Jump to content

Recommended Posts

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.



Fixed RT2_Plat Maps.zip

Edited by htp_rr
  • Like 1

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

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.

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.
Note: Your post will require moderator approval before it will be visible.

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...