Page 1 of 1

How do I dissalow wagons on an engine?

Posted: 22 Jan 2009 23:02
by ashaw
How would one dissalow wagons in an engine.

Re: How do I dissalow wagons on an engine?

Posted: 22 Jan 2009 23:12
by Nite Owl
By not attaching them to the engine.

If you are looking for NFO information to disallow this behavior in a NewGrf then consult the TTDP Wiki.

Re: How do I dissalow wagons on an engine?

Posted: 22 Jan 2009 23:22
by ashaw
I am, but a solution does not weem to be presenting it'self

Re: How do I dissalow wagons on an engine?

Posted: 22 Jan 2009 23:31
by DaleStan
What pages have you read?

Re: How do I dissalow wagons on an engine?

Posted: 22 Jan 2009 23:33
by ashaw
all the pages on action 0

Re: How do I dissalow wagons on an engine?

Posted: 22 Jan 2009 23:43
by PikkaBird
Callback 1D is what you need. The simplest way to use it is to check variable C6, which contains the ID of the wagon being attached.

Re: How do I dissalow wagons on an engine?

Posted: 22 Jan 2009 23:46
by ashaw
where can one find in formation about using callbacks
I do not want any wagons to be allowed.

I have the following code.

0 * 4 02 00 00 00
1 * 123 08 07 "MG" 06 01 "Logic engine 0.2" 00 "engine with "
"max speed and power" 0D "(replaces Lev3)" 0D
"2008-06-16 / Ammler Modified 2009-01-20 Alexis Shaw" 00
2 * 13 00 00 03 01 56 09 00 06 0B FF FF 16 01

Re: How do I dissalow wagons on an engine?

Posted: 23 Jan 2009 00:03
by DaleStan
Start by changing the engine's graphics. (See the tutorials) When you've got that down, then think about callbacks.

Re: How do I dissalow wagons on an engine?

Posted: 23 Jan 2009 00:05
by XeryusTC
The graphics aren't relevant here as the train is used as a logic train AFAIK which only needs to be fast and have instant acceleration to top speed. How it looks doesn't really matter to the effeciency of the logic circuit.

Re: How do I dissalow wagons on an engine?

Posted: 23 Jan 2009 00:07
by DaleStan
Yeah, but if you don't know how to change the graphics, you're not going to do well with callbacks.

Re: How do I dissalow wagons on an engine?

Posted: 23 Jan 2009 00:14
by ashaw
you got any graphics that I can use,
I really do not want it to be a masterpiece,
It is just ment to be a quick hack but if graphics are required, then...

what I am really asking is please fix my code. I do not WANT OR NEED TO BE RECOGNISED.
I just want this grf to exist, and if that means I have to do it myself, then...

Re: How do I dissalow wagons on an engine?

Posted: 23 Jan 2009 00:32
by DaleStan
All you actually need is:
Empty action 1 (One set containing no sprites)
Standard action 2
Variational action 2 returning false for CB 1D
Action 3

Or you can just deal with the fact that its possible for your logic engine to pull wagons.

The graphics are to prove that the action 1/2/3 set is working; you don't need anything fancy.

Re: How do I dissalow wagons on an engine?

Posted: 23 Jan 2009 01:23
by ashaw
will this empty set still have the train visible.

Re: How do I dissalow wagons on an engine?

Posted: 23 Jan 2009 03:03
by DaleStan
The vehicle will be visible unless you provide graphics that make it invisible.

Re: How do I dissalow wagons on an engine?

Posted: 22 Feb 2009 14:48
by Ammler
Your souce doesn't seem like something modified from me,
else it would look like that:

Code: Select all

// http://wiki.ttdpatch.net/tiki-index.php?page=Action0Trains	
    0 * 0 00 00 0C 01 
	56   			// vehicle id
	00 00 00		// date of introduction
	02 00			// reliability decay speed
	03 FF			// vehicle life in years
	04 FF			// model life in years
	05 02			// Track type (0=railroad, 1=monorail, 2=maglev)
	06 07			// climate availability
	09 FF FF		// Speed in mph*1.6
	0B FF FF 		// Power
	16 FF			// Weight in tons
	1F FE			// Coefficient of tractive effort 
	20 01			// Coefficient of air drag
	2A \d1900-01-01		// Long format introduction date
		0 * 0 04 00 7F 01 58 \"LevA 'Gator'\" 00
which is/should be always available from our homepage...

Greets
Ammler