Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
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.





Sponsor
Unknown Editor
8 years ago
Well it just needs some regular things with a little Change ...

For Core INI file :

Data\INI\CommandSet.ini

Change "Boss_ChinaCommandCenterCommandSet"

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

Data\INI\Object\BossGeneral.ini

Add the Code Somewhere inside "Boss_CommandCenter" modules .
Specially under W3D Draw modules .

  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


For map.ini :


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

Then to use with script you'll just need to do the Following :

Scripts\Unit\CommandButton\Use command Button ability at a waypoint

*** IF ***
True.
*** THEN ***
Unit '' use Ability 'Command_Paradrop' at Waypoint 'Drop_Here'.




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 😉

*** IF ***
True.
*** THEN ***
Player '' is granted Science 'SCIENCE_InfantryParadrop1'.
Player '' is granted Science 'SCIENCE_InfantryParadrop2'.
Player '' is granted Science 'SCIENCE_InfantryParadrop3'.



Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago

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

*** IF ***
True.
*** THEN ***
Unit '' use Ability 'Command_Paradrop' at Waypoint 'Drop_Here'.

Originally Posted by: Unknown Editor 




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 😉

*** IF ***
True.
*** THEN ***
Player '' is granted Science 'SCIENCE_InfantryParadrop1'.
Player '' is granted Science 'SCIENCE_InfantryParadrop2'.
Player '' is granted Science 'SCIENCE_InfantryParadrop3'.





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
Unknown Editor
8 years ago
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 .
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
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!
Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
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.
UTD^Force
8 years ago
Is this what you need?

UserPostedImage

A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
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?

UTD^Force
8 years ago
Do you mean how to make a script?

UserPostedImage
UserPostedImage
UserPostedImage


If this isn't what you need, please explain to me 🙂 (I'm not very good with English)
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
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?
UTD^Force
8 years ago
Are you doing this for a map or a mod?

Edit: I think this  might help.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
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.

UTD^Force
8 years ago
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.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
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)
UTD^Force
8 years ago
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 previously owned by America AI, which is now owned by AI boss, to use the paradrop ability at a certain waypoint.
This way the infantry from the paradrop will be owned by the boss general. :3

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'.

A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
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!
UTD^Force
8 years ago
Alright, not a problem.
Do not hesitate to ask about issues that you can't solve.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs