Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
Hi all,

I'm trying to mod the Boss General to include the USA's 'SuperweaponMOAB'

The MOAB appears as an option/upgrade in the Strategy Center, but I'm trying to find a way to make this ability available to the Boss General.

Can someone outline a step-by-step process for achieving this?

Any help would be greatly appreciated.
Sponsor
Zatsupachi
7 years ago
Do you want to go straight for MOAB?

If yes:


Just add this to your command center

  Behavior           = OCLSpecialPower ModuleTag_20
    SpecialPowerTemplate = SuperweaponMOAB ;SuperweaponDaisyCutter
    OCL                  = SUPERWEAPON_MOAB
    CreateLocation       = CREATE_AT_EDGE_NEAR_SOURCE
  End

Add these buttons to CommandButton.ini

CommandButton Command_MOAB
  Command           = SPECIAL_POWER
  SpecialPower      = SuperweaponMOAB
  Options           = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
  Science           = SCIENCE_MOAB ;These will cause the buttons to change icons, nothing more
  TextLabel         = CONTROLBAR:DaisyCutter
  ButtonImage       = SAMOAB
  ButtonBorderType  = ACTION 
  DescriptLabel     = CONTROLBAR:TooltipDaisyCutter
  RadiusCursorType  = DAISYCUTTER
  InvalidCursorName = GenericInvalid
End

CommandButton Command_MOABFromShortcut
  Command           = SPECIAL_POWER_FROM_SHORTCUT
  SpecialPower      = SuperweaponMOAB
  Options           = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
  Science           = SCIENCE_MOAB ;These will cause the buttons to change icons, nothing more
  TextLabel         = OBJECT:DaisyCutterBomb
  ButtonImage       = SAMOAB
;  ButtonBorderType  = ACTION 
  DescriptLabel     = CONTROLBAR:TooltipDaisyCutter
  RadiusCursorType  = DAISYCUTTER
  InvalidCursorName = GenericInvalid
End

Add those buttons to the command set of your command center and, your special power shortcut respectively.

Modify SCIENCE_MOAB. Or if you want to be safe, make a copy of SCIENCE_MOAB and make sure to replace all instance of SCIENCE_MOAB with the name of the copy.
The code inside should be the same.

Science SCIENCE_MOAB
  PrerequisiteSciences = SCIENCE_CHINA SCIENCE_RANK5 ;SCIENCE_AMERICA
  SciencePurchasePointCost = 1
  IsGrantable = Yes
  DisplayName = OBJECT:MOAB
  Description = CONTROLBAR:TooltipMOAB
End

Now, add this Commandbutton

CommandButton Command_PurchaseScienceMOAB
  Command           = PURCHASE_SCIENCE
  Science           = SCIENCE_MOAB
  ButtonImage       = SAMOAB                  
  TextLabel         = OBJECT:MOAB
  DescriptLabel     = CONTROLBAR:TooltipMOAB
End

Now add that button to the appropriate science commandset.


No, you want to be like how it normally goes:
You can just look at how vanilla America does it.
Go get the upgrade button from the Strategy Center and slap it on the appropriate commandset.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
Unknown Editor
7 years ago
NOTE : FOLLOWING GENERICALLY WORK FOR MAP.INI FILES

Step01 :
You'll need Daisy Cutter Purchase Button :
As such , You should include it here :

CommandSet Boss_SCIENCE_CHINA_CommandSetRank8
 1 = Command_PurchaseScienceEMPPulse
 2 = Command_PurchaseScienceSpectreGunship
 3 = Command_PurchaseScienceSneakAttack
 4 = Command_PurchaseScienceDaisyCutter
END

Step02 :
You'll need to make Daisy Cutter grantable for Boss , not only America .

CommandSet Boss_SCIENCE_CHINA_CommandSetRank8
 1 = Command_PurchaseScienceEMPPulse
 2 = Command_PurchaseScienceSpectreGunship
 3 = Command_PurchaseScienceSneakAttack
 4 = Command_PurchaseScienceDaisyCutter
END

Step02 :
You'll need to make Daisy Cutter grantable for Boss , not only America .

SCIENCE_DaisyCutter
 PrerequisiteSciences = SCIENCE_AMERICA SCIENCE_Rank5
End
So , Just Delete SCIENCE_AMERICA from the Prerequisites ...

SCIENCE_DaisyCutter
 PrerequisiteSciences = SCIENCE_Rank5
End

Step02 :
You'll need to make Daisy Cutter grantable for Boss , not only America .

SCIENCE_DaisyCutter
 PrerequisiteSciences = SCIENCE_AMERICA SCIENCE_Rank5
End
So , Just Delete SCIENCE_AMERICA from the Prerequisites ...

SCIENCE_DaisyCutter
 PrerequisiteSciences = SCIENCE_Rank5
End

Step03 :
You'll need to include the MOAB upgrade somewhere VALID in Boss Structures ...
I think Particle Cannon is the thing :
A. go and check "INI\Object\BossGeneral.ini" and find out "Boss_ParticleCannonUplink" .
B. Look if it does have "ProductionUpdate" ; This update is required for any Construction or Upgrade .
- This Structure does have it but if you want to apply this to another which doesn't have , You can sure Apply the Following code

