NML change game settings

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
AlphaCentauriBear
Engineer
Engineer
Posts: 55
Joined: 14 Jan 2024 01:32

NML change game settings

Post by AlphaCentauriBear »

Any way to change game settings in NewGRF?
I understand this is redundant since there are all there but I may want to publish a preset.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: NML change game settings

Post by Eddi »

maybe you should rephrase that question more specifically what you ACTUALLY want to do, before you pick up a tool that might not be designed for what you're trying to achieve.
User avatar
jfs
Tycoon
Tycoon
Posts: 1763
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: NML change game settings

Post by jfs »

No. NewGRF must work under the game setting chosen by the player. They can affect some rules of the game, and some things may override some defaults given by some game settings, but they can not change the value of settings as such. (For example, you have the game setting for how industry production changes happen: Either in large, infrequent steps, or in small, more frequent steps. Here a NewGRF industry can implement the various callbacks and make its own rules for how much cargo it produces and when it announces production changes, regardless of the game setting. But those rule changes are for that single industry type, not industries in general.)
dol422
Transport Coordinator
Transport Coordinator
Posts: 310
Joined: 29 Dec 2015 20:06
Location: England

Re: NML change game settings

Post by dol422 »

This thread explains how, but also why you shouldn't and what can happen if you do:
viewtopic.php?t=90609

Changing NewGRFs before a game will have no effect.
Take a look at: http://www.tt-forums.net/viewtopic.php?f=47&t=74993
Why do it tomorrow when you can do it today
skc
Traffic Manager
Traffic Manager
Posts: 177
Joined: 17 Sep 2022 02:02

Re: NML change game settings

Post by skc »

dol422 wrote: 23 Feb 2024 20:19 This thread explains how, but also why you shouldn't and what can happen if you do:
viewtopic.php?t=90609

Changing NewGRFs before a game will have no effect.
That's irrelevant to what this thread is about.
AlphaCentauriBear is wanting to know if it's possible to create a GRF that can change game settings, not changing GRF's during a game.
dol422
Transport Coordinator
Transport Coordinator
Posts: 310
Joined: 29 Dec 2015 20:06
Location: England

Re: NML change game settings

Post by dol422 »

skc wrote: 24 Feb 2024 00:32
dol422 wrote: 23 Feb 2024 20:19 This thread explains how, but also why you shouldn't and what can happen if you do:
viewtopic.php?t=90609

Changing NewGRFs before a game will have no effect.
That's irrelevant to what this thread is about.
AlphaCentauriBear is wanting to know if it's possible to create a GRF that can change game settings, not changing GRF's during a game.
Not really as the question he asked wasn't exactly specific.

I gave the answer that best suited the way I interpreted the question.
Take a look at: http://www.tt-forums.net/viewtopic.php?f=47&t=74993
Why do it tomorrow when you can do it today
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 23 guests