Page 1 of 1
Editing running cost and other parameters
Posted: 10 Sep 2022 21:50
by SportinisBU
Hay, explored this forum. Tried also search. And google some GFR editors, but didnt find out how i can modify some transport parameters. Like capacity, running cost. Purchase cost. Im not programeer. But i played transport tycoon since i think 1996 when i was about 7 years old ;D now i have openTTD. Instaled few mods. But i would like to modify some parameters. How could i do it? Notepad can't translate files correclty. Oh and im not programmer, so difficult to find starting steps. So any advice? Should i google more GfR editors? Or all parameters hidden in some other files?
Re: Editing running cost and other parameters
Posted: 10 Sep 2022 23:06
by kamnet
There are BaseCost mods which can make some modifications to things, and this may be your easiest way to change some of what you want.
There is no NewGRF file editor. NewGRFs are comprised of two parts - sprites and code - which are compiled together. The code is an ordinary plain text file which either has human-readable code such as NML, or largely unreadable code such as NFO. NML is the preferred method since most of the projects made with it also have their source code freely available to modify for your own purpose or to fork into another project.
If you would like to learn more about creating and modifying NewGRFs, head over to the pinned topics in the Graphics Development subforum and NewGRF Technical Discussion subforum. There is also a nice development community available on Discord.
Don't let the fact that you have no prior experience deter you. Nobody else had any experience with developing NewGRFs when they started. It's very much a learning experience, even our most experienced contributors and even core OpenTTD developers are learning new things every day. We've had new contributors start at the age of 15 and some who first started in their retirement years. You become good at it with practice.
Re: Editing running cost and other parameters
Posted: 11 Sep 2022 08:14
by SportinisBU
Thank you for your quick response. But im not sure did i will have enough free time to create something. I just started openTTD, and looked that i would like make few running cost and capacity modifications. Installed mod of military aircraft, and tried to find out how to make very small changes. And only for few of transport. Like 2 aircrafts and 3 trains.
But if i open with Notepad - i got symbols and hieroglyps

Now find some basecost mods. Ill try them

maby ill find my perfection there
But as i find is only GRF like here (picture in link)
https://prnt.sc/JYYqLQCqudWK
Re: Editing running cost and other parameters
Posted: 11 Sep 2022 18:14
by Redirect Left
SportinisBU wrote: 11 Sep 2022 08:14
But if i open with Notepad - i got symbols and hieroglyps
If you do not have access to the original code used, you will need to convert the file(s) back to their original code. Something like
GRFCodec can do that. The results of this output can vary, and it may not be very human readable. It depends on if it was done using NFO or NML, to my knowledge.
Also remember some GRFs may have been released with unfavourable terms & licencing that may frown upon any editing. It honestly more than likely is going to be easier to either ignore your concerns, or find other GRFs that have more friendly settings that you like out of the box.
Re: Editing running cost and other parameters
Posted: 11 Sep 2022 18:34
by kamnet
The Military Items NewGRF is open source and you can download the source code here:
https://github.com/adpro/openttd-military-grf
You will need to set up the NML compiler to make it into a NewGRF. I would advise also changing the GRFID and description in order to be able to tell it apart from the one you're modifying. It's distributed with a GPL v2 license, so you are free to redistribute it if you wish as long as you distribute all the files (including the license) and freely share any modifications you made.
Re: Editing running cost and other parameters
Posted: 11 Sep 2022 18:37
by _dp_
Redirect Left wrote: 11 Sep 2022 18:14
SportinisBU wrote: 11 Sep 2022 08:14
But if i open with Notepad - i got symbols and hieroglyps
If you do not have access to the original code used, you will need to convert the file(s) back to their original code. Something like
GRFCodec can do that. The results of this output can vary, and it may not be very human readable. It depends on if it was done using NFO or NML, to my knowledge.
Also remember some GRFs may have been released with unfavourable terms & licencing that may frown upon any editing. It honestly more than likely is going to be easier to either ignore your concerns, or find other GRFs that have more friendly settings that you like out of the box.
Vehicles are an exception as their parameters can be modified by other grfs with engine override.
https://newgrf-specs.tt-wiki.net/wiki/N ... er_NewGRFs
Re: Editing running cost and other parameters
Posted: 26 Sep 2022 11:28
by SportinisBU
Thank you for help

ill try that.
And i was looking for aircafts sets. Checked lot of them. But non of them had Antonov An-225 Mriya. MAby someone see that in some specific mod set?

Re: Editing running cost and other parameters
Posted: 26 Sep 2022 20:35
by kamnet
A version of the Antonov An-225 can be found in both the Russian Planeset for OpenTTD, and World Airlners Set.
Re: Editing running cost and other parameters
Posted: 30 Sep 2022 12:12
by SportinisBU
Okay, im absolute lost

Find antonov an-225. At russian set it is very low cargo but you can use it for almoust any cargo type. But there is only GRF file. So i cant edit it to adjust parameters.
Im also using aviator av9,8set.
So i started with world airliner set (WAS) it is made good option to parameters. But, creator had good sence of humor

made max load 750 and loading/unloading speed of 10

So it takes few months till it get unloaded and loaded.
What i tried. Downloaded TAR from here
http://bundles.openttdcoop.org/worldair ... es/LATEST/
Find one file at WAS-7876-source\src\gfx\Antonov\An225\An225.pnml. There unziped this file with 7zip. Modified loading speed to 50. And then created a TAR file with 7zip. But openttd didnt show this mod at all in newGRF settings... Then i checked unmodified TAR file... Openttd still doesnt recognise it as mod file.
So im a bit confused how did i can make small adjustments to parameters. That i didnt find out how to edit GRF (i think in these files are hidden all vechiles parameeters)

Re: Editing running cost and other parameters
Posted: 01 Oct 2022 02:38
by kamnet
As I previously mentioned, you will need to set up an NML compiler in order to compile the source code and sprites into a working NewGRF. This would be a good place to start:
https://github.com/OpenTTD/nml
We also have a community of developers on the official Discord channel whom you can tap into for guidance.
https://discord.com/invite/openttd