Hello everyone,
this is my very first post, since I'm new to Generals / ZH modding. I searched the forums but could not find a solution for my issue.
I followed the 'Creating a New General's Power' guide made by CommieDog, except I added the artillery barrage to the USA Superweapon General instead of GLA and I switched science rank 3 to 1 for testing purposes - results with rank 3 are the same.
I followed the guide to the letter, but the weapon will not fire. When I click the button in the CC I get the correct RadiusCursorType ARTILLERYBARRAGE but in the middle the GenericInvalid cursor. Also the the shortcut button won't show up.
Can anyone please point out to me what I am missing?
Code:
Science.ini
Science SCIENCE_USAArtilleryBarrage1
PrerequisiteSciences = SCIENCE_AMERICA SCIENCE_Rank1
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = SCIENCE:ChinaArtilleryBarrage
Description = CONTROLBAR:ToolTipChinaScienceArtilleryBarrage
End
Science SCIENCE_USAArtilleryBarrage2
PrerequisiteSciences = SCIENCE_USAArtilleryBarrage1 SCIENCE_Rank1
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = SCIENCE:ChinaArtilleryBarrage2
Description = CONTROLBAR:ToolTipChinaScienceArtilleryBarrage
End
Science SCIENCE_USAArtilleryBarrage3
PrerequisiteSciences = SCIENCE_USAArtilleryBarrage2 SCIENCE_Rank1
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = SCIENCE:ChinaArtilleryBarrage3
Description = CONTROLBAR:ToolTipChinaScienceArtilleryBarrage
End
SpecialPower.ini
;-----------------------------------------------------------------------------
SpecialPower SuperweaponUSAArtilleryBarrage
Enum = SPECIAL_NAPALM_STRIKE
ReloadTime = 300000 ; in milliseconds. min is 2x door/open close time!
RequiredScience = SCIENCE_USAArtilleryBarrage1
InitiateSound = FireArtilleryCannonSound
PublicTimer = No
SharedSyncedTimer = Yes
ViewObjectDuration = 30000
ViewObjectRange = 250
RadiusCursorRadius = 125
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
ObjectCreationList.ini
; -----------------------------------------------------------------------------
; -----------------------------------------------------------------------------
ObjectCreationList SUPERWEAPON_USAArtilleryBarrage1
DeliverPayload
Transport = ChinaArtilleryCannon
FormationSize = 12
FormationSpacing = 1.0
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1 ;max attempts
DeliveryDistance = 250 ;distance from target allowed to start/stop dropping.
WeaponErrorRadius = 100 ; how bad the artillerist is
DelayDeliveryMax = 3000 ; his delayed reaction to "Fire!"
VisibleItemsDroppedPerInterval = 1 ;Drops two bombs at a time
VisibleDropBoneBaseName = RootTransform ;The bombs are created and dropped at this bone base
VisibleSubObjectBaseName = Bomb ;The bombs are visible until dropped.
VisibleNumBones = 1 ;Number of bones.
VisiblePayloadTemplateName = ChinaArtilleryBarrageShell ;Created when payload is dropped.
VisiblePayloadWeaponTemplate = ArtilleryBarrageDamageWeapon
InheritTransportVelocity = Yes ;The bombs will start at transport velocity.
ExitPitchRate = 30 ;The bomb will pitch down.
SelfDestructObject = Yes ; so the delivery vehicle goes away 'POP!'
DeliveryDecalRadius = 125
DeliveryDecal
Texture = SCCArtilleryBarrage_China
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:156 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End
; -----------------------------------------------------------------------------
; -----------------------------------------------------------------------------
ObjectCreationList SUPERWEAPON_USAArtilleryBarrage2
DeliverPayload
Transport = ChinaArtilleryCannon
FormationSize = 24
FormationSpacing = 1.0
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1 ;max attempts
DeliveryDistance = 250 ;distance from target allowed to start/stop dropping.
WeaponErrorRadius = 100 ; how bad the artillerist is
DelayDeliveryMax = 3000 ; his delayed reaction to "Fire!"
VisibleItemsDroppedPerInterval = 1 ;Drops two bombs at a time
VisibleDropBoneBaseName = RootTransform ;The bombs are created and dropped at this bone base
VisibleSubObjectBaseName = Bomb ;The bombs are visible until dropped.
VisibleNumBones = 1 ;Number of bones.
VisiblePayloadTemplateName = ChinaArtilleryBarrageShell ;Created when payload is dropped.
VisiblePayloadWeaponTemplate = ArtilleryBarrageDamageWeapon
InheritTransportVelocity = Yes ;The bombs will start at transport velocity.
ExitPitchRate = 30 ;The bomb will pitch down.
SelfDestructObject = Yes ; so the delivery vehicle goes away 'POP!'
DeliveryDecalRadius = 125
DeliveryDecal
Texture = SCCArtilleryBarrage_China
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:156 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End
; -----------------------------------------------------------------------------
; -----------------------------------------------------------------------------
ObjectCreationList SUPERWEAPON_USAArtilleryBarrage3
DeliverPayload
Transport = ChinaArtilleryCannon
FormationSize = 36
FormationSpacing = 1.0
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1 ;max attempts
DeliveryDistance = 250 ;distance from target allowed to start/stop dropping.
WeaponErrorRadius = 100 ; how bad the artillerist is
DelayDeliveryMax = 3000 ; his delayed reaction to "Fire!"
VisibleItemsDroppedPerInterval = 1 ;Drops two bombs at a time
VisibleDropBoneBaseName = RootTransform ;The bombs are created and dropped at this bone base
VisibleSubObjectBaseName = Bomb ;The bombs are visible until dropped.
VisibleNumBones = 1 ;Number of bones.
VisiblePayloadTemplateName = ChinaArtilleryBarrageShell ;Created when payload is dropped.
VisiblePayloadWeaponTemplate = ArtilleryBarrageDamageWeapon
InheritTransportVelocity = Yes ;The bombs will start at transport velocity.
ExitPitchRate = 30 ;The bomb will pitch down.
SelfDestructObject = Yes ; so the delivery vehicle goes away 'POP!'
DeliveryDecalRadius = 125
DeliveryDecal
Texture = SCCArtilleryBarrage_China
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:156 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End
CommandButton.ini:
CommandButton Command_USAArtilleryBarrage
Command = SPECIAL_POWER
SpecialPower = SuperweaponUSAArtilleryBarrage
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
Science = SCIENCE_USAArtilleryBarrage1 SCIENCE_USAArtilleryBarrage2 SCIENCE_USAArtilleryBarrage3 ;These will cause the buttons to change icons, nothing more
TextLabel = CONTROLBAR:ArtilleryBarrage
ButtonImage = SSBarrage
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:TooltipFireArtilleryBarrage
RadiusCursorType = ARTILLERYBARRAGE
InvalidCursorName = GenericInvalid
End
CommandButton Command_USAArtilleryBarrageFromShortcut
Command = SPECIAL_POWER_FROM_SHORTCUT
SpecialPower = SuperweaponUSAArtilleryBarrage
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
Science = SCIENCE_USAArtilleryBarrage1 SCIENCE_USAArtilleryBarrage2 SCIENCE_USAArtilleryBarrage3 ;These will cause the buttons to change icons, nothing more
TextLabel = CONTROLBAR:NoHotKeyArtilleryBarrage
ButtonImage = SSBarrage
;ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:TooltipFireArtilleryBarrage
RadiusCursorType = ARTILLERYBARRAGE
InvalidCursorName = GenericInvalid
End
CommandButton Command_PurchaseScienceUSAArtilleryBarrage1
Command = PURCHASE_SCIENCE
Science = SCIENCE_USAArtilleryBarrage1
ButtonImage = SSBarrage
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
End
CommandButton Command_PurchaseScienceUSAArtilleryBarrage2
Command = PURCHASE_SCIENCE
Science = SCIENCE_USAArtilleryBarrage2
ButtonImage = SSBarrage2
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
End
CommandButton Command_PurchaseScienceUSAArtilleryBarrage3
Command = PURCHASE_SCIENCE
Science = SCIENCE_USAArtilleryBarrage3
ButtonImage = SSBarrage3
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
End
CommandSet.ini:
CommandSet SupW_SCIENCE_AMERICA_CommandSetRank3
1 = Command_PurchaseSciencePathfinder
3 = Early_Command_PurchaseScienceLeafletDrop
4 = Command_PurchaseScienceParadrop1
5 = Command_PurchaseScienceParadrop2
6 = Command_PurchaseScienceParadrop3
7 = Command_PurchaseScienceA10ThunderboltMissileStrike1
8 = Command_PurchaseScienceA10ThunderboltMissileStrike2
9 = Command_PurchaseScienceA10ThunderboltMissileStrike3
10 = Command_PurchaseScienceUSAArtilleryBarrage1
11 = Command_PurchaseScienceUSAArtilleryBarrage2
12 = Command_PurchaseScienceUSAArtilleryBarrage3
14 = Command_PurchaseScienceSpectreGunship1
15 = Command_PurchaseScienceSpectreGunship2
END
CommandSet SupW_SpecialPowerShortcutUSA
1 = Command_SpyDroneFromShortcut
2 = Command_USAArtilleryBarrageFromShortcut
3 = Command_A10ThunderboltMissileStrikeFromShortcut
4 = Command_NeutronMissileFromShortcut
5 = Command_DaisyCutterFromShortcut
6 = Command_SpySatelliteScanFromShortcut
7 = SupW_Command_FireParticleUplinkCannonFromShortcut
8 = AirF_Command_SpectreGunshipFromShortcut
9 = Command_ScudStormFromShortcut
10 = Command_CIAIntelligenceFromShortcut
11 = AirF_Command_CarpetBombFromShortcut
12 = Early_Command_LeafletDropFromShortcut
13 = Command_EmergencyRepairFromShortcut
14 = Command_ParadropFromShortcut
CommandSet SupW_AmericaCommandCenterCommandSet
1 = SupW_Command_ConstructAmericaDozer
2 = AirF_Command_SpectreGunship
3 = Command_USAArtilleryBarrage
4 = Early_Command_LeafletDrop
5 = Command_A10ThunderboltMissileStrike
6 = Command_Paradrop
7 = Command_SpyDrone
8 = Command_EmergencyRepair
9 = Command_DaisyCutter
10 = Command_SpySatelliteScan
11 = Demo_Command_ConstructGLAWorker
12 = Nuke_Command_ConstructChinaDozer
13 = Command_SetRallyPoint
14 = Command_Sell
End
Object\SuperweaponGeneral.ini:
Behavior = OCLSpecialPower ModuleTag_USAArtilleryBarrage
SpecialPowerTemplate = SuperweaponUSAArtilleryBarrage
UpgradeOCL = SCIENCE_USAArtilleryBarrage3 SUPERWEAPON_USAArtilleryBarrage3
UpgradeOCL = SCIENCE_USAArtilleryBarrage2 SUPERWEAPON_USAArtilleryBarrage2
OCL = SUPERWEAPON_USAArtilleryBarrage1
CreateLocation = CREATE_AT_EDGE_FARTHEST_FROM_TARGET
End
Edited by user Wednesday, September 27, 2023 7:43:04 PM(UTC)
| Reason: Not specified