Possible to change how much airplanes cost to buy?

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Xaykev
Engineer
Engineer
Posts: 99
Joined: 19 Jan 2006 11:53

Possible to change how much airplanes cost to buy?

Post by Xaykev »

I don't like that the airplanes are 10 times cheaper than the trains....
I have been playing with planeset and the DBset...
Is it possible to change how much the planes cost to build??
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Post by WWTBAM »

yes via grf but there is no easy way.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

GRF is easy. It's well documented, there are lots of people whose brains you can pick, and it's fast.

Recompiling OTTD is the hard option. There's basically no documentation, there are maybe five people who know where to look and what to change, and it takes ages to compile.
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
Xaykev
Engineer
Engineer
Posts: 99
Joined: 19 Jan 2006 11:53

Post by Xaykev »

So I can do it "the easy way" via .grf??
Someone has a link or something about how to do this?
Prof. Frink
Tycoon
Tycoon
Posts: 3849
Joined: 20 Jan 2003 14:51
Location: Broadstone, Dorset
Contact:

Post by Prof. Frink »

Xaykev
Engineer
Engineer
Posts: 99
Joined: 19 Jan 2006 11:53

Post by Xaykev »

Now I opened the grf file and I get this information:

11 * 9 02 03 00 01 01 00 00 00 00
12 * 9 03 03 01 02 00 00 00 00 00
13 * 21 04 03 1F 01 02 "Airbus A300 (L)" 00
14 * 35 00 03 0E 01 02 00 "þL" 03 14 04 33 06 07 08 FF 09 02 0A 01 0B 34 0C 42 0D 07 0E A0 0F 04 01 11
2D 12 07

Is 0B how much it cost?
Is this where I can change the amounts?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

0B is the property, not the setting. 34 is how much it costs.

But you're probably better off changing the base costs; see Prof Frink's post.
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
Xaykev
Engineer
Engineer
Posts: 99
Joined: 19 Jan 2006 11:53

Post by Xaykev »

Now I tried to change the number AFTER the 0B...in this example 34...
I changed this number for all the airplanes to make them more expensive.
But when I try to encode this file (MSinfo) + the PCX file into the .grf file something strange happen.
The .grf's usual size is 131 kb, but after I do my changes and encode it the file size of the new grf is 4 kb.

What am I doing wrong?

And I read I was probably better off changing the base costs..what is the base cost and how can I do that?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Xaykev wrote:The .grf's usual size is 131 kb, but after I do my changes and encode it the file size of the new grf is 4 kb.

What am I doing wrong?
Not telling us grfcodec's error message.
Xaykev wrote:And I read I was probably better off changing the base costs..what is the base cost and how can I do that?
Prof Frink linked to one of the pages you need to read; the other two are Action0 and Action0GeneralVariables.

No guarantees that Open supports changing the base costs, of course.
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
Xaykev
Engineer
Engineer
Posts: 99
Joined: 19 Jan 2006 11:53

Post by Xaykev »

Loading C:\transport tycoon deluxe\sprites/planesetw_459.pcxancy:100%) Sprite 14 Done: 3% Compressed: 41% (Transparency: 60 %, Redundancy: 65%)
Error: Sprite number mismatch, found 7 but wanted 15

this is the error....
anyone who knows what this means??
Last edited by Xaykev on 07 Feb 2006 22:32, edited 1 time in total.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

"Sprite number mismatch: found <foo> but wanted <bar>" possibly?

That message nearly always means either:
1) The given length for the preceeding sprite doesn't match its actual length.
2) You added/removed sprites, but didn't renumber correctly.
NFORenum will fix both problems for you, but for a simple property-change, you shouldn't be adding/removing sprites, nor changing the lengths. Changing the base costs will require a new sprite, though.

Peter1138 says that base costs are supported, so that potential problem isn't one after all.
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
Xaykev
Engineer
Engineer
Posts: 99
Joined: 19 Jan 2006 11:53

Post by Xaykev »

yes, u r right....look at the post above..I edited that one....

I downloaded the NFOrenum program...
So, I'm supposed to fix the MSinfo Document file with this program, right?
The MSinfo Document is that the .nfo file....?

I'm sorry to ask all these questions, but I'm a big-time newbee so hope u forgive :wink:

By the way, what I'm doing is giving the airplanes new prices right?
Last edited by Xaykev on 07 Feb 2006 22:46, edited 1 time in total.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

It looks to me like you added a byte somewhere in the middle of sprite 14 but failed to change the size.

NFORenum should be able figure out what exactly is going on, but I doubt that just changing the length to 36 will fix your problem.

If you can't figure out NFORenum's error message, post the sprite and error message.
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
Xaykev
Engineer
Engineer
Posts: 99
Joined: 19 Jan 2006 11:53

Post by Xaykev »

The only thing I did was to change the hex numbers in the MSinfo Document file....
I didn't touch the pcx file....

Is the MSinfo document file the nfo file?
Prof. Frink
Tycoon
Tycoon
Posts: 3849
Joined: 20 Jan 2003 14:51
Location: Broadstone, Dorset
Contact:

Post by Prof. Frink »

Yes, Windows (XP certainly maybe others) like to associate .nfo files with MSInfo.

I would suggest reassociating them with notepad/wordpad/a real editor, as I've never seen a .nfo file that wasn't a text file.
Xaykev
Engineer
Engineer
Posts: 99
Joined: 19 Jan 2006 11:53

Post by Xaykev »

I'm struggling with the NFORenum...
I would be very happy if someone could give me some assist. :wink:
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

You read the readme, right?

If you don't tell me what you think it should do but it doesn't, or what it is doing that you think it shouldn't, I really can't help you.

(And no, "work" is not a valid answer for what it isn't doing. Not unless you give me, at the very least, NFORenum's error message.)
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
Xaykev
Engineer
Engineer
Posts: 99
Joined: 19 Jan 2006 11:53

Post by Xaykev »

Yes I read the readme....
Just find it kind of complicated...
I'm not used to do this kind of things.

But do you think it will work?
Do you think it is possible to change the price of the airplanes?
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Post by WWTBAM »

it is dale stan is one of the well known ttdpatch grf coders
Xaykev
Engineer
Engineer
Posts: 99
Joined: 19 Jan 2006 11:53

Post by Xaykev »

What do I write?
What is the commando in this dos program?
renum planesetw_459.nfo ...??
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 12 guests