Hell Tr00ps
15 years ago
helloo,,

i made a new upgrade for my paladin (still in testing) that it have a 25% damage bonus when you buy the upgrade, but when i buy it, it becomes upgraded on al paladins, but i want that you have to buy it seperatly, just like if you buy a overlordgattlinggun you only buy it for that overlord

here are some codes
weapon:
Weapon PaladinTankGun
  PrimaryDamage = 200.0
  PrimaryDamageRadius = 10.0
  ScatterRadiusVsInfantry = 10.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange = 750.0
  MinTargetPitch = -15                         ; we may not target anything outside of this pitch range
  MaxTargetPitch = 15                          ; ditto
  DamageType = ARMOR_PIERCING
  DeathType = NORMAL
  WeaponSpeed = 300                           ; dist/sec 
  WeaponRecoil = 5                            ; angle to deflect the model when firing
  ProjectileObject = GenericTankShell
  FireFX           = WeaponFX_GenericTankGunNoTracer
  VeterancyFireFX  = HEROIC WeaponFX_HeroicGenericTankGunNoTracer
  ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
  FireSound = PaladinTankWeapon
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 750               ; time between shots, msec
  ClipSize = 3                    ; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 10000          ; how long to reload a Clip, msec
  WeaponBonus               = PLAYER_UPGRADE DAMAGE 125%
  ; note, these only apply to units that aren't the explicit target 
  ; (ie, units that just happen to "get in the way"... projectiles
  ; always collide with the Designated Target, regardless of these flags
  ProjectileCollidesWith = STRUCTURES WALLS  
  ProjectileDetonationOCL     = OCL_FireFieldSmall
  ScatterRadius = 20 ;5
  MinimumAttackRange          = 40 ;20.0 
End

Upgrade:
Upgrade Upgrade_PaladinUraniumShells
  DisplayName        = UPGRADE:UraniumShells
  Type               = OBJECT
  BuildTime          = 30.0
  BuildCost          = 1000
  ButtonImage        = SSDepletedU_Shell
  ResearchSound      = NoSound
End
commandbutton:
CommandButton Command_UpgradePaladinUraniumShells
  Command       = PLAYER_UPGRADE
  Upgrade       = Upgrade_PaladinUraniumShells
  Options       = IGNORES_UNDERPOWERED
  TextLabel     = CONTROLBAR:UpgradeChinaUraniumShells
  ButtonImage   = SSDepletedU_Shell
  ButtonBorderType        = UPGRADE ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:TooltipUpgradeChinaUraniumShells
End

commandset:
CommandSet AmericaTankPaladinCommandSet
  1  = Command_ConstructAmericaVehicleBattleDrone
  2  = Command_ConstructAmericaVehicleScoutDrone
  3  = Command_ConstructAmericaVehicleHellfireDrone
  4  = Command_UpgradePaladinUraniumShells
  11 = Command_AttackMove
  13 = Command_Guard
  14 = Command_Stop
End

how do i have to change it so that it works like the overlordgattlinggun?
eventually i want the upgrade to be that it creates a firefieldsmall (OCL_FireFieldSmall)
and with a new image, strings, ect, but it is still in testing :P


Update:
i changed PLAYER_UPGRADE in OBJECT_UPGRADE in the 2 files (commandbutton and weapon)
the game crashed so i starded WB, to study the error
the error is: OBJECT_UPGRADE is not a valid member of the index list.
so how do i solve this?
Sponsor
CommieDog
15 years ago
WeaponBonus = PLAYER_UPGRADE in your Weapon code was correct. Change it back.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Hell Tr00ps
15 years ago
changed it back, but then if i hover over the upgrade, it says in the textsbox:
the conflicting upgrade cannot be purchased...

and how can i change the upgrade that if the upgrade has been purchased that the unit gains ProjectileDetonationOCL = OCL_FireFieldSmall?
Annihilationzh
15 years ago

changed it back, but then if i hover over the upgrade, it says in the textsbox:
the conflicting upgrade cannot be purchased...


Make sure your paladin has a production module so it can research the upgrade, and a weapon bonus module so that the bonus will be activated.

and how can i change the upgrade that if the upgrade has been purchased that the unit gains ProjectileDetonationOCL = OCL_FireFieldSmall?


Look at how the toxin shells upgrade works (it's not in the tank code, it's in the shell code).
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.
Hell Tr00ps
15 years ago

and a weapon bonus module so that the bonus will be activated.


this is what i did (made a new Weaponobject (paladintankshell):

Object PaladinTankShell

  ; *** ART Parameters ***
  Draw = W3DModelDraw ModuleTag_01
    ConditionState = NONE
      Model = AVTankShel
    End
  End

  ; ***DESIGN parameters ***
  DisplayName       = OBJECT:TankShell
  EditorSorting     = SYSTEM
  ArmorSet
    Armor = ProjectileArmor
  End
  VisionRange = 0.0  

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

  Behavior = DestroyDie ModuleTag_03
    ;nothing
  End
    
  Behavior = DumbProjectileBehavior ModuleTag_04
    ; To tweak a Bezier path, please see GS
    FirstHeight = 10  ; Height of Bezier control points above highest intervening terrain
    SecondHeight = 10
    FirstPercentIndent = 50% ; Percentage of shot distance control points are placed
    SecondPercentIndent = 90%
    FlightPathAdjustDistPerSecond   = 100 ; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag.
  End

  Behavior = WeaponBonusUpgrade ModuleTag_06  ;------this part is it i think
    TriggeredBy = Upgrade_PaladinUraniumShells      
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 0.01   ; we can't have a zero mass, but we want it pretty tiny...
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_55
    DeathWeapon   = ToxinShellWeapon                                        ;\
    StartsActive  = No                      ; turned on by upgrade           ;} 
    TriggeredBy   = Upgrade_GLAToxinShells                                   ;} busy with this
    ConflictsWith = Upgrade_GLAAnthraxBeta Chem_Upgrade_GLAAnthraxGamma     ;/
  End

  Geometry = Sphere
  GeometryIsSmall = Yes
  GeometryMajorRadius = 1.0

