Page 1 of 2

Converting Vehicles

Posted: Fri Nov 09, 2007 8:36 pm
by unit468
I was wondering if there is a way to convert a land vehicle like "rep_hover_fightertank" to be able to fly like any other flying vehicle. I have already tried editing the odf in a number of different ways, but I can't seem to get it to work. Any help would be appreciated, Thanks

Re: Converting Vehicles

Posted: Fri Nov 09, 2007 10:01 pm
by computergeek
Can you edit the odf so instead of being VehicleType- hover to VehicleType- flyer
dont copy and paste this because I just guessed on what it would say.
Basically replace "hover" with "flyer"

Re: Converting Vehicles

Posted: Fri Nov 09, 2007 10:15 pm
by unit468
That was my first guess,but when I tried it, I realized I would have to change and add other lines, and I'm not quite sure what to do with those. When I munge my level and go into it, it just crashes.

Re: Converting Vehicles

Posted: Sat Nov 10, 2007 4:33 pm
by Ace_Azzameen_5
Check your bfront2.log to see what's causing the crash.
Put bf2_modtools.exe in your data folder an run your map with it.

Re: Converting Vehicles

Posted: Sat Nov 10, 2007 5:07 pm
by trainmaster611
CHanging the classlabel and vehicletype to flyer isn't the only thing you need to do. You need to go through the contents and erase anything that relates to hover vehicles. Such as
SetAltitude = 0.5
GravityScale = 4.0
LiftSpring = 4.0 //Suspension tightness. High is a firm rugged ride, low is floaty and smooth
LiftDamp = 3.0 //Shock Absorber. High corrects quickly, low causes it to bounce and over correct alot.
and more things.

Then you also have to add contents that apply to flyer vehicles.

Re: Converting Vehicles

Posted: Sat Nov 10, 2007 5:48 pm
by ARC_Commander
It would probably be simpler to take a flyer and change its geometry and animations to the geometry of the hover vehicle that you're converting.

Re: Converting Vehicles

Posted: Sat Nov 10, 2007 6:42 pm
by The_Emperor
ARC_Commander wrote:It would probably be simpler to take a flyer and change its geometry and animations to the geometry of the hover vehicle that you're converting.
qft, that's way easier. Just replace the msh name, animation name and weaponsection in an existing flyer, copy it over your odf et voilĂ , done. Change some sounds, maybe.

Re: Converting Vehicles

Posted: Sat Nov 10, 2007 7:18 pm
by unit468
Thank you everyone. Ill try everything out and let you know.

Re: Converting Vehicles

Posted: Sat Nov 10, 2007 8:05 pm
by unit468
It still crashes on me. I must still be doing something wrong. I edited and added bunch of lines in the odf but it still won't work. And where is this bfront2.log file? I can't find it.

Re: Converting Vehicles

Posted: Sat Nov 10, 2007 9:34 pm
by trainmaster611
In your BF2_Modtools folder, there's an application called BF2_Modtools.exe with a little clone icon. Copy and paste that into Star Wars Battlefront 2/Gamedata. Then run BF2_Modtools from within the gamedata folder. It should run the game in windowed format and have a green thing on the upper half. Ignore that. Run your map with BF2_Modtools.exe. After your map crashes, go back to the gamedata folder. There should be a notepad file called BFront2. Open and copy and paste the contents here.

Re: Converting Vehicles

Posted: Sat Nov 10, 2007 9:54 pm
by unit468
Thanks I'll try that.

Re: Converting Vehicles

Posted: Mon Nov 12, 2007 6:45 pm
by unit468
Ok, I read the log file and found out that it was something else that was causing it to crash so I fixed that, and I also took out the converted vehicle. Now it doesn't crash. So I know it was the vehicle that caused it, and now I just need to figure out what lines I need to change in the odf, so if anyone has any ideas, that would be great.

Re: Converting Vehicles

Posted: Mon Nov 12, 2007 7:52 pm
by AceMastermind
Let's see the ODF contents and we'll help you debug it.

Re: Converting Vehicles

