some questions about vehicle creating


(ischbinz) #1

i m just working on a vehicle for et:Qw - my 1st one for this game.
after a lot reading the tutorial with less understanding :frowning:
i was able to add my vehicle to the game -
but the scripting stuff makes me crazy…

my vehicle stucks a little bit inside the ground - how to fix this?
and the physics of it are very strange -
maybe someone can help me with that?

the vehicle def:


//
// gmc
//

model vehicle_gmc
{
    mesh                       models/vehicles/edf_gmc/gmc.md5mesh

    anim base                  models/vehicles/edf_gmc/gmc.md5anim
    anim ik_pose               models/vehicles/edf_gmc/gmc.md5anim
    anim initial               models/vehicles/edf_gmc/gmc.md5anim
    anim idle                  models/vehicles/edf_gmc/gmc.md5anim
}


entityDef vehicle_gmc 
{
    "inherit"                       "vehicle_base_gdf"

    "option_combat_model"           "1"
    "option_selection_combat_model" "1"
    "option_task_interface"         "1"

    "spawnclass"                    "sdVehicle_RigidBody"
    "scriptObject"                  "vehicle_base"
    "vs_vehicleScript"              "gmc"
    "model"                         "vehicle_gmc"

    "input_mode"                    "car"
    "vehicle_control"               "wheeled"

    "info_name"                     "gmc"
    "health"                        "800"

    "steering_angle"                "45"

    "table_gearforces"              "gmc_gear_forcetable"
    "table_gearspeeds"              "gmc_gear_speedtable"

    "overdrive_factor"              "1.5"
    "power_curve_scale"             "2"

    "collection_antivehicle"       "antivehicle"
    "collection_vehicles_light"    "vehicles_light"
    "collection_vehicles_gdf"      "vehicles_gdf"

    "joint_damage_smoke"           "effects"
    "joint_damage_fire"            "effects"

   "damage_smoke"                  "70"
   "damage_level1"                 "50"
   "damage_level2"                 "30"
   "damage_level3"                 "10"

   "fx_damage_level_smoke"         "effects/vehicles/generic_smoke"
   "fx_damage_level1"              "effects/vehicles/vehicle_flames_small"
   "fx_damage_level2"              "effects/vehicles/vehicle_flames_medium"
   "fx_damage_level3"              "effects/vehicles/vehicle_flames_large"

	"dmg_collide"                    "damage_gmc_collide"

}


damageDef damage_gmc_collide {
    damage                          "damage_gmc_collide"

    team_kill_cvar                  "g_allowComplaint_vehicles"

    tt_obituary                     "tooltips/killmsgs/vehicles/gmc"
    tt_obituary_unknown             "tooltips/killmsgs/vehicles/gmc/empty"
    tt_obituary_team_kill           "tooltips/killmsgs/vehicles/gmc/teamkill"
    tt_obituary_self                "tooltips/killmsgs/vehicles/driving"
}

damageFilter damage_gmc_collide 
{
    type 
	{
        target  "target_player_all"
        damage  100
    	}
    type 
	{
        target  "target_veh_all"
        damage  500
    	}
    type 
	{
        target  "target_supply_crate"
        damage  200
    	}
    type 
	{
        target  "target_deployables_all"
        damage  500
    	}
}

and the vscript:


table gmc_gear_speedtable 
{					
	clamp							
	{
		20, 40, 65, 80					
	}
}
table gmc_gear_forcetable 					
{
	clamp							
	{
		800000, 600000, 300000, 100000			
	}
}

template templates/vehicles/gmc/wheel_behavior 
	{
   	parameters< FrontBackParm, LeftRightParm >
    	text 
		{

        	"name"                         "FrontBackParm LeftRightParm Wheel"		//10
        	"surface1"                     "FrontBackParm_LeftRightParm_wheels"
        	"joint"                        "FrontBackParm_LeftRightParm_wheel"



		"slowonLeftRightParm"          "1"
 
		"health"			"100"



		"brakingForce"                 "100000"

		//"drive"                        "1"

		"alternateSuspensionModel"     "1"
		"suspensionUpTrace"            "8"
		"suspensionDownTrace"          "20"
		"suspensionRange"              "28"						//20
		"suspensionVelocityScale"	"150"
		"suspensionBase"		"5000"



		"wheelSpinForceThreshhold"		"1000000"
		"wheelSpinForceMultiplier"		"0.5"


		"suspensionKCompress"          "100000"
		"suspensionDamping"            "0"

		"suspensionMaxRestVelocity"    "3.5"

		"maxSlip"                      "300"
		"contactFriction"              "0 0.7 0"

		useTemplate templates/vehicles/gmc/wheel_FrontBackParm< "LeftRightParm" >
		}
	}

	template templates/vehicles/gmc/wheel_front 						//30
		{
   	 	parameters< LeftRightParm >
    		text 
			{
			"turn"                         "1"
       	 		"radius"                       "28"
       	 		"footprint"                    "15"
			}
		}


	template templates/vehicles/gmc/wheel_rear 
		{
    		parameters< LeftRightParm >
    		text 
			{
       		 	"hasHandbrake"                 "1"
         		"radius"                       "28"					//40
        		"footprint"                    "30"
			}
		}


	template templates/vehicles/gmc/wheel_middle_front 
		{
    		parameters< LeftRightParm >
    		text 
			{
       		 	"hasHandbrake"                 "1"
         		"radius"                       "28"					//40
        		"footprint"                    "30"
			}
		}

vehicleDef "gmc" 						
{
	part 
		{
		"mins"                      "-96 -55 60"
		"maxs"                      "78 55 94"
		"mass"                      "1000"
		"friction"                  "0.4 0.4 0.4"
		}

	part 
		{
		"mins"                      "-96 -55 24"
		"maxs"                      "78 55 60"
		"mass"                      "3000"
		"friction"                  "0.4 0.4 0.4"
		}

	antiroll 
		{
		"angle_start"               "5"
		"angle_end"                 "30"
		"strength"                  "2"
		}
	hurtZone 
		{
		"mins"                  "-96 -55 0"
		"maxs"                  "78 55 24"
		}




	positionDef 						
	{
 		data 
		{
         	   "joint_attach"  "driver"							//50
         	   "show_player"   "1"
       	  	   "player_anim"   "VehicleBadgerDriver"
       		}

       		 view 
			{
            		eyeJoint        "cam1"
            		autoCenter
			
            			clamp pitch 
				{
                		min         -70
               			max         20
            			}

            			clamp yaw 
				{
               			 min         -80						//60
               			 max         80
            			}
      			}
       		 view 
			{
            		eyeJoint        "cam1"
            		type            "smooth_locked"
            		thirdPerson
            		cameraDistance  240
            		cameraHeight    50
        		}
	}
	exitDef 
		{
        	joint               "exit_left_1"
    		}
	exitDef 
		{
        	joint               "exit_left_1"
    		}
	wheel 
	{
   		useTemplate templates/vehicles/gmc/wheel_behavior< "front", "left" >


		"drive"							"1"
		
		//"contactFriction"				"0.005 0.9 0.005"

		//"suspensionKCompress"			"9500"

		"fx_splash"						"effects/water/generic_splash"
		"fx_wake"						"effects/water/wheel_wake"

		//"control_steering"				"1"

		"trace_index"					"0"
	}

	wheel 
	{
    		useTemplate templates/vehicles/gmc/wheel_behavior< "front", "right" >


		"drive"							"1"
		
		//"contactFriction"				"0.005 0.9 0.005"

		//"suspensionKCompress"			"9500"

		"fx_splash"						"effects/water/generic_splash"
		"fx_wake"						"effects/water/wheel_wake"

		//"control_steering"				"1"

		"trace_index"					"0"
	}

	wheel 
	{
  		  useTemplate templates/vehicles/gmc/wheel_behavior< "rear", "left" >

		//"drive"							"1"

		//"contactFriction"				"0.005 0.8 0.005"

		//"suspensionKCompress"			"9500"

		"fx_splash"						"effects/water/generic_splash"
		"fx_wake"						"effects/water/wheel_wake"

		"trace_index"					"1"
	}

	wheel 
	{
    		useTemplate templates/vehicles/gmc/wheel_behavior< "rear", "right" >

		//"drive"							"1"

		//"contactFriction"				"0.005 0.8 0.005"

		//"suspensionKCompress"			"9500"

		"fx_splash"						"effects/water/generic_splash"
		"fx_wake"						"effects/water/wheel_wake"

		"trace_index"					"1"
	}

	wheel 
	{
    		useTemplate templates/vehicles/gmc/wheel_behavior< "middle_front", "left" >

		//"drive"							"1"

		//"contactFriction"				"0.005 0.8 0.005"

		//"suspensionKCompress"			"9500"

		"fx_splash"						"effects/water/generic_splash"
		"fx_wake"						"effects/water/wheel_wake"

		"trace_index"					"1"
	}

	wheel 
	{
    		useTemplate templates/vehicles/gmc/wheel_behavior< "middle_front", "right" >

		//"drive"							"1"

		//"contactFriction"				"0.005 0.8 0.005"

		//"suspensionKCompress"			"9500"

		"fx_splash"						"effects/water/generic_splash"
		"fx_wake"						"effects/water/wheel_wake"

		"trace_index"					"1"
	}
}

its just for testing - only a driver for now - if someone can help me and i understand it ill add some more stuff :wink:

ah i forgot - the model is little bit jumping around :frowning:


(light_sh4v0r) #2

I fail to remember who did the bicycle mod for ETQW recently, but I’m sure he could help you out.

edit: clicky
Send him a PM.


(ischbinz) #3

thats what i tried 1st :slight_smile:
but i was able to make it drive now - the bouncing is gone
the behavior is still little bit weird - but i think i ll get this soon, too.


(light_sh4v0r) #4

Nice :slight_smile:
Is it very secret or can we get a sneakpeek?


(ischbinz) #5

ah - i think for most et:qw gamers its uninteresting -
its a ww2 verhicle i did for et some time ago :slight_smile:
maybe ill convert a map too - we ll see -
for the moment its more learning stuff - experimenting


(ischbinz) #6

1st thx to Luddens Desir - he answered my pm quickly :slight_smile:

but now i have the next problem:
the broken/damaged wheels


entityDef part_vehicle_gmc_front_left_wheel 
			{
			useTemplate templates/vehicles/destroyedParts 
				<
				"models/vehicles/edf_gmc/parts/front_left_wheel.ase",
				"0 -1000 600",
				"0 0 10",
				"vehicles/misc/debris/wheel",
				".75",
				".2",
				"1"
				>

			//"fx_explode"					"effects/vehicles/wheel_explode"
			//"climate_skin_key"				"gmc"
			//"priority"	

i always get the message that et:Qw cannot load the model

models/vehicles/edf_gmc/parts/front_left_wheel.ase —>.lwo /.md5mesh

i tried diffrent formats - but always the same…

if i have no model in the folder - i shows me cubes as wheels if i shoot them…

if i add any model - et:qw crashes :S

is there any special version of lwo/ase?

the vehicle works proper - but not this stuff - help plz


(murka) #7

What if you make your wheel model, add it the origin bone and use it, will that work?


(SphereCow) #8

If you have no models in the folder you get yellow cubes because…there are no models in your folder. : P

Your model is probably not unwrapped. That causes ETQW to crash, as far as I can recall.

Oh, about your collision meshes, your faces need to be quaded, and co-planar. You can’t have a quad with 1 or more of the 4 vertex points not on the same plane, or it won’t load correctly.

You can still send me the models/def and .vscript files if you want. That would help me put the issues together.

Again, textures aren’t necessary. : D


(.Chris.) #9

Did you use blender by any chance to make your vehicles anyone?

Having real trouble getting the joints working ready for exporting.

AttributeError: ‘Armature’ object has no attribute ‘getBones’ is all I get no matter how I parent the armature.


(ischbinz) #10

no - i don tlike blender - i use it only for special stuff like ambient occulsion maps

i used milkshape to create the model and the bones

and then lightray3d to bind it to the bone+export it,
with lightray you cannot bind a skin to the last bone. dunno why its a little bit crappy.
means for example:
you have following bones:

origin -> base -> front_left_upper_wishbone -> front_left_wheel

if you want to add a wheel to the front wheel bone you have to add 1 bone more so you have:

origin -> base -> front_left_upper_wishbone -> front_left_wheel -> fw_left_unneed

if you bind you wheel then to the fw_left_unneed bone, it automatic jumps back to the correct one :S

while i export the model i hide the unneeded bones…

now i try to make a correct cockbit - huge script needed :S

btw how can i activate 3rperson like in et?!


(.Chris.) #11

pm_thirdperson 1

Can play around with other pm_thirdperson<TAB> cvars to control angle and distance the camera is.


(ischbinz) #12

^^ya - but this don t work in vehicles :S
maybe i m too stupid?!

edit:
omg i m - i have no external camera bone - so it looks weird - so forget it :slight_smile:


(.Chris.) #13

default button is ‘Home’ for vehicles. Cant remember the cvar though.


(ischbinz) #14

so my vehicle is working now -
the collision models need really less polys/verticles - that was my error :slight_smile:
so the model works now fine - it not perfect but works…
no i m working on the cockpit - and find out how the .gui is working
looks like c# :S