End

the upgradebutton works, i can press it now(!) thank you, but the upgrade does nothing.. -.-'

Look at how the toxin shells upgrade works (it's not in the tank code, it's in the shell code).


im busy with that, so dont need help with that part (and hopefully never does)

but im going to bed now:P, tomorrow school again

thanks again!
Annihilationzh
15 years ago
I just realised, I made a massive mistake. As this is an object upgrade and not a player upgrade, it won't have any effect on the shell. Sorry about that.

Ok, for it to work with an object upgrade, you'll need to use a weaponset upgrade (which makes the damage bonus obsolete).

Modified from above:
Weapon PaladinTankGun
  PrimaryDamage = 200.0
  PrimaryDamageRadius = 10.0
  ScatterRadiusVsInfantry = 10.0
  AttackRange = 750.0
  MinTargetPitch = -15
  MaxTargetPitch = 15
  DamageType = ARMOR_PIERCING
  DeathType = NORMAL
  WeaponSpeed = 300
  WeaponRecoil = 5
  ProjectileObject = GenericTankShell
  FireFX           = WeaponFX_GenericTankGunNoTracer
  VeterancyFireFX  = HEROIC WeaponFX_HeroicGenericTankGunNoTracer
  ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
  FireSound = PaladinTankWeapon
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 750
  ClipSize = 3
  ClipReloadTime = 10000

  ProjectileCollidesWith = STRUCTURES WALLS 
  ScatterRadius = 20
  MinimumAttackRange          = 40
End

Weapon PaladinTankGunUpgraded
  PrimaryDamage = 250.0 ;;;;; 125% of above
  PrimaryDamageRadius = 10.0
  ScatterRadiusVsInfantry = 10.0
  AttackRange = 750.0
  MinTargetPitch = -15
  MaxTargetPitch = 15
  DamageType = ARMOR_PIERCING
  DeathType = NORMAL
  WeaponSpeed = 300
  WeaponRecoil = 5
  ProjectileObject = GenericTankShell
  FireFX           = WeaponFX_GenericTankGunNoTracer
  VeterancyFireFX  = HEROIC WeaponFX_HeroicGenericTankGunNoTracer
  ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
  FireSound = PaladinTankWeapon
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 750
  ClipSize = 3
  ClipReloadTime = 10000

  ProjectileCollidesWith = STRUCTURES WALLS 
  ProjectileDetonationOCL     = OCL_FireFieldSmall ;;;;; creates fire after upgrade
  ScatterRadius = 20 ;5
  MinimumAttackRange          = 40 ;20.0
