Heavy ship turret [Solved]

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
baumerindustries
Lance Corporal
Posts: 96
Joined: Mon Apr 11, 2011 8:24 am
Games I'm Playing :: Bf2 EAW EAWFOC[SI]
xbox live or psn: No gamertag set
Location: In front of my english vocab and translating my confused thinkings into English....

Heavy ship turret [Solved]

Post by baumerindustries »

Hi, I want to make the shipturret of the cis playable by a player. So I edited some odfs and ended up with this:
Hidden/Spoiler:
[code][GameObjectClass]
ClassLabel = "armedbuilding"
GeometryName = "cis_prop_shipturret.msh"

[Properties]

BUILDINGSECTION = "BODY"

MapTexture = "shipturret_icon"
IconTexture = "HUD_all_lascannon_icon"

MapScale = "1.8"
HealthTexture = "HUD_kam_turret_icon"

GeometryName = "cis_prop_shipturret"
ExplosionName = "spa2_prop_antenna_descruct_exp"
DestroyedGeometryName = "cis_prop_shipturret_dam1"

MaxHealth = "15000.0"


BUILDINGSECTION = "TURRET1"

ForceMode = 1

TurretNodeName = "aimer_head"

PitchLimits = "-40 15"
YawLimits = "-180 180"

PitchTurnFactor = "0.0"

//FirstPerson = "com\comviewf;com_1st_cockpit_viewfinder"
ThirdPersonFOV = "65"
WeaponName = "spa1_weap_imp_shipturret"
WeaponAmmo = "0"


MaxTurnSpeed = "5.0"
MaxPitchSpeed = "5.0"
PitchRate = "1.0"
TurnRate = "1.0"
PCMaxPitchSpeed = "5.0"
PCMaxTurnSpeed = "5.0"
EyePointOffset = "0.0 0.0 0.0"
TrackCenter = "0.0 15.0 -15.0"
TrackOffset = "0.0 -8.0 -8.0"
TiltValue = "10"

TURRETSECTION = "TURRET1"

PilotType = "remote"

AimerNodeName = "aimer_barrels"
AimerPitchLimits = "-30 10"
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 = ""


FoleyFXGroup = "metal_foley"

DamageStartPercent = 50.0
DamageStopPercent = 30.0
DamageEffect = "com_sfx_vehiclespark"

DamageStartPercent = 30.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_vehiclespark"
DamageAttachPoint = "hp_spark_1"

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


//CHUNKSECTION = "CHUNK1"
//ChunkGeometryName = "cis_bldg_boxturret_chunk1"
//ChunkNodeName = ""
//ChunkPhysics = "STATIC"


CHUNKSECTION = "CHUNK1"
ChunkGeometryName = "cis_bldg_boxturret_chunk2"
ChunkNodeName = ""
ChunkTerrainCollisions = "6"
ChunkTerrainEffect = "com_sfx_explosion_lg"
ChunkPhysics = "FULL"
ChunkOmega = "1.4 1.5 2.0"
ChunkBounciness = 0.45
ChunkStickiness = 0.25
ChunkSpeed = "16.0"
ChunkUpFactor = "14.00"
ChunkTrailEffect = "com_sfx_chunktrail_sm"[/code]
It's used with the Remoteconsoles around the Mainframe. but if you turn right and left, the cosour moves, but not the turret itself. The shot goes in the direction of the cousor.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: heavy ship turret

Post by DarthD.U.C.K. »

the problem is that you seemed to have taken the odf from a boxturret and only changed the msh and weapon. you should take the original odf and edit it rather than taking another one. the reason why the turret doesnt move is that the hardpoint that are referenced such as aimer_head, aimer_barrels, barrel1, barrel2, hp_fire1, hp_fire2 etc. that the boxturret has arent present in the mshfile of the shipturret. therefore it cant rotate, have recoil and so on. i think all you need to do to make the shipturret pilotable is to change the pilottype to remote.
you probably want to give it a little wider roatationrange if the player controlls it. to do that ou hace to edit these values in the buildingsecion "body"

Code: Select all

PitchLimits             = "-5 5"
YawLimits           	= "-10 10"
pitch is the verical rotation and yaw the horizontal
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: heavy ship turret

Post by Bob »

change
Hidden/Spoiler:
[code]
TurretNodeName = "aimer_head"
[/code]
to
Hidden/Spoiler:
[code]
TurretNodeName = "aimer_y"
[/code]
and
Hidden/Spoiler:
[code]
TURRETSECTION = "TURRET1"

PilotType = "remote"

AimerNodeName = "aimer_barrels"
AimerPitchLimits = "-30 10"
AimerYawLimits = "-0 0"


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

NextBarrel = "-"

BarrelNodeName = "barrel2"
BarrelRecoil = "0.5"
FirePointName = "hp_fire2"
[/code]
to
Hidden/Spoiler:
[code]
TURRETSECTION = "TURRET1"

AimerNodeName = "aimer_x"
AimerPitchLimits = "-5 5"
AimerYawLimits = "-10 10"


BarrelNodeName = "spa2_prop_shipturret1_L_GunBarrel_ZaxisRecoil"
BarrelRecoil = "2.5"
FirePointName = "hp_LGun"

NextBarrel = "-"

BarrelNodeName = "spa2_prop_shipturret1_R_GunBarrel_ZaxisRecoil"
BarrelRecoil = "2.5"
FirePointName = "hp_RGun"
[/code]
baumerindustries
Lance Corporal
Posts: 96
Joined: Mon Apr 11, 2011 8:24 am
Games I'm Playing :: Bf2 EAW EAWFOC[SI]
xbox live or psn: No gamertag set
Location: In front of my english vocab and translating my confused thinkings into English....

Re: heavy ship turret

Post by baumerindustries »

It works when I take the second given solution with the remote thing. So It works thx.
But now i've got the problem I see the back of this biiig turret and only the back, on the whole screen. How can I fix that?
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: heavy ship turret

Post by Bob »

Go under BUILDINGSECTION = "TURRET1" and change
Hidden/Spoiler:
EyePointOffset = "0.0 0.0 0.0"
TrackCenter = "0.0 15.0 -15.0"
TrackOffset = "0.0 -8.0 -8.0"
to
Hidden/Spoiler:
EyePointOffset = "0.0 6.2 -8.3"
TrackCenter = "0.0 15.0 -5.0"
TrackOffset = "0.0 -3.0 10.0"
baumerindustries
Lance Corporal
Posts: 96
Joined: Mon Apr 11, 2011 8:24 am
Games I'm Playing :: Bf2 EAW EAWFOC[SI]
xbox live or psn: No gamertag set
Location: In front of my english vocab and translating my confused thinkings into English....

Re: heavy ship turret

Post by baumerindustries »

it's still to big. Could you explain what you're changing so I can fix that alone. Maybe you could tell me which point these values depend from?
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: heavy ship turret

Post by Bob »

the important point is the EyePointOffset, it affects the point from where you look at your turret when you control it. I have no idea wich of the numbers is for the X,Y or Z axis, maybe someone else can help...
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: heavy ship turret

Post by DarthD.U.C.K. »

the eyepointoffset should determinate where the camera is. the vaules should be

Code: Select all

EyePointOffset          = "X-coordinate Y-coordinate Z-coordinate"
so if the turret is too big, decrease the z-value to move the camera further backwards and increase the y-coordinate to move it upwards.
baumerindustries
Lance Corporal
Posts: 96
Joined: Mon Apr 11, 2011 8:24 am
Games I'm Playing :: Bf2 EAW EAWFOC[SI]
xbox live or psn: No gamertag set
Location: In front of my english vocab and translating my confused thinkings into English....

Re: heavy ship turret

Post by baumerindustries »

ok. could it be that the camera stucks between the parts of the turret? there is Np change eben at a value of 300 got the 2. Parameter. How Can I Add a zoom to the turret?
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: heavy ship turret

Post by Bob »

baumerindustries wrote:ok. could it be that the camera stucks between the parts of the turret? there is Np change eben at a value of 300 got the 2. Parameter.
the camera isn't an object, it cant stuck. are you sure you added the line to the correct place in your ODF and REPLACED it with the old parameters?

to make something have a zoom you must change the weapon's ODF, play with the parameters
(or add them if they don't exist):
ZoomMin = "number"
ZoomMax = "number"
(take the same number to make a normal zoom like all weapons have or a higher number for ZoomMax
to control the zoom with the keys "W" and "S")
baumerindustries
Lance Corporal
Posts: 96
Joined: Mon Apr 11, 2011 8:24 am
Games I'm Playing :: Bf2 EAW EAWFOC[SI]
xbox live or psn: No gamertag set
Location: In front of my english vocab and translating my confused thinkings into English....

Re: heavy ship turret

Post by baumerindustries »

ok, now all the problems are fixed. thank you all. (my next question will come soon XD)
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: heavy ship turret

Post by Bob »

baumerindustries wrote:my next question will come soon XD
We'll crush it with wisdom.
Post Reply