Auto Turret 'Awareness' Question

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Sakujyo
Recruit Womprat Killer
Posts: 11
Joined: Sun May 23, 2010 5:57 pm

Auto Turret 'Awareness' Question

Post by Sakujyo »

How does one make an auto turret...smarter? Such as increasing its active range, because my default it seems that the auto turrets from felucia only attack once fired upon, or if you stand very close to it, or a shot has been fired in their general direction, i.e. a shot fired between two turrets triggers both. Is there a way to cause a selected number of turrets to commence a firing barrage once a player has entered a certain region(s)? If possible I'd love for these turrets to be as proactive as the chaingun turrets inside capital ships on the stock space maps - I added several of these to my map and they have sniped me from across the map :funny2: . Thanks!
Last edited by Sakujyo on Sat Jun 19, 2010 5:30 am, edited 1 time in total.
User avatar
SW_elite
Filthy Thief
Filthy Thief
Posts: 507
Joined: Sat Jan 02, 2010 6:43 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia!!!

Re: Quick Turret Question

Post by SW_elite »

You have to go into the odf file for the turret you want to change. You can change stuff like the range in there. You can also add other stuff like a barrage option in there as well although I can't remember what it acctualy was that you have to type in to add it...

As for the part where you want all the turrets to start fiering at you as soon as you enter a region, you could make a region in ZE and use the OnEnterRegion() command to get it to work, but you will need someone else to explain it for you becuase I simply cannot. (Haven't learnt it myself :? )
Sakujyo
Recruit Womprat Killer
Posts: 11
Joined: Sun May 23, 2010 5:57 pm

Re: Quick Turret Question

Post by Sakujyo »

Kind of like the teleporter tutorial right? But apparently I wasn't able to change the HP of the felucia turret by editing the odf...so I must not be going deep enough in the class hierarchy. Do you have any experience in editing turrets, like for example modifying their health?

Here is my current tur_bldg_recoilless_fel_auto.odf code. I added a few things as outlined here: http://www.gametoast.com/forums/viewtop ... ge#p384982 (Oh trusty search function, but it did not make any noticeable difference in the auto turret behavior).
Hidden/Spoiler:
[code][GameObjectClass]
ClassLabel = "armedbuilding"
GeometryName = "fel1_weap_prop_turret.msh"

[Properties]

BUILDINGSECTION = "BODY"

MapTexture = "turret_icon"
IconTexture = "HUD_all_lascannon_icon"

MapScale = "1.2"
HealthTexture = "HUD_kam_turret_icon"

GeometryName = "fel1_weap_prop_turret"
DestroyedGeometryName = "fel1_weap_prop_turret_chunk"

TargetableCollision = "p_collision14"

MaxHealth = "15000.0"
RespawnTime = "30.0"


BUILDINGSECTION = "TURRET1"

ForceMode = 1

Pilottype = "self"

TargetEnemy = "1"
TargetFriendly = "1"


TurretNodeName = "aimer_y"

PitchLimits = "-30 20"
YawLimits = "-180 180"

PitchTurnFactor = "0.0"
//FirstPerson = "com\comviewf;com_1st_cockpit_viewfinder"
ThirdPersonFOV = "65"
WeaponName = "tur_weap_recoilless_rifle"
WeaponAmmo = "0"

MinRange = "2"
OptimalRange = "10"
MaxRange = "100"

BarrageMin = "3"
BarrageMax = "6"
BarrageDelay = "0.5"

AIBubbleScaleDistDivider = "100"
AIBubbleScaleClamp = "3.0"
AIBubbleSizeMultiplier = "0.2"

MinSpread = "0.0"
MaxSpread = "0.2"
AutoAimSize = "2.0"


MaxTurnSpeed = "3.8"
MaxPitchSpeed = "3.8"
PitchRate = "1.0"
TurnRate = "1.5"
PCMaxPitchSpeed = "6.0"
PCMaxTurnSpeed = "6.0"
EyePointOffset = "0.0 6.2 -8.3"
TrackCenter = "0.0 8.0 5.0"
TrackOffset = "-0.9 -3.4 7.5"

TURRETSECTION = "TURRET1"

AimerNodeName = "aimer_x"
AimerPitchLimits = "-30 20"
AimerYawLimits = "0 0"


BarrelNodeName = "barrel1"
BarrelRecoil = "0.5"
FirePointName = "hp_fire1"

NextBarrel = "-"

BarrelNodeName = "barrel2"
BarrelRecoil = "0.5"
FirePointName = "hp_fire2"



TurretYawSound = "turret_whir_yaw_lp"
TurretYawSoundPitch = "0.7"
TurretPitchSound = "turret_whir_pitch_lp"
TurretPitchSoundPitch = "0.7"
TurretAmbientSound = ""
TurretActivateSound = "vehicle_equip"
TurretDeactivateSound = "vehicle_equip"
TurretStartSound = ""
TurretStopSound = ""

PilotPosition = "hp_main_gunner"
PilotAnimation = "drive"

FoleyFXGroup = "metal_foley"

DamageStartPercent = 50.0
DamageStopPercent = 30.0
DamageEffect = "com_sfx_vehiclespark"

DamageStartPercent = 30.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_smokeplume"
DamageAttachPoint = "hp_smoke_1"

////// Chunks //////////

CHUNKSECTION = "CHUNK1"
ChunkGeometryName = "antiaircraft_chunk2"
ChunkNodeName = ""
ChunkTerrainCollisions = "3"
ChunkTerrainEffect = "com_sfx_explosion_lg"
ChunkPhysics = "FULL"
ChunkOmega = "2.0 0.5 2.0"
ChunkBounciness = 0.4
ChunkStickiness = 0.25
ChunkSpeed = "8.0"
ChunkUpFactor = "2.00"
ChunkTrailEffect = "com_sfx_chunktrail_sm"


CHUNKSECTION = "CHUNK2"
ChunkGeometryName = "antiaircraft_chunk3"
ChunkNodeName = ""
ChunkTerrainCollisions = "5"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = "com_sfx_chunktrail_sm"
ChunkPhysics = "FULL"
ChunkOmega = "3.0 2.0 2.0"
ChunkSpeed = "14.0"
ChunkBounciness = 0.5
ChunkStickiness = 0.25


CHUNKSECTION = "CHUNK3"
ChunkGeometryName = "antiaircraft_chunk4"
ChunkNodeName = ""
ChunkTerrainCollisions = "3"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = "com_sfx_chunktrail_sm"
ChunkPhysics = "FULL"
ChunkOmega = "3.0 1.0 2.0"
ChunkSpeed = "9.0"
ChunkBounciness = 0.3
ChunkStickiness = 0.45

ExplosionCritical = "tur_myg_recoilless_md_exp"
ExplosionDestruct = "tur_myg_recoilless_md_exp"[/code]
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Auto Turret 'Awareness' Question

Post by myers73 »

edit the MinRange, and MaxRange, these tell the AI what distance to fire at, not the range at which they are effective, which is what some people think
Sakujyo
Recruit Womprat Killer
Posts: 11
Joined: Sun May 23, 2010 5:57 pm

Re: Auto Turret 'Awareness' Question

Post by Sakujyo »

This just occurred to me...they're quite effective when fighting enemy objects...as soon as they spot an enemy turret they will commence a firing barrage. However the same doesn't hold true for regular infantry :( I guess its impossible to change the felucia auto turrets into something that poses a serious threat to infantry, and not just enemy objects or infantry in vehicles.
User avatar
SAMofBIA
Major General
Major General
Posts: 649
Joined: Tue Jun 15, 2010 3:38 pm
Projects :: Nothing....nothing at all.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: MIA and not stopping in often anymore.

Re: Auto Turret 'Awareness' Question

Post by SAMofBIA »

I guess its impossible to change the felucia auto turrets into something that poses a serious threat to infantry, and not just enemy objects or infantry in vehicles.
i wouldnt believe that your last statement is true Sakujyo. have you tried editing their lock on's? in their odf there should be something that says "target:___ = 0/1" or something like that. is it possible that those are not active for the "player"(or somat like that)? or it could be some other script that instructs it to attack the biggest threat in the area. im going to do some experimenting on this.

(hint: you could always take the hoth auto turret values and replace the felucia turret values with them)
Post Reply