Posted by: NOP - Wednesday, July 13, 2011 12:29:24 AM
Im trying to make a new lvl 1 science for the china nuke gen which will unlock a new unit, "nuketankhunter" like the one from contra, but my game just crashes and the crashlog always has something to do with my new science, although its cloned from original ZH... Heres the code:
Science.INI
[code]
Science SCIENCE_NukeTankHunter
PrerequisiteSciences = SCIENCE_CHINA SCIENCE_Rank1
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = SCIENCE:USAPaladin
Description = CONTROLBAR:ToolTipUSASciencePaladin
End[/code]
commandbutton.INI
[code]CommandButton Nuke_Command_ConstructChinaInfantryNukeTankHunter
Command = UNIT_BUILD
Object = Nuke_ChinaInfantryNukeTankHunter
TextLabel = CONTROLBAR:ConstructNukeTankHunter
ButtonImage = SSTankKiller
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipNukeTankHunter
End
CommandButton Command_PurchaseScienceNukeTankHunter
Command = PURCHASE_SCIENCE
Science = SCIENCE_NukeTankHunter
Object = Nuke_ChinaInfantryNukeTankHunter ; AmericaTankPaladin
ButtonImage = SAPaladin
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
End
[/code]
Commandset.ini:
[code]CommandSet Nuke_SCIENCE_CHINA_CommandSetRank1
1 = Command_PurchaseScienceRedGuardTraining
2 = Command_PurchaseScienceArtilleryTraining
3 = Command_PurchaseScienceNukeTankHunter ; MINE!!!!! !!!!! !!!!! !!!!! !!!!!
4 = Early_Command_PurchaseScienceEmergencyRepair1
END
CommandSet Nuke_ChinaBarracksCommandSet
1 = Nuke_Command_ConstructChinaInfantryNUKERedguard
2 = Nuke_Command_ConstructChinaInfantryTankHunter
3 = Nuke_Command_ConstructChinaInfantryHacker
4 = Nuke_Command_ConstructChinaInfantryBlackLotus
5 = Nuke_Command_ConstructChinaInfantryNukeTankHunter
6 = Nuke_Command_UpgradeToNuclearBullets
7 = Command_UpgradeChinaRedguardCaptureBuilding
12 = Command_UpgradeChinaMines
13 = Command_SetRallyPoint
14 = Command_Sell
End[/code]
Unit code:
[code] Prerequisites
Object = Nuke_ChinaBarracks
Science = SCIENCE_NukeTankHunter
End[/code]
Any ideas for a solution?
Posted by: Annihilationzh - Wednesday, July 13, 2011 2:19:10 AM
Have you run world builder?
Posted by: NOP - Wednesday, July 13, 2011 2:24:31 AM
Just did, and I see your point... ;-) It tells me to define Science_China, so I'll start there and see... Ill post again later with the details....
Posted by: NOP - Wednesday, July 13, 2011 2:52:10 AM
Okay, so it turns out everything was done correctly EXCEPT that the science i defined in science.ini had to be moved down on the list.... I thought i didnt matter what order things were defined in the inis... Live and learn!!!!
Posted by: Annihilationzh - Wednesday, July 13, 2011 3:01:38 AM
Try putting a locomotor before the AI update on a unit.
That's one of the first things you learn when messing with map.inis. The second you replace an AIUpdate, units stop moving.