Jump to content


Photo

How to edit superweapons / specialweapons in ZH


  • Please log in to reply
14 replies to this topic

#1 Aznboy1993

Aznboy1993
  • Members
  • 11 posts

Posted 27 December 2009 - 03:37 AM

Hi, I am a semi-noob and modding who is teaching himself but I have stumbled across a problem that I cannot overcome and I would like some help. My question is how do you change the weapon used for a superweapon (ie. nuclear missile) or general's power (ie. carpet bomb)? For example let's say that I want to change air force general's carpet bomber to fire a nuclear missile instead of the conventional carpet bombs. How do I do this?

Thanks!~
Aznboy

#2 Gen.Kenobi

Gen.Kenobi

    I'm a doc, not an...

  • Undead
  • 1,429 posts
  • Location:Brazil
  • Projects:Survive Med School
  •  Your Doc
  • Division:Revora
  • Job:Hosting Admin

Posted 29 December 2009 - 08:30 PM

Well, first of all welcome the Revora Creative Community & to CnC Guild.

To edit Superweapons you need to edit the SpecialPower.ini file. If you wish to edit the objects that will carry the superweapon, like the American B-3 jet, you need to edit the SpecialPowerObjects.ini .
Now to change weapons, you need to take a look into Weapons.ini file :good:

Hope that helps and happy modding! Any more questions feel free to post !


-Gen.Kenobi

kudos to Pasidon for this awesome avvy and siggy!


#3 Aznboy1993

Aznboy1993
  • Members
  • 11 posts

Posted 02 January 2010 - 11:35 PM

Well, first of all welcome the Revora Creative Community & to CnC Guild.

To edit Superweapons you need to edit the SpecialPower.ini file. If you wish to edit the objects that will carry the superweapon, like the American B-3 jet, you need to edit the SpecialPowerObjects.ini .
Now to change weapons, you need to take a look into Weapons.ini file :)

Hope that helps and happy modding! Any more questions feel free to post !


-Gen.Kenobi


Hi, thank you for your welcoming and informative response. I really appreciate it. I now have figured out how to change the nuke to be like the one in ShockWave mod, Rise of Red, and Contra. I also have figured out scud storm damage but not particle beam. How particle beam damage be changed?

OK another question. I give you specific example to help little.

Here is my Science.ini for SWG carpet bombing...

Science SupW_SCIENCE_CarpetBomb1
PrerequisiteSciences = SCIENCE_AMERICA SCIENCE_Rank3
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = SCIENCE:SupWCarpetBomb1
Description = CONTROLBAR:ToolTipChinaScienceCarpetBomb
End

Science SupW_SCIENCE_CarpetBomb2
PrerequisiteSciences = SupW_SCIENCE_CarpetBomb1
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = SCIENCE:SupWCarpetBomb2
Description = CONTROLBAR:ToolTipChinaScienceCarpetBomb
End

Science SupW_SCIENCE_CarpetBomb3
PrerequisiteSciences = SupW_SCIENCE_CarpetBomb2
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = SCIENCE:SupWCarpetBomb3
Description = CONTROLBAR:ToolTipChinaScienceCarpetBomb
End


In my SpecialPower.ini I have a carpet bomb for Super Weapon General. It look like this...

SpecialPower SuperweaponCarpetBombSWG
Enum = SPECIAL_CARPET_BOMB
ReloadTime = 480000 ; in milliseconds (8:00)
RequiredScience = SupW_SCIENCE_CarpetBomb1
PublicTimer = No
SharedSyncedTimer = Yes
ViewObjectDuration = 45000
ViewObjectRange = 225
RadiusCursorRadius = 200
ShortcutPower = Yes
AcademyClassify = ACT_SUPERPOWER
End


It is like A10 so it have 1, 2, and 3 upgrade. On number 3 the bomb is delivered by 3 B3 bombers. In my SpeciaPowerObjects.ini I have B3...

Object AmericaJetB3

; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
ParticlesAttachedToAnimatedBones = Yes
DefaultConditionState
Model = AVB2
ParticleSysBone = Engine01 JetBlackTrailThin
ParticleSysBone = Engine02 JetBlackTrailThin
ParticleSysBone = WingTip01 JetContrailThin
ParticleSysBone = WingTip02 JetContrailThin
ParticleSysBone = WingTip03 JetContrailThin
ParticleSysBone = WingTip04 JetContrailThin
End
ConditionState = DAMAGED
Model = AVB2_D
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Engine01 JetBlackTrailThin
ParticleSysBone = Engine02 JetBlackTrailThin
ParticleSysBone = Engine03 JetBlackTrailThin
ParticleSysBone = Engine04 JetBlackTrailThin
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
End
ConditionState = REALLYDAMAGED
Model = AVB2_D
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Engine01 JetBlackTrailThin
ParticleSysBone = Engine02 JetBlackTrailThin
ParticleSysBone = Engine03 JetBlackTrailThin
ParticleSysBone = Engine04 JetBlackTrailThin
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
End

ConditionState = DOOR_1_OPENING
Model = AVB2
ParticleSysBone = Engine01 JetBlackTrailThin
ParticleSysBone = Engine02 JetBlackTrailThin
ParticleSysBone = WingTip01 JetContrailThin
ParticleSysBone = WingTip02 JetContrailThin
ParticleSysBone = WingTip03 JetContrailThin
ParticleSysBone = WingTip04 JetContrailThin
Animation = AVB2.AVB2
AnimationMode = ONCE
End
ConditionState = DAMAGED DOOR_1_OPENING
Model = AVB2_D
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Engine01 JetBlackTrailThin
ParticleSysBone = Engine02 JetBlackTrailThin
ParticleSysBone = Engine03 JetBlackTrailThin
ParticleSysBone = Engine04 JetBlackTrailThin
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
Animation = AVB2_D.AVB2_D
AnimationMode = ONCE
End
ConditionState = REALLYDAMAGED DOOR_1_OPENING
Model = AVB2_D
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Engine01 JetBlackTrailThin
ParticleSysBone = Engine02 JetBlackTrailThin
ParticleSysBone = Engine03 JetBlackTrailThin
ParticleSysBone = Engine04 JetBlackTrailThin
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
Animation = AVB2_D.AVB2_D
AnimationMode = ONCE
End

ConditionState = DOOR_1_CLOSING
Model = AVB2
ParticleSysBone = Engine01 JetBlackTrailThin
ParticleSysBone = Engine02 JetBlackTrailThin
ParticleSysBone = WingTip01 JetContrailThin
ParticleSysBone = WingTip02 JetContrailThin
ParticleSysBone = WingTip03 JetContrailThin
ParticleSysBone = WingTip04 JetContrailThin
Animation = AVB2.AVB2
AnimationMode = ONCE_BACKWARDS
End
ConditionState = DAMAGED DOOR_1_CLOSING
Model = AVB2_D
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Engine01 JetBlackTrailThin
ParticleSysBone = Engine02 JetBlackTrailThin
ParticleSysBone = Engine03 JetBlackTrailThin
ParticleSysBone = Engine04 JetBlackTrailThin
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
Animation = AVB2_D.AVB2_D
AnimationMode = ONCE_BACKWARDS
End
ConditionState = REALLYDAMAGED DOOR_1_CLOSING
Model = AVB2_D
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Engine01 JetBlackTrailThin
ParticleSysBone = Engine02 JetBlackTrailThin
ParticleSysBone = Engine03 JetBlackTrailThin
ParticleSysBone = Engine04 JetBlackTrailThin
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
Animation = AVB2_D.AVB2_D
AnimationMode = ONCE_BACKWARDS
End

ConditionState = RUBBLE
Model = AVB2_E
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
End
AliasConditionState = RUBBLE DOOR_1_OPENING
AliasConditionState = RUBBLE DOOR_1_CLOSING
OkToChangeModelColor = Yes
End

; ***DESIGN parameters ***
DisplayName = OBJECT:B52
EditorSorting = VEHICLE
Side = America
TransportSlotCount = 0
VisionRange = 0.0
ArmorSet
Conditions = None
Armor = AirplaneArmor
DamageFX = TankDamageFX
End
ArmorSet
Conditions = PLAYER_UPGRADE
Armor = CountermeasuresAirplaneArmor
DamageFX = None
End
CommandSet = Command_ScriptedTransportDrops

; *** AUDIO Parameters ***
SoundAmbient = B3BomberAmbientLoop
SoundAmbientRubble = NoSound

; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK VEHICLE SCORE TRANSPORT AIRCRAFT IGNORED_IN_GUI EMP_HARDENED

Body = ActiveBody ModuleTag_03
MaxHealth = 1500.0
InitialHealth = 1500.0
End

ExperienceValue = 50 50 50 50 ; Experience point value at each level

Behavior = PhysicsBehavior ModuleTag_07
Mass = 500.0
End

Behavior = DeliverPayloadAIUpdate ModuleTag_08
DoorDelay = 500
MaxAttempts = 4
DropOffset = X:0 Y:0 Z:0
DropDelay = 300 ; time in between each item dropped (if more than one)
PutInContainer = AmericaParachute
DeliveryDistance = 450
End
Locomotor = SET_NORMAL B52Locomotor

Behavior = TransportContain ModuleTag_09
Slots = 100 ; hey, it's a BIG transport
ScatterNearbyOnExit = No
OrientLikeContainerOnExit = Yes
KeepContainerVelocityOnExit = Yes
ExitPitchRate = 30
ExitBone = WeaponA01
AllowInsideKindOf = INFANTRY VEHICLE PROJECTILE DOZER PARACHUTABLE
DoorOpenTime = 0 ; this prevents the Contain module from messing with the doors, since we want DeliverPayload to handle 'em
NumberOfExitPaths = 0
DestroyRidersWhoAreNotFreeToExit = Yes ; 'destroy' as opposed to 'kill'
End

Behavior = JetSlowDeathBehavior ModuleTag_10
DestructionDelay = 999999
RollRate = 0.2
RollRateDelta = 100%
PitchRate = 0
FallHowFast = 125.0%
FXInitialDeath = FX_JetBigDeathInitial
OCLInitialDeath = OCL_B2DeathInitial
DelaySecondaryFromInitialDeath = 2000
OCLSecondary = OCL_AmericaJetCargoHulkDeath
FXSecondary = FX_BigPlaneDeath
FXOnGroundDeath = FX_JetOnGroundDeath
OCLOnGroundDeath = OCL_B2DeathFinalBlowUp
FXHitGround = FX_JetDeathHitGround
OCLHitGround = OCL_RaptorDeathHitGround
DelayFinalBlowUpFromHitGround = 200
FXFinalBlowUp = FX_JetDeathFinalBlowUp
OCLFinalBlowUp = OCL_B2DeathFinalBlowUp
End

Behavior = TransitionDamageFX ModuleTag_11
DamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_JetBigDamageTransition
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_JetBigDamageTransition
End

Behavior = ArmorUpgrade ModuleTag_Armor01
TriggeredBy = Upgrade_AmericaCountermeasures
End

Behavior = CountermeasuresBehavior ModuleTag_12
TriggeredBy = Upgrade_AmericaCountermeasures
FlareTemplateName = CountermeasureFlare
FlareBoneBaseName = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
VolleySize = 4 ; Number of flares launched per volley (requires bones)
VolleyArcAngle = 90.0 ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
VolleyVelocityFactor = 2.0 ; Shoots out flares at a stronger velocity with a higher value.
DelayBetweenVolleys = 1000 ; Time between flare volleys
NumberOfVolleys = 5 ; Number of times the volleys will fire before reloading
ReloadTime = 0 ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
EvasionRate = 50% ; With active flares, the specified percentage will be diverted.
ReactionLaunchLatency = 100 ; Reaction between getting shot at and the firing of the first volley of countermeasures.
MissileDecoyDelay = 200 ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
End

;SCRIPTED SUPPORT: These special powers are triggered directly
;from the transport without creating a transport. This is done
;via new code support and CreateLocation USE_OWNER_OBJECT --
;which also prevents creating the payload transport.
Behavior = OCLSpecialPower ModuleTag_Scripted1
SpecialPowerTemplate = SuperweaponShockwaveBomb
OCL = SUPERWEAPON_ShockwaveBomb
CreateLocation = USE_OWNER_OBJECT
ScriptedSpecialPowerOnly = Yes
End
Behavior = OCLSpecialPower ModuleTag_Scripted2
SpecialPowerTemplate = SuperweaponVDB
OCL = SUPERWEAPON_MOAB
CreateLocation = USE_OWNER_OBJECT
ScriptedSpecialPowerOnly = Yes
End

Behavior = StealthUpdate ModuleTag_Stealth
StealthDelay = 500 ; msec
StealthForbiddenConditions = None
FriendlyOpacityMin = 50.0%
FriendlyOpacityMax = 100.0%
InnateStealth = Yes
OrderIdleEnemiesToAttackMeUponReveal = No
End

Scale = 0.9
Geometry = Box
GeometryIsSmall = No
GeometryMajorRadius = 30.0
GeometryMinorRadius = 30.0
GeometryHeight = 10.0
Shadow = SHADOW_VOLUME
ShadowSizeX = 89
End


In my Weapon.ini this is the current weapon associated with the plane and special power...

Weapon CarpetBombWeapon
PrimaryDamage = 320.0 ; 300.0
PrimaryDamageRadius = 70.0 ; 50.0
SecondaryDamage = 125.0
SecondaryDamageRadius = 100.0
AttackRange = 100.0
DamageType = EXPLOSION
DeathType = EXTRA_5 ;gib
WeaponSpeed = 99999.0
ProjectileObject = NONE
FireFX = FX_CarpetBomb
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS NOT_SIMILAR NOT_AIRBORNE
DelayBetweenShots = 0
ClipSize = 1
ClipReloadTime = 0
AutoReloadsClip = No
End


Now my questions is. 1. How you change to different weapon for that carpet bomb? Like if I want to make my own weapon "Weapon CarpetBombWeaponUberPowerful" instead of "Weapon CarpetBombWeapon" 2. How do I change the number of bombs dropped?

Thanks you very much sir!

Edited by Aznboy1993, 02 January 2010 - 11:46 PM.


#4 Doctor

Doctor
  • New Members
  • 4 posts
  • Location:United States
  • Projects:X4-ReMod, WTF mod V2, WTH mod V1
  •  Web Designer/Programmer

Posted 06 January 2010 - 12:12 PM

@Aznboy1993

This is a tutorial I took interest in a while back;

Modding: C&C Generals: Creating a New General's Power
C&C Generals ModdingThe Step-by-Step Guide to Creating a New General's Power by Cloning an Existing One
Learning by Example: Giving the Chinese Artillery Barrage General's Power to the GLA

This tutorial assumes that you already know how to access the INI files within INI.big (INIZH.big for Zero Hour), extract them to the proper location, and know how to edit them. People who cannot handle these tasks would be better served looking at a beginner's tutorial and getting some basic modding experience before jumping headfirst into a more difficult task such as this.

As you might have guessed by the title, this tutorial is about adding a new General's Power to a side. I prefer to use the cloning method (copying existing code and changing whatever is necessary in the copy) as opposed to typing new code from scratch as it greatly reduces the likelihood of a typo interfering. For the purposes of this tutorial, I will use the example of cloning China's Artillery Barrage power and giving it to the GLA. You'll probably want to clone another General's Power at some point, but the principle is the same. So, without any further disclaimers, here is the step-by-step guide:

1.

Clone all Artillery Barrage Sciences (3 of them in this case) in Science.ini. Be sure to give each Science a new name (a common mistake when cloning code) and change the PrerequisiteScience= values so that SCIENCE_GLA is present instead of SCIENCE_CHINA for the first level and that levels 2 and 3 refer to the new Sciences 1 level beneath them, or else your new Artillery Barrage clone will be inaccessable.

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

2. Clone the Artillery Barrage SpecialPower in SpecialPower.ini. Change the RequiredScience= value to refer to the level 1 version of your cloned Sciences. In addition, you will need to change the Enum= value to something used by a SpecialPower that was cut from Generals or ZH at some point. The Napalm Strike is a good example of this, so I'm going to copy SPECIAL_NAPALM_STRIKE from it for my new Artillery Barrage. If you are modding normal Generals, then the AcademyClassify= line will not exist. No not panic, as this was new code added for Zero Hour.

