Science SCIENCE_GLAArtilleryBarrage1 PrerequisiteSciences = SCIENCE_GLA SCIENCE_Rank3 SciencePurchasePointCost = 1 IsGrantable = Yes DisplayName = SCIENCE:ChinaArtilleryBarrage Description = CONTROLBAR:ToolTipChinaScienceArtilleryBarrage End Science SCIENCE_GLAArtilleryBarrage2 PrerequisiteSciences = SCIENCE_GLAArtilleryBarrage1 SCIENCE_Rank3 SciencePurchasePointCost = 1 IsGrantable = Yes DisplayName = SCIENCE:ChinaArtilleryBarrage2 Description = CONTROLBAR:ToolTipChinaScienceArtilleryBarrage End Science SCIENCE_GLAArtilleryBarrage3 PrerequisiteSciences = SCIENCE_GLAArtilleryBarrage2 SCIENCE_Rank3 SciencePurchasePointCost = 1 IsGrantable = Yes DisplayName = SCIENCE:ChinaArtilleryBarrage3 Description = CONTROLBAR:ToolTipChinaScienceArtilleryBarrage End
; ----------------------------------------------------------------------------- SpecialPower SuperweaponGLAArtilleryBarrage Enum = SPECIAL_NAPALM_STRIKE ReloadTime = 300000 ; in milliseconds. min is 2x door/open close time! RequiredScience = SCIENCE_GLAArtilleryBarrage1 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 SUPERWEAPON_GLAArtilleryBarrage1 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_GLAArtilleryBarrage2 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_GLAArtilleryBarrage3 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 Command_PurchaseScienceGLAArtilleryBarrage1 Command = PURCHASE_SCIENCE Science = SCIENCE_GLAArtilleryBarrage1 ButtonImage = SSBarrage ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is End CommandButton Command_PurchaseScienceGLAArtilleryBarrage2 Command = PURCHASE_SCIENCE Science = SCIENCE_GLAArtilleryBarrage2 ButtonImage = SSBarrage2 ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is End CommandButton Command_PurchaseScienceGLAArtilleryBarrage3 Command = PURCHASE_SCIENCE Science = SCIENCE_GLAArtilleryBarrage3 ButtonImage = SSBarrage3 ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is End CommandButton Command_GLAArtilleryBarrage Command = SPECIAL_POWER SpecialPower = SuperweaponGLAArtilleryBarrage Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND Science = SCIENCE_GLAArtilleryBarrage1 SCIENCE_GLAArtilleryBarrage2 SCIENCE_GLAArtilleryBarrage3 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_GLAArtilleryBarrageFromShortcut Command = SPECIAL_POWER_FROM_SHORTCUT SpecialPower = SuperweaponGLAArtilleryBarrage Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND Science = SCIENCE_GLAArtilleryBarrage1 SCIENCE_GLAArtilleryBarrage2 SCIENCE_GLAArtilleryBarrage3 TextLabel = CONTROLBAR:NoHotKeyArtilleryBarrage ButtonImage = SSBarrage DescriptLabel = CONTROLBAR:TooltipFireArtilleryBarrage RadiusCursorType = ARTILLERYBARRAGE InvalidCursorName = GenericInvalid End
CommandSet SCIENCE_GLA_CommandSetRank3 1 = Command_PurchaseScienceHijacker 4 = Command_PurchaseScienceRebelAmbush1 5 = Command_PurchaseScienceRebelAmbush2 6 = Command_PurchaseScienceRebelAmbush3 7 = Command_PurchaseScienceCashBounty1 8 = Command_PurchaseScienceCashBounty2 9 = Command_PurchaseScienceCashBounty3 10 = Command_PurchaseScienceEmergencyRepair1 11 = Command_PurchaseScienceEmergencyRepair2 12 = Command_PurchaseScienceEmergencyRepair3 13 = Command_PurchaseScienceGLAArtilleryBarrage1 14 = Command_PurchaseScienceGLAArtilleryBarrage2 15 = Command_PurchaseScienceGLAArtilleryBarrage3 END[/code]Next is the sidebar shortcut button, which goes in SpecialPowerShortcutGLA.[code]CommandSet SpecialPowerShortcutGLA 1 = Command_AmbushFromShortcut 2 = Command_EmergencyRepairFromShortcut 3 = Command_AnthraxBombFromShortcut 4 = Command_ScudStormFromShortcut 5 = Command_RadarVanScanFromShortcut 6 = Command_SneakAttackFromShortcut 7 = Command_GPSScramblerFromShortcut 8 = Command_GLAArtilleryBarrageFromShortcut END[/code]Finally, you should add the normal firing CommandButton the the GLA Command Center's CommandSet.[code]CommandSet GLACommandCenterCommandSet 1 = Command_ConstructGLAWorker 4 = Command_GPSScrambler 5 = Command_Ambush 6 = Command_EmergencyRepair 7 = Command_AnthraxBomb 8 = Command_SneakAttack 9 = Command_GLAArtilleryBarrage 13 = Command_SetRallyPoint 14 = Command_Sell End[/code]Remember that all 3 CommandSets already exist and should not be created anew. [*]Step 6: Now you'll need to edit the GLA Command Center itself so that it can support the new Artillery Barrage. Copying code that already works is the best way to do this, so search for "Object ChinaCommandCenter" in \Object\FactionBuilding.ini and then search for "ModuleTag_17". Copy the associated block of code (all 7 line's worth, the entire module) and then search for "Object GLACommandCenter". Scroll down to the end of that Object's code and paste your copied code slightly above the unindented "End" statement. Give your new module a name, because the fun part is about to begin. The module you just copied had several references to the original Artillery Barrage code, and you'll need to update all of them in order to have the new Artillery Barrage work properly ingame.[code]Object GLACommandCenter ... Behavior = OCLSpecialPower ModuleTag_GLAArtilleryBarrage SpecialPowerTemplate = SuperweaponGLAArtilleryBarrage UpgradeOCL = SCIENCE_GLAArtilleryBarrage3 SUPERWEAPON_GLAArtilleryBarrage3 UpgradeOCL = SCIENCE_GLAArtilleryBarrage2 SUPERWEAPON_GLAArtilleryBarrage2 OCL = SUPERWEAPON_GLAArtilleryBarrage1 CreateLocation = CREATE_AT_EDGE_FARTHEST_FROM_TARGET End ... End
The C&C Labs Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies. More Details Close