You are here

Car Setup Tutorials For Trents Maxscript Tools.

Pages

starbuck's picture
Velociraptor Fister
PayPal Backer
Posts: 1409
Submitted: Mon, 15/08/2016 - 01:56

I admit I am having troubles with wheels, for one thing I dont seem to get it. I know if the wheels are not correct (nonexistent) they may not show up in the garage with wheels on them.Right now car is 20 times to big. I see a corner of it spinning on the screen. :P

I have to edit and possibly check everything to make sure its in there.

But learning those 5 files is a little bit confusing too, the XML files mostly. I am still in the learning process but I am getting it one step at a time.

I would post a link to the car file here, but I want it to be a surprise when its forum ready. Hopefully a basic car by the end of the week.

I am getting really confused here. First I am at "4-B] Collision Model" so do I just make a blank cube or set of cubes ?

And I just copied the SystemDamage XML file from the C1 car and did not edit it yet. I have a car called "Stone" (secret Reason)

And I see these errors in the Script_log
stone: Error processing SYSTEMS DAMAGE - couldn't find crushable part 'c_Body'
stone: Error processing SYSTEMS DAMAGE - couldn't find solid part 'Engine'
stone: Error processing SYSTEMS DAMAGE - couldn't find solid part 'Gearbox'
stone: Error processing SYSTEMS DAMAGE - couldn't find complicated wheel 'Wheel_FL'
stone: Error processing SYSTEMS DAMAGE - couldn't find complicated wheel 'Wheel_FR'

The name of the crushable collision file was separate item in 3ds max and called "c_Body_Collision" exported like that topic said.

What about the rest ? Do I need to name those items under CNT Heirarchy and for example can I edit out the gearbox statement in the SystemDamage XML file ? How do I setup a complicated wheel ?

In Max WHEEL_FL for example is already named.

Edited by: starbuck on Mon, 15/08/2016 - 04:13

Why is it that when you are a child at the dinner table you can get punished asking for someone to please pass you the fork and knife ?

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1129
Submitted: Mon, 15/08/2016 - 10:10

Quote:
What do we do if the game crashes to the desktop and there is no error listed in the "Script_Log" with anything about our car ?

When there is no usable error in the script_log, it is usually something fundamental in the structure.xml that is screwed up. This could be an incorrect physics property, or something could be missing from the structure.xml and potentially the CNT hierarchy.

When faced with a crash on event load, with no usable errors, my first port of call is to verify the physics properties in the structure.xml are correct. In fact, I will usually do that after initial structure.xml export.

Spoiler: Physics Properties for a normal four wheeled vehicle
Hub_FL
  • - FRONT_LEFT_POINT_OF_SUSPENSION
  • - FRONT_LEFT_POINT_OF_STEERING

Brake_FL

  • - FRONT_LEFT_POINT_OF_ROTATION

Wheel_FL

  • - FRONT_LEFT_WHEEL

Hub_FR

  • - FRONT_RIGHT_POINT_OF_SUSPENSION
  • - FRONT_RIGHT_POINT_OF_STEERING

Brake_FR

  • - FRONT_RIGHT_POINT_OF_ROTATION

Wheel_FR

  • - FRONT_RIGHT_WHEEL

Hub_RL

  • - REAR_LEFT_POINT_OF_SUSPENSION

Brake_RL

  • - REAR_LEFT_POINT_OF_ROTATION

Wheel_RL

  • - REAR_LEFT_WHEEL

Hub_RR

  • - REAR_RIGHT_POINT_OF_SUSPENSION

Brake_RR

  • - REAR_RIGHT_POINT_OF_ROTATION

Wheel_RR

  • - REAR_RIGHT_WHEEL

Quote:
Only thing in there was a reference to "Could not Load Texture: 'spatter_X' for material 'Data_Core\Content\Vehicles\(every other car in the game)\Paint" ?

You can ignore that warning.

Quote:
I admit I am having troubles with wheels, for one thing I dont seem to get it. I know if the wheels are not correct (nonexistent) they may not show up in the garage with wheels on them.Right now car is 20 times to big. I see a corner of it spinning on the screen. :P

Correct, if the wheel nodes do not exist, then no wheels will appear in the garage. Furthermore, the game will crash when you try to load an event.

Quote:
I am getting really confused here. First I am at "4-B] Collision Model" so do I just make a blank cube or set of cubes ?

It depends on the the shape of your vehicle. The whole purpose of the collision mesh is that it should reflect the most basic shape of the vehicle with a very small number of triangles to simply collision detection. Take a look at the official cars for reference.

Quote:
And I see these errors in the Script_log
stone: Error processing SYSTEMS DAMAGE - couldn't find crushable part 'c_Body'
stone: Error processing SYSTEMS DAMAGE - couldn't find solid part 'Engine'
stone: Error processing SYSTEMS DAMAGE - couldn't find solid part 'Gearbox'
stone: Error processing SYSTEMS DAMAGE - couldn't find complicated wheel 'Wheel_FL'
stone: Error processing SYSTEMS DAMAGE - couldn't find complicated wheel 'Wheel_FR'

The name of the crushable collision file was separate item in 3ds max and called "c_Body_Collision" exported like that topic said.

What about the rest ? Do I need to name those items under CNT Heirarchy and for example can I edit out the gearbox statement in the SystemDamage XML file ? How do I setup a complicated wheel ?

In Max WHEEL_FL for example is already named.

The above errors mean that the game cannot find the quoted parts in the vehicles CNT hierarchy at all. So, the parts have either not exported or are incorrectly named. The biggest concern right now is the wheels. In 3dsmax, make sure that 'Wheel_FL' & 'Wheel_FR' are parented to their relevant brake nodes in the hierarchy. Without the wheel nodes, the vehicle will crash the game when you try to load an event.

'Complicated Wheels' are the wheels. That is why it doesn't say anything about editing that part of the 'systemsdamage.xml' in the tutorial.

If the root of your vehicle is not called 'c_Body', then either rename it to 'c_Body', or change the crushable part reference in the bodywork section in the 'systemsdamage.xml' to match the name of the root of your vehicle.

As for the Engine & Gearbox/Transmission, do you have model parts on the car that represent these? If so, then you need to name them 'Engine' & 'Gearbox', or change the solid part reference in the 'systemsdamage.xml' to match their current names.

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

LuckyMike's picture
Cunning Stunt Licker
Posts: 237
Submitted: Mon, 15/08/2016 - 13:03

starbuck
You can leave the problem with the wheels on the next version. You can always connect any wheels from standard cars in the game. See the last lines in the file vehicle.cfg.
Also you can not do collision box. I understand that the game itself creates a standard cube, if it is not in the file cars.
Сant wait to see your car. :)

Edited by: LuckyMike on Mon, 15/08/2016 - 13:27
starbuck's picture
Velociraptor Fister
PayPal Backer
Posts: 1409
Submitted: Mon, 15/08/2016 - 23:12

Mad Mike if you dont mind I am going to send you my file to keep it a secret.

Please check it over. Thanks.

LuckyMike I am sending you a PM

Edited by: starbuck on Mon, 15/08/2016 - 23:24

Why is it that when you are a child at the dinner table you can get punished asking for someone to please pass you the fork and knife ?

LuckyMike's picture
Cunning Stunt Licker
Posts: 237
Submitted: Tue, 16/08/2016 - 06:13

Thank you. :)

LuckyMike's picture
Cunning Stunt Licker
Posts: 237
Submitted: Mon, 22/08/2016 - 12:53

Somebody try to create a battle tank? How it works? I know that the tracks and additional "wheels" of Blitzkrieger are stored in a folder with the simple wheels. it's all that I understand...
:-)

Mad Mike and Doctor Fraggington did something similar.
I do not understand what I'm doing wrong. When i try to moving suspension parts of tank, game has crashing on race load.
Maybe there's a tutorial?

Edited by: LuckyMike on Mon, 22/08/2016 - 21:11
starbuck's picture
Velociraptor Fister
PayPal Backer
Posts: 1409
Submitted: Mon, 22/08/2016 - 20:21

LuckyMike wrote:
Somebody try to create a battle tank? How it works? I know that the tracks and additional "wheels" of Blitzkrieger are stored in a folder with the simple wheels. it's all that I understand...
:-)
Mad Mike and Doctor Fraggington did something similar.
I do not understand what I'm doing wrong. When i try to moving suspension parts of tank, game has crashing on race load.
Maybe there's a tutorial?

Pretty sure its not only in the modeling phase where the problem lies, but in one of the setup files etc.

Why is it that when you are a child at the dinner table you can get punished asking for someone to please pass you the fork and knife ?

Trent's picture
I was in the War!
Community VIPKickstarter BackerCompetition Winner
Posts: 2989
Submitted: Tue, 23/08/2016 - 07:50

The garage wheels in the wheel folder are only for when the car is shown in the garage. Tank tracks are dynamically created by the game based on settings at the top of the structure.xml file in the vehicle characteristics section which define how tracks behave (e.g. How much they sag, etc.) and point to a CNT/MDL which defines a single section of the track, then in the main hierarchy of the structure.xml you define which wheels belong to which tank track. You need at least 2 wheels per track and can have multiple tracks per vehicle (Blitzkrieger only has 2 tracks but project x has 4, etc.)

Currently my tools do not have support for setting up more than 4 wheels or tank tracks so you would have to do it manually.

LuckyMike's picture
Cunning Stunt Licker
Posts: 237
Submitted: Sat, 27/08/2016 - 16:12

Some problems with MDL exporting or importing...

export

http://pastebin.com/yZxHgkwn

after "import car"

http://pastebin.com/RQpSr1U8

Trent's picture
I was in the War!
Community VIPKickstarter BackerCompetition Winner
Posts: 2989
Submitted: Sat, 27/08/2016 - 17:29

By any chance did you originally import that model from an OBJ file? OBJ files break shit. Try running this script a few times then exporting again:

for obj in objects do 
(
	if classof obj == editable_poly then
	(
		vertList = #{1 .. (polyop.getnumverts obj)}
		polyop.breakverts obj vertList
		obj.weldThreshold = 0.001
		polyop.weldvertsbythreshold obj #{1 .. (polyop.getnumverts obj)}
	)
	else if classof obj == editable_mesh then
	(
		vertList = #{1..(meshop.getnumverts obj)}
		meshop.breakVerts  obj vertList
		meshop.weldvertsbythreshold obj #{1..(meshop.getnumverts obj)} 0.001
	)
)

Pages