Post tutorial Report RSS How to make a stand alone mod

This short Tutorial will show you how to make a stand alone mod for changing unit stats (Health, Cost, Build Time, Damage), that will work with any version or mod for SupCom 2, This is useful if you wish to make your own style of game play with your own balance with out editing the core files.

Posted by on - Basic Starting a mod

Things that are changeable by Merging
Any think with in the bp
• Unit stats (Health, Cost, Build Time, Damage)
• Weapons (projectile changes)

Software needed
• Winrar
• Notepad

Folders Needed
• uncompiled_lua.scd\units
• z_uncompiled_lua_dlc1.scd\mods\DLC1\base\Units

Both scd are located in your gamedata folder in your steam folder
Default path
C:\Program Files\Steam\SteamApps\common\supreme commander 2\gamedata

!!!A Template Mod is available in the download selection it will give you your base to start off on!!!
INFO ABOUT THE TEMPLATE MOD IS ON THE DOWNLOAD PAGE.

Ok you want to start off by making a new folder named units

Now you will need to open up the uncompiled_lua.scd using Winrar so you can find each unit you wish to change. Once you have it open navigate to units and copy the whole folder out to desktop or any were you wish it to be now once you have done that you can close the uncompiled_lua.scd its no longer needed now navigat to a "faction" and the unit ID you would like to modify. Here's an example:
\Units\Cybran\UCB0202

This is a Unit, Cybran, Building. 0202 refers to Shield Generators. UUB0202 is for the UEF Shield Generator. UIB0202 is for the Illuminate Shield Generator.

Open up the UCB0202.bp with notepad. Now open up a new txt with notepad. You can also look at the units.bp online on the SC2 wikia by clicking on the bp link under the units name and picture Supcom2.wikia.com

Now comes the coding start of with the following in your new txt file you started

