they should allow grfs to be added after starting the game

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
andreasaspenberg
Engineer
Engineer
Posts: 106
Joined: 26 May 2020 18:33

they should allow grfs to be added after starting the game

Post by andreasaspenberg »

here is my suggestion: enable players to add grfs for vehicles during the game, which is then added to the server and all players have to download it. other grfs could be possible as long as they are compatible with what is already active.
Auge
Route Supervisor
Route Supervisor
Posts: 459
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: they should allow grfs to be added after starting the game

Post by Auge »

Hello
andreasaspenberg wrote: 20 Apr 2021 19:35 here is my suggestion: enable players to add grfs for vehicles during the game
It is possible to add or remove NewGRFs during game play. It is a wilful hidden feature because of altering NewGRFs in a running game is possibly breaking it.

[edit]*btw*: Who the f*** is "they"?[/edit]

Tschö, Auge
Last edited by Auge on 21 Apr 2021 07:04, edited 1 time in total.
User avatar
jfs
Tycoon
Tycoon
Posts: 1339
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: they should allow grfs to be added after starting the game

Post by jfs »

The part about "as long as they are compatible with what is already active" is impossible to determine.

It would require completely rewriting the game, it would be 15 years of work to get that done. The way NewGRF integrates with the game is very tightly coupled, and it's literally impossible (look up The halting problem for the computer science) to determine if a NewGRF would interfere with an ongoing game in a harmful way. There do exist NewGRFs where it's possible to determine whether it's safe or not to add it, but there are also NewGRF's where it's not possible to determine if they are safe or not, and it's not possible to determine if any given NewGRF belongs to the first or second class. Or well, that's my gut feeling about the problems involved, based on my knowledge about how the languages and machines involved work.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9419
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: they should allow grfs to be added after starting the game

Post by planetmaker »

It might be possible to achieve that, *iff* *all* NewGRFs in question in the game are limited to a subset of the existing variables (thus make them completely deaf wrt all global variables which can be changed by any other NewGRF, and make them completely deaf to all other NewGRFs presence or not-presence and when they conform to a recent enough NewGRF version. To ensure that, it would require to introduce a new NewGRF version which makes sure that all these paths for interaction are barred and OpenTTD need not rely on the NewGRF not doing what it promises to not do (history shows, that does not work - the topic is so complex even the best authors with all the best intentions do sometimes things with unexpected consequences when placed in the context with other NewGRFs).

Maybe the provision of "*all*" can be dropped, if OpenTTD can make sure that such deaf and silenced NewGRFs are not communicated to the outside, thus other NewGRFs either.

Things which need be dropped for these kind of NewGRFs include the possibility to extend an existing NewGRF, to check for other NewGRFs to offer better seamless integration with some other, possibly even to check for the presence or absence of specific cargoes, railtypes, etc as they could also be used as proxy to make decisions which influence the game state (oh, we have fruit? Let's change its weight --> boom! oh, we have electric trams? Change its costs and introduction date --> boom!)

So in essence... independent NewGRFs most likely only work for the most basic, but not as soon as you get to the sophisticated NewGRFs which really need to take into consideration things possibly defined or altered by other NewGRFs (like cargoes, track and road and tram types). So the 'no other effect' is very hard to ensure - unless you maybe also introduce additional restrictions like only one type of feature writable (only add vehicles, no disabling etc, no freight definitions, no tracks, no roads, no global or other costs).

In essence: it's a pandora's box :)
andreasaspenberg
Engineer
Engineer
Posts: 106
Joined: 26 May 2020 18:33

Re: they should allow grfs to be added after starting the game

Post by andreasaspenberg »

the vehicle based grfs would mostly be safe either way. they usually work with the ones that mods the base game. vehicle based grfs usually do not disable any vehicles. it could be possible to lock out functions that dusables stuff. others is worth investigating but, i primarily suggested vehicled based ones.
Last edited by andreasaspenberg on 21 Apr 2021 12:35, edited 1 time in total.
User avatar
Erato
Director
Director
Posts: 623
Joined: 25 May 2015 09:09
Location: The Netherlands

Re: they should allow grfs to be added after starting the game

Post by Erato »

I mean, there's a far easier solution: changing absolutely nothing, and have changing NewGRFs at the player's own risk
No pics no clicks. Seriously.
ImageImageImageImageImageImageImage
Auge
Route Supervisor
Route Supervisor
Posts: 459
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: they should allow grfs to be added after starting the game

Post by Auge »

Hello
Erato wrote: 21 Apr 2021 12:14 I mean, there's a far easier solution: changing absolutely nothing, and have changing NewGRFs at the player's own risk
Since ages there is a warning in a bright red box about changing a NewGRF ingame could possibly break your game. Before the feature to change a NewGRF ingame was hidden, the normal flow was to ignore the warning and to write here venomous postings about the s*** game (or at least a bug report) afterwards. Poking in the savegame brought to light that one ore more NewGRFs changed during game play and that caused the game to break.

That was the reason why it got hidden at all. IMHO this is not a case of "the good ol' times".

Tschö, Auge
Eddi
Tycoon
Tycoon
Posts: 7648
Joined: 17 Jan 2007 00:14

Re: they should allow grfs to be added after starting the game

Post by Eddi »

andreasaspenberg wrote: 21 Apr 2021 11:56 the vehicle based grfs would mostly be safe either way.
whatever you smoked, i want none of that.

changing vehicle grfs can change the length of vehicles mid-game, which leads to disconnected vehicles and all sorts of other things that might crash the game.
You might not exactly be interested in Ferion, but if you are, have fun :)
User avatar
Erato
Director
Director
Posts: 623
Joined: 25 May 2015 09:09
Location: The Netherlands

Re: they should allow grfs to be added after starting the game

Post by Erato »

Auge wrote: 21 Apr 2021 12:59 IMHO this is not a case of "the good ol' times".
I think something got massively lost in translation here. Like it's not even funny how much got lost there. I just mean basically keep it as it currently is. (That's what changing nothing means after all) Where you have to manually edit the config file to allow it at all. It's a little obnoxious, and that's kind of the point. It at least reduces the problems related to people who don't have a clue of what they're doing significantly, by limiting it to somewhat more experienced players, and allows us to give a more direct disclaimer, which tends to work better than having to accept the terms of service. Of course it's still not perfect, but it's the closest you're going to get to something that is good enough for most people.

To eradicate the problem entirely you'd need to disable changing NewGRFs altogether which I can only describe as toxic game design. So I think it may be for the better to just ignore any suggestions for changing the way it currently is.
No pics no clicks. Seriously.
ImageImageImageImageImageImageImage
User avatar
2TallTyler
Transport Coordinator
Transport Coordinator
Posts: 308
Joined: 11 Aug 2019 18:15
Location: Massachusetts, USA
Contact:

Re: they should allow grfs to be added after starting the game

Post by 2TallTyler »

andreasaspenberg wrote: 21 Apr 2021 11:56vehicle based grfs usually do not disable any vehicles.
Not true. Most comprehensive replacement sets (Iron Horse, eGRVTS, OpenGFX+ Trains, Danish Trains, etc) disable the default vehicles of that type.
andreasaspenberg
Engineer
Engineer
Posts: 106
Joined: 26 May 2020 18:33

Re: they should allow grfs to be added after starting the game

Post by andreasaspenberg »

it is not true for all of them. the developers could just add a safeguard to make grfs unable to tamper with existing material when loaded after game start. i suggest just throwing the option in so that it can be tested, rather than guess what will happen.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5398
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: they should allow grfs to be added after starting the game

Post by andythenorth »

andreasaspenberg wrote: 21 Apr 2021 21:10 make grfs unable to tamper with existing material when loaded after game start
This is literally what grfs do. This is the design.

I know it seems simple to fix, but it really isn't. :D

And it's open-source, not '1 important player haz demanded, so devs must' :) My point being, there is literally no person walking on earth who will be interested in trying to patch this.

Or prove me wrong! (with a patch) :D
andreasaspenberg
Engineer
Engineer
Posts: 106
Joined: 26 May 2020 18:33

Re: they should allow grfs to be added after starting the game

Post by andreasaspenberg »

i am not a programmer. i am just a transport tycoon veteran. i have played transport tycoon since the first dos version.
User avatar
kamnet
Moderator
Moderator
Posts: 7559
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: they should allow grfs to be added after starting the game

Post by kamnet »

I just wanted to make a note that there are currently five game devs and four experienced NewGRF creators who are commenting on how not-easy this is.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 9 guests