What am I missing??
I'm simply adding an Emperor Tank Paradrop to the Infantry General side for Zero Hour. No mod, just my own amusement, but I have hit a snag. I'm hoping someone here can help.
This is what I have so far:
Added to Infa_ChinaCommandCenter in INFANTRYGENERAL.INI
Code:
Behavior = OCLSpecialPower ModuleTag_20
SpecialPowerTemplate = Infa_SuperweaponTankParadrop
OCL = Infa__SUPERWEAPON_TankParadrop
CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
OCLAdjustPositionToPassable = Yes ;Like RA2, shift target to passable cell so we don't land in water and on cliffs.
End
COMMANDBUTTON.INI
Code:
CommandButton Infa_Command_PurchaseScienceTankParadrop
Command = PURCHASE_SCIENCE
Science = SCIENCE_Infa_TankParadrop
ButtonImage = SSTankDrop
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
End
CommandButton Infa_Command_TankParadrop
Command = SPECIAL_POWER
SpecialPower = Infa_SuperweaponTankParadrop
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
Science = SCIENCE_Infa_TankParadrop
TextLabel = CONTROLBAR:TankParadrop
ButtonImage = SSTankDrop
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:TooltipTankParaDrop
RadiusCursorType = PARADROP
InvalidCursorName = GenericInvalid
End
CommandButton Infa_Command_TankParadropFromShortcut
Command = SPECIAL_POWER_FROM_SHORTCUT
SpecialPower = Infa_SuperweaponTankParadrop
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
Science = SCIENCE_Infa_TankParadrop
TextLabel = GUI:SuperweaponTankParadrop
ButtonImage = SSTankDrop
;ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:TooltipTankParaDrop
RadiusCursorType = PARADROP
InvalidCursorName = GenericInvalid
End
COMMANDSET.INI
Code:
CommandSet Infa_SCIENCE_CHINA_CommandSetRank3
1 = Command_PurchaseScienceClusterMines
2 = Infa_Command_PurchaseScienceTankParadrop
3 = Infa_Command_PurchaseScienceCarpetBomb
4 = Command_PurchaseScienceNapalmBarrage1
5 = Command_PurchaseScienceNapalmBarrage2
6 = Command_PurchaseScienceNapalmBarrage3
7 = Command_PurchaseScienceEmergencyRepair1
8 = Command_PurchaseScienceEmergencyRepair2
9 = Command_PurchaseScienceEmergencyRepair3
10 = Early_Command_PurchaseScienceFrenzy2
11 = Early_Command_PurchaseScienceFrenzy3
END
CommandSet Infa_SpecialPowerShortcutChina
1 = Command_ClusterMinesFromShortcut
2 = Command_NapalmBarrageFromShortcut
3 = Infa_Command_ParadropFromShortcut
4 = Command_EmergencyRepairFromShortcut
5 = Infa_Command_EMPPulseFromShortcut
6 = Command_Infa_NeutronMissileFromShortcut
7 = Infa_Command_ChinaCarpetBombFromShortcut
8 = Early_Command_FrenzyFromShortcut
9 = Infa_Command_NapalmStrikeFromShortcut
10 = Infa_Command_TankParadropFromShortcut
END
CommandSet Infa_ChinaCommandCenterCommandSet
1 = Infa_Command_ConstructChinaDozer
2 = Infa_Command_ChinaCarpetBomb
3 = Infa_Command_Paradrop
4 = Command_ClusterMines
5 = Infa_Command_TankParadrop
7 = Command_EmergencyRepair
8 = Infa_Command_EMPPulse
9 = Command_UpgradeChinaRadar
10 = Early_Command_Frenzy
12 = Command_UpgradeChinaMines
13 = Command_SetRallyPoint
14 = Command_Sell
End
CommandSet Infa_ChinaCommandCenterCommandSetUpgrade
1 = Infa_Command_ConstructChinaDozer
2 = Infa_Command_ChinaCarpetBomb
3 = Infa_Command_Paradrop
4 = Command_ClusterMines
5 = Infa_Command_TankParadrop
7 = Command_EmergencyRepair
8 = Infa_Command_EMPPulse
9 = Command_UpgradeChinaRadar
12 = Command_UpgradeEMPMines
13 = Command_SetRallyPoint
14 = Command_Sell
End
OBJECTCREATIONLIST.INI
Code:
; -----------------------------------------------------------------------------
; -----------------------------------------------------------------------------
ObjectCreationList Infa_SUPERWEAPON_TankParadrop
DeliverPayload
Transport = Infa_ChinaJetCargoPlane
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 4
DropOffset = X:0 Y:0 Z:-10
DropDelay = 80 ; time in between each item dropped (if more than one)
ParachuteDirectly = No ; will tell all contained parachutes to go ahead and bunch
PutInContainer = LargeParachute
Payload = Infa_ChinaTankEmperor 1
DeliveryDistance = 0 ;when outbound vehicle must be this close to target to continue delivery
PreOpenDistance = 300 ;When inbound, vehicle can be this much farther than DeliveryDistance to begin delivery
DeliveryDecalRadius = 50
DeliveryDecal
Texture = SCCParadrop_USA
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:227 G:229 B:22 A:255
OnlyVisibleToOwningPlayer = Yes
End
;RequiresLivePlayer = Yes ; I want to require a live player, but I'll settle for dropping neutral rangers instead
End
DeliverPayload
Transport = Infa_ChinaJetCargoPlane
StartAtPreferredHeight = Yes
StartAtMaxSpeed = No
MaxAttempts = 4
DropOffset = X:0 Y:0 Z:-10
DropDelay = 80 ; time in between each item dropped (if more than one)
ParachuteDirectly = No ; will tell all contained parachutes to go ahead and bunch
PutInContainer = LargeParachute
Payload = Infa_ChinaTankEmperor 1
DeliveryDistance = 0 ;when outbound vehicle must be this close to target to continue delivery
PreOpenDistance = 300 ;When inbound, vehicle can be this much farther than DeliveryDistance to begin delivery
DeliveryDecalRadius = 50
DeliveryDecal
Texture = SCCParadrop_USA
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:227 G:229 B:22 A:255
OnlyVisibleToOwningPlayer = Yes
End
;RequiresLivePlayer = Yes ; I want to require a live player, but I'll settle for dropping neutral rangers instead
End
End
(note that 'Infa_ChinaTankEmperor' is the right name for the payload and 'Infa_ChinaJetCargoPlane' is the right name for the transport as taken from INFANTRYGENERAL.INI)
SCIENCE.INI
Code:
Science SCIENCE_Infa_TankParadrop
PrerequisiteSciences = SCIENCE_CHINA SCIENCE_Rank3
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = SCIENCE:ChinaTankParadrop1
Description = CONTROLBAR:ToolTipChinaScienceTankParadrop
End
SPECIALPOWER.INI
Code:
SpecialPower Infa_SuperweaponTankParadrop
Enum = SPECIAL_TANK_PARADROP
ReloadTime = 5000 ; in milliseconds
RequiredScience = SCIENCE_Infa_TankParadrop
PublicTimer = No
SharedSyncedTimer = Yes
RadiusCursorRadius = 50
ShortcutPower = Yes ;Capable of being fired by the side-bar shortcut.
AcademyClassify = ACT_SUPERPOWER ;Considered a powerful special power that a player could fire. Not for simpler unit based powers.
End
The result is that the game loads fine and I can start a skirmish or challenge game. I can purchase the science and the shortcut icon appears on the side of the screen. I can select that icon and it gives me the target enum then when I left click to fire it disappears and reloads. I can do it time and time again, but no enum is left on the map and nothing is delivered. What am I doing wrong?
Thank you.