Editing running cost and other parameters

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

Moderator: OpenTTD Developers

Post Reply
SportinisBU
Engineer
Engineer
Posts: 5
Joined: 10 Sep 2022 21:46

Editing running cost and other parameters

Post 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?
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Editing running cost and other parameters

Post 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.
SportinisBU
Engineer
Engineer
Posts: 5
Joined: 10 Sep 2022 21:46

Re: Editing running cost and other parameters

Post 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 :D
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
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Editing running cost and other parameters

Post by Redirect Left »

SportinisBU wrote: 11 Sep 2022 08:14 But if i open with Notepad - i got symbols and hieroglyps :D
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.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Editing running cost and other parameters

Post 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.
_dp_
Transport Coordinator
Transport Coordinator
Posts: 278
Joined: 18 Dec 2013 12:32

Re: Editing running cost and other parameters

Post 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 :D
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
SportinisBU
Engineer
Engineer
Posts: 5
Joined: 10 Sep 2022 21:46

Re: Editing running cost and other parameters

Post 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? :)
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Editing running cost and other parameters

Post by kamnet »

A version of the Antonov An-225 can be found in both the Russian Planeset for OpenTTD, and World Airlners Set.
SportinisBU
Engineer
Engineer
Posts: 5
Joined: 10 Sep 2022 21:46

Re: Editing running cost and other parameters

Post by SportinisBU »

Okay, im absolute lost :D 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 :D 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) :)
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Editing running cost and other parameters

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

Return to “General OpenTTD”

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot] and 16 guests