;-----------------------------------------------------------------------------
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

3. Clone all Artillery Barrage OCL's (ObjectCreationLists) from ObjectCreationList.ini. (Again, there are 3 of them in this case). Fortunately, no change is required beyond a simple name edit.

;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
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

4. Now you'll need to clone a total of 5 CommandButtons in CommandButton.ini: 3 for you to purchase your new Artillery Barrage and 2 to fire it. (Notice a pattern here?) As before, substitute your new code name wherever there is a reference to the original Artillery Barrage.

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

5. With everything ready, now you can set up your shiny new CommandButtons to appear ingame by adding their names in the appropriate places in CommandSet.ini.

First off comes the new purchasing buttons. They belong in SCIENCE_GLA_CommandSetRank3, and I recommend placing them in slots 13, 14, and 15.

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

Next is the sidebar shortcut button, which goes in SpecialPowerShortcutGLA.

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

Finally, you should add the normal firing CommandButton the the GLA Command Center's CommandSet.

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

Remember that all 3 CommandSets already exist and should not be created anew. Note that in normal Generals, the number of CommandSet slots is more restricted, so you may need to make some sacrifices in order to fit in your new Artillery Strike.
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.

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

7.

Test your new Artillery Strike ingame. Note that this guide will only give the new Artillery Strike to the default GLA faction. If you are modding ZH and want any of the GLA generals to have this new ability as well, then you must repeat Steps 5 and 6 for each General.

While this guide goes through a few steps that are not technically necessary, I recommend cloning General's Powers in this way in order to prevent the two powers from having dependencies that could interfere with each other. This way, the new Artillery Barrage is independent of the old one and can be adjusted accordingly. (Want to change the timer or the rank prerequisites for your new General's Power? Go ahead!). You'll also be well on your way to creating a new unique General's Power, but that involves additional steps and will be covered in another tutorial.



I hope this helps! ;)

Edited by Doctor, 06 January 2010 - 12:16 PM.


#5 Aznboy1993

Aznboy1993
  • Members
  • 11 posts

Posted 10 January 2010 - 07:37 PM

@Aznboy1993

This is a tutorial I took interest in a while back;

Modding: C&C Generals: Creating a New General's Power
C&C Generals ModdingThe Step-by-Step Guide to Creating a New General's Power by Cloning an Existing One
Learning by Example: Giving the Chinese Artillery Barrage General's Power to the GLA

This tutorial assumes that you already know how to access the INI files within INI.big (INIZH.big for Zero Hour), extract them to the proper location, and know how to edit them. People who cannot handle these tasks would be better served looking at a beginner's tutorial and getting some basic modding experience before jumping headfirst into a more difficult task such as this.

As you might have guessed by the title, this tutorial is about adding a new General's Power to a side. I prefer to use the cloning method (copying existing code and changing whatever is necessary in the copy) as opposed to typing new code from scratch as it greatly reduces the likelihood of a typo interfering. For the purposes of this tutorial, I will use the example of cloning China's Artillery Barrage power and giving it to the GLA. You'll probably want to clone another General's Power at some point, but the principle is the same. So, without any further disclaimers, here is the step-by-step guide:

1.

Clone all Artillery Barrage Sciences (3 of them in this case) in Science.ini. Be sure to give each Science a new name (a common mistake when cloning code) and change the PrerequisiteScience= values so that SCIENCE_GLA is present instead of SCIENCE_CHINA for the first level and that levels 2 and 3 refer to the new Sciences 1 level beneath them, or else your new Artillery Barrage clone will be inaccessable.

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

2. Clone the Artillery Barrage SpecialPower in SpecialPower.ini. Change the RequiredScience= value to refer to the level 1 version of your cloned Sciences. In addition, you will need to change the Enum= value to something used by a SpecialPower that was cut from Generals or ZH at some point. The Napalm Strike is a good example of this, so I'm going to copy SPECIAL_NAPALM_STRIKE from it for my new Artillery Barrage. If you are modding normal Generals, then the AcademyClassify= line will not exist. No not panic, as this was new code added for Zero Hour.

;-----------------------------------------------------------------------------
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

