最高指挥官2独立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.

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 = "uXXXX

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

UnitBlueprint {
   Merge = true,
   BlueprintId = "ucb020-- 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
ld
   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',
   },

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 = "ucb020-- Cybran Shield
eld
   Defense = {
   Health = 3000,
   MaxHealth = 3000,
   RegenRate = 8,
   Shield = {
   ShieldMaxHealth = 10000,
   ShieldRechargeTime = 10,
   },
   Economy = {
   BuildTime = 70,
   Ener

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.
http://forums.gaspowered.com/viewtopic.php?f=19&t=50438
最高指挥官2独立MOD修改教程原地址:
http://www.moddb.com/mods/revamp-mod/tutorials/how-to-make-a-stand-alone-mod
谷歌在线译文;
http://translate.googleusercontent.com/translate_c?rurl=translate.google.com.hk&sl=en&tl=zh-CN&u=http://www.moddb.com/mods/revamp-mod/tutorials/how-to-make-a-stand-alone-mod&usg=ALkJrhidvRPm6X1U5gYwnlaPSxhz5WwHsg

:soso_e179::soso_e179::soso_e179::soso_e179:期待已久~!

除了被阉割的部分,其他和一代相同……

我想问下楼主,加载在2代里的1代MOD,有架放在万古科技树内的瑟拉芬T4轰炸机在攻击时没有攻击效果,只会在天上飞,是哪个文件需要修改和添加?

:6_282: