how to get the number ob max trains (and others) higer??
Moderator: OpenTTD Developers
how to get the number ob max trains (and others) higer??
with the patch settings i can't get the maximum higher than 5000. can somone tell me how i can make this higher? is there a file i should edit?
Re: how to get the number ob max trains (and others) higer??
Are you crazy? no computer can run 5000 trains.
Re: how to get the number ob max trains (and others) higer??
but if i want to try it anyway
how could i make it higher? 


Re: how to get the number ob max trains (and others) higer??
Open src\settings.cpp
Find lines with:
Change 5000 to anything higher (max is 65535 as it is 16bit number).
Recompile
That should do the trick. Note that some problems may arise with so many vehicles and things may break. You have been warned.
Find lines with:
Code: Select all
SDT_VAR(Patches, max_trains, SLE_UINT16, 0, 0, 500, 0, 5000, 0, STR_CONFIG_PATCHES_MAX_TRAINS, RedrawScreen),
SDT_VAR(Patches, max_roadveh, SLE_UINT16, 0, 0, 500, 0, 5000, 0, STR_CONFIG_PATCHES_MAX_ROADVEH, RedrawScreen),
SDT_VAR(Patches, max_aircraft, SLE_UINT16, 0, 0, 200, 0, 5000, 0, STR_CONFIG_PATCHES_MAX_AIRCRAFT, RedrawScreen),
SDT_VAR(Patches, max_ships, SLE_UINT16, 0, 0, 300, 0, 5000, 0, STR_CONFIG_PATCHES_MAX_SHIPS, RedrawScreen),
Recompile
That should do the trick. Note that some problems may arise with so many vehicles and things may break. You have been warned.
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Re: how to get the number ob max trains (and others) higer??
tnx 
it will take some while before i get to 5000 anyway, but i play a huge map so i think i will need more later.
worst thing that could happen is the game crases i think. maybe savegame unuseble, but i make backupsaves

it will take some while before i get to 5000 anyway, but i play a huge map so i think i will need more later.
worst thing that could happen is the game crases i think. maybe savegame unuseble, but i make backupsaves

Re: how to get the number ob max trains (and others) higer??
There can be a maximum of 65535 vehicle in game. A vehicle means *any* wagon, articulated part, engine smoke, sparks, aircrafts + shadows, rotors, road vehicles, ships, etc. With 5000 trains, and nothing else (except smoke and sparks), that would mean trains with an average length of about 10.
Re: how to get the number ob max trains (and others) higer??
So .. if the server raises limits on trains to 700 and you build 655 trains, 100 wagons(parts) each (plus one with 35 parts), nobody in game can build any vehicle anymore?Rubidium wrote:There can be a maximum of 65535 vehicle in game. A vehicle means *any* wagon, articulated part,...
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Re: how to get the number ob max trains (and others) higer??
well then if this is true, how can i build 9 train engines and 1 one train with 12 wagons on it if train limit is 10?Rubidium wrote:There can be a maximum of 65535 vehicle in game. A vehicle means *any* wagon, articulated part, engine smoke, sparks, aircrafts + shadows, rotors, road vehicles, ships, etc. With 5000 trains, and nothing else (except smoke and sparks), that would mean trains with an average length of about 10.
Re: how to get the number ob max trains (and others) higer??
Because a wagon is not a train.Draakon wrote:well then if this is true, how can i build 9 train engines and 1 one train with 12 wagons on it if train limit is 10?
Re: how to get the number ob max trains (and others) higer??
These are separate limits. The 500/5000/10 train limits that can be set in settings is for entire trains. That 65535 limit Rubidium mentioned is total number of objects in game. Engine is an object. Wagon is an object. Spark, plane, shadow, ship or road vehicle is an object. Articulated part is also object.
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Re: how to get the number ob max trains (and others) higer??
65535 means an `unsigned int'. I don't know the OTTD internals, but I think changing it to a `long int' would make the limit impossible to reach, but it may not be that simple at all and I don't want to say anything about resource usage.Bilbo wrote:These are separate limits. The 500/5000/10 train limits that can be set in settings is for entire trains. That 65535 limit Rubidium mentioned is total number of objects in game. Engine is an object. Wagon is an object. Spark, plane, shadow, ship or road vehicle is an object. Articulated part is also object.
Re: how to get the number ob max trains (and others) higer??
Nope, that's an uint16 in openttd code. On most modern compilers for x86, that would be an unsigned short int. But it's not quite as simple as changing that to uint32, and the limit is pretty unreachable anyway.Desolator wrote:65535 means an `unsigned int'. I don't know the OTTD internals, but I think changing it to a `long int' would make the limit impossible to reach, but it may not be that simple at all and I don't want to say anything about resource usage.Bilbo wrote:These are separate limits. The 500/5000/10 train limits that can be set in settings is for entire trains. That 65535 limit Rubidium mentioned is total number of objects in game. Engine is an object. Wagon is an object. Spark, plane, shadow, ship or road vehicle is an object. Articulated part is also object.
Re: how to get the number ob max trains (and others) higer??
Well, I don't think it is unreachable but it is large enough to be very little issue for most peopleYexo wrote:...pretty unreachable anyway.
One openttdcoop map (1024x1024) came to 1000 trains with 6 wagons each (approx 10% of the limit while CPU usage got to about 40%), so with 2048x2048 and more industries you may actually hit the limit, although the game would become quite slow then.
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Re: how to get the number ob max trains (and others) higer??
Ooops, yeah, I forgot, it was very late when I postedYexo wrote:Desolator wrote:Nope, that's an uint16 in openttd code.

Re: how to get the number ob max trains (and others) higer??
Hi...
Can that hard-limit be raised? Why a limit that low?
Some weeks ago i started a game on a 2048x2048-map in year 1950, after about 10 years everyone of us had around 1000 airplanes. I imagine we will reach the 5000 airplane limit around year 2000 to 2010. Then everyone will start building trains as it is the 2nd best income market. I think you get what i mean... seems to be a low set limit and we are only 3 players in that specific game...
rmk:
3x 5000 planes = 15000 objects, add some trains ... okay it could be enough till 2051, but i'm not sure about that.
Can that hard-limit be raised? Why a limit that low?
Some weeks ago i started a game on a 2048x2048-map in year 1950, after about 10 years everyone of us had around 1000 airplanes. I imagine we will reach the 5000 airplane limit around year 2000 to 2010. Then everyone will start building trains as it is the 2nd best income market. I think you get what i mean... seems to be a low set limit and we are only 3 players in that specific game...
rmk:
3x 5000 planes = 15000 objects, add some trains ... okay it could be enough till 2051, but i'm not sure about that.
Playing TT & TTD since 1995 - Will satisfy the Megalomaniac in everyone!
Click here to see all my maps!
Highlights:
CarstsEuropeScenario based on SRTM-Data (Redo planned)
CarstsWorldScenario based on satellite heightmap
CarstsGermanyScenario coming soon...
CarstsBerlinBburgScenario planned...
Click here to see all my maps!
Highlights:
CarstsEuropeScenario based on SRTM-Data (Redo planned)
CarstsWorldScenario based on satellite heightmap
CarstsGermanyScenario coming soon...
CarstsBerlinBburgScenario planned...
Re: how to get the number ob max trains (and others) higer??
Actually, 3 x 5000 planes = 30,000 objects, since the shadow is a separate vehicle.CARST wrote:3x 5000 planes = 15000 objects
No-one's more important than the earthworm.
Re: how to get the number ob max trains (and others) higer??
Well then could we have it an uint32, please?Maedhros wrote:Actually, 3 x 5000 planes = 30,000 objects, since the shadow is a separate vehicle.CARST wrote:3x 5000 planes = 15000 objects
Re: how to get the number ob max trains (and others) higer??
Not easily, no. VehicleIDs are used frequently in Commands, and I suspect that many of them don't have 16 more bits in p1 and p2 spare in order to increase the size of a VehicleID.Desolator wrote:Well then could we have it an uint32, please?
No-one's more important than the earthworm.
Re: how to get the number ob max trains (and others) higer??
Well, it is possible for these commands to have some p3 or p4 if needed or is the size of the command fixed?Maedhros wrote:Not easily, no. VehicleIDs are used frequently in Commands, and I suspect that many of them don't have 16 more bits in p1 and p2 spare in order to increase the size of a VehicleID.Desolator wrote:Well then could we have it an uint32, please?
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Who is online
Users browsing this forum: No registered users and 1 guest