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

Forum Info
Forum Members: 18,643
Total Threads: 8,744
Posts: 95,520

Administrators:
DeeZire, Redemption

There are currently 42 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 01-03-2005, 05:49 PM   #1 (permalink)
Junior Member
 
Join Date: Jan 2005
Posts: 16
Default Having trouble adding a weapon

I've lately taken to *tweaking* Generals (the original, not Zero Hour) to more suit my tastes. Most of the changes work fine so far, but I've hit a snag.

I modified the Raptor and Stealth weapons. The Raptor's missile only targets air units, does a lot of damage per missile, but only has 2 ammo and doesn't fire very often. The Stealth's missile only targets ground units, but also takes 5 seconds or so between missiles. Takes about 2 of these to kill your average tank.

Now, the Stealth works fine, because it's air-to-ground only. The problem is with the Raptor. I wanted it to have both the AA and the AG missiles. So I went in and tried to add in the StealthJetMissile (and StealthJetLaserGuidedMissile) as the Raptor's second weapon. But no matter what I do, it won't use it in-game.

The two relevant sections of the ini file go as follows:

Code:
DefaultConditionState
      Model               = AVRaptor
      HideSubObject       = BurnerFX01 BurnerFX02
      WeaponLaunchBone = PRIMARY WeaponA
      WeaponLaunchBone = SECONDARY WeaponA
      End
Code:
WeaponSet
    Conditions          = None 
    ; -----
    Weapon              = PRIMARY     RaptorJetMissileWeapon
    PreferredAgainst    = PRIMARY     AIRCRAFT
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = SECONDARY   StealthJetMissileWeapon
    PreferredAgainst    = SECONDARY   VEHICLE STRUCTURE
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
  End
  WeaponSet
    Conditions          = PLAYER_UPGRADE 
    ; -----
    Weapon              = PRIMARY     RaptorJetLaserGuidedMissileWeapon
    PreferredAgainst    = PRIMARY     AIRCRAFT
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = SECONDARY   StealthJetLaserGuidedMissileWeapon
    PreferredAgainst    = SECONDARY   VEHICLE STRUCTURE
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
  End
For the latter section, I copied the Comanche's WeaponSet code and altered it to my purposes. I'm not sure exactly what I'm messing up. Did I make a typo, or is there some other value I need to edit or something?
Jim Starluck is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2005, 11:21 AM   #2 (permalink)
Junior Member
 
Join Date: Jan 2005
Posts: 16
Default

Anyone? Little help?
Jim Starluck is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2005, 11:50 AM   #3 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

Please post your modified WEAPON.ini lines. Maybe there is something wrong there.
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2005, 12:20 PM   #4 (permalink)
Junior Member
 
Join Date: Jan 2005
Posts: 16
Default

Raptor Missile (air-to-air only):
Code:
Weapon RaptorJetMissileWeapon
  PrimaryDamage               = 300.0            
  PrimaryDamageRadius         = 5.0
  ScatterRadiusVsInfantry     = 10.0
  AttackRange                 = 320
  MinimumAttackRange          = 100.0
  AcceptableAimDelta          = 30
  DamageType                  = JET_MISSILES
  DeathType                   = EXPLODED
  WeaponSpeed                 = 1000
  ProjectileObject            = RaptorJetMissile
  ProjectileExhaust           = MissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicMissileExhaust
  FireFX                      = None
  FireSound                   = RaptorJetMissileWeapon
  ProjectileDetonationFX      = WeaponFX_JetMissileDetonation
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  DelayBetweenShots           = 8000
  ClipSize                    = 2 
  ClipReloadTime              = 8000 
  AutoReloadsClip             = RETURN_TO_BASE 
  AntiAirborneVehicle         = Yes
  AntiAirborneInfantry        = No
  AntiGround			= No
  ShowsAmmoPips               = No
