Jump to content
OpenRCT2
Sign in to follow this  
NightHawk

How to increase cars per train beyond limit ?

Recommended Posts

I just saw this on a server:

wat.jpg

 

The server owner just said he "hacked" it, didn't want to explain how.

Ride stat still said:  3 Trains 6 Cars.

Share this post


Link to post
Share on other sites

I am currently working on a cheat to do this. Another option, which I have used in the past, is to modify the DAT file to set the minimum car length to the length you want - this overrides all other limits on the train length. However, the fact that the train length displayed in the window remains unchanged suggests neither method was used here. 8Cars has a similar feature, it's possible that the train length was hacked in 8Cars, and then the resulting savegame loaded in OpenRCT2. It is also theoretically possible to do something like this by directly editing the game's memory (which is essentially what 8Cars does), but I'm not sure how easy this would be.

In the vanilla game and current versions of OpenRCT2, there is an absolute limit of 16 cars and setting a length longer than that can result in undefined behaviour/possible crashes. My cheat increases this limit to 255 cars, which I believe is as far as you can go without having to modify the save format.

 

Also see this other discussion on the topic

Edited by X7123M3-256

Share this post


Link to post
Share on other sites

Kasper mananged to edit openrct2.dll to get the hacked cars. "Beyond 16".

For that he just added a cheat and you must have enabled it in order to set it.

Just dont use it yourself :) It's not stable.

Edited by daand12

Share this post


Link to post
Share on other sites

Note that setting it beyond 16 will cause compatibility issues with other players who do not have that version, and also with RCT2 itself.

Share this post


Link to post
Share on other sites
9 hours ago, daand12 said:

Kasper mananged to edit openrct2.dll to get the hacked cars. "Beyond 16".

For that he just added a cheat and you must have enabled it in order to set it.

 

Here you can download it, but use it with care :)

If that is the one I sent you then the only thing I did was allow station lengths longer than 12. The credit should really go to X7123M3-256 as I used his code. Anyhow it is an older build so you might not want to use it. He continued on improving it and I compiled a new build based on it to play around with.

The attached .dll is X7123M3-256's newest code from here: https://github.com/OpenRCT2/OpenRCT2/pull/3192 with 2 modifications, 1) 99 station length and up to 9 stations (untested) and 2) multiplayer versionchanged to 4 so it should 'work' with current clients. The new code allows up to 255 cars per train instead of 64.

 

6 hours ago, Broxzier said:

Note that setting it beyond 16 will cause compatibility issues with other players who do not have that version, and also with RCT2 itself.

From my experience it works just fine for the normal OpenRCT2 builds, but if you click on the ride the game immediately crashes. Keep in mind that some rides like railroads have 2 additional cars in the front so the real limit for those is 14 and not 16.

openrct2.dll

Edited by KKLD
Download removed

Share this post


Link to post
Share on other sites
44 minutes ago, KKLD said:

multiplayer versionchanged to 4 so it should 'work' with current clients.

Please be careful with this. The game state may not be deserialized correctly because my version expects an extra byte for the status of the new cheat, which won't be sent by servers running the develop build. Also, without the patch you're limited to 16 cars, and setting more than that will corrupt the memory of other clients. Even if it appears to work, I would recommend against it - it can have all sorts of side effects because you are overwriting memory that is being used for other things. I had various weird bugs occur during testing as a result of this memory corruption - car sprites being drawn where they shouldn't be, menu items being populated with random text, and at one point it thought my coaster was a sign. I am not sure whether this could actually crash the server or other clients - I suspect it could but I'm reluctant to try it.

Edited by X7123M3-256
  • Like 1

Share this post


Link to post
Share on other sites

@KKLD @daand12 please don't provide such hacked builds for widely available public downloads. There is a reason for changing the network version and also a reason for not merging that code just yet.

It will easily break other people's games and we get a ton of users complaining about such things. There are enough users doing nasty stuff already.

  • Like 2

Share this post


Link to post
Share on other sites

@janisozaur Yeah i agree with that. My hacked build was not really that stable enough to run it. I did revert back to normal latest build after that. Also it did had some sync problems to others.

 

Share this post


Link to post
Share on other sites

Hey sorry for the trouble. I thought I was being helpful. But it might cause more harm than good.

Share this post


Link to post
Share on other sites

Thanks.

BTW it's fine if you provide such build, but with some unique network version, like 0.0.4-longtrains or some such – just so it won't cause mayhem on someone's server. If you choose to do so, please also provide some ID in version.h so we can track it more easily.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...