NewGRFs Overwriting each other

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

Moderator: OpenTTD Developers

Post Reply
User avatar
DeletedUser10
Traffic Manager
Traffic Manager
Posts: 204
Joined: 01 Jun 2017 10:03

NewGRFs Overwriting each other

Post by DeletedUser10 »

Hello.
New to OpenTTD.
I installed 2 different train NewGRFs in a save game,and I realized that some trains from one trainset are overwriting trains from the other train set. Is there any way to prevent things like this?
Sent from my Ubuntu 16.04 LTS
User avatar
kamnet
Moderator
Moderator
Posts: 8532
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: NewGRFs Overwriting each other

Post by kamnet »

Yes. Don't load more than one train set. :)

Seriously, though, what sets are you using, and what exactly do you mean by "overwriting"
User avatar
DeletedUser10
Traffic Manager
Traffic Manager
Posts: 204
Joined: 01 Jun 2017 10:03

Re: NewGRFs Overwriting each other

Post by DeletedUser10 »

2cc train set and Japan set.
When I build a train depot I realized some of the trains are not showed in the list,even it should be available in that year.
Sent from my Ubuntu 16.04 LTS
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: NewGRFs Overwriting each other

Post by Sylf »

Vehicles can show up to 2 years early or 2 years later than the programmed design date, decided randomly. Wait 2 more years and see if that train has been introduced by then.
User avatar
DeletedUser10
Traffic Manager
Traffic Manager
Posts: 204
Joined: 01 Jun 2017 10:03

Re: NewGRFs Overwriting each other

Post by DeletedUser10 »

Thank you everyone.
How about discompile the newGRF and change vehicle ID? (It might be difficult)
I have my pc (Ubuntu) with NML compiler installed.
I REALLY want to use 2or more sets.
Sent from my Ubuntu 16.04 LTS
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: NewGRFs Overwriting each other

Post by Sylf »

Each NewGRF have their own ID pool - they do not write each other over, unless it's made specifically with engine_override functionality.

You can decompile NewGRF to NFO using grfcodec tool, but not to NML. After you decompile it to NFO, you can update vehicle ID, and compile it again, if you really want to.

I think you should post the save file of the game that's giving you troubles and let the rest of us see what's going on, and determine if there's really a problem.
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: NewGRFs Overwriting each other

Post by Transportman »

ir1n1o57 wrote:Thank you everyone.
How about discompile the newGRF and change vehicle ID? (It might be difficult)
I have my pc (Ubuntu) with NML compiler installed.
I REALLY want to use 2or more sets.
The 2cc TrainsInNML source code is publicly available, but it won't help you, as I only disable the default vehicles and not those from other sets. I'm pretty sure 99% of other train NewGRFs do the same if they disable vehicles, they only disable the default ones.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: NewGRFs Overwriting each other

Post by adf88 »

Try changing order of GRFs on your in-game NewGRF list (in main menu, you have to start a new game with the new list of NewGRFs).

And post a savegame!!! Or I will have to go downstairs and clean my crystal ball...
:] don't worry, be happy and checkout my patches
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: NewGRFs Overwriting each other

Post by Baldy's Boss »

It is certainly possible to use a large number of NewGRF sets simultaneously,which can have the effect of offering multiple incarnations of the same vehicle (look for differences in running cost).
Example:
Attachments
TuhavenandBadburgRRCo.,1stJul1880.sav
(3.41 MiB) Downloaded 22 times
User avatar
DeletedUser10
Traffic Manager
Traffic Manager
Posts: 204
Joined: 01 Jun 2017 10:03

Re: NewGRFs Overwriting each other

Post by DeletedUser10 »

I think that NFO is MUCH MORE difficult and confusing than nml
I installed nmlc by apt-get in Ubuntu,but can I install grfcodec via apt-get too?
Sent from my Ubuntu 16.04 LTS
User avatar
DeletedUser10
Traffic Manager
Traffic Manager
Posts: 204
Joined: 01 Jun 2017 10:03

Re: NewGRFs Overwriting each other

Post by DeletedUser10 »

I'm sorry I didn't tell you,my problem is that 2 of trainsets overwriting default vehicle at the same time, so the train that replaced the default vehicle which from the lower set in the Grf list is also overwrited by trains from another sets who wanted to replace the default trains too.

Sorry for my "Appalling" English. :bow:
Sent from my Ubuntu 16.04 LTS
User avatar
SilverSurferZzZ
Route Supervisor
Route Supervisor
Posts: 468
Joined: 29 Oct 2013 23:31

Re: NewGRFs Overwriting each other

Post by SilverSurferZzZ »

Maybe exits a easiest form of fix your problem without the use of any complicated code: OpenGFX+ Trains.
NewGRFs__
City names/Landscape: Naruto | Planets | Lovers | Halloween | Kaijus
Vehicles: Famous Cars | Super Cars | Racing Cars | Cars Cars | Improved M Cars

SilverSurferZzZ has left the building!
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: NewGRFs Overwriting each other

Post by Transportman »

ir1n1o57 wrote:I'm sorry I didn't tell you,my problem is that 2 of trainsets overwriting default vehicle at the same time, so the train that replaced the default vehicle which from the lower set in the Grf list is also overwrited by trains from another sets who wanted to replace the default trains too.

Sorry for my "Appalling" English. :bow:
I think most NewGRFs do not replace the default vehicles, but completely disable them.

But I think a savegame would help here, along with an example of a vehicle for which you have the problem.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
DeletedUser10
Traffic Manager
Traffic Manager
Posts: 204
Joined: 01 Jun 2017 10:03

Re: NewGRFs Overwriting each other

Post by DeletedUser10 »

I am sorry.
I mean that for example there are 2 train sets example1.grf and example2.grf ,which are containing train 1 and train 2 who both want to replace AsiaStar, if example1.grf is at the top of the list,then train 1 appeared in the vehicle list but train 2 doesn't.
Sent from my Ubuntu 16.04 LTS
User avatar
kamnet
Moderator
Moderator
Posts: 8532
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: NewGRFs Overwriting each other

Post by kamnet »

ir1n1o57 wrote:I am sorry.
I mean that for example there are 2 train sets example1.grf and example2.grf ,which are containing train 1 and train 2 who both want to replace AsiaStar, if example1.grf is at the top of the list,then train 1 appeared in the vehicle list but train 2 doesn't.
There is no way to prevent that from happening, due to the nature of how the NewGRF system works, other than restricting yourself to using a set which doesn't overwrite the default vehicles, or only using one train set.
User avatar
DeletedUser10
Traffic Manager
Traffic Manager
Posts: 204
Joined: 01 Jun 2017 10:03

Re: NewGRFs Overwriting each other

Post by DeletedUser10 »

Thanks.
I finally use 20and more trainset with gfxplus train...
And it worked fine.
Sent from my Ubuntu 16.04 LTS
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 6 guests