Posted by: Mabus2018 - Sunday, January 7, 2018 7:34:21 PM
Hi guys, I'm in need of some modding help for C&C Zero Hour. What I'm basically trying to do is give the Boss General the ability to use the American Paradrop. The below tutorial by CommieDog gives the GLA the ability to use the Chinese ArtilleryBarrage, but due to the Boss General not being one of the three regular sides, it appears that a different approach is needed when it comes to what code to clone (and where). http://www.cnclabs.com/modding/generals/creating-a-new-generals-power.aspx) Any help would be greatly appreciated.

Posted by: Unknown Editor - Monday, January 8, 2018 4:26:45 AM
Well it just needs some regular things with a little Change ... For Core INI file : Data\INI\CommandSet.ini Change "Boss_ChinaCommandCenterCommandSet" [code=plain]CommandSet Boss_ChinaCommandCenterCommandSet 1 = Boss_Command_ConstructChinaDozer 3 = Command_Paradrop 5 = Command_ArtilleryBarrage 6 = Command_EMPPulse 7 = Command_ClusterMines 8 = Command_SpectreGunship 9 = Command_SneakAttack 10 = Command_ChinaCarpetBomb 11 = Command_UpgradeChinaRadar 12 = Command_UpgradeChinaMines 13 = Command_SetRallyPoint 14 = Command_Sell End[/code] Data\INI\Object\BossGeneral.ini Add the Code Somewhere inside "Boss_CommandCenter" modules . Specially under W3D Draw modules . [code=plain] Behavior = OCLSpecialPower ModuleTag_ParaDrop SpecialPowerTemplate = SuperweaponParadropAmerica UpgradeOCL = SCIENCE_Paradrop3 SUPERWEAPON_Paradrop3 UpgradeOCL = SCIENCE_Paradrop2 SUPERWEAPON_Paradrop2 OCL = SUPERWEAPON_Paradrop1 CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE OCLAdjustPositionToPassable = Yes ; Not on Cliffs or in Water End[/code] For map.ini : [code=plain] CommandSet Boss_ChinaCommandCenterCommandSet 1 = Boss_Command_ConstructChinaDozer 3 = Command_Paradrop 5 = Command_ArtilleryBarrage 6 = Command_EMPPulse 7 = Command_ClusterMines 8 = Command_SpectreGunship 9 = Command_SneakAttack 10 = Command_ChinaCarpetBomb 11 = Command_UpgradeChinaRadar 12 = Command_UpgradeChinaMines 13 = Command_SetRallyPoint 14 = Command_Sell End Object Boss_CommandCenter AddModule Behavior = OCLSpecialPower ModuleTag_ParaDrop SpecialPowerTemplate = SuperweaponParadropAmerica UpgradeOCL = SCIENCE_Paradrop3 SUPERWEAPON_Paradrop3 UpgradeOCL = SCIENCE_Paradrop2 SUPERWEAPON_Paradrop2 OCL = SUPERWEAPON_Paradrop1 CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE OCLAdjustPositionToPassable = Yes ; Not on Cliffs or in Water End End End[/code] Then to use with script you'll just need to do the Following : Scripts\Unit\CommandButton\Use command Button ability at a waypoint [quote]*** IF *** True. *** THEN *** Unit '' use Ability 'Command_Paradrop' at Waypoint 'Drop_Here'.[/quote] And to use it by yourself , You will of course need the Science : Scripts\Player\Science\Grant a Science to a Given Player Grant all 3 for 20 rangers , as you sure know [wink] [quote]*** IF *** True. *** THEN *** Player '' is granted Science 'SCIENCE_InfantryParadrop1'. Player '' is granted Science 'SCIENCE_InfantryParadrop2'. Player '' is granted Science 'SCIENCE_InfantryParadrop3'. [/quote]

Posted by: Mabus2018 - Monday, January 8, 2018 11:45:12 PM
[quote=Unknown Editor;146913]Well it just needs some regular things with a little Change ... To use with script you'll just need to do the Following : Scripts\Unit\CommandButton\Use command Button ability at a waypoint [quote]*** IF *** True. *** THEN *** Unit '' use Ability 'Command_Paradrop' at Waypoint 'Drop_Here'.[/quote] And to use it by yourself , You will of course need the Science : Scripts\Player\Science\Grant a Science to a Given Player Grant all 3 for 20 rangers , as you sure know [wink] [quote]*** IF *** True. *** THEN *** Player '' is granted Science 'SCIENCE_InfantryParadrop1'. Player '' is granted Science 'SCIENCE_InfantryParadrop2'. Player '' is granted Science 'SCIENCE_InfantryParadrop3'. [/quote] [/quote] Thanks for your help. Just two questions. 1. For Map.ini, I could seem to find this in any of the folders. Does this step require creating a new file called Map.ini and pasting the code in there? 2. In Script.ini, do I replace the existing code for those two sections verbatim with the one you've posted, or does this sit underneath the existing code? Thanks

Posted by: Unknown Editor - Tuesday, January 9, 2018 1:55:19 AM
map.ini is a file of course , you must place it in your map folder . And past this codes inside of it Scripts are in your World builder in edit section and you must find the script you want and set properties for how it works .

Posted by: Mabus2018 - Tuesday, January 9, 2018 6:06:32 AM
Okay, nearly there. Just one last obstacle: From what I've determined I should be accessing a folder called 'TeamSkirmish' in World Builder > Edit > Scripts (which should appear in addition to other folders like 'Neutral', 'Plyrcivilian, etc) but the only folder in Scripts appears to be 'Neutral'. Where do I find the TeamSkirmish folder? Obviously once I'm in there and paste the code I'll be in the clear, so help with this last step would be greatly appreciated!

Posted by: Mabus2018 - Wednesday, January 17, 2018 2:33:25 PM
After reading through the ZH WorldBuilder Tutorial, it doesn't seem to show where to locate: 'Scripts\Unit\CommandButton\Use command Button ability at a waypoint' and enter a script into it. Can someone please point me to where exactly I can locate this within WorldBuilder? I've added the skismish players, etc, but in terms of getting to that part mentioned above, it's a dead end.

Posted by: UTD^Force - Friday, January 19, 2018 3:53:45 AM
[img]https://scontent-frx5-1.xx.fbcdn.net/v/t1.0-9/26731777_1475284522584301_2787795120741810120_n.jpg?oh=3f82751627660b6a8f5c8283b04c7bb2&oe=5AE0436B[/img]

Posted by: Mabus2018 - Friday, January 19, 2018 5:57:15 AM
That's exactly what I need! I'm just having trouble navigating to this point. I notice that in the first Scripts window there are a whole bunch of folders. I take it you added all of the skirmish players/Generals, but where do I go from there, and how do I apply the script to that Command Button?

Posted by: UTD^Force - Friday, January 19, 2018 6:28:47 AM
[img=https://scontent-frx5-1.xx.fbcdn.net/v/t1.0-9/26993851_1475400155906071_8584793520698721055_n.jpg?oh=a9aab580dd0a600c8c4742251cf9303e&oe=5AE84E26]1[/img] [img=https://scontent-frx5-1.xx.fbcdn.net/v/t1.0-9/26734007_1475401112572642_7333627163934181920_n.jpg?oh=8d1d97eb83c1170d9927197c0878bc3d&oe=5AEA9C8D]2[/img] [img=https://scontent-frx5-1.xx.fbcdn.net/v/t1.0-9/26907668_1475401115905975_3414263283599134290_n.jpg?oh=94ba804f631747de7b4c4d9dd631875e&oe=5AEC3983]3[/img]

Posted by: Mabus2018 - Friday, January 19, 2018 7:03:14 AM
This has been a great starting point, thank you! I notice that the Boss General (who I want to add the Paradrop ability for) is missing from that list. I guess the first thing I'll need to do is add the Boss General to that list, but it doesn't appear in the available options. Is there a way to add the Boss General in this list so I can make the edit?

Posted by: UTD^Force - Friday, January 19, 2018 7:09:20 AM
Are you doing this for a map or a mod? Edit: I think [url=http://klingondragon.uk/generals/mods/boss]this[/url] might help.

Posted by: Mabus2018 - Saturday, January 20, 2018 3:53:37 AM
Does it make a difference? (sorry, I'm a little new to all of this). I was trying to achieve the Boss Paradrop by making changes in the Rules.ini, Commandset, etc files in the Data/INI folder. However, another user in this same thread gave me some very helpful instructions but also told me that the last step in the process required editing the Boss General's script in ZH WorldBuilder.

Posted by: UTD^Force - Saturday, January 20, 2018 11:57:12 PM
If you are willing to make a skirmish AI for BossGeneral, it's a mod and it will take more time if you're new. (Follow the link above, Klingondragon's boss mod will help) If you want the AI to use American paradrop in one map, it will be very much easier. Edit: and in both cases, worldbuiler is needed.

Posted by: Mabus2018 - Sunday, January 21, 2018 12:56:54 AM
I appreciate you letting me know. There is a map I use much more often than the others. If I wanted my (Boss) General to use the American paradrop for one map only, what is the process? I figure that it's something like the below: 1. Add the Boss General to the list of Generals/Skirmish players in WorldBuilder (this is something I need some help with). 2. Open Scripts and edit the script using the code that I was given 3. Save and use the map I edited to see the changes. Please correct me if I'm wrong (thank you for your help so far)

Posted by: UTD^Force - Sunday, January 21, 2018 10:21:27 AM
You can do this without changing .ini files, you can add another AI player FactionAmerica, which has the paradrop already, grant the paradrop science to this player and place an american command center owned by this player and set a timer to expire after sometime. Then, transfer all this player's assets to the AI boss and set a script so the command center that was [u]previously owned by America AI[/u],[b] which is now owned by AI boss[/b], to use the paradrop ability at a certain waypoint. This way the infantry from the paradrop will be owned by the boss general. :3 [code=plain] Script #1 *** IF *** True. *** THEN *** Set timer '123' to expire in 2.00 seconds. Player 'America AI' is granted Science 'SCIENCE_Paradrop1'. ======================================================================================================== Script #2 *** IF *** Timer '123' has expired. *** THEN *** All assets of Player 'America AI' are transferred to Player 'Boss AI' Set timer '12' to expire in 2.00 seconds. ======================================================================================================== Script #3 *** IF *** Timer '12' has expired. *** THEN *** Unit 'America Command Center' use Ability 'Command_Paradrop' at Waypoint 'Waypoint 1'. [/code]

Posted by: Mabus2018 - Monday, January 22, 2018 4:02:03 AM
Thank you! I was wondering why the Boss General didn't appear in the list of Skirmish Players in WorldBuilder. So I take it that adding the FactionAmerica side is basically in lieu of the Boss General (which doesn't appear anyway). I'll give this a try and see how I go. Thanks for being so patient!

Posted by: UTD^Force - Monday, January 22, 2018 4:48:20 AM
Alright, not a problem. Do not hesitate to ask about issues that you can't solve.