End

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.
Hell Tr00ps
15 years ago
okay, do i have to do something with a module? besides copying the codes you made?

i have this module for the upgrade to work:

Behavior = CommandSetUpgrade ModuleTag_25
CommandSet = AmericaTankPaladinCommandSet
TriggeredBy = Upgrade_PaladinUraniumShells
End

Annihilationzh
15 years ago
I was referring to this:
  Behavior = WeaponSetUpgrade ModuleTag_Up
    TriggeredBy = Upgrade_PaladinUraniumShells
  End

Take a look at the weaponset of other units (like the dragon tank) to see how they do it.
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.
Hell Tr00ps
15 years ago
the upgrade still does nothing

here is what I done (i didnt do the weapon bonus cause that was only for testing)
thing:

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY PaladinTankGun
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE 
    Weapon = PRIMARY PaladinTankGunUpgradeOne 
  End
module:

  Behavior = CommandSetUpgrade ModuleTag_25
    TriggeredBy = Upgrade_PaladinIncendiaryShells
  End
upgrade

Upgrade Upgrade_PaladinIncendiaryShells
  DisplayName        = UPGRADE:PaladinIncendiaryShells
  Type               = OBJECT
  BuildTime          = 10.0
  BuildCost          = 1000
  ButtonImage        = CWCUpgrade ;---- [i]only thing what worked without asking -.-' adding a new cameo[/i]
End
weapon (upgraded)