End
Stealth Missile (air-to-ground only)
Code:
Weapon StealthJetMissileWeapon
  PrimaryDamage               = 200.0            
  PrimaryDamageRadius         = 5.0
  ScatterRadiusVsInfantry     = 10.0
  AttackRange                 = 320 ;400.0
  MinimumAttackRange          = 100.0
  AcceptableAimDelta          = 30
  DamageType                  = ARMOR_PIERCING
  DeathType                   = EXPLODED
  WeaponSpeed                 = 1000
  ProjectileObject            = RaptorJetMissile
  ProjectileExhaust           = MissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicMissileExhaust
  FireFX                      = None
  FireSound                   = RaptorJetMissileWeapon
  ProjectileDetonationFX      = WeaponFX_JetMissileDetonation
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  DelayBetweenShots           = 2000
  ClipSize                    = 4 
  ClipReloadTime              = 8000 
  AutoReloadsClip             = RETURN_TO_BASE 
  ProjectileCollidesWith      = STRUCTURES
  AntiAirborneVehicle       = No
  AntiAirborneInfantry      = No
  ShowsAmmoPips             = Yes
End
The laser guided variants are identical save for the damage, so I left them out. And I changed the damage on the Stealth missile in order for it to be more usefull against vehicles.
Jim Starluck is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2005, 01:09 PM   #5 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

Try to add "AntiGround = Yes" to the StealthJetMissileWeapon.
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2005, 01:17 PM   #6 (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

To stop you in your tracks - having two weapons on a unit that reloads at the airfield doesn't work at all. It only works if both weapons can target the exact same things, which kinda makes it useless for what you need it for in the first place.

The reason? Well aircraft only return when ALL of their ammo is gone. But if their secondary weapon still has ammo, they won't go back. Instead, they'll just circle the target forever, as the weapon they're trying to fire can't attack the target. That's why they made the comanche reload in the air. If it had to go back to the airfield, it would never do so because its nose cannon never runs out of ammo.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2005, 01:22 PM   #7 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

Well but the code still works, the unit might behave in a strange way, but still from a coder's point of view, it functions.
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2005, 03:51 PM   #8 (permalink)
Junior Member
 
Join Date: Jan 2005
Posts: 16
Default

I wouldn't mind having the Raptor hang around if it only had one kind of missile left, but it does raise a good point (being all out of AG missiles with no enemy aircraft in sight).

In terms of gameplay, though, that only comes up when the aircraft is using either the Guard or Attack-Move commands. And you could always just hit "Stop," or order them to land on their own.

Besides, the problem right now is that the Raptor won't even use the second weapon.

And no, setting StealthJetMissileWeapon and StealthJetLaserGuidedMissileWeaopn to AntiGround = Yes didn't let the Raptor use them.



Is it possible that I need to change which missile object the weapons are using? I copy/pasted some of the RaptorJetMissile code into the StealthJetMissile, so they're both firing the RaptorMissile object...could that be the problem?
Jim Starluck is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2005, 03:54 PM   #9 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

Remove the PreferredAgainst and the AutoChooseSources lines on both weapons. Since they are AntiGround / AntiAir only they can't fire otherwise so it might be obsolete.
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2005, 04:42 PM   #10 (permalink)
Junior Member
 
Join Date: Jan 2005
Posts: 16
Default

Tried that, nothing.

I disabled the ammo pips on the Air-to-air missiles so I can just click on the jet to see whether or not it's using the Stealth Missiles. Originally I thought it was a conflict between two weapons that both had ammo pips, but now I'm not so sure.
Jim Starluck 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
I'm having trouble getting rid of this gay ass mod ! Lava2007 Red Alert 2 & Yuri's Revenge Editing 0 11-25-2006 03:45 PM
Having Trouble Adding New Unit Sicknesslife Red Alert 2 & Yuri's Revenge Editing 6 01-09-2004 10:44 AM
Could someone help me with adding a weapon on a supply truck scythe_3000 Generals & Zero Hour Editing 5 07-29-2003 01:04 PM
adding a new specialpower weapon... CarmaPlayer Generals & Zero Hour Editing 18 04-15-2003 07:36 PM
AI trouble and AI question ice Red Alert 2 & Yuri's Revenge Editing 4 02-07-2003 12:14 AM


All times are GMT -4. The time now is 10:51 AM.


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