Page 1 of 1

No vehicle collision glitch [Solved]

Posted: Fri Dec 08, 2017 1:34 pm
by Calrissian97
So after working on my map for a good five months I've finally run into a problem I can't get around. For whatever reason, whenever I load stock vehicles but with edited odfs through a custom side (the ClassParent trick) the collision is absent from these models.
Screenshot:
Image

Here's how I'm loading them through the lua:

Code: Select all

    ReadDataFile("SIDE\\rep.lvl",
		"rep_fly_assault_dome",
		"rep_fly_anakinstarfighter_sc",
		"rep_fly_arc170fighter_sc",
		"rep_fly_gunship_sc",
		"rep_fly_vwing",
		"rep_hover_fightertank",
		"rep_hover_barcspeeder",
		"rep_inf_ep2_rifleman",
		"rep_inf_ep2_rocketeer",
		"rep_inf_ep2_engineer",
		"rep_inf_ep2_sniper",
		"rep_inf_ep3_officer",
		"rep_inf_ep2_jettrooper")

    ReadDataFile("dc:SIDE\\rep.lvl",
	"rep_fly_anakinstarfighter_scN",
        "rep_fly_arc170fighter_scN",
	"rep_fly_arc170fighter_dome",
        "rep_fly_assault_domeN",
        "rep_fly_gunship_scN",
        "rep_fly_gunship",
        "rep_fly_vwingN",   
	"rep_hero_ahsoka",
        "rep_hero_anakin_cloakedHD",
	"all_hover_hovernaut",
	"rep_inf_ep2_engineerN",
        "rep_inf_ep2_jettrooperN",
        "rep_inf_ep2_jettrooper_sniperN",
        "rep_inf_ep2_officerN",
	"rep_inf_ep2_riflemanN",
        "rep_inf_ep2_rocketeerN",
	"rep_inf_commando")
I've manually cleaned and munged numerous times to no avail.
Maybe this error message will provide insight?

Code: Select all

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionMesh.cpp(550)
Duplicate collision mesh name exists in another level file: d6b3a2f1
It's the only possibly related error message I can find. Any help with this would be greatly appreciated.

Re: No vehicle collision glitch

Posted: Fri Dec 08, 2017 9:10 pm
by Marth8880
Could you please post the edited ODF here so we can take a look at it? :o

Re: No vehicle collision glitch

Posted: Fri Dec 08, 2017 9:15 pm
by Calrissian97
Sure thing. Might as well give ya the one in the picture:
Hidden/Spoiler:
[code][GameObjectClass]
ClassParent = "rep_fly_anakinstarfighter_sc"
ClassLabel = "flyer"
//GeometryName = "rep_fly_anakinstarfighter.msh"

[Properties]
HUDModel = "hud_jedistarfighter_shape"
FLYERSECTION = "BODY"
VehicleType = "fighter"

MapTexture = "anistarfighter_icon"
HealthTexture = "HUD_rep_jedistarfighter_icon"
VehiclePosition = "common.vehiclepositions.pilot"

MapScale = 1.5
MapViewMin = 750
MapViewMax = 750
MaxShield = 500
AddShield = 10
//AddShieldOff = 150

// PathFollower Attributes
PathFollowerClass = "rep"
PathFollowerClass_CTF = "rep_flag"
PathFollowerBranchPaths = "6"
PathFollowerBranchMaxAngle = "60"
PathFollowerMinBranchDist = "190.0"
PathFollowerBranchRange = "1500"
SquadronFormation = "five-form"
SquadronFormation = "eschleft-form"
//-----------------------------------

//GeometryName = "rep_fly_anakinstarfighter"
AnimationName = "rep_fly_anakinstarfighter"
//FirstPerson = "REP\repjedfi;rep_1st_cockpit_jedistarfighter"
//ForceMode = "1"

MaxHealth = 1500.0
HealthType = "vehicle"
//HitLocation = "p_crithit 0"