Weapon PaladinTankGunUpgradeOne 
  PrimaryDamage = 200.0
  PrimaryDamageRadius = 10.0
  ScatterRadiusVsInfantry = 10.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange = 750.0
  MinTargetPitch = -15                         ; we may not target anything outside of this pitch range
  MaxTargetPitch = 15                          ; ditto
  DamageType = ARMOR_PIERCING
  DeathType = NORMAL
  WeaponSpeed = 300                           ; dist/sec 
  WeaponRecoil = 5                            ; angle to deflect the model when firing
  ProjectileObject = GenericTankShell
  FireFX           = WeaponFX_GenericTankGunNoTracer
  VeterancyFireFX  = HEROIC WeaponFX_HeroicGenericTankGunNoTracer
  ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
  FireSound = PaladinTankWeapon
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 750               ; time between shots, msec
  ClipSize = 3                    ; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 10000          ; how long to reload a Clip, msec
  ; note, these only apply to units that aren't the explicit target 
  ; (ie, units that just happen to "get in the way"... projectiles
  ; always collide with the Designated Target, regardless of these flags
  ProjectileCollidesWith = STRUCTURES WALLS  
  ScatterRadius = 20 ;5
  MinimumAttackRange          = 40 ;20.0 
  ProjectileDetonationOCL     = OCL_FireFieldSmall
End

for comparison
dragon tank
module:

  Behavior = WeaponSetUpgrade ModuleTag_05
    TriggeredBy = Upgrade_ChinaBlackNapalm
  End
weaponset:

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY DragonTankFlameWeapon
    Weapon = SECONDARY DragonTankFireWallWeapon
    AutoChooseSources = SECONDARY NONE
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE 
    Weapon = PRIMARY DragonTankFlameWeaponUpgraded
    Weapon = SECONDARY DragonTankFireWallWeaponUpgraded
    AutoChooseSources = SECONDARY NONE
    WeaponLockSharedAcrossSets = Yes ; This set is so similar to the default set that it can hold the weapon lock
  End

why doesnt it just work.... -.-'

Annihilationzh
15 years ago
Spot the difference:

Wrong:
  Behavior = CommandSetUpgrade ModuleTag_25
    TriggeredBy = Upgrade_PaladinIncendiaryShells
  End

Right:
  Behavior = WeaponSetUpgrade ModuleTag_25
    TriggeredBy = Upgrade_PaladinIncendiaryShells
  End

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.
Hell Tr00ps
15 years ago
thank you very much!

only problem now is that i need some string help
i did this:

CommandButton Command_UpgradePaladinIncendiaryShells
  Command       = OBJECT_UPGRADE
  Upgrade       = Upgrade_PaladinIncendiaryShells
  Options       = IGNORES_UNDERPOWERED
  TextLabel     = CONTROLBAR:UpgradePaladinIncendiaryShells
  ButtonImage   = CWCUpgrade
  ButtonBorderType        = UPGRADE ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:TooltipUpgradePaladinIncendiaryShells
End

CONTROLBAR:TooltipUpgradePaladinIncendiaryShells
"The Paladin will now shoot Incendiary shells that wil leave a firefield on detonations"
END

CONTROLBAR:UpgradePaladinIncendiaryShells
"&Incendiary Shells"
END

but ingame it says: MISSING CONTROLBAR:UpgradePaladinIncendiaryShells
and such.. why?

UPDATE info:
i downloaded an str. file from internet, and edited that file..
Hell Tr00ps
15 years ago
hee,

how do i succesfully place new strings in the game?
Annihilationzh
15 years ago
You used this one?
http://www.falloutstudios.net/site/index.php?download=9 

As long as the STR file is in the Data folder, it should work.
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.
Hell Tr00ps
15 years ago
wtf,,
my commandset:

CommandButton Command_UpgradePaladinIncendiaryShells
  Command       = OBJECT_UPGRADE
  Upgrade       = Upgrade_PaladinIncendiaryShells
  Options       = IGNORES_UNDERPOWERED
  TextLabel     = CONTROLBAR:UpgradePaladinIncendiaryShells
  ButtonImage   = CWCUpgrade
  ButtonBorderType        = UPGRADE ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:TooltipUpgradePaladinIncendiaryShells
End

My new strings:
CONTROLBAR:UpgradePaladinIncendiaryShells
"&Incendiary Shells"
END

CONTROLBAR:TooltipUpgradePaladinIncendiaryShells
"The Paladin will now shoot Incendiary shells that wil leave a firefield on detonations"
END

i downloaded the file you said,
and added the 2 controbars at the bottem of the file, so why,
is there an other place where i have to refer the new strings?
Hell Tr00ps
15 years ago
i tried the csfedititor, but that screwed the text that appears after a match, accademy or so

so i think i do this later, the string thing.
k, i have another question about upgrades :P
i want to make that if the above update is purchased that you can buy another upgrade
but i have a problem with that
with the weaponset upgrade, how can i make that the first weaponset is triggerd by Upgrade_PaladinIncendiaryShells
and the second weaponset by Upgrade_PaladinPrecisionAiming?
  
WeaponSet
    Conditions = None 
    Weapon = PRIMARY PaladinTankGun
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE
    Weapon = PRIMARY PaladinTankGunUpgradeOne 
  End
  ;WeaponSet
  ; Conditions = PLAYER_UPGRADE_ONE
  ;  Weapon = PRIMARY PaladinTankGunUpgrade2 
  ;End



  ;Behavior = CommandSetUpgrade ModuleTag_24
  ;CommandSet = AmericaTankPaladinCommandSet1
  ;  TriggeredBy = Upgrade_PaladinIncendiaryShells
  ;End

  Behavior = WeaponSetUpgrade ModuleTag_25
    TriggeredBy = Upgrade_PaladinIncendiaryShells
  End

  ;Behavior = WeaponSetUpgrade ModuleTag_26
  ; Weaponset = PaladinTankGunUpgrade2
  ; TriggeredBy = Upgrade_PaladinPrecisionAiming
  ;End


thx in advance
CommieDog
15 years ago
You can't have multiple WeaponSets that trigger on different upgrades. Hopefully your Precision Aiming upgrade doesn't involve anything more than a multiplier.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Hell Tr00ps
15 years ago
mmhh, *censored* xD
my plan was that a unit (the paladin in this case) have multiple upgrades, xD
so thats not gonna happen..