newgrf limit

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

User avatar
cmoiromain
Chief Executive
Chief Executive
Posts: 655
Joined: 15 Jan 2007 21:45
Location: FRANCE
Contact:

newgrf limit

Post 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?
I am little, ugly, and nasty. How do you do?
Draakon
Director
Director
Posts: 542
Joined: 11 Mar 2007 16:50

Re: newgrf limit

Post 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.
User avatar
cmoiromain
Chief Executive
Chief Executive
Posts: 655
Joined: 15 Jan 2007 21:45
Location: FRANCE
Contact:

Re: newgrf limit

Post 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 =)
I am little, ugly, and nasty. How do you do?
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: newgrf limit

Post 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.
Computer.Pers
Engineer
Engineer
Posts: 1
Joined: 15 Jun 2008 05:22

Re: newgrf limit

Post 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)
User avatar
Muzzly
Traffic Manager
Traffic Manager
Posts: 226
Joined: 09 Jun 2010 20:54
Location: Vilnius, LT

[Patch] Too many NewGRFs are loaded.

Post 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!
Attachments
max_grfs_v0.2.patch
Patch for revision 20394.
(5.13 KiB) Downloaded 1314 times
User avatar
Emperor Jake
Tycoon
Tycoon
Posts: 3426
Joined: 24 Apr 2007 09:37
Skype: Discord: Emperor Jake #4106
Location: Not Actually Japan
Contact:

Re: newgrf limit

Post 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
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: newgrf limit

Post 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?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: newgrf limit

Post by Alberth »

Please test with r20514 or newer first, as error message colours got fixed recently.
Marctraider
Engineer
Engineer
Posts: 7
Joined: 27 Oct 2005 16:18

Re: newgrf limit

Post by Marctraider »

Is there a technical limitation on network games or just the reason rubi mentioned?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: newgrf limit

Post 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.
Being a retired OpenTTD developer does not mean I know what I am doing.
Marctraider
Engineer
Engineer
Posts: 7
Joined: 27 Oct 2005 16:18

Re: newgrf limit

Post by Marctraider »

Gotcha. Was just curious. Personally I dont really see much situations where more than 60 GRF's are favorable anyway.
Roslav
Engineer
Engineer
Posts: 59
Joined: 19 May 2014 21:50
Location: Slovakia

Re: newgrf limit

Post 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 :))
Eddy Arfik
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 09 Apr 2014 11:10

Re: newgrf limit

Post 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?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: newgrf limit

Post 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.
Eddy Arfik
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 09 Apr 2014 11:10

Re: newgrf limit

Post 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?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: newgrf limit

Post 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.
Eddi
Tycoon
Tycoon
Posts: 8254
Joined: 17 Jan 2007 00:14

Re: newgrf limit

Post 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.
steamymart
Engineer
Engineer
Posts: 4
Joined: 29 Jun 2019 22:50

Re: newgrf limit

Post 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
Eddi
Tycoon
Tycoon
Posts: 8254
Joined: 17 Jan 2007 00:14

Re: newgrf limit

Post 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
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 1 guest