TimeRequiredToEject = "2.5"
EjectResistance = "0.01"
TimeTilReboard = "5.0"

PilotSkillRepairScale = 0.02

TakeoffTime = 1.0
TakeoffSpeed = 10.0
LandingTime = 1.0
LandingSpeed = 12.5
TakeoffHeight = 1.5
LandedHeight = 0.7

WEAPONSECTION = 1
WeaponName = "rep_weap_fly_anakin_cannon"
WeaponAmmo = 0

AimerNodeName = "hp_fire_l"
AimerYawLimts = "-90 90"
AimerPitchLimts = "-90 90"

NextAimer = "-"

AimerNodeName = "hp_fire_r"
AimerYawLimts = "-90 90"
AimerPitchLimts = "-90 90"


WEAPONSECTION = 2
WeaponName = "rep_weap_fly_anakin_missile"
WeaponAmmo = 0

AimerNodeName = "hp_cannon_l"
NextAimer = "-"
AimerNodeName = "hp_cannon_r"


//PilotPosition = "hp_pilot"
//PilotAnimation = "drive"
//IsPilotExposed = "0"

CHUNKSECTION = "CHUNK1"
ChunkGeometryName = "rep_fly_anakinstarfighter_chunk1"
ChunkNodeName = ""
ChunkTerrainCollisions = "2"
ChunkTerrainEffect = "com_sfx_explosion_lg"
ChunkPhysics = "FULL"
ChunkOmega = "0.0 0.0 0.0"
ChunkBounciness = 0.45
ChunkStickiness = 0.25
ChunkSpeed = "8.0"
ChunkUpFactor = "1.00"
ChunkTrailEffect = "com_sfx_chunktrail_sm"

CHUNKSECTION = "CHUNK2"
ChunkGeometryName = "rep_fly_anakinstarfighter_chunk2"
ChunkNodeName = ""
ChunkTerrainCollisions = "2"
ChunkTerrainEffect = "dirtspray"
ChunkPhysics = "FULL"
ChunkOmega = "2.0 2.5 2.0"
ChunkBounciness = 0.45
ChunkStickiness = 0.25
ChunkSpeed = "10.0"
ChunkUpFactor = "0.10"
ChunkTrailEffect = "com_sfx_chunktrail_sm"

CHUNKSECTION = "CHUNK3"
ChunkGeometryName = "rep_fly_anakinstarfighter_chunk3"
ChunkNodeName = ""
ChunkTerrainCollisions = "3"
ChunkTerrainEffect = "dirtspray"
ChunkPhysics = "FULL"
ChunkOmega = "2.0 2.0 1.5"
ChunkBounciness = 0.45
ChunkStickiness = 0.25
ChunkSpeed = "12.0"
ChunkUpFactor = "0.80"
ChunkTrailEffect = "com_sfx_chunktrail_sm"

CHUNKSECTION = "CHUNK4"
ChunkGeometryName = "rep_fly_anakinstarfighter_chunk4"
ChunkNodeName = ""
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = ""
ChunkTrailEffect = "com_sfx_chunktrail_sm"
ChunkPhysics = "FULL"
ChunkOmega = "1.0 1.0 1.0"
ChunkUpFactor = "1.70"
ChunkSpeed = "6.0"

ChunkSmokeEffect = "com_sfx_smokeplume"
ChunkSmokeNodeName = "hp_smoke1"


ThrustEffect = "com_sfx_exhaust_jedistarfighter_blue"
ThrustAttachPoint = "dummyroot"
ThrustAttachOffset = "0.3091 -0.2137 -2.2377"
ThrustEffectMinScale = "0.5"
ThrustEffectMaxScale = "1.4"
ThrustEffectScaleStart = "0.55"

ThrustEffect = "com_sfx_exhaust_jedistarfighter_blue"
ThrustAttachPoint = "dummyroot"
ThrustAttachOffset = "-0.3091 -0.2137 -2.2377"
ThrustEffectMinScale = "0.5"
ThrustEffectMaxScale = "1.4"
ThrustEffectScaleStart = "0.55"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "dummyroot"
ContrailAttachOffset = "0.3091 -0.2137 -2.2377"
ContrailEffectMinScale = "0.2"
ContrailEffectMaxScale = "0.8"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "dummyroot"
ContrailAttachOffset = "-0.3091 -0.2137 -2.2377"
ContrailEffectMinScale = "0.2"
ContrailEffectMaxScale = "0.8"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "dummyroot"
ContrailAttachOffset = "0.3091 -0.2137 -2.2377"
ContrailEffectMinSpeed = "0.0"
ContrailEffectMinScale = "1.2"
ContrailEffectMaxScale = "1.8"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "dummyroot"
ContrailAttachOffset = "-0.3091 -0.2137 -2.2377"
ContrailEffectMinSpeed = "0.0"
ContrailEffectMinScale = "1.2"
ContrailEffectMaxScale = "1.8"


// SPARK

DamageStartPercent = "85"
DamageStopPercent = "25"
DamageEffect = "com_sfx_vehiclespark_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage1"

DamageStartPercent = "75"
DamageStopPercent = "15"
DamageEffect = "com_sfx_vehiclespark_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage2"

DamageStartPercent = "65"
DamageStopPercent = "5"
DamageEffect = "com_sfx_vehiclespark_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage3"

// SMOKE

DamageStartPercent = "75"
DamageStopPercent = "35"
DamageEffect = "com_sfx_vehiclesmoke_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage1"

DamageStartPercent = "65"
DamageStopPercent = "25"
DamageEffect = "com_sfx_vehiclesmoke_sc"
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_damage3"

// FLAME

DamageStartPercent = "35"
DamageStopPercent = "0.1"
DamageEffect = "com_sfx_vehicleflame_sc"
DamageEffectScale = "0.75"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage1"

DamageStartPercent = "25"
DamageStopPercent = "0.1"
DamageEffect = "com_sfx_vehicleflame_sc"
DamageEffectScale = "0.75"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage2"


ExplosionDestruct = "rep_fly_jedifighter_sc_exp"

//SOUNDS*******************8
VOUnitType = 128
EngineSound = "rep_fly_arc170_engine_parameterized"
TakeoffSound = "rep_fly_arc170_take_off"
LandSound = "rep_fly_arc170_land"
HurtSound = "imp_weap_ord_exp_lg"
DeathSound = "imp_weap_ord_exp_lg"
VehicleCollisionSound = "com_veh_collision_lg"
TurnOnSound = "rep_fly_arc170_turn_on"
TurnOffSound = "rep_fly_arc170_airbrakes_off" //Played when the flyer turns off
TurnOffTime = "1.5" //Time it takes to turn off the flyer (in seconds)
TurningOffSound = "rep_fly_arc170_turn_off" // Played when a soldier leaves the flyer
Music = ""
CISMusic = "cis_vehicle"
RepMusic = "rep_vehicle"
MusicSpeed = "0.3"
MusicDelay = "3.0"
AfterburnerOnSound = ""
AfterburnerOffSound = ""
AfterburnerSpeed = ""
Cockpit1stPersonSound = "rep_inf_com_space_chatter"
Cockpit3rdPersonSound = "rep_inf_com_space_chatter"
BoostSound = "rep_fly_arc170_shift_up_property 0.11 1"
BoostSound = "rep_fly_arc170_shift_up_property 0.53 1"
BoostSound = "rep_fly_arc170_shift_up_high_property 0.69 1"
BoostSound = "rep_fly_arc170_shift_down_property 0.17 0"
BoostSound = "rep_fly_arc170_shift_down_property 0.69 0"
TrickSound = "rep_fly_arc170_roll" //Played when the flyer performs a roll
FlipSound = "rep_fly_arc170_flip" //Played when the flyer performs a flip
ProximityMinDist = "25" // Distance from target where proximity parameter of engine is 0.
ProximityMaxDist = "50" // Distance from target where proximity parameter of engine is 1.
FoleyFXGroup = "metal_foley"

// ***************************************************************************************

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

FirstPersonFOV = "52"
CockpitTension = "22"
CollisionScale = 1.5
CollisionThreshold = 5.0

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

EyePointOffset = "0.0 1.0 -2.0"
TrackCenter = "0.0 0.0 0.0"
//TrackOffset = "0.0 2.5 8.0"
TiltValue = "5.0"

AimTension = "20.0"

MoveTensionX = "3.7"
MoveTensionY = "3.2 15.0"
MoveTensionZ = "4.25"


BlurEffect = 0.9
BlurStart = 40.0

FOVEffect3rd = 90
FOVEFFectMinCamOffset3rd = "0.0 3.0 12.0"
FOVEFFectMaxCamOffset3rd = "0.0 6.0 -18.0"

FOVEffect1st = 90

Acceleraton = 50.0
MinSpeed = 35.0
MidSpeed = 80
MaxSpeed = 105
BoostAcceleration = 80.0
BoostSpeed = 170.0

TrickRollSpeed = 6.0
TrickFlipSpeed = 9.0
TrickSideRollStrafeSpeed = 30
TrickFlipCameraDetach = 0.24
TrickSideRollCameraDetach = 0.48
[/code]

Re: No vehicle collision glitch

Posted: Fri Dec 08, 2017 9:20 pm
by Marth8880
I can't remember if that particular flyer parent ODF has them or not and I don't have the ODFs on-hand since I'm still at work, but IIRC, if a flyer ODF has any references to these parameters in it:

Code: Select all

TargetableCollision
TerrainCollision
BuildingCollision
VehicleCollision
SoldierCollision
OrdnanceCollision
They need to be included in any child ODFs as well.

Does that make sense?

Re: No vehicle collision glitch

Posted: Fri Dec 08, 2017 9:32 pm
by Calrissian97
Ok, so I looked through the stock odf and can't find any of those lines. I'd simply load the stock vehicle (which works fine) but then I'd lose the health and shield parameters that I worked on for a day or two to balance. :?
If I were to load all of its assets in my side it would work, but would come at the cost of file size. All the vehicles that are loaded like this lack collision, but ones that are 100% stock or 100% loaded in the custom side work fine. Also wanted to note that this even happens when I load the droideka using the ClassParent method, but not any other troops. Is this because droidekas are treated as vehicles/walkers?

Re: No vehicle collision glitch

Posted: Fri Dec 08, 2017 9:44 pm
by Marth8880
Calrissian97 wrote:Ok, so I looked through the stock odf and can't find any of those lines. I'd simply load the stock vehicle (which works fine) but then I'd lose the health and shield parameters that I worked on for a day or two to balance. :?
If I were to load all of its assets in my side it would work, but would come at the cost of file size. All the vehicles that are loaded like this lack collision, but ones that are 100% stock or 100% loaded in the custom side work fine.
Have you tried including the MSH and not its textures? :o
Calrissian97 wrote:Also wanted to note that this even happens when I load the droideka using the ClassParent method, but not any other troops. Is this because droidekas are treated as vehicles/walkers?
Honestly it's hard to say, but I wouldn't put it past it.

Re: No vehicle collision glitch

Posted: Fri Dec 08, 2017 10:38 pm
by Calrissian97
I'm going to try to just include the msh. Might have to bite the bullet and just include them all in the custom side. Weird that this only affects vehicles tho. I'll update with the results.


EDIT
Marth8880 wrote:Have you tried including the MSH and not its textures? :o

That worked! I'm going to go ahead and call it solved since I think that's as good as it's going to get.
Thanks so much Marth! :bowdown:
I never would have thought of that. Thanks again for your help! :mrgreen: