Jump to content

Recommended Posts

Posted (edited)

EDIT: Did you know your ports were broken? The built-in map editor always sets the port demand level to 0 when it writes the port data. This results in demand dropping to zero after a single delivery if playing the expert industry model. Many maps exhibit this error, since the only way to fix it, is to directly manipulate the binary data of the map file.

As noted in my other thread for 1.57, I tend to like things to be 'right' even if it doesn't really affect the gameplay too much. I also needed a little programming project so I created a little command line tool to display / fix / edit the RT2 ports. It will display in hex, decimal, or words. The fix option will set the demand to 5.0. This value was selected for two reasons, the first is that in most scenario maps, port entry 1 has demand set to 5.0 even if the demand is unneeded for that entry, like a raw producer. The second reason is that according to the strategy guide, demand level 5.0 is the level that pays 100% in the expert industrial model. If one wants to use a different value, the tool will allow you to edit to any reasonable value that you'd like. Just to be explicit for those who didn't realize, ports are not defined in the exe file like other building production data, ports are defined in the map, and once a game is started, the map is copied into your save file. So to fix a port, the map file is modified, and if one wants to fix a port in an ongoing game, then the save file must be modified. Generally, RT2 is installed under C:\Program Files or c:\Program Files (x86) in modern Windows, and this is a protected area, so one can view the port data without privileges, but to make fixes or edits then the shell should be 'Run as Administrator'. As noted in the help option, the program will accept wildcards, but a Microsoft bug causes the first match to be truncated to the first character. Multiple map files may also be specified individually on the same line. As an example if I wanted to look and all the Second Century scenarios in my install, and I type 'RT2_Port maps\#e*' (without the single quotes) then I would get a file error for maps\# then I would get data for all the Second Century maps other than #e01camp.mp2. As a workaround I would type 'RT2_Port maps\#e01camp.mp2 maps\#e*'. You still get the error which can be ignored, but now one gets all the data since the missing file was individually specified. (The above path presumes the RT2_Port.exe file was placed in the main RT2 directory.) Help will be printed if the program is run with -h or -? or any illegal option. I developed the tool for map files and it works with *.map and *.mp2 files. Game files seem to put the data in the same location and so it seems to also work with *.gm2 game files though I didn't test the game files extensively. Note any file names with spaces must be enclosed within double quotes, so the name is recognized as a single token.

RT2_Port.zip includes just the RT2_Port.exe file which I recommend putting in the same directory as RT2_Plat.exe for simplicity, but it can go anywhere.

Fixed RT2_Plat Maps.zip contains updated maps for a subset of the standard 36 scenarios with the only change being the ports, and a readme file.

Note: From my recent experience, guests can download from the download area, but cannot download files within forum posts. If you then create an account to question or comment on this, you'll notice that you can download from forum posts once you have an account.

Questions and comments welcome.

 

RT2_Port.zip

Fixed RT2_Plat Maps.zip

Edited by htp_rr
  • Like 1
  • Upvote 1
Posted

Port notes for map builders:

The port data is patterned after the conversion data for other buildings, though it lives in the map rather than in the exe like the other building data.

Though the built-in editor won't let you enter it, ports do support inputs to boost production of raw producers, like grain boosts cattle production.

Though the data structure supports 2 inputs per output, the ports do not. Conversions like the Steel Mill, 1 iron + 1 coal -> 2 steel, do not work.

Though the data structure supports Start and End dates for each entry, the dates are not honored.

While only one input is only supported for each output, the ratios do not need to be 1 for 1. Entries may be 1 for 2 or 2 for 1 or probably other similar choices.

The built-in editor sets demand to 0.0; the tool in this thread will accept values up to 9.0, but I did not test for an actual maximum. It may be above or below 9.0, though 5.0 definitely works.

Demand of 5.0 is the only value other than 0.0 found in campaign maps, and 5.0 pays 100% in the expert industry model.

Demand less than 1.0 will, in the expert industry model, initially present as a demand of 2 cars, but as soon as any delivery is made, the demand will permanently drop to 0.

  • Upvote 1
  • 2 months later...
Posted

Thanks for this, but I'm having a little trouble using the switches. (I'm using the Command Prompt that comes with Windows 10.)

I'm able to read the data of a map file, but I'm not sure where or how to place the switches to get the desired effects.

  • 5 months later...
Posted

I have just found this forum and am intrigued by this fix. However, I have had a problem running this program.

I am running Windows 10 Home.

I am using the Run dialog to enter the command line. The program seems to start but the window it runs in disappears after displaying loads of data which scroll too fast for me o read.

Any suggestions on what I am doing wrong?

Thans in advance.

  • 2 weeks later...
Posted (edited)

My mistake was to use the Run Command (Windows Key + R) and not the Windows Command Prompt (found under the Windows System folder on the Windows 10 Start Menu). I think what was being displayed was RT2_Port's help instructions; which give much detail of the app's functions.

I have successfully modified a map file to fix the ports. Now, demand for goods at the port does not fall to zero after the first delivery. To achieve this I used the command: RT2_Port -fw <MapfileName>

This automatically fixes the map file and rewrites the data to the file. The Command Prompt app has to be run using Adminstrator permissions; as mentioned in the OP and in the app's instructions.

The result of this is that revenue from materials taken to a port does not collapse after the first delivery as it did before.

Again, thanks to ftp_rr for posting this solution to a bug, I suspect, most users are unaware of.

Edited by Mooncrest
A previous post does not seem to have been approved by Moderators yet
  • Upvote 1
Posted

Thanks to htr_rr for this tool.  It's much easier to fix the map files with this instead of a hex-editor.

Also thanks to jeffryfisher for his research and enhancements for RRT2. I still occasionally play this game with a patched *.exe that fixes the input 2 demand bug.

  • 2 years later...
Posted

Thank you for creating this fix; I just have one question about using it. I had downloaded other fixed versions of Platinum campaign missions and scenarios, but there was no mention of the port bug, perhaps because it was not yet discovered back then. Is it possible to just run this program for all of the Platinum map files so the port fix is applied to every map, or do I have to check and see what maps actually have ports?

Posted

My memory is fuzzy, but I think there's a data table in every map that has rows for all building types, even those not placed or allowed, so my guess is that you can "fix" the port data even on a map whose port data has no actions/transactions.

Posted

If I understand this topic correctly I only need to use the RT2_Port.exe if I want to correct custom maps?

The file with the fixed maps contains the stock maps and these have already been fixed with the command tool. So to play RT2 Platinum with the stock map files I can just copy these over and I`m good to go?

 

  • 5 months later...
Posted

For anyone looking for a simple process to apply to all their maps (both campaign and scenario), you can use Powershell to do it quickly:

  1. Unpack RT2_Port.exe into "C:\Program Files (x86)\Steam\steamapps\common\Railroad Tycoon 2 Platinum\maps" - for a Steam install you can find this quickly by right-clicking the game as choosing "Manage" > "Browse Local Files"
  2. Open powershell and execute the below - you may need to run as admin depending on your account configuration
  3. cd "C:\Program Files (x86)\Steam\steamapps\common\Railroad Tycoon 2 Platinum\maps"
  4. ls *.MP2 | ForEach-Object { .\RT2_Port.exe -fw $_ }

 

 

  • 6 months later...
Posted
On 7/29/2022 at 1:08 AM, Justin said:

For anyone looking for a simple process to apply to all their maps (both campaign and scenario), you can use Powershell to do it quickly:

  1. Unpack RT2_Port.exe into "C:\Program Files (x86)\Steam\steamapps\common\Railroad Tycoon 2 Platinum\maps" - for a Steam install you can find this quickly by right-clicking the game as choosing "Manage" > "Browse Local Files"
  2. Open powershell and execute the below - you may need to run as admin depending on your account configuration
  3. cd "C:\Program Files (x86)\Steam\steamapps\common\Railroad Tycoon 2 Platinum\maps"
  4. ls *.MP2 | ForEach-Object { .\RT2_Port.exe -fw $_ }

 

 

This information is outstanding, thank you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.