logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,581
Total Threads: 8,668
Posts: 94,537

Administrators:
DeeZire, Redemption

There are currently 50 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 08-26-2003, 07:33 AM   #1 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default 2 editing questions

1: How do I disable a building's weapon with a command button? The idea is that you can switch modes with 2 buttons (like the ranger) except that one button activates the weapon while the other disables it (making the building hold its fire effectively). Can I do this by switching to a secondary weapon slot but not specifying a secondary weapon in the weaponset, or do I need to do something else?

2: Can I (and if so, how) get a building to get its max hit points reduced when it is firing, but return to the "stronger" state when it stops, like the C&C SAM Site? Alternatively I could give it a different armour type or somehow multiply the damage it takes, but how?
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-26-2003, 01:35 PM   #2 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

for Nr1:

I would create the building, define the (firing) primary weapon, say we call it BuildingWeapon01 and then copy the weapon's entry in the weapon.ini and create another weapon called BuildingWeapon02.

I would then remove the damage parameters, all the fx and so on so that the weapon actually "exists" but is not able to cause any pain to your enemies. Than I would copy and change the ranger's code for the building and define a primary AND a secondary weapon in the FactionBuilding.ini. So that the program is able to really switch the weapons.

I may show it with the code from the US Strategy Center:

Code:
FactionBuilding.ini:

Object AmericaStrategyCenter
    DefaultConditionState
      Model           = ABStrategy_A8
      WeaponLaunchBone  = PRIMARY Muzzle
      WeaponMuzzleFlash               = PRIMARY MuzzleFX
      WeaponRecoilBone                = PRIMARY Barrel
      WeaponLaunchBone  = SECONDARY Muzzle
      WeaponMuzzleFlash               = SECONDARY MuzzleFX
      WeaponRecoilBone                = SECONDARY Barrel
      Turret                          = Turret01
      TurretPitch                     = TurretEL
      HideSubObject   = Chassis
    End

  WeaponSet
    Conditions           = None 
    Weapon               = PRIMARY StrategyCenterGun
    AutoChooseSources    = PRIMARY NONE
    Weapon               = SECONDARY StrategyCenterGun2
    AutoChooseSources    = SECONDARY NONE
  End

Weapon.ini:

;------------------------------------------------------------------------------
Weapon StrategyCenterGun
  PrimaryDamage         = 200.0            
  PrimaryDamageRadius   = 25.0      
  ScatterRadius         = 15.0
  ScatterRadiusVsInfantry = 15.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange = 400.0
  MinimumAttackRange = 100.0
  MinTargetPitch = 45                         ; we may not target anything outside of this pitch range
  MaxTargetPitch = 80                          ; ditto
  DamageType = EXPLOSION
  DeathType = EXPLODED
  WeaponSpeed = 150                           ; dist/sec 
  WeaponRecoil = 5                            ; angle to deflect the model when firing
  ProjectileObject = StrategyCenterArtilleryShell
  FireFX = WeaponFX_GenericTankGunNoTracer
  ProjectileDetonationFX = FX_ArtilleryBarrage
  FireSound = StrategyCenter_ArtilleryRound
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 7000              ; time between shots, msec
  ShotsPerBarrel = 1                   ; By default, shoot one shot per barrel
  ClipSize = 0                    ; how many shots in a Clip (0 == infinite)
  WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; UraniumShells

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

;------------------------------------------------------------------------------
Weapon StrategyCenterGun2
  PrimaryDamage         = 0.0            
  PrimaryDamageRadius   = 0.0      
  ScatterRadius         = 0.0
  ScatterRadiusVsInfantry = 0.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange = 0.0
  MinimumAttackRange = 0.0
  MinTargetPitch = 45                         ; we may not target anything outside of this pitch range
  MaxTargetPitch = 80                          ; ditto
  DamageType = EXPLOSION
  DeathType = EXPLODED
  WeaponSpeed = 150                           ; dist/sec 
  WeaponRecoil = 5                            ; angle to deflect the model when firing
  ;ProjectileObject = StrategyCenterArtilleryShell
  ;FireFX = WeaponFX_GenericTankGunNoTracer
  ;ProjectileDetonationFX = FX_ArtilleryBarrage
  ;FireSound = StrategyCenter_ArtilleryRound
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 7000              ; time between shots, msec
  ShotsPerBarrel = 1                   ; By default, shoot one shot per barrel
  ClipSize = 0                    ; how many shots in a Clip (0 == infinite)
  ;WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; UraniumShells

  ; 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 
End
Then you need to add the buttons to your commandset.ini and commandbutton.ini.

You may try to disable the damage parameters also with an ";" but I don't now whether that is possible. If it crashes look at the "ReleaseCrashInfo.txt". Simply search for it using the search tool of windows. It often tells you where to look for INI errors.

for Nr2:

again take a look at the Strategy Center's code:

Code:
  ArmorSet
    Conditions      = None
    Armor           = StructureArmor
    DamageFX        = StructureDamageFXNoShake
  End
you see the line Conditions = None? Copy the code and insert FIRING_A so that when the building fires with its primary weapon it has another Armorset:

Code:
ArmorSet
    Conditions      = FIRING_A
    Armor           = StructureArmor_FIRING
    DamageFX        = StructureDamageFXNoShake
  End

ArmorSet
    Conditions      = None
    Armor           = StructureArmor
    DamageFX        = StructureDamageFXNoShake
  End
You need to define a new Armor in the armor.ini called StructureArmor_FIRING or so and change the parameters.

I hope my tips help you but I must say I did not test them so good luck!
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-26-2003, 02:32 PM   #3 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default

Thanks for the help, I'll see if it works.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-28-2003, 01:06 PM   #4 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default

Ok so the first one works but the second one doesn't. I don't think you can upgrade armorsets like weaponsets (I think EA removed it in a patch or something). Any other suggestions?
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-28-2003, 03:16 PM   #5 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: USA
Posts: 452
Default

there was a post here that discussed changing armor sets on upgrade

but you can't switch between armors like you can between weapons.
guyee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some Editing Questions that I can't figure out Tapion013 Red Alert 2 & Yuri's Revenge Editing 14 02-24-2006 08:02 AM
RA2/YR editing questions. Silverdragon Red Alert 2 & Yuri's Revenge Editing 18 08-03-2005 05:20 PM
editing newbs come here ill anser your questions darkchild50 Red Alert 2 & Yuri's Revenge Editing 34 03-28-2005 10:52 PM
AI Editing help ShoNuff Red Alert 2 & Yuri's Revenge Editing 2 10-19-2003 08:39 AM
Some Editing Questions:Airbursts,modesmd,superweaps... Nick_Perrin Red Alert 2 & Yuri's Revenge Editing 22 07-30-2003 12:21 PM


All times are GMT -4. The time now is 07:46 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.