SCIENCE_DaisyCutter
 PrerequisiteSciences = SCIENCE_Rank5
End

Step03 :
You'll need to include the MOAB upgrade somewhere VALID in Boss Structures ...
I think Particle Cannon is the thing :
A. go and check "INI\Object\BossGeneral.ini" and find out "Boss_ParticleCannonUplink" .
B. Look if it does have "ProductionUpdate" ; This update is required for any Construction or Upgrade .
- This Structure does have it but if you want to apply this to another which doesn't have , You can sure Apply the Following code

SCIENCE_DaisyCutter
 PrerequisiteSciences = SCIENCE_AMERICA SCIENCE_Rank5
End

C. After Validating "ProductionUpdate" You'll need to add MOAB Upgrade button to structure .
So , Check for the CommandSet in ***DESIGN parameters *** of Object .
Boss_ParticleCannonUplink's is "Boss_AmericaParticleUplinkCannonCommandSet"

D. Check INI\CommandSet.ini for CommandSet , Then Add the Upgrade button to an empty place of CommandSet or You can also Replace it with what you think is no Neccessary .

Object NAME
 AddModule
  Behavior = ProductionUpdate ModuleTag_Productive
  ; The module above is required to allow Object Construct units or Upgrade .
  End
 End
End

C. After Validating "ProductionUpdate" You'll need to add MOAB Upgrade button to structure .
So , Check for the CommandSet in ***DESIGN parameters *** of Object .
Boss_ParticleCannonUplink's is "Boss_AmericaParticleUplinkCannonCommandSet"

D. Check INI\CommandSet.ini for CommandSet , Then Add the Upgrade button to an empty place of CommandSet or You can also Replace it with what you think is no Neccessary .

CommandSet Boss_AmericaParticleUplinkCannonCommandSet
  1 = Command_FireParticleUplinkCannon
  4 = Command_UpgradeAmericaSentryDroneGun
  5 = Command_UpgradeAmericaMOAB
  6 = Command_UpgradeAmericaCompositeArmor
  8 = Command_UpgradeAmericaAdvancedTraining
 12 = Command_UpgradeChinaMines
 14 = Command_Sell
End

E. Add GrantScienceUpgrade to Grant "SCIENCE_MOAB" for Player upon the Upgrade .

CommandSet Boss_AmericaParticleUplinkCannonCommandSet
  1 = Command_FireParticleUplinkCannon
  4 = Command_UpgradeAmericaSentryDroneGun
  5 = Command_UpgradeAmericaMOAB
  6 = Command_UpgradeAmericaCompositeArmor
  8 = Command_UpgradeAmericaAdvancedTraining
 12 = Command_UpgradeChinaMines
 14 = Command_Sell
End

E. Add GrantScienceUpgrade to Grant "SCIENCE_MOAB" for Player upon the Upgrade .

Boss_ParticleCannonUplink
 AddModule
  Behavior      = GrantScienceUpgrade ModuleTag_MOABScienceGrant
   GrantScience = SCIENCE_MOAB
   TriggeredBy  = Upgrade_AmericaMOAB
  End
 End
End

Step04 :
You'll need SPECIAL POWER Support in your Command Center and Shortcut list .
To Display Daisy cutter or MOAB in Shortcut , Easily add the Button to CommandSet :

CommandSet SpecialPowerShortcutBoss
  1 = Command_ClusterMinesFromShortcut
  2 = Command_ChinaCarpetBombFromShortcut
  3 = Command_ArtilleryBarrageFromShortcut
  4 = Command_EMPPulseFromShortcut
  5 = Command_SpectreGunshipFromShortcut
  6 = Command_SneakAttackFromShortcut
  7 = Command_FireParticleUplinkCannonFromShortcut
  8 = Command_ScudStormFromShortcut
  9 = Command_NeutronMissileFromShortcut
 10 = Command_DaisyCutterFromShortcut
END

Step04 :
You'll need SPECIAL POWER Support in your Command Center and Shortcut list .
To add the Support to Command Center (Can not be deployed without) Which can be other Structures too but requires the settings :
A. Add the OCLSpecialPower Module to the structure :

Object Boss_CommandCenter
 AddModule
  Behavior           = OCLSpecialPower ModuleTag_DaisyCutter
   SpecialPowerTemplate = SuperweaponDaisyCutter
   OCL                  = SUPERWEAPON_DaisyCutter
   UpgradeOCL           = SCIENCE_MOAB SUPERWEAPON_MOAB
   CreateLocation       = CREATE_AT_EDGE_NEAR_SOURCE
  End
 End
End

B. Setup the IN-Structure CommandSet , To make the availbility of Commanding Daisycutter of MOAB from a Specific Structure .

CommandSet Boss_ChinaCommandCenterCommandSet
  1 = Boss_Command_ConstructChinaDozer
  3 = Command_DaisyCutter
  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

Also To Display Daisy cutter or MOAB in Shortcut , Easily add the Button to CommandSet :

CommandSet SpecialPowerShortcutBoss
  1 = Command_ClusterMinesFromShortcut
  2 = Command_ChinaCarpetBombFromShortcut
  3 = Command_ArtilleryBarrageFromShortcut
  4 = Command_EMPPulseFromShortcut
  5 = Command_SpectreGunshipFromShortcut
  6 = Command_SneakAttackFromShortcut
  7 = Command_FireParticleUplinkCannonFromShortcut
  8 = Command_ScudStormFromShortcut
  9 = Command_NeutronMissileFromShortcut
 10 = Command_DaisyCutterFromShortcut
END

5. Have fun and Report me if this doesn't work properly which requires my Full Apology .
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%
Annihilationzh
7 years ago

NOTE : FOLLOWING GENERICALLY WORK FOR MAP.INI FILES

Originally Posted by: Unknown Editor 



Been a while since I last did this, but IIRC you can simplify all that with just this:

CommandSet Boss_SCIENCE_CHINA_CommandSetRank8
 4 = Command_PurchaseScienceDaisyCutter
End

CommandSet SpecialPowerShortcutBoss
 10 = Command_DaisyCutterFromShortcut
End

CommandSet Boss_AmericaParticleUplinkCannonCommandSet
  5 = Command_UpgradeAmericaMOAB
End

CommandSet Boss_ChinaCommandCenterCommandSet
  3 = Command_DaisyCutter
End

Object Boss_CommandCenter
 AddModule
  Behavior           = OCLSpecialPower ModuleTag_DaisyCutter
   SpecialPowerTemplate = SuperweaponDaisyCutter
   OCL                  = SUPERWEAPON_DaisyCutter
   UpgradeOCL           = SCIENCE_MOAB SUPERWEAPON_MOAB
   CreateLocation       = CREATE_AT_EDGE_NEAR_SOURCE
  End
 End
End

Step02 is entirely unnecessary - the boss is already considered american.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Unknown Editor
7 years ago
Oh , I knew it . I totally forgot to include GrantScienceUpgrade
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
7 years ago
Ok, it worked! Thanks guys, I appreciate your help.
Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
Hey guys, a quick question. The fuel-air bomb works fine, but when the MOAB upgrade becomes available in the Particle Uplink Cannon, the button doesn't appear on the right side of the screen as an actionable button. What have I missed?
Unknown Editor
7 years ago
-- Would you please confirm one of this :
1. When You Upgrade the Button is still "Full air Bomb" not "MOAB" .
2. When you Upgrade the Button disappears .
3. When you Upgrade the Button doesn't change it's Image .
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
7 years ago

-- Would you please confirm one of this :
1. When You Upgrade the Button is still "Full air Bomb" not "MOAB" .

Originally Posted by: Unknown Editor 



The MOAB button doesn't disappear from the Particle Uplink Cannon upgrades, as such. After the timer gets to the end and it's been 'purchased', it just appears dimmed out like the other upgrades that have been purchased.

I can still use the Fuel-Air Bomb. It just seems like somewhere in the mod's steps, whatever it is that spawns the timer on the right side of the page hasn't worked.

Unknown Editor
7 years ago
Well I actually announced XD

I forgot to include GrantScienceUpgrade ; Sorry , My Fault .

Either use this for map.ini files :


CommandSet Boss_ChinaCommandCenterCommandSet
 3 = Command_DaisyCutter
End

CommandSet Boss_AmericaParticleUplinkCannonCommandSet
 5 = Command_UpgradeAmericaMOAB
End

CommandSet Boss_SCIENCE_CHINA_CommandSetRank8
 4 = Command_PurchaseScienceDaisyCutter
End

CommandSet SpecialPowerShortcutBoss
 10 = Command_DaisyCutterFromShortcut
End

Object Boss_CommandCenter
 AddModule
  Behavior              = OCLSpecialPower ModuleTag_DaisyCutter
   SpecialPowerTemplate = SuperweaponDaisyCutter
   OCL                  = SUPERWEAPON_DaisyCutter
   UpgradeOCL           = SCIENCE_MOAB SUPERWEAPON_MOAB
   CreateLocation       = CREATE_AT_EDGE_NEAR_SOURCE
  End
  Behavior              = GrantScienceUpgrade ModuleTag_UPScience
   GrantScience         = SCIENCE_MOAB
   TriggeredBy          = Upgrade_AmericaMOAB
  End
 End
End

or also add this to your modded commandcenter : (If you made a mod)


Behavior = GrantScienceUpgrade ModuleTag_UPScience
GrantScience = SCIENCE_MOAB
TriggeredBy = Upgrade_AmericaMOAB
End



Good Luck 😁👍
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
7 years ago
Perfect! It works now.

Thank you for all your help and patience guys, it's much appreciated.
Mabus2018
  • Mabus2018
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
Hey guys, one more thing.

Each time I deploy the MOAB I have to select the CommandCenter first. Shouldn't the MOAB button appear on the right side of the screen along with the ArtilleryBarrage, SpectorGunShip and so on? How do I make it appear there with the others?

AdrianeMapMaker
7 years ago
go to commandset.ini and find for word shortcut using ctrl f
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage