How can I make a trainset? Some info inside...

Discuss, get help with, or post new modifications, graphics or related tools for Locomotion in this forum.

Moderator: Locomotion Moderators

Post Reply
Leone
Engineer
Engineer
Posts: 17
Joined: 25 Sep 2004 22:05

How can I make a trainset? Some info inside...

Post by Leone »

Well, im triing to make a 3-car trainset (head-motor-head) but no success.

I've tried to find some info in other threads but i havent found anything. Maybe i missed something about this question in other threads, if so, plz point me to the post.

Well i have these images:
000 - 135 - Head wagon graphics
136 - 271 - Motor wagon graphics
272 - 319 - Bogey Graphics

The XML is well formed and all sprites and xoffs and yoffs are fine for all the graphics.

The only thing i need to modify are two structures and some parameters to make a trainset:

This structure defines the front and rear bogey position, order of the units and some other parameters, like the sprites it uses:

Code: Select all

<structure name="field_24[0]" size="6">
		<variable name="length" size="1">30</variable>
		<unknown name="field_1" size="1">30</unknown>
		<unknown name="field_3" size="1">1</unknown>
		<variable name="spriteind" size="1">0</variable>
		<unknown name="field_5" size="1">64</unknown>
	</structure>
	<structure name="field_24[1]" size="6">
		<variable name="length" size="1">30</variable>
		<unknown name="field_1" size="1">30</unknown>
		<unknown name="field_2" size="1">1</unknown>
		<variable name="spriteind" size="1">128</variable>
		<unknown name="field_5" size="1">64</unknown>
	</structure>
	<structure name="field_24[2]" size="6">
		<variable name="length" size="1">0</variable>
		<variable name="spriteind" size="1">0</variable>
	</structure>
	<structure name="field_24[3]" size="6">
		<variable name="length" size="1">0</variable>
		<variable name="spriteind" size="1">0</variable>
	</structure>
This one define how many diferent sprites the model has and the number of images of each sprite:

Code: Select all

	<structure name="sprites[0]" size="30">
		<variable name="numdir" size="1">64</variable>
		<unknown name="field_1" size="1">32</unknown>
		<unknown name="field_2" size="1">1</unknown>
		<variable name="vehtype" size="1">1</variable>
		<variable name="numunits" size="1">1</variable>
		<unknown name="field_5" size="1">1</unknown>
		<variable name="bogeypos" size="1">100</variable>
		<bitmask name="flags" size="1">
			<bit name="hassprites">1</bit>
			<bit name="bit_3">1</bit>
			<bit name="reversed">0</bit>
		</bitmask>
		<variable name="spritenum" size="1">0</variable>
	</structure>
	<structure name="sprites[1]" size="30">
		<variable name="numdir" size="1">0</variable>
		<variable name="vehtype" size="1">0</variable>
		<variable name="numunits" size="1">0</variable>
		<variable name="bogeypos" size="1">0</variable>
		<bitmask name="flags" size="1">
			<bit name="hassprites">0</bit>
			<bit name="reversed">0</bit>
		</bitmask>
		<variable name="spritenum" size="1">0</variable>
	</structure>
	<structure name="sprites[2]" size="30">
		<variable name="numdir" size="1">0</variable>
		<variable name="vehtype" size="1">0</variable>
		<variable name="numunits" size="1">0</variable>
		<variable name="bogeypos" size="1">0</variable>
		<bitmask name="flags" size="1">
			<bit name="hassprites">0</bit>
			<bit name="reversed">0</bit>
		</bitmask>
		<variable name="spritenum" size="1">0</variable>
	</structure>
	<structure name="sprites[3]" size="30">
		<variable name="numdir" size="1">0</variable>
		<variable name="vehtype" size="1">0</variable>
		<variable name="numunits" size="1">0</variable>
		<variable name="bogeypos" size="1">0</variable>
		<bitmask name="flags" size="1">
			<bit name="hassprites">0</bit>
			<bit name="reversed">0</bit>
		</bitmask>
		<variable name="spritenum" size="1">0</variable>
	</structure>
I think this parameter defines de number of units in the trainset:

Code: Select all

<unknown name="field_4" size="1">2</unknown>

Ive tried multiple combinations of the parameters making a "try-run game" method :roll: I've been studiing other object xml files, like the trambcomb (tramset with 3 units), 508 trainset and some more...

Plz need some help because i have spent a lot of time and im reaching my patience limits ;)

Thanks :)


Some notes:

- It seems that there is a maximum cargo capacity of 248 at least for passengers: if u put a cargo capacity bigger than that number, the game simply put 248 (The spanish 447 trainset i'm trying to make can carry 760 passengers :()
- The code above is from the 508 trainset.
DarkMatter
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 14 Sep 2004 14:26
Location: The Land O' Lakes (GMT -6)

Post by DarkMatter »

I'd head over to the LocoWikki if you haven't already.

http://wiki.locomotiondepot.net/index.php/Main_Page
Post Reply

Return to “Locomotion Graphics, Modifications & Tools”

Who is online

Users browsing this forum: No registered users and 18 guests