Jump to content

Historical RT2 Mod


Recommended Posts

You mentioned the building cost as being 0D and that most of the editor functions were available to managers. Do you happen to have a list of these functions as they might be used by the managers in this table? I think some of it can be pulled out based on inference and the order in which things are presented in the strategy manual and other places, but if you compiled a list, please do share!

I have compiled a partial list (I tested some and inferred others) and I will upload it tomorrow when I am at home. I'll also upload the tables I mentioned, as well as some other tables I have found but can't identify their function. I could not find the "Stock Liquidity" ability. I guess the developpers originally meant to include it but never did or took it our during testing. Where I would have expected to appear on the list is actually the "fewer robberies" ability that Bat Masterson has... and the .lng reference is significantly out of synch with the others.

 

I actually found that searching for numbers from the .lng file to be very useful in identifying the tables. At the end of the EXE file there is a list of .lng reference numbers. I assume this list is when you use the /D2 switch to test the file (this is described in the header of the .lng file).

Link to comment
Share on other sites

Ok, here is a spreadsheet with the extra tables I have found (and only the extra tables or those that I have added to significantly). There are about 10 of them and I identified some of them (about half). If jeffryfisher wants to add this to his spreadsheet, go for it (I would do it myself, but since this is your thread it's best if you keep everything coordinated). I hope some of this is useful to you.

 

The list of manager abilities is in the "ed,man" table. I tested some of these and that is also shown in the table by colour coding.

 

There is also a table related to bridge costs that someone posted about earlier in this thread. I found tables related to station graphics, tycoons, (managers, but I wasn't the only one to find this!), the campaigns, and the verification list for the .lng file when using the /D2 switch as outlined in the header of the .lng file.

 

As I said above, the version number is stored as plain text at offset 0x15B0F8. This would be useful to identify your modified version of the game. Maybe call it version 1.57jf or something. That way it will be obvious when you start up the game which version you are using. It will help keep track of any modified version of the game. Perhaps we could work on an unofficial patch that fixes some of the glaring errors like the misplaced numbers in the conversion table, the ridiculously incorrect availabilities of the Class 232 and TGVx, and the insane speed of the F9 and reliability of the GG1. Whatever the community can agree upon as mistakes maybe? I'm just throwing the idea out there.

Other notes regarding various small things I found in jeffryfisher's tables (additions mostly):
in the “cars” tab the string seems to imply graphics to use
in the “bldg prices” tab the string refers to graphics while the 1 byte integer that follows refers to a thumbnail
in the “managers” tab, the first integer refers to the image of the manager
in the “stabuilds” tab the string refers to the thumbnail
 

In playing around withthese graphics it seems that they are stored as .imb files, but since I am not a computer programmer I do not know how to decode the .pk2 files. I took a look in the hex editor but couldn't see anything that I could identify.

 

If anyone could identify anything else, we'll really be making progress!

EXE Data Skyfire.zip

Link to comment
Share on other sites

Oh, and I also tried to look into that really annoying bug where the AI begins to replace all trains over the age of 25 and continues to replace them every year (eventually resulting in bankruptcy). This is really annoying in really long games.

 

In the save games there is a table near the end of the file with the trains in (333 bytes long... you can identify it by searching for the names of any named trains you have). It seems trains have three dates associated with them. One is the age of the train (given by a year that it first came into being) and one is the age of the locomotive (given by a year that it first came into service)... the other, I have no idea (also a year). These must be mixed up somewhere in the code and not likely something we can fix. However, it is easy to identify the two columns that are the age of the train and the age of the locomotive. When the AI replaces trains it must look at either the wrong one or update the wrong one because when it updates trains only one of these values changes. If you set the two values equal to each other, it will not replace the same train the following year. So at the very least, every year in january, you can save the game, fix the dates and play for another year. This does work and the AI won't just die after 25-30 years. Kind of annoying though...

 

Now if only someone could actually fix this! Or write a program to do it in a single click even! If there's any programmers reading this, there's your challenge. :)

Link to comment
Share on other sites

Oh, and I also tried to look into that really annoying bug where the AI begins to replace all trains over the age of 25...

 

In the save games there is a table near the end of the file with the trains... trains have three dates associated with them. One is the age of the train (given by a year that it first came into being) and one is the age of the locomotive (given by a year that it first came into service)... the other, I have no idea (also a year). These must be mixed up somewhere in the code...

Indeed, this has been my theory for several years (that the AI looks at the wrong year). I don't think we can ever track down the code that accesses the wrong offset in some array or record (it would take a fancy debugger and some some pretty ingenious sleuthing to ferret that out of an EXE that was not compiled for debugging).

 

If you set the two values equal to each other, it will not replace the same train the following year. So at the very least, every year in january, you can save the game, fix the dates and play for another year.

 

Actually, you could probably get away with changing the older of the two dates once every 20 years.

 

Now if only someone could actually fix this! Or write a program to do it in a single click even!

 

If the rule for finding the start of the data section can be codified, then a program can be written. I did a program like that to raise all of the rents in SimTower. However, I am too lazy to do this one.

 

BTW, If someone has the energy, I'd also want the program to avoid changing any dates for human-company trains/locomotives. Only the AI should be tricked.

Link to comment
Share on other sites

Ok, here is a spreadsheet with the extra tables I have found (and only the extra tables or those that I have added to significantly). There are about 10 of them and I identified some of them (about half). If jeffryfisher wants to add this to his spreadsheet, go for it

 

I'll hang onto them until somebody sees an opportunity in one before I incorporate them into my sheets.

 

As I said above, the version number is stored as plain text at offset 0x15B0F8. This would be useful to identify your modified version of the game.

 

I like that idea. I'll have to think on what number to choose. Whatever it is, I don't think I can change the length of the string.

 

Perhaps we could work on an unofficial patch that fixes some of the glaring errors like the misplaced numbers in the conversion table, the ridiculously incorrect availabilities of the Class 232 and TGVx, and the insane speed of the F9 and reliability of the GG1.

 

I've already done all of those except the date of the TGVx.Unfortunately, the TGVx does not obey its data table entry. Instead, it seems to be hard coded.

Link to comment
Share on other sites

I like that idea. I'll have to think on what number to choose. Whatever it is, I don't think I can change the length of the string.

The version number supports at least two extra characters. I tested that... 1.5601 worked fine. I do not know how many more digits it can handle though. There are quite a few blanks after the 1.56.

 

 

I've already done all of those except the date of the TGVx.Unfortunately, the TGVx does not obey its data table entry. Instead, it seems to be hard coded.

Someone else posted in this thread on how to fix this. I'll repeat it here since I do not know which post it was and do not feel like looking through the whole thread to find it. The relevant offsets are 0x79602 – 0x79609, which are indeed in the middle of the EXE file. I tested it and, yes, it does work. I set it to 1973 and everything worked fine. I have no idea why the dates are there.

 

 

Link to comment
Share on other sites

Maybe he means to open up the patch in the hex editor to see if it indicates what is being changed... and maybe something could be added to the patch file so that other items (such as the things you discovered and put in your spreadsheet) could get fixed in the process.

Link to comment
Share on other sites

Maybe he means to open up the patch in the hex editor to see if it indicates what is being changed... and maybe something could be added to the patch file so that other items (such as the things you discovered and put in your spreadsheet) could get fixed in the process.

Oh, I just assumed that the patch replaced some files. Maybe I'm wrong.

Link to comment
Share on other sites

  • 2 weeks later...

I've just uploaded a revised US History scenario including a new mod and various spreadsheets in the zip file. In particular, I messed with manager salaries, some of them radically. The biggest mover: Siemens. His big electric engine discount belongs in the late game (because electric engines come late to most maps, and because his discount is the biggest engine discount in the game).

 

Anyway, please try it (and my map), and please let me know what you like and what I could do better (and if I missed anything that I screwed up).

Link to comment
Share on other sites

  • 2 years later...
PORTS: ok, we solved the problems with all factories, however ports as well have their demands dropping to 0 on first delivery and never recovering afterwards and THIS cannot be solved by editing the EXE file... However, I found another way around this problem. The thing is that production and demand for ports is determined through the editor as you create a new Map....That means that the table governing production and demand for ports must be written somewhere in the MAP files. I searched a little and BINGO: On each MAP file there is a data block, starting at 0x8703, which looks exactly like the data blocks for other industries. And, as I suspected, I discovered that the editor failed to write anything where there should be a floating number governing the demand for input cargoes! If you want ports to work properly you then need to open the MAP file before playing the scenario and enter the demand level for each goods manually.....tried it and it WORKS.

 

Best thing is you can do stuff that would otherwise be impossible with the editor: You can for example set your ports to behave like other transforming industries, for example producing 2 goods out of one cotton and one wool, or set your ports to produce a set amount of goods (let's say 2) and at the same time demand other stuff that acts like production boosters (like grain for cattle ranch) etc...

 

I've just verified something else: If I mod the port and then edit the map or other settings (without changing port), then the mod values stay in place. However, I suspect that if I ever messed with imports or exports, then I would need to go back in with a hex-editor to reinstate my demand float.

 

Something else I saw: Port slot #1 looked as if demand was in the correct column.

Link to comment
Share on other sites

  • 2 months later...

Hello!  I just discovered this thread and am very interested in trying your patch and map, but I can't seem to download the patch from the first page of this thread.  I was able to download your map from the "downloads" section of the site, however, but just wondered about the patch since you say the two are somewhat interconnected.

Link to comment
Share on other sites

  • 2 years later...
On 8/12/2018 at 10:54 AM, jeffryfisher said:

Very cool! If you could also change the introduction dates on military factories, loads and cars, then they could appear in time to be used in the Civil War. Then players could use your patch in place of mine (doing without my other meddling).

If you look at my spreadsheets, the red values are things I changed.

I did this in a non-interference manner. The modifications are in a new exe file which must be put into your installation directory so it finds all the necessary data files. This will allow people to run the regular version for standard games, and run this version for the USHistory map or others if someone else chooses to target the civil war period. I also made the new exe point to a different language file. Since the exe file extends the use of some station buildings, the language file properly reports which cargos are affected in game. Beyond the exe and lng files the zip file contains a comprehensive readme file listing all changes in reasonable detail.

As compared to the EXE provided in the USHistory map collection, this file does not have changes to the housing & townhouses, changes to the locomotives, nor changes to the managers.
 

RT2_Civil.zip for standard CD installations of Railroad Tycoon II - Platinum

RT2_Civil GoG.zip for Gog.com installations of Railroad Tycoon II - Platinum

If I've missed something important for play of the map, let me know.

Edited by htp_rr
  • Like 1
Link to comment
Share on other sites

Oh yes, the managers. You might enjoy reading the thread where we discussed them. Siemens was what hooked me: He helps with electrics, but his salary was so low that he appeared only early when he couldn't do much. By raising his salary to the top-tier, he appears later when he can be very valuable.

Going forward, I think your patches to the GoG executable will be very valuable since GoG is still selling the game (and the CD is becoming obsolete).

Link to comment
Share on other sites

  • 5 months later...
On 2/12/2019 at 4:11 PM, kill723 said:

I'm trying to download these files but I keep getting files with 0 size. Could someone upload them elsewhere and send them to me, or post new versions here?

 

 

Which files? The zip in message #1, or something attached to a more recent message?

If there's a problem with the site, then @Gobalopper is the one to help.

Link to comment
Share on other sites

On 10/15/2011 at 2:46 AM, jeffryfisher said:

Building on my RT2 v1.56 mod* from an old modding thread, I have "fixed" (I think) a few problems with locomotives. Modern high-speed pax engines are now reliable, a couple of "super engines" (e.g. F9) have been brought back to reality, and a variety of other nagging discrepancies have been "corrected".

I am not sure that everything I've done is right, but I did invest several hours researching some of my changes. If I misunderstood something (like were some of the diesels powered and priced as if they were working tandem?), then I could be convinced to make further changes. Please try it out and tell me where I messed up.

The zip file uploaded here contains four files:
1) RT2_PLAT.EXE.j7x2 (the modded game executable)
2) default2.lng.x2 (a modded game-text file)
3) EXE Data.ods (multi-sheet open desktop spreadsheet roadmap to modding v1.56)
4) LocomotiveData.ods (Engines in the modded game; keep this handy while playing)

To use this mod, you must already have installed RT2-Platinum from a CD. Back up your working EXE and LNG files, then put my EXE and LNG files where the originals were (and strip off the extra extension from each one's name).

The spread sheets are for info purposes. If you're not interested in the how-to of modding, then EXE Data will be interesting only for its "alt" sheets showing mods in red-on-babyblue. On the other hand, if you installed the game from an online vendor like Steam, then you might use the EXE_Data.ods spreadsheet to get you started mod'ing a copy of your own exe (and then upload it for other Steam client players)

Locomotive data will be helpful to have on a second screen or paper when playing.

* The mod already had enhancements to industry. For example, chem plants can convert oil into synthetic rubber starting in WWII, and T&D factories can turn "rubber" (plastic) into goods starting after the war. Therefore, you should keep an eye on your industries when playing with this mod.

EDIT: Files updated 28-Oct-2012

EDIT: Updated EXE Data spreadsheet added 3-Jan-2013 (with new managers tab)

RT2_PLAT-201210.zip

EXE Data20130103.zip

These files, I'm unable to download them

Link to comment
Share on other sites

8 hours ago, jeffryfisher said:

Aha! I forgot that I had two threads (one for the map and another for the mod). At some point it became awkward having the files split like that, so I put them all in the other thread:

    US History Map thread

I'll see if I can edit post #1 here to point people in that right direction.

Thanks a bunch, this worked perfectly!

Link to comment
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.

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