Page 1 of 2

newgrf limit

Posted: 03 May 2008 16:34
by cmoiromain
I tried launching a game with many newgrfs, many vehicle sets (wanna try out the new feature), but also other newgrf such as stations, terrain etc...

The problem is, I ended up with this:
FATAL: too many NewGRFs are loaded.
I searched the wiki but didn't find the answer to this, so what is the limit of newgrf files? can this limit be increased?

Re: newgrf limit

Posted: 03 May 2008 17:38
by Draakon
cmoiromain wrote:I tried launching a game with many newgrfs, many vehicle sets (wanna try out the new feature), but also other newgrf such as stations, terrain etc...

The problem is, I ended up with this:
FATAL: too many NewGRFs are loaded.
I searched the wiki but didn't find the answer to this, so what is the limit of newgrf files? can this limit be increased?
Take some NewGRFs off and other NewGRFs that do the same thing as another current one does. Even better, show the load order and then i can be more helpful on what to keep and what not.

Re: newgrf limit

Posted: 03 May 2008 17:58
by cmoiromain
I am not seeking help for my particular problem, I am just asking for precision about the limit of NewGRF files. but thank you anyway for offering support =)

Re: newgrf limit

Posted: 03 May 2008 19:20
by Rubidium
The limit is around 60-ish NewGRFs. More than that is unlikely to be supported because that means that it becomes much harder to check whether the client has the required NewGRFs before joining a server.

Re: newgrf limit

Posted: 15 Jun 2008 05:30
by Computer.Pers
HI All

I'm dont playing any on-line games and wants to play with MANY of GRRFs loaded ...

So (in ver 0.6.1 in Source) in file fios.h i've found:
LAST_GRF_SLOT=63
MAX_FILE_SLOTS = 64

i've changed this to:
LAST_GRF_SLOT=160
MAX_FILE_SLOTS = 161

and recompiled the game....
and everything working fine.... for now at least......

(sorry for my bad english)

[Patch] Too many NewGRFs are loaded.

Posted: 07 Aug 2010 15:27
by Muzzly
I would like to put here my patch.

Currently it is possible to load max 63 NewGRF files.
This patch allows you to load up to 255 files in single player mode.
In multiplayer mode GRF limit stays the same - 63 files.
For convenience make two presets, one for single player game and one for multiplayer game :-)


Todo/known errors:
============
1. For some reason warning message is in blue color. Currently I do not know how to change it to white :-)
2. There is a way to overcome this check. Start a new game with many GRFs, save it and then load this game for network play.
3. ( should I make ? ) new message ID.

Patch is for revision 20394.

Your opinion, suggestions and bug report are welcome!

Re: newgrf limit

Posted: 20 Aug 2010 08:25
by Emperor Jake
muzzy wrote: 1. For some reason warning message is in blue color. Currently I do not know how to change it to white :-)
That is not your patch's fault. I have the same thing in a recent unmodified nightly.

- Jake

Re: newgrf limit

Posted: 20 Aug 2010 08:39
by Rubidium
Emperor Jake wrote:That is not your patch's fault. I have the same thing in a recent unmodified nightly.
Then why haven't I seen that issue on the bug tracker yet?

Re: newgrf limit

Posted: 20 Aug 2010 09:15
by Alberth
Please test with r20514 or newer first, as error message colours got fixed recently.

Re: newgrf limit

Posted: 06 Nov 2014 05:34
by Marctraider
Is there a technical limitation on network games or just the reason rubi mentioned?

Re: newgrf limit

Posted: 06 Nov 2014 07:24
by Alberth
Marctraider wrote:Is there a technical limitation on network games or just the reason rubi mentioned?
yes

The current limit is derived from the maximum number of newgrfs you can put in one network packet (as used by the Internet).

Obviously you can split the information over multiple packets, but that gives the problem of knowing when to send what from the server, and from the client the problems of whether you have receieved everything, while ensuring the server didn't change the content in the mean time.

That is a lot of complicated problems. Together with 60-ish being quite reasonable, extending seems too much work (with risk of breaking network things) to make such a change.

Re: newgrf limit

Posted: 07 Nov 2014 22:25
by Marctraider
Gotcha. Was just curious. Personally I dont really see much situations where more than 60 GRF's are favorable anyway.

Re: newgrf limit

Posted: 08 Nov 2014 08:51
by Roslav
Marctraider wrote:Gotcha. Was just curious. Personally I dont really see much situations where more than 60 GRF's are favorable anyway.
Then you never saw how many NewGRFs I have loaded. :D

(Well, it's because I never submitted any screenshot so far :))

Re: newgrf limit

Posted: 30 Nov 2014 01:30
by Eddy Arfik
Currently static-loaded GRFs are counted towards the multiplayer limit, even though there is no need to send this information to other network clients AFAIK. Would it be safe to modify the code so that static GRFs are not counted, or should I run a dedicated server with a different config file?

Re: newgrf limit

Posted: 30 Nov 2014 10:44
by planetmaker
Eddy Arfik wrote:Currently static-loaded GRFs are counted towards the multiplayer limit, even though there is no need to send this information to other network clients AFAIK. Would it be safe to modify the code so that static GRFs are not counted, or should I run a dedicated server with a different config file?
As far as I see, the main reason for the limit is the network packet size, thus in principle they could be exempt from that limit.

However static NewGRFs make absolutely no sense for a *dedicated* server as they may only change the visual appearence of sprites which are not drawn anyway.

Re: newgrf limit

Posted: 30 Nov 2014 14:26
by Eddy Arfik
planetmaker wrote: static NewGRFs make absolutely no sense for a *dedicated* server as they may only change the visual appearence of sprites which are not drawn anyway.
In other words it's safe to load the maximum 58 GRFs on a dedicated server and still have several "action A only" GRFs loaded client side?

Re: newgrf limit

Posted: 30 Nov 2014 14:48
by planetmaker
The definition of 'static NewGRF' is that it cannot change how the game behaves. A static NewGRF is and will be disabled when one of the non-static NewGRFs queries its presence.

Also, a server using static NewGRFs will not report these to the client.

Re: newgrf limit

Posted: 30 Nov 2014 22:36
by Eddi
There is a difference between GRFs that are loaded as static, and GRFs that are able to load as static, but are actually loaded as normal.

Also, counting static GRFs (of the first kind) should be UNSAFE, because a client joining a maxed out server would not be able to load all GRFs if he also had static GRFs set up.

Re: newgrf limit

Posted: 06 Jul 2019 23:20
by steamymart
I am completely new to the world of patches for Open TTD, this one sounds interesting, can anyone help an idiot like me, as to how this patches should be installed

Re: newgrf limit

Posted: 07 Jul 2019 01:00
by Eddi
In order to "install" patches, you must first learn to compile the game from source code without any patches, see https://wiki.openttd.org/Compiling for details