This tutorial will show you how to enable the Black Market Nuke superweapon in Generals.
First of all open the file FactionBuilding.ini located in Data\INI\Object. Find this bit of code:
Code:
DisplayName = OBJECT:CommandCenter
Side = GLA
Under that entry find this line:
Code:
; *** ENGINEERING Parameters ***
This defines the special parameters for this building. Under this section add this code:
Code:
Behavior = OCLSpecialPower ModuleTag_12
SpecialPowerTemplate = SuperweaponBlackMarketNuke
OCL = SUPERWEAPON_BlackMarketNuke
CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
End
Behavior = CommandSetUpgrade ModuleTag_22
CommandSet = GLACommandCenterBlackMarketNukeCommandSet
TriggeredBy = Upgrade_GLABlackMarketNuke
End
Save the file and close it. Now open CommandSet.ini located in Data\INI. Add this code:
Code:
CommandSet GLACommandCenterBlackMarketNukeCommandSet
1 = Command_ConstructGLAWorker
5 = Command_Ambush
7 = Command_AnthraxBomb
8 = Command_BlackMarketNuke
9 = Command_EmergencyRepair
11 = Command_SetRallyPoint
12 = Command_Sell
End
Now find this:
Code:
CommandSet GLABlackMarketCommandSet
1 = Command_UpgradeGLAAPBullets
2 = Command_UpgradeGLAAPRockets
3 = Command_UpgradeGLAJunkRepair
4 = Command_UpgradeGLABuggyAmmo
5 = Command_UpgradeGLARadarVanScan
12 = Command_Sell
End
Change it to:
Code:
CommandSet GLABlackMarketCommandSet
1 = Command_UpgradeGLAAPBullets
2 = Command_UpgradeGLAAPRockets
3 = Command_UpgradeGLAJunkRepair
4 = Command_UpgradeGLABuggyAmmo
5 = Command_UpgradeGLARadarVanScan
6 = Command_UpgradeGLABlackMarketNuke
12 = Command_Sell
End
Save the file and close it. Now open CommandButton.ini located in Data\INI. Add this code:
Code:
CommandButton Command_BlackMarketNuke
Command = SPECIAL_POWER
SpecialPower = SuperweaponBlackMarketNuke
Options = NEED_TARGET_POS CONTEXTMODE_COMMAND NEED_UPGRADE
Upgrade = Upgrade_GLABlackMarketNuke
TextLabel = GUI:SuperweaponBlackMarketNuke
ButtonImage = SNNukeLaunch
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:TooltipFireBlackMarketNuke
RadiusCursorType = NUCLEARMISSILE
InvalidCursorName = GenericInvalid
End
CommandButton Command_UpgradeGLABlackMarketNuke
Command = PLAYER_UPGRADE
Upgrade = Upgrade_GLABlackMarketNuke
TextLabel = CONTROLBAR:UpgradeGLABlackMarketNuke
ButtonImage = SNNukeLaunch
ButtonBorderType = UPGRADE
DescriptLabel = CONTROLBAR:ToolTipGLAUpgradeBlackMarketNuke
End
Save the file and close it. Now open SpecialPower.ini located in Data\INI. Find this:
Code:
SpecialPower SuperweaponBlackMarketNuke
Enum = SPECIAL_BLACK_MARKET_NUKE
ReloadTime = 600000 ; in milliseconds. min is 2x door/open close time!
RequiredScience = SCIENCE_BlackMarketNuke
PublicTimer = Yes
SharedSyncedTimer = Yes
ViewObjectDuration = 30000
ViewObjectRange = 250
RadiusCursorRadius = 100
End
Change it to:
Code:
SpecialPower SuperweaponBlackMarketNuke
Enum = SPECIAL_BLACK_MARKET_NUKE
ReloadTime = 360000
PublicTimer = No
InitiateSound = AirRaidSiren
InitiateAtLocationSound = AirRaidSiren
SharedSyncedTimer = Yes
ViewObjectDuration = 30000
ViewObjectRange = 250
RadiusCursorRadius = 100
End
Save the file and close it. Now open Upgrade.ini located in Data\INI. Add this code:
Code:
Upgrade Upgrade_GLABlackMarketNuke
DisplayName = UPGRADE:BlackMarketNuke
BuildTime = 60.0
BuildCost = 3500
ButtonImage = SNNukeLaunch
End
Save the file, close it and you're done. You have now successfully enabled the Black Market Nuke superweapon.