newgrf limit

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

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

newgrf limit

Post by cmoiromain » 03 May 2008 16:34

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 » 03 May 2008 17:38

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 » 03 May 2008 17:58

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 » 03 May 2008 19:20

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 » 15 Jun 2008 05:30

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 » 07 Aug 2010 15:27

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 917 times

User avatar
Emperor Jake
Tycoon
Tycoon
Posts: 3074
Joined: 24 Apr 2007 09:37
Location: Straya

Re: newgrf limit

Post by Emperor Jake » 20 Aug 2010 08:25

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
--Stuff I made (or helped make)--
ImageImageImageImage

--My Award-Winning Screenshots and Videos--

Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: newgrf limit

Post by Rubidium » 20 Aug 2010 08:39

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: 4740
Joined: 09 Sep 2007 05:03
Location: home

Re: newgrf limit

Post by Alberth » 20 Aug 2010 09:15

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 » 06 Nov 2014 05:34

Is there a technical limitation on network games or just the reason rubi mentioned?

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4740
Joined: 09 Sep 2007 05:03
Location: home

Re: newgrf limit

Post by Alberth » 06 Nov 2014 07:24

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 OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.

Marctraider
Engineer
Engineer
Posts: 7
Joined: 27 Oct 2005 16:18

Re: newgrf limit

Post by Marctraider » 07 Nov 2014 22:25

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 » 08 Nov 2014 08:51

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: 262
Joined: 09 Apr 2014 11:10

Re: newgrf limit

Post by Eddy Arfik » 30 Nov 2014 01:30

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: 9293
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: newgrf limit

Post by planetmaker » 30 Nov 2014 10:44

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: 262
Joined: 09 Apr 2014 11:10

Re: newgrf limit

Post by Eddy Arfik » 30 Nov 2014 14:26

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: 9293
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: newgrf limit

Post by planetmaker » 30 Nov 2014 14:48

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: 7415
Joined: 17 Jan 2007 00:14

Re: newgrf limit

Post by Eddi » 30 Nov 2014 22:36

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.
You might not exactly be interested in Ferion, but if you are, have fun :)

steamymart
Engineer
Engineer
Posts: 4
Joined: 29 Jun 2019 22:50

Re: newgrf limit

Post by steamymart » 06 Jul 2019 23:20

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: 7415
Joined: 17 Jan 2007 00:14

Re: newgrf limit

Post by Eddi » 07 Jul 2019 01:00

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
You might not exactly be interested in Ferion, but if you are, have fun :)

Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 4 guests