Page 1 of 2

Self-Piloted Crashes

Posted: Tue Jul 15, 2008 10:42 pm
by jangoisbaddest
So I made some snailtanks into self-piloted vehicles, tied their spawn points to a command post, and played the game. It worked fine. Then I did something, munged, and now it's crashing because of them about five seconds in (for those of you who noticed, this is the source of the mysterious crash I was talking about earlier). I know it's them because when I take them out, no crash. Now, I am able to get the freecam there just before it crashes, and it appears that it does so just as they start moving. Any idea what is causing this?

It must be something to do with the ODF or something, cause the flyers that have self-pilot work just fine and are tied to the same CP in the same way. It can't be anything in ZeroEditor. Here's the ODF for the vehicle.
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "hover"
GeometryName = "cis_tread_tank.msh"

[Properties]
FLYERSECTION = "BODY"
VehicleType = "medium"
PilotType = self

//ReserveOneForPlayer = "0"

MapTexture = "snailtank_icon"
HealthTexture = "HUD_cis_tank_icon"
VehiclePosition = "common.vehiclepositions.pilot"
MapScale = 1.5



GeometryName = "cis_tread_tank"

Explosion = "cis_tread_snailtank_exp"
ExplosionCritical = "cis_tread_snailtank_exp"
ExplosionDestruct = "cis_tread_snailtank_exp"
//FirstPerson = "cis\cishlfrd;cis_1st_cockpit_tankdroid"
FirstPersonFOV = "45"

CockpitTension = 35

CollisionScale = 1.0
CollisionThreshold = 4
MaxHealth = 8000.0
HealthType = "vehicle"
HitLocation = "p_-o_crithit 4"

TimeRequiredToEject = "10.0"
EjectResistance = "0.02"
TimeTilReboard = "5.0"

SetAltitude = 0.0
GravityScale = 3.0
LiftSpring = 4.0
LiftDamp = 3.0

Acceleration = 8.0
Deceleration = 10.0
Traction = 50.0
ForwardSpeed = 10.0
ReverseSpeed = 8.0
StrafeSpeed = 0.0
FloatsOnWater = 0

EnergyBar = 100
EnergyOverheat = 20
EnergyAutoRestore = 10
EnergyBoostDrain = 20
BoostSpeed = 25
BoostAcceleration = 10
BoostFOV = 75

AddSpringBody = "0.0 1.6 2.0 2.0"
BodySpringLength = 0.4
BodyOmegaXSpringFactor = -2.0

AddSpringBody = "0.0 1.6 -0.2 2.0"
BodySpringLength = 0.4

AddSpringBody = "-1.50 0.8 3.0 1.0"
BodySpringLength = 0.4
AddSpringBody = "1.50 0.8 3.0 1.0"
BodySpringLength = 0.4

AddSpringBody = "0.0 0.8 -2.0 1.0"
BodySpringLength = 0.4

AddSpringBody = "0.0 0.6 -4.0 0.75"
BodySpringLength = 0.4

NoRandomSpring = 1

VelocitySpring = 4
VelocityDamp = 2
OmegaXSpring = 3.0
OmegaXDamp = 2.0
OmegaZSpring = 6.0
OmegaZDamp = 2.5

PCPitchRate = "15.0"
PCSpinRate = "15.0"
PCTurnRate = "20.0"

SpinRate = 1.0
TurnRate = 1.25
TurnFilter = 10.0
PitchRate = 0.5
LevelSpring = 5.0
LevelDamp = 3.0

EyePointOffset = "0.0 3.0 -5.0"
TrackCenter = "0.0 -12.0 1.0"
TrackOffset = "0.0 16.5 14.0"
TiltValue = "6.0"
NormalDirection = "0.0 -10.0 0.0"

PitchLimits = "-20.0 30.0"
YawLimits = "-0.0 0.0"


WHEELSECTION = 1
WheelTexture = "cis_tank_tread_tracks"
WheelVelocToV = -0.8333333
WheelOmegaToV = 0


//WEAPONSECTION = 1

//WeaponName = "com_weap_inf_null"
//WeaponAmmo = 0

//FLYERSECTION = "TURRET1"

//VehiclePosition = "common.vehiclepositions.gunner"

WEAPONSECTION = 1

WeaponName = "ksh_weap_cis_snailtank_laser"
WeaponAmmo = 0

AimerNodeName = "aimer_left"
AimerPitchLimits = "-10.0 40.0"
AimerYawLimits = "-20.0 20.0"
FireOutsideLimits = "1"
FirePoint = "hp_gun_1"

NextAimer = "-"

AimerNodeName = "aimer_right"
AimerPitchLimits = "-10.0 40.0"
AimerYawLimits = "-20.0 20.0"
FireOutsideLimits = "1"
FirePoint = "hp_gun_2"


//WEAPONSECTION = 2

//WeaponName = "cis_weap_tread_snailtank_mortar"
//WeaponAmmo = 0

//AimerNodeName = "aimer_left"
//AimerPitchLimits = "-10.0 40.0"
//AimerYawLimits = "-20.0 20.0"
//FireOutsideLimits = "1"
//FirePoint = "hp_cannon_1"

//NextAimer = "-"

//AimerNodeName = "aimer_right"
//AimerPitchLimits = "-10.0 40.0"
//AimerYawLimits = "-20.0 20.0"
//FireOutsideLimits = "1"
//FirePoint = "hp_cannon_2"




WakeEffect = "Hailfire_wake"



CHUNKSECTION = "CHUNK1"
ChunkGeometryName = "cis_tread_tank_chunk1"
ChunkNodeName = ""
ChunkTerrainCollisions = "2"
ChunkTerrainEffect = "com_sfx_dirtspray_lg"
ChunkPhysics = "FULL"
ChunkOmega = "1.0 -.75 3.0"
ChunkSpeed = "5.0"
ChunkUpFactor = "2.0"
ChunkBounciness = "0.75"
ChunkStickiness = "0.5"

CHUNKSECTION = "CHUNK2"
ChunkGeometryName = "cis_tread_tank_chunk2"
ChunkNodeName = ""
ChunkTerrainCollisions = "5"
ChunkTerrainEffect = "com_sfx_dirtspray_lg"
ChunkPhysics = "FULL"
ChunkOmega = "1.0 0.05 1.5"
ChunkSpeed = "9.0"
ChunkUpFactor = "6.0"
ChunkBounciness = "1"

CHUNKSECTION = "CHUNK3"
ChunkGeometryName = "cis_tread_tank_chunk3"
ChunkNodeName = ""
ChunkOmega = "0.5 0.03 1.0"
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "com_sfx_explosion_lg"
ChunkPhysics = "FULL"
ChunkSpeed = "4.0"


CHUNKSECTION = "CHUNK4"
ChunkGeometryName = "cis_tread_tank_chunk4"
ChunkNodeName = ""
ChunkTerrainCollisions = "3"
ChunkTerrainEffect = "com_sfx_dirtspray_lg"
ChunkPhysics = "FULL"
ChunkOmega = "1.0 -.05 1.0"
ChunkSpeed = "11.0"
ChunkUpFactor = "5.0"

CHUNKSECTION = "CHUNK5"
ChunkGeometryName = "cis_tread_tank_chunk5"
ChunkNodeName = ""
ChunkTerrainCollisions = "2"
ChunkTerrainEffect = "com_sfx_dirtspray_lg"
ChunkPhysics = "FULL"
ChunkOmega = "0.6 -0.05 0.9"
ChunkSpeed = "6.0"
ChunkUpFactor = "1.0"

CHUNKSECTION = "CHUNK6"
ChunkGeometryName = "cis_tread_tank_chunk6"
ChunkNodeName = ""
ChunkOmega = "3.0 2.0 2.0"
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "com_sfx_dirtspray_lg"
ChunkPhysics = "FULL"
ChunkSpeed = "12.0"
ChunkUpFactor = "6.0"

CHUNKSECTION = "CHUNK7"
ChunkGeometryName = "cis_tread_tank_chunk7"
ChunkNodeName = ""
ChunkTerrainCollisions = "0"
ChunkTerrainEffect = "com_sfx_explosion_lg"
ChunkPhysics = "FULL"
ChunkOmega = "2.0 -1.0 1.0"
ChunkSpeed = "4.0"
ChunkUpFactor = "6.0"


CHUNKSECTION = "CHUNK8"
ChunkGeometryName = "cis_tread_tank_chunk8"
ChunkNodeName = ""
ChunkTerrainCollisions = "2"
ChunkTerrainEffect = ""
ChunkPhysics = "FULL"
ChunkOmega = "0.1 0.0 0.08"
ChunkSpeed = "0.2"


AISizeType = "MEDIUM"
//MovingTurnOnly = 1

//SuspensionNodeName = "CIS_tank_Droid_center"
//SuspensionLeftArmNodeName = "armL"
//SuspensionRightArmNodeName = "armR"
//SuspensionMaxOffset = "-0.5"
//SuspensionMidOffset = "-0.125"

//////////////////////////
////DAMAGE///////////
///////////////

DamageStartPercent = 60.0
DamageStopPercent = 20.0
DamageEffect = "com_sfx_vehiclespark"
DamageAttachPoint = "hp_damage2"

DamageStartPercent = 70.0
DamageStopPercent = 20.0
DamageEffect = "com_sfx_vehiclespark"
DamageAttachPoint = "hp_damage3"

DamageStartPercent = 70.0
DamageStopPercent = 20.0
DamageEffect = "com_sfx_vehiclespark"
DamageAttachPoint = "hp_damage2"

DamageStartPercent = 50.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_vehiclesmoke"
DamageAttachPoint = "hp_damage1"

DamageStartPercent = 5.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_vehicleflame"
DamageAttachPoint = "hp_damage1"


EngineSound = "cis_tread_hailfire_engine_parameterized"
//HurtSound = "cis_inf_com_chatter_wound"
DeathSound = "imp_weap_ord_exp_lg"
VehicleCollisionSound ="com_veh_collision_lg"
TurnOnSound = ""
TurnOffSound = ""
Music = ""
RepMusic = "rep_vehicle"
CISMusic = "cis_vehicle"
ImpMusic = "imp_vehicle"
MusicSpeed = ".15"
MusicDelay = "3.0"
GroundedSound = ""
GroundedHeight = ""
FoleyFXGroup = "metal_foley"

Re: Self-Piloted Crashes

Posted: Thu Jul 24, 2008 1:03 pm
by ARC_Commander
Sounds like a memory pool problem to me.

Re: Self-Piloted Crashes

Posted: Thu Jul 24, 2008 2:25 pm
by MandeRek
Kill me for this, this sounds totally noobish, but try "self" instead of self

:oops:

Re: Self-Piloted Crashes

Posted: Fri Jul 25, 2008 9:02 am
by Teancum
MandeRek wrote:Kill me for this, this sounds totally noobish, but try "self" instead of self

:oops:
That may very well be it. I've only seen numeric values ever not have quotes around them. I'm pretty sure any text-based values would need it, as that makes logical programming sense.

Re: Self-Piloted Crashes

Posted: Sat Jul 26, 2008 12:05 am
by jangoisbaddest
Just tried adding quotes to self. Still crashes. Also, my self-piloted flyers had no quotes, and work just fine.

I wonder, though, what do you mean by memory pool issue? Is there a maximum number of type of vehicles in a map or something? It's a long shot (I still think it has something to do specifically with the properties of this vehicle), but I'd like to know.

Re: Self-Piloted Crashes

Posted: Sat Jul 26, 2008 12:37 am
by FragMe!
Does it crash if you don't make them selfpiloted?
Also if you have BF2_modtools.exe look for errors in there.

Re: Self-Piloted Crashes

Posted: Sat Jul 26, 2008 10:57 am
by jangoisbaddest
FragMe! wrote:Does it crash if you don't make them selfpiloted?
No. That's what's wierd. I have only one pilotType = self in there, and it's inside the flyer section (correct placement, no?). Also, they worked just fine as self-piloted until some random change that I don't even know. :?
FragMe! wrote:Also if you have BF2_modtools.exe look for errors in there.
That's the first thing I checked - I thought it was a missing weapon or something. There are no errors at all that indicate a crash.

Re: Self-Piloted Crashes

Posted: Sat Jul 26, 2008 11:25 am
by Aman/Pinguin
jangoisbaddest wrote:There are no errors at all that indicate a crash.
Are you sure? I think you should post it anyway, maybe we find something.

Re: Self-Piloted Crashes

Posted: Sat Jul 26, 2008 2:51 pm
by MercuryNoodles
Just to address the memory pool question, I doubt it'd cause a crash. (I think it's only with walkers you have to do anything to avoid a crash, if memory serves.) If you don't allocate enough memory for something like that, the game just refuses to spawn it until there's "room" for the thing. Memory pools are for limiting the amount of strain a map puts on your system, more or less.

Re: Self-Piloted Crashes

Posted: Sat Jul 26, 2008 6:48 pm
by Teancum
Wait, are you running custom weapons on the snailtank? It looks like you are, and typically a crash in-or-around spawntime is due to something funky with a weapon odf(s).

Re: Self-Piloted Crashes

Posted: Sun Jul 27, 2008 1:55 am
by jangoisbaddest
I don't think that's it, either. As I said before, I've had AI (and myself) get in and use the new weapons just fine if I take the self-pilot line out. Also, it refrences the same weapon as the non-self-piloted snailtanks, which also work fine. It must be something having to do with the self pilot paramiter in some way. I just can't figure it (or how they were working for a while, then stopped when I didn't touch them at all and then munged). I've been making this map for three years, off and on, and I've never been stumped like this. All the same, here are the ODFs:
Hidden/Spoiler:
ksh_weap_cis_snailtank_laser
[WeaponClass]
ClassParent = "com_weap_veh_laser"

[Properties]
OrdnanceName = "ksh_weap_cis_snailtank_laser_ord"

HeatPerShot = "0.14"
HeatRecoverRate = "0.38"
HeatThreshold = "0.02"

ShotDelay = "0.5"

FireSound = "imp_weap_walk_atst_cannon_head_fire"

FlashLightColor = "255 192 192 175"
FlashLightRadius = "4.0"
FlashLightDuration = "0.25"
Hidden/Spoiler:
ksh_weap_cis_snailtank_laser_ord
[OrdnanceClass]
ClassParent = "com_weap_veh_laser_ord"

[Properties]

ExplosionName = "ksh_weap_cis_snailtank_laser_exp"

LaserLength = "8"
LaserWidth = "0.3"
Hidden/Spoiler:
ksh_weap_cis_snailtank_laser_exp
[ExplosionClass]
ClassLabel = "explosion"

[Properties]
WaterEffect = "com_sfx_watersplash_md"

Damage = "150.0"
DamageRadiusInner = "2.5"
DamageRadiusOuter = "4.5"

Push = "5.0"
PushRadiusInner = "2.5"
PushRadiusOuter = "2.5"
PushDeadOnly = "0"

Shake = "0.0"
ShakeLength = "0.0"
ShakeRadiusInner = "0.0"
ShakeRadiusOuter = "0.0"

VehicleScale = "0.0"
PersonScale = "1.0"
DroidScale = "1.0"
BuildingScale = "0.0"
AnimalScale = "1.0"
Effect = "com_sfx_weap_redbolt_exp_lg"
LightColor = "247 91 70 150"
LightRadius = "20.0"
LightDuration = "1.0"

SoundProperty = "imp_weap_ord_exp_lg"

Re: Self-Piloted Crashes

Posted: Sun Jul 27, 2008 3:10 am
by Penguin
find and remove

Code: Select all

 AISizeType = "MEDIUM"
================================
find and replace

Code: Select all

FLYERSECTION = "BODY"
VehicleType = "medium"
PilotType = self
with

Code: Select all

FLYERSECTION = "BODY"
VehicleType = "medium"
AISizeType = "medium"
pilottype = "self"

================================
find and replace

Code: Select all

//ReserveOneForPlayer = "0"
with

Code: Select all

ReserveOneForPlayer = "0"
================================
find and remove

Code: Select all

//WEAPONSECTION = 1

//WeaponName = "com_weap_inf_null"
//WeaponAmmo = 0

//FLYERSECTION = "TURRET1"

//VehiclePosition = "common.vehiclepositions.gunner"
================================
find and remove

Code: Select all

//WEAPONSECTION = 2

//WeaponName = "cis_weap_tread_snailtank_mortar"
//WeaponAmmo = 0

//AimerNodeName = "aimer_left"
//AimerPitchLimits = "-10.0 40.0"
//AimerYawLimits = "-20.0 20.0"
//FireOutsideLimits = "1"
//FirePoint = "hp_cannon_1"

//NextAimer = "-"

//AimerNodeName = "aimer_right"
//AimerPitchLimits = "-10.0 40.0"
//AimerYawLimits = "-20.0 20.0"
//FireOutsideLimits = "1"
//FirePoint = "hp_cannon_2"
================================
find and remove

Code: Select all

//MovingTurnOnly = 1

//SuspensionNodeName = "CIS_tank_Droid_center"
//SuspensionLeftArmNodeName = "armL"
//SuspensionRightArmNodeName = "armR"
//SuspensionMaxOffset = "-0.5"
//SuspensionMidOffset = "-0.125"

//////////////////////////
////DAMAGE///////////
///////////////

Re: Self-Piloted Crashes

Posted: Sun Jul 27, 2008 5:34 am
by Aman/Pinguin
Wow. Ok. Why didn't I think of that? :funny2:

Re: Self-Piloted Crashes

Posted: Sun Jul 27, 2008 7:52 am
by Maveritchell
Penguin, those are exactly the same. The only actual change you said to do was "MEDIUM" to "medium," and as far as I know, that variable is the same and not case-sensitive. The other things you said to remove were already commented-out, which means that the .odf wasn't reading them.

Re: Self-Piloted Crashes

Posted: Sun Jul 27, 2008 8:40 am
by Penguin
I know, but I'm nitpicking at anything that shouldn't cause a problem that might as I have had crashes from a variable being in caps.

Re: Self-Piloted Crashes

Posted: Sun Aug 03, 2008 1:05 pm
by jangoisbaddest
Replaced MEDIUM with medium. No effect - it still works fine non-self-piloted, and crashes when I put in the self pilot paramiter just after the line FLYERSECTION.

I must be missing something about the pilotType paramiter, as it still works perfectly fine as a regular vehicle. Is there a limit to how many self-piloted vehicles you can have on a map? Maybe there's a memory pool for that sort of thing? Or perhaps this particular vehicle needs a pilottype paramiter elsewhere, or it needs to be moved?

I'm desprate. Any wild idea is welcome.

Re: Self-Piloted Crashes

Posted: Mon Aug 04, 2008 4:51 am
by MercuryNoodles
Like I posted earlier in some thread, I doubt the crash relates to a memory pool as the pools affect whether or not whatever thing needing to have memory allocated actually does anything or shows up ingame. In other words, no memory pool would be similar to setting a memory pool to zero. If it really was needed, it would likely show in the error log.

Compare some self-piloted odfs. I've been looking around for a minute or two, and I'm seeing some odd things. Looking at the trooptrans (Sentinel) self-piloted odf, I see that the body flyersection says pilottype = "none", and the turret flyersection uses pilottype = "self". That said, I'm a little confused myself. Maybe that's the way it's meant to be setup... Come to think of it, after looking at a few space vehicles, I think that's it. Setting the pilottype to none apparently is the way you're supposed to designate that there's no pilot from without the vehicle. At least, that's what I infer, since I'm looking at controllable vehicles that don't set this parameter, or comment it out.

Re: Self-Piloted Crashes

Posted: Tue Aug 05, 2008 11:32 am
by jangoisbaddest
I tried setting up a gunner's position, rather than having the pilot control the weapons. Then I changed the pilot's position to pilotType = "none". As far as I can tell, pilotType = "none" simply makes the craft sit there - possibly allowing people to board, possibly not (I didn't test). And yes, I've looked over other self-piloted craft, as well as my own functioning flyer. The pilottype paramiter needs to be in every FLYERSECTION that you want controlled by the vehicle itself. From what I can tell, though, the snailtank only has one FLYERSECTION. I also tried pilotType = "self" in BOTH sections, to which it crashed. The problem still seems to be with the pilot's position and the pilotType paramiter.

I thank you for your suggestion. It sounded promising to mess around with that.

Re: Self-Piloted Crashes

Posted: Tue Aug 05, 2008 1:01 pm
by MetalcoreRancor
May I suggest changing the Vehicle side from 1 or 2, to 3?

I find most self automated turrets enjoy shooting both sides.. Maybe that would work for vehicles.

Re: Self-Piloted Crashes

Posted: Tue Aug 05, 2008 3:46 pm
by MercuryNoodles
I just took another look at some odfs, and I think I may be wrong about that. I just took a look at two gunships from the rep side, and one has the pilot's pilottype as self, with the other sections set to self as well. I know there's a note about pilottypes in psychofred's docs somewhere. Let me see if I can hunt it down.

from weaponnotes wrote:Any controllable class (soldier, droid, flyer, hover, walker, turret):
PilotType: "none" = unpilotable, "self" = self-piloting, "vehicle" = pilot enters, "remote" = remote-controlled
The object spawned by WeaponRemote must be set to "remote" type.
So, I was definitely wrong there. My apologies for wasting your time on that.

I also see your new weapon calls for a different hp. I'm not saying it'll cause a crash, but I wanted to point it out anyway.


Edit: What was that about one flyersection? I see you commented out the line that designates the turret flyersection. Without that, you don't necessarily have a second position as far as the game is concerned.