3. Clone all Artillery Barrage OCL's (ObjectCreationLists) from ObjectCreationList.ini. (Again, there are 3 of them in this case). Fortunately, no change is required beyond a simple name edit.

;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
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

4. Now you'll need to clone a total of 5 CommandButtons in CommandButton.ini: 3 for you to purchase your new Artillery Barrage and 2 to fire it. (Notice a pattern here?) As before, substitute your new code name wherever there is a reference to the original Artillery Barrage.

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

5. With everything ready, now you can set up your shiny new CommandButtons to appear ingame by adding their names in the appropriate places in CommandSet.ini.

First off comes the new purchasing buttons. They belong in SCIENCE_GLA_CommandSetRank3, and I recommend placing them in slots 13, 14, and 15.

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

Next is the sidebar shortcut button, which goes in SpecialPowerShortcutGLA.

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

Finally, you should add the normal firing CommandButton the the GLA Command Center's CommandSet.

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

Remember that all 3 CommandSets already exist and should not be created anew. Note that in normal Generals, the number of CommandSet slots is more restricted, so you may need to make some sacrifices in order to fit in your new Artillery Strike.
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.

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

7.

Test your new Artillery Strike ingame. Note that this guide will only give the new Artillery Strike to the default GLA faction. If you are modding ZH and want any of the GLA generals to have this new ability as well, then you must repeat Steps 5 and 6 for each General.

While this guide goes through a few steps that are not technically necessary, I recommend cloning General's Powers in this way in order to prevent the two powers from having dependencies that could interfere with each other. This way, the new Artillery Barrage is independent of the old one and can be adjusted accordingly. (Want to change the timer or the rank prerequisites for your new General's Power? Go ahead!). You'll also be well on your way to creating a new unique General's Power, but that involves additional steps and will be covered in another tutorial.



I hope this helps! :)


Yes thank you for that. It helped me to understand the ObjectCreationList or OCL. I now know how to change the amounts of bombs in a carpet bombing run, etc. But I have one more question. Where do I go to change the weapon? For me carpet bomb is like this...

ObjectCreationList SUPERWEAPON_CarpetBombSWG3
DeliverPayload
Transport = AmericaJetB3
FormationSize = 5 ; 3
FormationSpacing = 100.0
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1
DropOffset = X:0 Y:0 Z:-2
DropVariance = X:30 Y:40 Z:0
DropDelay = 500
Payload = CarpetBomb 12 ; 6
DeliveryDistance = 500 ; 350
DeliveryDecalRadius = 400 ; 200
DeliveryDecal
Texture = SCCCarpBomb
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:0 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End


How do I change the "Payload = CarpetBomb 12" to "Payload = CarpetBombSWG 12" and make it work. I tried to change it by copying the code for...

Weapon CarpetBombWeapon
PrimaryDamage = 500.0 ; 320.0 ; 300.0
PrimaryDamageRadius = 100.0 ; 70.0 ; 50.0
SecondaryDamage = 125.0
SecondaryDamageRadius = 100.0
AttackRange = 100.0
DamageType = EXPLOSION
DeathType = EXTRA_5 ;gib
WeaponSpeed = 99999.0
ProjectileObject = NONE
FireFX = FX_CarpetBomb
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS NOT_SIMILAR NOT_AIRBORNE
DelayBetweenShots = 0
ClipSize = 1
ClipReloadTime = 0
AutoReloadsClip = No
End


in my weapon.ini and changing the name to Weapon CarpetBombSWGWeapon and for testing purposes leaving everything else the same. I then changed "Payload = CarpetBomb 12" to "Payload = CarpetBombSWG 12". I fired up the game and when I tried the Carpet Bomb 3 for SWG comes with only ONE plane instead of FIVE and when it flies over the target NOTHING comes out!? What am I missing here?

Regards,
Aznboy1993

#6 Gen.Kenobi

Gen.Kenobi

    I'm a doc, not an...

  • Undead
  • 1,429 posts
  • Location:Brazil
  • Projects:Survive Med School
  •  Your Doc
  • Division:Revora
  • Job:Hosting Admin

Posted 11 January 2010 - 03:39 PM

I see your probleman:

"Payload = CarpetBombSWG 12"


When in the weapon INI you have:

Weapon CarpetBombSWGWeapon


So...to make it work, try to write in the payload the same as you wrote in the weapon.ini:

"Payload = CarpetBombSWGWeapon 12" =)

Hope that helps,

-Gen.Kenobi

Edited by Gen.Kenobi, 11 January 2010 - 03:39 PM.

kudos to Pasidon for this awesome avvy and siggy!


#7 Aznboy1993

Aznboy1993
  • Members
  • 11 posts

Posted 11 January 2010 - 11:21 PM

Thanks for the quick response :p but it didn't work :(

I think it has something to do with the bomb themselves and not the actual damage. Since "CarpetBombSWGWeapon" in my Weapon.ini refers to the actual damage of the bomb and not the bomb itself because in "CarpetBombSWGWeapon" "WeaponSpeed = 99999" and the bomb DOES NOT move that fast. Where do I go to change the bomb settings? I think in there I can find another option to change so I can change what it does when the bomb "dies" (ie. hits the grounds). Thanks for helping me! I'm getting there and this is only getter more fun!

#8 Gen.Kenobi

Gen.Kenobi

    I'm a doc, not an...

  • Undead
  • 1,429 posts
  • Location:Brazil
  • Projects:Survive Med School
  •  Your Doc
  • Division:Revora
  • Job:Hosting Admin

Posted 15 January 2010 - 01:57 PM

Weird...i'll need to see this when i get home, since i'm travelling and i just get back in January 24th...

Keep trying dude...that's all i can say for now... :p

kudos to Pasidon for this awesome avvy and siggy!


#9 Aznboy1993

Aznboy1993
  • Members
  • 11 posts

Posted 16 January 2010 - 07:45 PM

OK thanks. I will keep trying in the meantime to find a solution to my problem(s). Again I appreciate your help and assistance.

#10 Gen.Kenobi

Gen.Kenobi

    I'm a doc, not an...

  • Undead
  • 1,429 posts
  • Location:Brazil
  • Projects:Survive Med School
  •  Your Doc
  • Division:Revora
  • Job:Hosting Admin

Posted 24 January 2010 - 12:11 AM

Have you gotten sucess yet? If not i just arrived and i'll try to see this for you :p

kudos to Pasidon for this awesome avvy and siggy!


#11 Aznboy1993

Aznboy1993
  • Members
  • 11 posts

Posted 26 January 2010 - 11:58 PM

Have you gotten sucess yet? If not i just arrived and i'll try to see this for you :)

Nope. Still no luck. I've practically looked in every .ini file that I could think of that would store the particular data. Found nothing relating how to change the bomb explosion. *Sigh* Modding is a long process, no? Thanks again for helping me. It is much appreciated!

#12 Gen.Kenobi

Gen.Kenobi

    I'm a doc, not an...

  • Undead
  • 1,429 posts
  • Location:Brazil
  • Projects:Survive Med School
  •  Your Doc
  • Division:Revora
  • Job:Hosting Admin

Posted 27 January 2010 - 08:27 PM

Try the WeaponObjects.ini:

;------------------------------------------------------------------------------
Object CarpetBomb

 ; *** ART Parameters ***
  Draw = W3DModelDraw ModuleTag_01
	DefaultConditionState
	  Model = EXCarptBmb
	End
  End

 ; ***DESIGN parameters ***
  DisplayName	  = OBJECT:CarpetBomb
  Side = America
  EditorSorting   = SYSTEM
  TransportSlotCount = 1				;how many "slots" we take in a transport (0 == not transportable)
  VisionRange = 300.0  
  ArmorSet
	Conditions	  = None
	Armor		   = ProjectileArmor
	DamageFX		= None
  End

 ; *** AUDIO Parameters ***
  SoundFallingFromPlane = DaisyCutterWeapon

 ; *** ENGINEERING Parameters ***
  KindOf			= PROJECTILE
  Body = ActiveBody ModuleTag_02
	MaxHealth	   = 100.0
	InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
  End
  Locomotor = SET_NORMAL None

  Behavior = PhysicsBehavior ModuleTag_04

	Mass				  = 75.0
	AerodynamicFriction   = 1	; this is now friction-per-sec
	ForwardFriction	   = 33   ; this is now friction-per-sec
	CenterOfMassOffset	= 2	; Default of 0 means nothing tips as it falls.  Positive tips forward, negative tips back
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_05
	DeathWeapon   = CarpetBombWeapon
	StartsActive  = Yes
  End

  Behavior = HeightDieUpdate ModuleTag_06
	TargetHeight = 1.0
	TargetHeightIncludesStructures = No
  End

  Behavior = SpecialPowerCompletionDie ModuleTag_07
	SpecialPowerTemplate = SuperweaponCarpetBomb
  End

  Behavior = FXListDie ModuleTag_08
	DeathFX = FX_CarpetBomb
  End
  Behavior = DestroyDie ModuleTag_09
   ;nothing
  End