UnitBlueprint {
   Merge = true,
   BlueprintId = "uXXXXXX",

The BlueprintId needs to be the same as the folder ID of the unit so mine will be ucb0202 exp:

UnitBlueprint {
   Merge = true,
   BlueprintId = "ucb0202", -- Cybran Shield

The -- just means the engine skips anything written after it. This is useful to add unit names so you can easily remember them if you wish to make changes in the future.

Caps DO matter in most cases, so make sure you copy or type this code exactly.

All ways start off with the 1st three lines of the code above. UnitBlueprint { tells the engine its a unit.bp file that's being opened and Merge = true, will tell the engine to use your modified values over the original values and the BlueprintId is the id of the unit or structure

The first is what is the definition of each value of the original code, so that each piece of code you adjust provide the in game modification you desire. Thankfully, someone has made a Wiki page for these values and defined almost every one for you:
Supcom2.wikia.com

Now you want to look back to the file your going to be using as a template. The unit.bp file you opened out of the folder you copied from the uncompiled_lua.scd. You want to copy the parts you wish to change as you can see below how it all goes together.

UnitBlueprint {
   BlueprintId = "ucb0202",  -- Cybran Shield
    Defense = {
        AirThreatLevel = 10,
        EconomyThreatLevel = 5,
        Health = 1500,
        MaxHealth = 1500,
        RegenRate = 4,
        Shield = {
            AllowPenetration = true,
            CollisionOffsetY = -4,
            CollisionShape = 'Sphere',
            ImpactEffects = 'ShieldHit01',
            Mesh = '/meshes/Shield/Shield02_mesh',
            PanelArray = {
                Panel_1 = '/meshes/Shield/ShieldDomeSection03_mesh',
                Panel_2 = '/meshes/Shield/ShieldDomeSection04_mesh',
            },
            ShieldDamageAbsorb = 0.85,
            ShieldMaxHealth = 8000,
            ShieldRechargeTime = 40,
            ShieldRegenRate = 80,
            ShieldSize = 42,
            ShieldType = 'Panel',
        },
    Economy = {
        BuildTime = 40,
        CaptureTimeMult = 0.6,
        EnergyValue = 750,
        MassValue = 300,
    },
}

I'm going to be changing the Defense and Economy ill be showing you how to change the Weapons later on. Note the = } , {. Do NOT remove or change these. They're needed so the engine can read each part of a units bp. All you really need to know about them is { is a open in the code, } is a close in the code. For each open there need to be a close. The , tells the engine that it is not the final close } in the bp. You can see by the last close on the bp there won't be a , this is because its the final close that responds with the very 1st open {.

If there unneeded code you can remove it like so just keep in what you wish to change nothing else.

exp:

UnitBlueprint {
   Merge = true,
   BlueprintId = "ucb0202", -- Cybran Shield
    Defense = {
        Health = 3000,
        MaxHealth = 3000,
        RegenRate = 8,
        Shield = {
            ShieldMaxHealth = 10000,
            ShieldRechargeTime = 10,
        },
    Economy = {
        BuildTime = 70,
        EnergyValue = 950,
        MassValue = 410,
    },
}

As you can see above im made my changes and i have removed the PanelArray = { with the close }, and the other values because i wont be changing these.

Now for the weapon code. We will move on to a different unit that has more than 1 weapon. Let's use the fatboy 2. By looking at its unit.bp file, you will see it has 5 weapons so you will need to the following code, so the engine reads which weapon your wishing to change, If you're changing only the first weapon all you need is this exp:

Weapons = {
        {
            Damage = 1000,
        },
    },

Im only changing the 1st weapons damage so this show you all that's needed, Ok so you want to change not the 1st but only the 5th here a example showing you how this is done.
exp:

Weapons = {
        [5] = {
            Damage = 1000,
        },
    },

You can see before our 2nd open we have a [5] = this is telling the engine its weapon 5 we are changing once again im only changing the damage so Damage = 1000, is all i need to be there.

Now to continue on changing other units you just start of again under the last close of the perverse unit
exp:

UnitBlueprint {
   Merge = true,
   BlueprintId = "ucb0202", -- Cybran Shield
    Defense = {
        Health = 3000,
        MaxHealth = 3000,
        RegenRate = 8,
        Shield = {
            ShieldMaxHealth = 10000,
            ShieldRechargeTime = 10,
        },
    Economy = {
        BuildTime = 70,
        EnergyValue = 950,
        MassValue = 410,
    },
}
UnitBlueprint {
   Merge = true,
   BlueprintId = "ucl0204",   -- Adaptor
    Defense = {
        Health = 560,
        MaxHealth = 560,
        Shield = {
            ShieldDamageAbsorb = 0.8,
            ShieldMaxHealth = 850,
            ShieldRegenRate = 2,
        },
    },
    Economy = {
        EnergyValue = 185,
        MassValue = 65,
    },
}

After you have finished all your changes and you want to use your modifications save the file in side the unit folder you created earlier, Name it what every you wish but make sure you save it with a extension of .bp now create a new .scd file. Use winrar to perform the following: right click on your units folder, add to archive, rename it to whatever you like (don't use spaces or it won't be read correctly and make sure it has the .scd file extension).
exp: mymod.scd

If you wish to make future changes all you need to do is open up you mod.scd and reopen you unit.bp file and edited it from there by closing it from with in your mod.scd winrar will ask you if you wish to update the file just click yes and you new changes will be applied.

To run your mod, place the mod file in the SupCom2 'gamedata' folder.

To disable your mod, remove the mod file from the SupCom2 'gamedata' folder.

If you wish to edit the DLC, it is done in the same way. The files are located in a different .scd (z_uncompiled_lua_dlc1.scd) under 2 file paths of
\mods\DLC1\base\Units
\mods\DLC1\shadow\Units
you will need to create 2 more bp files in theses locations you will have to make your changes again to the shadowed units make sure you name your DLC merge bp files starting with Z.

MERGING UNITS THAT ARE IN THE REVAMP EXPANSION MOD
This is also possible its done in the exactly the same way as the DLC crate a 2nd merge bp file make sure it has z at the start of it exp: z_mybalance.bp and its goes into units not into the DLC units folders.

Any questions just ask

Tutorial Written by OverRated

If your after more info about how this type of mod works and how to merge ability's a full run though can be found here.

How To Use Blueprint Merges

Post comment Comments
DevlinXIII
DevlinXIII - - 18 comments

Thumbs up for this tutorial, great to get you started on modding ^_^

Reply Good karma Bad karma+5 votes
OverRated Author
OverRated - - 2,885 comments

Improved the Tutorial added things i missed to make it easier for every one to read.

Reply Good karma+5 votes
Fordekash
Fordekash - - 4 comments

I unzipped
uncompiled_lua.scd\units
Opened
\Units\uncompiled\Units\UEF\UUB0701
Opened
UUB0701_unit.bp
Changed line
ProductionPerSecondMass = 1.2,
to
ProductionPerSecondMass = 10000,
Saved the file, then used winrar to compile
\Units folder as mymod.scd
Installed into
C:\Program Files (x86)\Steam\SteamApps\common\supreme commander 2\gamedata
However, when I build mass extractor with UEF it still only generates 1.2 mass.
Can you help me?
I also noticed the original uncompiled_lua.scd\units file size is over 7kb and my “re-rared” file is 6.8kb
I also tried compiling the \uncompiled. As well tried deleting the uncompiled_lua.scd\units and uncompiled_lua.scd\units.sdi files but mass extractor still only generates 1.2 mass.

Reply Good karma Bad karma+1 vote
Fordekash
Fordekash - - 4 comments

It apears that I used uncompiled_lua and not uncompiled_lua.scd. My uncompiled_lua.scd file shows as a "ENC file" and apearently I can not open this. I am not able to open uncompiled_lua.scd (the enc file) with winRAR or winZIP. Any sugestions on opeing the ENC file? Apperently oping the uncompiled_lua does not work.

Reply Good karma Bad karma+1 vote
OverRated Author
OverRated - - 2,885 comments

The get the units IDs and stats just open up the uncompiled_lua.scd for normal units and the z_uncompiled_lua_dlc1.scd for DLC and shadowed units, The ENC files doesn't need to be opened. To see how the merge mod works i have added a Template Mod to the download selection.

Reply Good karma+2 votes
godlywill21
godlywill21 - - 22 comments

How can I change the color of the multiplayer for the colors of the camping that blue of UEF and the red and yelow of the Cybran camping?

Reply Good karma Bad karma+1 vote
Fordekash
Fordekash - - 4 comments

The template in the download section totaly worked! This post told me how to do it I just wasn't paying enought attention to figure it out. Anyways, thanks for the help I am excited agin to play the game!

Reply Good karma Bad karma+1 vote
coldsoap
coldsoap - - 2 comments

where i can download it?

Reply Good karma Bad karma+1 vote
Holyhelmet
Holyhelmet - - 5 comments

Doesn't want to work for me.
-------------------------------
UnitBlueprint {
Merge = true,
BlueprintId = "uib0701",
Economy = {
BuildTime = 25,
EnergyValue = 500,
MassValue = 200,
ProductionPerSecondMass = 5000,
},
}

saved it in units called helmet.bp, right clicked on the units folder and added to archive saved as mymod.scd and put it in the gamedata folder and nothing is differen when playing the game

Reply Good karma Bad karma+1 vote
OverRated Author
OverRated - - 2,885 comments

Are you using the template mod or creating a new scd make sure its in zip format and if your running it with the balance mod name yours higher so just add a z to the front of the name so Z_helmet.scd apart from that your merge is fine.

Reply Good karma+1 vote
TheOmegaPyro
TheOmegaPyro - - 391 comments

what if i wanted to make a new unit, and not replace the original, what do i do and how do i make it on the menu

Reply Good karma Bad karma+1 vote
Snaptrap
Snaptrap - - 1 comments

Why doesn't it accept direct edits to the bp files? I tried doing this for SC1 but it doesn't work. I prefer to make direct edits and then delete the mod by overwriting with original backups. I edited the health of my unit except there were no changes so obviously the game is getting it's stats from somewhere else besides these files.

Reply Good karma Bad karma+1 vote
drich147
drich147 - - 10 comments

Hmm, would it be possible to make it so that the commander can build basic units?

Reply Good karma Bad karma+1 vote
JONAGOLD
JONAGOLD - - 11 comments

Ive made a mod with more resource income. its compatible with DLC (havent checked for vanilla) and partly with revamp.
When using the 'resource' mod with the revamp mod, the energy generator and the research generator both generate the income stated by the resource mod, but mass extractors generate 2.0 mass (i guess whats stated in revamp). Any one know a solution?
Btw, i use the template mod and the mod manager :)

Reply Good karma Bad karma+1 vote
jac197
jac197 - - 2 comments

how do you know what unit is what i mean when its coded how can you find out

Reply Good karma Bad karma+1 vote
jac197
jac197 - - 2 comments

can you mod engineers

Reply Good karma Bad karma+1 vote
godlywill21
godlywill21 - - 22 comments

How do i use the template mod?It keep giving error when i try to open with the mod maneger, the mod maneger sucks it dont work in my coputer it say that are many errors like path not specifyed and other stuff...

Reply Good karma Bad karma+1 vote
godlywill21
godlywill21 - - 22 comments

How do i use the template mod?It keep giving error when i try to open with the mod maneger, the mod maneger sucks it dont work in my coputer it say that are many errors like path not specifyed and other stuff...

Reply Good karma Bad karma+1 vote
godlywill21
godlywill21 - - 22 comments

How do i change the colors!!!!

Reply Good karma Bad karma+1 vote
Viaknar
Viaknar - - 12 comments

Ok, I am trying to get the radar to give vision as well. I have tried using this tut >>>https://code.google.com/p/madface-revamp/wiki/ResearchTreeModding<<<<< for research tree editing, but when ever i try to start a game with the mod it crashes, i even tried just adding it to another mod. I am doing something wrong and I can't figure out what.

Reply Good karma Bad karma+1 vote
masterx285
masterx285 - - 30 comments

im stuck at Name it what every you wish but make sure you save it with a extension of .bp now create a new .scd file. what is a .scd file. i dont know what thats means

Reply Good karma Bad karma+1 vote
masterx285
masterx285 - - 30 comments

is there a video tutorial of this i just do not understand i did all the steps it still does not want to work.

Reply Good karma Bad karma+1 vote
mikeshadow7979
mikeshadow7979 - - 12 comments

hey when using the Alt-2 function for unit spawn command, i noticed that i can spawn a number of custom units from the campaign like warehouses and facility's. i want to be able to spawn cybran warehouses but its not in the list. is there a way i can add the cybran warehouses to be spawn-able with Alt-2.

Reply Good karma Bad karma+1 vote
OverRated Author
OverRated - - 2,885 comments

The spawn menu covers all units if you cant find it its probably named different.

Reply Good karma+1 vote
mikeshadow7979
mikeshadow7979 - - 12 comments

hey revamp, how do you change the scaling of the units, i found the file "EffectScale.Lua" but it has no effect when i change it. or am i changing the wrong file?

Reply Good karma Bad karma+1 vote
Guest
Guest - - 687,512 comments

This comment is currently awaiting admin approval, join now to view.

Guest
Guest - - 687,512 comments

This comment is currently awaiting admin approval, join now to view.

Overlord8
Overlord8 - - 1 comments

Any idea what prevents from editing the original units stats? I mean, not creating a mod, but tweaking stats in the game itself? I have changed some units health and damage but when I play the game, they are as they used to be. And for example, in the files for Kraken the HP is 30 000, yet in the game it is 45 000. Without doing any changes at all. And if I change Kraken to 60 000, it is still 45 000. I also changed the values in shadow folder so I'm at a loss. Where does the game really take its information for unit values from?

Reply Good karma Bad karma+1 vote
coldsoap
coldsoap - - 2 comments

where is download page???
im newb with this site

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: