How do I dissalow wagons on an engine?

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
ashaw
Engineer
Engineer
Posts: 16
Joined: 07 Aug 2008 11:53

How do I dissalow wagons on an engine?

Post by ashaw »

How would one dissalow wagons in an engine.
User avatar
Nite Owl
Tycoon
Tycoon
Posts: 1889
Joined: 06 Mar 2007 19:32
Location: In The Dark

Re: How do I dissalow wagons on an engine?

Post 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.
Humor is the second most subjective thing on the planet
------------------------------------------------------------
Brevity is the soul of wit and obscenity is its downfall
--------------------------------------------------------
Good Night And Good Luck - Read You Soon
ashaw
Engineer
Engineer
Posts: 16
Joined: 07 Aug 2008 11:53

Re: How do I dissalow wagons on an engine?

Post by ashaw »

I am, but a solution does not weem to be presenting it'self
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: How do I dissalow wagons on an engine?

Post by DaleStan »

What pages have you read?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
ashaw
Engineer
Engineer
Posts: 16
Joined: 07 Aug 2008 11:53

Re: How do I dissalow wagons on an engine?

Post by ashaw »

all the pages on action 0
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: How do I dissalow wagons on an engine?

Post 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.
ashaw
Engineer
Engineer
Posts: 16
Joined: 07 Aug 2008 11:53

Re: How do I dissalow wagons on an engine?

Post 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
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: How do I dissalow wagons on an engine?

Post by DaleStan »

Start by changing the engine's graphics. (See the tutorials) When you've got that down, then think about callbacks.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Re: How do I dissalow wagons on an engine?

Post 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.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: How do I dissalow wagons on an engine?

Post by DaleStan »

Yeah, but if you don't know how to change the graphics, you're not going to do well with callbacks.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
ashaw
Engineer
Engineer
Posts: 16
Joined: 07 Aug 2008 11:53

Re: How do I dissalow wagons on an engine?

Post 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...
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: How do I dissalow wagons on an engine?

Post 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.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
ashaw
Engineer
Engineer
Posts: 16
Joined: 07 Aug 2008 11:53

Re: How do I dissalow wagons on an engine?

Post by ashaw »

will this empty set still have the train visible.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: How do I dissalow wagons on an engine?

Post by DaleStan »

The vehicle will be visible unless you provide graphics that make it invisible.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: How do I dissalow wagons on an engine?

Post 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
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Railwaymodeler and 6 guests