Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sun Jun 24, 2018 9:05 am

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to edit GRFs?
PostPosted: Sat Sep 10, 2016 12:49 pm 
Offline
Engineer
Engineer
User avatar

Joined: Tue Jul 29, 2014 6:08 pm
Posts: 103
Location: Czech Republic
Okay, so; I red many tutorials and stuff, then I gave up, then I red them again and I still don!t get the compiling part of NewGRFs. Maybe I am just dumb af, but everytime I try to compile GRF that I downloaded and edited, nothing happend, just... nothing. Only thing I want to do is to edit some prices in one aircraft grf to match prices of another one.


Top
   
 Post subject: Re: How to edit GRFs?
PostPosted: Sat Sep 10, 2016 1:56 pm 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2633
Can you describe more precise which steps you have taken? Which NewGRF are you editing, where did you download the source of that NewGRF, which program(s) are you using to compile the NewGRF? At which step does "nothing" happen?

_________________
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML


Top
   
 Post subject: Re: How to edit GRFs?
PostPosted: Sat Sep 10, 2016 2:06 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4632
Location: home
Let's take a few steps back, and explain "compile" first.

Suppose you want to have dinner. You go to the super market, and buy lots of tasty ingredients. Raw meat, uncut vegetables, some uncooked potatoes, or unboiled rice, etc.
Do you eat all those ingredients as you bought them from the super market?

No, you don't (at least Ii hope so :) ).
There is a process called "cooking" that transforms tasty ingredients to a meal known as "dinner".


Compiling is a similar process. Computers are bad at reading text, and good at reading numbers. We are good at reading text, and bad at reading numbers. To bridge that gap from humans to computers, there is a process called "compiling". It transforms the text describing the GRF contents to a form known as NewGRF, which the computer (game) understands.

Like cooking, compiling is a one-way transformation. You can't get back to the original ingredients from the cooked meal. You can't get back from the NewGRF to the original text. The latter is not entirely true, there is a process called "decompiling" that does produce text from the NewGRF. Technically, it is text, but it's not very readable, you need a lot of study to understand what it says.


Now, back to your problem. What does "download a grf" means exactly? What are you downloading? The "NewGRF" file (ie the transformed result aimed at use by a computer), or its source code (the text describing the grf, aimed at editing by humans)?

In cases like this, it helps if you show us every step of the way, in such a detailed way, that we can replicate the exact same steps, hopefully getting the exact same result that you get. At that level of detail, we can literally try to do the same thing you did, and then find where it doesn't work, or where you forget a small but crucial detail.
This goes as far as what file you downloaded, which tool you used to unpack it, the command line parameters that you used, the file that you edited, the exact line you changed (with "before" and "after", so we can see the exact change), the command to compile, the response of the system, and since you say "nothing happens", probably also an indication of what you expect to happen at some point, but doesn't.

Edit: Ninja-ed by Transportman about the last part :)

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
 Post subject: Re: How to edit GRFs?
PostPosted: Sat Sep 10, 2016 2:54 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Tue May 10, 2016 7:09 pm
Posts: 317
Also feel free to ask more questions if anything from above replies were not understandable.

Edit: just trying to be proactive here and making a guess:

SPolygon wrote:
Maybe I am just dumb af, but


Do not hold your hopes up. Everyone has such moments. ;)

SPolygon wrote:
everytime I try to compile GRF that I downloaded and edited, nothing happend, just... nothing. Only thing I want to do is to edit some prices in one aircraft grf to match prices of another one.


Assuming that nothing happened means prices did not change, and you are compiling from downloaded the source of some newgrf:

if the compiling finished then did you copy the resulting grf file into the place game is expecting it (under Linux it is in the ~/.openttd/newgrf folder, I have to check the Windows later on if somebody else does not jump in).

_________________
California City Sets viewtopic.php?t=76786
1000 building set viewtopic.php?t=75250


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.