Posted by: Iprahim9112 - Tuesday, May 4, 2021 9:39:00 PM
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
Posted by: General Brown - Wednesday, May 12, 2021 11:26:27 AM
G'day,
Try this.
In the units.ini file under 'Engineering Parameters'
Behavior = AIUpdateInterface ModuleTag_04
AutoAcquireEnemiesWhenIdle = No
End
Cheer's General Brown.[smile]
Posted by: Iprahim9112 - Friday, May 21, 2021 3:07:57 PM
Hi, General Brown
that didn't work sadly
Posted by: General Brown - Tuesday, May 25, 2021 11:54:27 AM
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.[smile]
Posted by: beng - Saturday, November 6, 2021 8:25:17 AM
[quote=Iprahim9112;150595]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[/quote]
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.
Posted by: rey - Thursday, October 13, 2022 8:21:43 AM
Check mod TEOD, Russia faction, RPGs there can't fire from fireports.
If i remember correctly it's done via
[quote] 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
[b]WeaponBonusPassedToPassengers = Yes[/b]
End[/quote]
to activate bonus mechanic for inmates
[quote]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
[b]WeaponBonus = PLAYER_UPGRADE RANGE -100%[/b]
End[/quote]to make 0 range(basically no fire) for RPG soldiers.
Posted by: Gameanater - Friday, October 14, 2022 8:27:05 PM
[quote=beng;151645][quote=Iprahim9112;150595]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[/quote]
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.[/quote]
Color me suprised to come back after a few years to see an old Generals modding vet here again. Wow!