End

I'll need to stud a little more, since i'm not a coder for special powers :) Keep trying and please post your results here!

kudos to Pasidon for this awesome avvy and siggy!


#13 Aznboy1993

Aznboy1993
  • Members
  • 11 posts

Posted 28 January 2010 - 12:56 AM

YES! Thank you I got it to work! All I did was this.

In Weapon.ini I created a new weapon like-so.

Weapon CarpetBombSWGWeapon
PrimaryDamage = 2500.0
PrimaryDamageRadius = 150.0
SecondaryDamage = 500.0
SecondaryDamageRadius = 200.0
AttackRange = 100.0
FireFX = WeaponFX_MOAB_Blast
DamageType = EXPLOSION
DeathType = EXTRA_5 ;gib
WeaponSpeed = 99999.0
ProjectileObject = NONE
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 0
ClipSize = 1
ClipReloadTime = 0
AutoReloadsClip = No
ShockWaveAmount = 250.0
ShockWaveRadius = 200.0
ShockWaveTaperOff = 0.33
End


In WeaponObjects.ini I added a new behavior for Object CarpetBomb (which corresponds to ALL USA carpet bombs except for airforce's in my case. he uses cluster carpet bombing)

Behavior = FireWeaponWhenDeadBehavior ModuleTag_Bomb01
DeathTypes = ALL -LASERED
DeathWeapon = CarpetBombSWGWeapon
StartsActive = Yes
End


In ObjectCreationList.ini I edited / added a new addition to the superweapon general's carpet bombing. NOTE THAT the payload corresponds to the object in weaponobject.ini and that object is the bomb itself and NOT the actual damaging weapon. the bomb's death is the explosion and damage in WeaponObject.ini. My error is trying to edit the Payload to the actualy weapon in weapon.ini. In reality it is trying to create an object that does not exist. If i added an Object CarpetBombWeaponSWG to WeaponObject.ini then it would work. ALSO not that some of the object being created is in SpecialWeaponsObjects.ini. For example Object AmericaJetB3.

ObjectCreationList SUPERWEAPON_CarpetBombSWG3
DeliverPayload
Transport = AmericaJetB3
FormationSize = 5 ; 3
FormationSpacing = 100.0
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1
DropOffset = X:0 Y:0 Z:-2
DropVariance = X:30 Y:40 Z:0
DropDelay = 500
Payload = CarpetBomb 12 ; 6
DeliveryDistance = 500 ; 350
DeliveryDecalRadius = 400 ; 200
DeliveryDecal
Texture = SCCCarpBomb
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:0 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End



#14 Gen.Kenobi

Gen.Kenobi

    I'm a doc, not an...

  • Undead
  • 1,429 posts
  • Location:Brazil
  • Projects:Survive Med School
  •  Your Doc
  • Division:Revora
  • Job:Hosting Admin

Posted 28 January 2010 - 01:12 PM

Glady to be helpfull! Post your mod on the Generals Showcase Forums! We would love to see your work!

Any questions, feel free to ask!

Edited by Gen.Kenobi, 28 January 2010 - 01:12 PM.

kudos to Pasidon for this awesome avvy and siggy!


#15 Justin Van de Laar

Justin Van de Laar
  • Members
  • 5 posts

Posted 16 December 2016 - 01:39 PM

How did you edit the Nuke in genral i dont get it to work






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users