Change name of existing cargo types < Is it possible?

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

Moderator: OpenTTD Developers

Post Reply
gambit505
Engineer
Engineer
Posts: 3
Joined: 18 Jan 2021 16:25

Change name of existing cargo types < Is it possible?

Post by gambit505 »

Hello there.

Been playing for a little while but never attempted to create any kind of newGRF (or other content). Been looking into this just a little bit and not sure if what I want to achieve is possible.

What I want to do (just for fun) is to change the name of existing goods, eg. change "Passengers" to "Fans" and "goods" to "graphics cards" ... that sort of thing.

Before I spend too long getting deep into the NFO, is this even possible? or can one only add NEW items rather than edit existing ones?

Many thanks in advance.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 507
Joined: 11 Aug 2019 18:15
Contact:

Re: Change name of existing cargo types < Is it possible?

Post by 2TallTyler »

Yes, this is possible and quite easy. I suggest using NML rather than NFO. I believe you would have to disable the original cargo and define a new one, but if you use the same cargo ID number it will replace the chosen cargo for industry production and house acceptance, while the standard cargo label will ensure compatibility with other NewGRFs.

The NML specs for cargos are pretty easy to figure out, once you're familiar with NML itself. For reference, here are my cargo definitions for Improved Town Industries.

If you have other questions or need code help, I'm happy to help.
gambit505
Engineer
Engineer
Posts: 3
Joined: 18 Jan 2021 16:25

Re: Change name of existing cargo types < Is it possible?

Post by gambit505 »

Thanks 2TallTyler, now I know I'll not be wasting my time :D I'll look into it and let you know how I (slowly) progress.
gambit505
Engineer
Engineer
Posts: 3
Joined: 18 Jan 2021 16:25

Re: Change name of existing cargo types < Is it possible?

Post by gambit505 »

Just an update... I did it! Managed to get a few things re-named and its all working! Now I'm making more plans to add more items.

Thanks a log 2TallTyler, your github project really really helped me reference things and look how things were done, from the XML to some of the build parameters. Thanks again.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 44 guests