Posted: Mon Nov 12, 2007 10:20 pm
by unit468
Here is the odf. I used the trifighter odf for a stap.
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "flyer"
VehicleType = "flyer"
GeometryName = "cis_hover_stap.msh"

[Properties]
FLYERSECTION = "BODY"
HUDModel = "hud_stap_shape"
Label = "Tridroidfighter"
MapTexture = "stap_icon"
HealthTexture = "HUD_cis_stap_icon"
VehiclePosition = "common.vehiclepositions.pilot"

MapScale = 1.5
MapViewMin = 750
MapViewMax = 750

GeometryName = "cis_hover_stap"
//FirstPerson = "cis\cisstapp;cis_1st_cockpit_stap"

//ExplosionCritical = "cis_fly_droidfighter_exp"
ExplosionDestruct = "cis_fly_droidfighter_exp"
CollisionScale = "0.5"
CollisionThreshold = "15.0"
MaxHealth = 150.0
HealthType = "vehicle"
//HitLocation = "p_crithit 0"

TimeRequiredToEject = "1.0"
EjectResistance = "0.01"
TimeTilReboard = "5.0"

PilotSkillRepairScale = 0.02

// PathFollower Attributes
PathFollowerClass = "cis"
PathFollowerClass_CTF = "cis_flag"
PathFollowerBranchPaths = "6"
PathFollowerBranchMaxAngle = "60"
PathFollowerMinBranchDist = "190.0"
PathFollowerBranchRange = "1500"

//BOOST AND TRICKS

BlurEffect = 0.9
BlurStart = 40.0

FOVEffect3rd = 60

FOVEFFectMinCamOffset3rd = "0.0 2.0 9.0"
FOVEFFectMaxCamOffset3rd = "0.0 3.0 -2.0"

FOVEffect1st = 60

Acceleraton = 50.0
MinSpeed = 35
MidSpeed = 80
MaxSpeed = 105
BoostSpeed = 170

BoostAcceleration = 80.0

EnergyBar = 100
EnergyAutoRestore = 10
EnergyBoostDrain = 20
EnergyTrickDrainSingleTap = 15
EnergyTrickDrainDoubleTap = 30

TrickRollSpeed = 6.0
TrickFlipSpeed = 9.0
TrickSideRollStrafeSpeed = 30
TrickFlipCameraDetach = 0.24
TrickSideRollCameraDetach = 0.48

PitchRate = 1.25
PitchFilter = 6.0
PitchFilterDecel = 6.0
PitchBuildupMultiplier = 1.0
TurnRate = 1.25
TurnFilter = 6.0
TurnFilterDecel = 6.0
TurnBuildupMultiplier = 1.0

BankAngle = 0.8
BankFilter = 3.5
LevelFilter = 1.5
LevelFilterLanding = 5.0 // LevelFilter for landing
RollRate = 3.15

PCPitchRate = 15.0
PCSpinRate = 15.0
PCTurnRate = 25.0

TakeoffTime = 1.0
TakeoffSpeed = 10.0
LandingTime = 1.0
LandingSpeed = 12.5
TakeoffHeight = 1.5
ThirdPersonFOV = "38"
EyePointOffset = "0.0 1.5 0.0"
TrackCenter = "0.0 2.5 -6.0"
TrackOffset = "0.0 0.0 0.0"
// = "0.0 0.0 5.0"
TiltValue = "5.0"

AimTension = "20.0"

MoveTensionX = "5.0"
MoveTensionY = "4.0 15.0"
MoveTensionZ = "4.25"



ThrustEffect = "com_sfx_exhaust_jedistarfighter"
ThrustAttachPoint = "dummyroot"
ThrustAttachOffset = "0.0000 1.0638 -3.3238"
ThrustEffectMinScale = "0.5"
ThrustEffectMaxScale = "1.4"
ThrustEffectScaleStart = "0.55"

ThrustEffect = "com_sfx_exhaust_jedistarfighter"
ThrustAttachPoint = "dummyroot"
ThrustAttachOffset = "0.7177 -0.1793 -3.3238"
ThrustEffectMinScale = "0.5"
ThrustEffectMaxScale = "1.4"
ThrustEffectScaleStart = "0.55"

ThrustEffect = "com_sfx_exhaust_jedistarfighter"
ThrustAttachPoint = "dummyroot"
ThrustAttachOffset = "-0.7177 -0.1793 -3.3238"
ThrustEffectMinScale = "0.5"
ThrustEffectMaxScale = "1.4"
ThrustEffectScaleStart = "0.55"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "dummyroot"
ContrailAttachOffset = "0.0000 1.0638 -3.3238"
ContrailEffectMinScale = "0.0"
ContrailEffectMaxScale = "0.8"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "dummyroot"
ContrailAttachOffset = "0.7177 -0.1793 -3.3238"
ContrailEffectMinScale = "0.0"
ContrailEffectMaxScale = "0.8"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "dummyroot"
ContrailAttachOffset = "-0.7177 -0.1793 -3.3238"
ContrailEffectMinScale = "0.0"
ContrailEffectMaxScale = "0.8"


//WEAPON SYSTEMS

WEAPONSECTION = 1
WeaponName = "cis_weap_hover_stap_cannon"
WeaponAmmo = "0"

AimerNodeName = "hp_nosecannon"
AimerPitchLimits = "-90.0 90.0"
AimerYawLimits = "-90.0 90.0"

//NextAimer = "-"
//
//AimerNodeName = "hp_gun_2"
//AimerPitchLimits = "-90.0 90.0"
//AimerYawLimits = "-90.0 90.0"
//
//NextAimer = "-"
//
//AimerNodeName = "hp_gun_1"
//AimerPitchLimits = "-90.0 90.0"
//AimerYawLimits = "-90.0 90.0"



////DAMAGE///////////
///////////////
// SMOKE

DamageStartPercent = "75"
DamageStopPercent = "35"
DamageEffect = "com_sfx_vehiclesmoke_speeder"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_1"

DamageStartPercent = "55"
DamageStopPercent = "15"
DamageEffect = "com_sfx_vehiclesmoke_speeder"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage2"

DamageStartPercent = "55"
DamageStopPercent = "0.1"
DamageEffect = "com_sfx_vehiclesmoke_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_2"

// FLAME

DamageStartPercent = "35"
DamageStopPercent = "0.1"
DamageEffect = "com_sfx_vehicleflame_speeder"
DamageEffectScale = "0.75"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_1"

DamageStartPercent = "15"
DamageStopPercent = "0.01"
DamageEffect = "com_sfx_vehicleflame_speeder"
DamageEffectScale = "0.75"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_2"


// SOUND

VOUnitType = 085
EngineSound = "cis_hover_stap_engine_parameterized"
TakeoffSound = "cis_fly_tridroidfighter_take_off"
LandSound = "cis_fly_tridroidfighter_land"
HurtSound = ""
DeathSound = "com_weap_obj_small_exp"
VehicleCollisionSound ="com_veh_collision_sm"
TurnOnSound = ""
TurnOffSound = "" //Played when the flyer turns off
TurnOffTime = "1.5" //Time it takes to turn off the flyer (in seconds)
TurningOffSound = "cis_fly_tridroidfighter_turn_off" // Played when a soldier leaves the flyer
Cockpit1stPersonSound = "cis_inf_com_space_chatter" // Sound which is triggered every frame when the player is in first person mode.
Cockpit3rdPersonSound = "cis_inf_com_space_chatter" // Sound which is triggered every frame when the player is in third person mode.
BoostSound = "cis_fly_tridroidfighter_shift_up_low_property 0.11 1"
BoostSound = "cis_fly_tridroidfighter_shift_up_property 0.53 1"
BoostSound = "cis_fly_tridroidfighter_shift_up_high_property 0.66 1"
BoostSound = "cis_fly_tridroidfighter_shift_down_low_property 0.11 0"
BoostSound = "cis_fly_tridroidfighter_shift_down_high_property 0.17 0"
BoostSound = "cis_fly_tridroidfighter_shift_down_property 0.41 0"
BoostSound = "cis_fly_tridroidfighter_shift_down_high_property 0.9 0"
TrickSound = "cis_fly_tridroidfighter_roll" //Played when the flyer performs a roll
FlipSound = "cis_fly_tridroidfighter_flip" //Played when the flyer performs a flip
ProximityMinDist = "25" // Distance from target where proximity parameter of engine is 0.
ProximityMaxDist = "100" // Distance from target where proximity parameter of engine is 1.

//MinSpeed = 35 = .21
//MidSpeed = 80 = .47
//MaxSpeed = 105 = .62
//BoostSpeed = 170

Music = ""
CISMusic ="cis_vehicle"
RepMusic ="rep_vehicle"
ImpMusic ="imp_vehicle"
MusicSpeed = ".15"
MusicDelay = "3.0"
FoleyFXGroup = "metal_foley"

Re: Converting Vehicles

Posted: Mon Nov 12, 2007 11:06 pm
by AceMastermind
Get rid of the weapon section you have and copy this into your ODF in place of it, then munge and try it out:
Hidden/Spoiler:
[code]PilotPosition = "hp_active"
PilotAnimation = "stap_ride"

WeaponName = "cis_weap_hover_stap_cannon"
WeaponAmmo = "0"

EyePointOffset = "0.0 3.0 0.0"
TrackCenter = "0.0 3.0 0.0"
TrackOffset = "0.0 0.0 5.0"
TiltValue = "5.0"

PitchLimits = "-15.0 15.0"
YawLimits = "-15.0 15.0"

AimerNodeName = "hp_gun_2"
AimerPitchLimits = "-90.0 90.0"
AimerYawLimits = "-90.0 90.0"

NextAimer = "-"

AimerNodeName = "hp_gun_1"
AimerPitchLimits = "-90.0 90.0"
AimerYawLimits = "-90.0 90.0"[/code]

Re: Converting Vehicles

Posted: Tue Nov 13, 2007 10:18 pm
by unit468
Hey, I tried what you said Ace, but no go. I'm gonna look over the odf and make sure there aren't any mistakes, like too may brackets or something.

Re: Converting Vehicles

Posted: Tue Nov 13, 2007 10:34 pm
by AceMastermind
What errors are you getting in your BFront2.log after you run the game with the BF2_modtool.exe?

Re: Converting Vehicles

Posted: Tue Nov 13, 2007 10:43 pm
by trainmaster611
I'm 90% sure this is needed. Its collision references. But me being myself, I could be wrong.

Code: Select all

AISizeType		= "SMALL"


//BuildingCollision 		= "p_sphere"
//BuildingCollision 		= "p_sphere1"


VehicleCollision 		= "p_sphere"
VehicleCollision 		= "p_sphere1"

SoldierCollision		= "CollisionMesh"

OrdnanceCollision		= "CollisionMesh"
Add those things and see if it helps. I'm pretty sure those lines are necessary.

Look at this

Code: Select all

////DAMAGE///////////
///////////////
// SMOKE

DamageStartPercent = "75"
DamageStopPercent = "35"
DamageEffect = "com_sfx_vehiclesmoke_speeder"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_1"

DamageStartPercent = "55"
DamageStopPercent = "15"
DamageEffect = "com_sfx_vehiclesmoke_speeder"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage2"

DamageStartPercent = "55"
DamageStopPercent = "0.1"
DamageEffect = "com_sfx_vehiclesmoke_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_2"
See those last two bits are exactly the same except for the DamageStopPercent value. I would take this part out

Code: Select all

DamageStartPercent = "55"
DamageStopPercent = "0.1"
DamageEffect = "com_sfx_vehiclesmoke_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_2"
Because the one that says DamageStopPercent = "15" is the one that is in the stap ODF.

The ThrustEffect section also refers to a hardpoint called "dummyroot". I'm not sure that exists in the stap model because I don't see it in the stap ODF. My suggestion is either change the name of the hardpoint for the thrusteffect to something you know exists or else just take out the Thrusteffect altogether.

Re: Converting Vehicles

Posted: Wed Nov 14, 2007 9:31 pm
by unit468
Tried everything you said, but still no luck. Ill post my log file when im home.

Re: Converting Vehicles

Posted: Sat Nov 17, 2007 11:26 am
by unit468
Ok, it might be a while before I can post it because I won't have access to it for a little while, but when I do I will post the log file. Thanks