Iprahim9112
4 years ago
Hi, I'm making some edits to infantry and I wonder if I could make some units like RPG soldiers not to fire while contained (inside a vehicle) while allowing other small arms infantry to fire normally.
and mortar soldiers not to fire while contained or in garrison.
things I thought of.. "PassengersAllowedToFire" under "TransportContain" but that effects all passengers
Sponsor
General Brown
4 years ago
G'day,
Try this.

In the units.ini file under 'Engineering Parameters'

Behavior = AIUpdateInterface ModuleTag_04
AutoAcquireEnemiesWhenIdle = No
End
Cheer's General Brown.😄
Iprahim9112
4 years ago
Hi, General Brown
that didn't work sadly

General Brown
4 years ago
G'day,
Do this as well, but this means that you have control over the units for attacking.

'DESIGN parameters'

DELETE-'FROM_SCRIPT FROM_AI' and add FROM_PLAYER

WeaponSet
Conditions = NONE
; -----
Weapon = PRIMARY ASOSniperRifle
AutoChooseSources = PRIMARY FROM_PLAYER DEFAULT_SWITCH_WEAPON
; -----
Weapon = SECONDARY ASOSniperRifleKP
AutoChooseSources = SECONDARY FROM_PLAYER DEFAULT_SWITCH_WEAPON
; -----
Weapon = TERTIARY ASOSniperRifleKG
AutoChooseSources = TERTIARY FROM_PLAYER DEFAULT_SWITCH_WEAPON
WeaponLockSharedAcrossSets = Yes
End
Cheer's General Brown.😄
beng
  • beng
  • 66.5% (Friendly)
  • Captain
4 years ago

Hi, I'm making some edits to infantry and I wonder if I could make some units like RPG soldiers not to fire while contained (inside a vehicle) while allowing other small arms infantry to fire normally.
and mortar soldiers not to fire while contained or in garrison.
things I thought of.. "PassengersAllowedToFire" under "TransportContain" but that effects all passengers

Originally Posted by: Iprahim9112 



I seem to recall there is an easy way to do this but I can't for the life of me remember what it was. Something to do with the weaponset.
rey
  • rey
  • 52.5% (Neutral)
  • Major
3 years ago
Check mod TEOD, Russia faction, RPGs there can't fire from fireports.
If i remember correctly it's done via

Behavior = TransportContain ModuleTag_05
Slots = 8
PassengersAllowedToFire = Yes
ScatterNearbyOnExit = No
HealthRegen%PerSec = 10
DamagePercentToUnits = 30%
AllowInsideKindOf = INFANTRY
ExitDelay = 300
NumberOfExitPaths = 3 ; Defaults to 1. Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
WeaponBonusPassedToPassengers = Yes
End


to activate bonus mechanic for inmates

Weapon RussiaRPG_27Missile
PrimaryDamage = 240.0
PrimaryDamageRadius = 3.0
ScatterRadiusVsInfantry = 20.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 225.0
PreAttackDelay = 900
PreAttackType = PER_SHOT
MinimumAttackRange = 10.0 ; Rockets take some distance to target, and you don't want them to blow up in your face.
DamageType = INFANTRY_MISSILE ;ignored for projectile weapons
DeathType = EXPLODED
WeaponSpeed = 600 ; ignored for projectile weapons
ProjectileObject = RPG29M
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
ScatterRadius = 0 ; This weapon will scatter somewhere within a circle of this radius, instead of hitting someone directly
DelayBetweenShots = 100 ; time between shots, msec
ClipSize = 3 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 60000 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
FireSound = RPG29Fire
FireFX = FX_RPG27MissileIgnition
ProjectileDetonationFX = WeaponFX_LOWATDetonation
AntiAirborneVehicle = No
AntiAirborneInfantry = No
WeaponBonus = PLAYER_UPGRADE RANGE -100%
End

to make 0 range(basically no fire) for RPG soldiers.
Gameanater
3 years ago

Hi, I'm making some edits to infantry and I wonder if I could make some units like RPG soldiers not to fire while contained (inside a vehicle) while allowing other small arms infantry to fire normally.
and mortar soldiers not to fire while contained or in garrison.
things I thought of.. "PassengersAllowedToFire" under "TransportContain" but that effects all passengers

Originally Posted by: beng 



I seem to recall there is an easy way to do this but I can't for the life of me remember what it was. Something to do with the weaponset.

Originally Posted by: Iprahim9112 



Color me suprised to come back after a few years to see an old Generals modding vet here again. Wow!




Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.