Nine Easy Ways to Improve Gameplay -- Simple XML edits.

It's not a map? It's not a Train? Share and download the files here
Post Reply
railage
Posts: 35
Joined: Tue Dec 22, 2015 2:09 am

Nine Easy Ways to Improve Gameplay -- Simple XML edits.

Post by railage » Thu Mar 10, 2016 11:12 pm

In the typical scenario, tracks are far too cheap and resources too plentiful. Basically there is always an economic reason to build even more track. This leads to lots of lag late in the game when laying even more track. This ruins the fun for me. The purpose of this guide is to hopefully help the average player fix this.

Getting Started:
First, you need a XML Editor. I am using the completely free Notepad++. Download it here: http://sourceforge.net/projects/notepad-plus/files/. Find the XML files for an installed custom map on your computer here: Documents/My Games/Sid Meiers Railroads!/UserMaps folder.

Before editing anything, make sure you have the original map accessible should you make a mistake. Don't edit your only copy. Make a backup first if needed.

When editing XML files be very careful not to accidentally overwrite any of the symbols: <, >, / etc.. These changes involve replacing an old value with a new one. You don't need to know how to use the symbols, just leave them intact. If some are missing, the map probably wont load anymore.

Info about identifying the XML files to edit:
There is some variation amongst maps in how the XML files are setup. Some use Globals such as the simple RRT_Trains.XML, others use locals such as RRT_Trains_[Name of the Map].XML. It doesn't matter which type the map uses for this tutorial, just make sure to edit the file that has the keyword we want as part of the name. In this example the keyword is "Trains".

If one or more of the files are missing, no problem. The map is using the game's default files without changes. Choose the file with the right keyword from the attached Original XML Files zip, put it in the map folder, and edit that.

If you have the file and open it only to find that it is missing the information we want to change, you have a stub file. These are the trickiest to do. You must find the correct stub for the section that would normally contain this information, then insert a new line.

In a stub file each item will still have a section. In our example, this is the section for the Grasshopper engine. Each engine a map uses will have its own section.

Stub file (Trains XML File):

Code: Select all

  <Train>
    <szName>TAG_NAME_GRASSHOPPER</szName>
  </Train>
The default base cost for this engine is 500 before the Difficulty level modifier affects it. Robber Baron is 1.4. 1.4x500 = 700 giving the default Robber Baron cost.

Here's the same section but with the Maintenance Cost line added. This is the default (500) multiplied by 3.5 to implement stabilized maintenance costs in Option 8:

Code: Select all

  <Train>
    <szName>TAG_NAME_GRASSHOPPER</szName>
    <MaintenanceCost>1750</MaintenanceCost>
  </Train>
My suggestion would be to copy the new lines in. The clean files I included have full sections with all the information. In this example, I would use the search function to find "GRASSHOPPER" in the clean file, then scan down till I find the Maintenance Cost line, and copy that out. Once you paste that into your file, make sure to remember to modify it from default. :-)

Searching in Notepad++:
Press Ctrl+F, to bring up the find box.
Enter your query. For option 2, this is: <fPassengerAndMailModifier>.
Now select "Find all in current Document".
This will display a pane at the bottom of the screen with all the results.
Double clicking on a result will take you there in the document
Please note that the search results pane doesn't update as the values are changed. Don't worry about this.
Searching in Notepad++.jpg
Searching in Notepad++.jpg (52.4 KiB) Viewed 36618 times
Attachments
Original XML files.zip
(5.83 KiB) Downloaded 1782 times

railage
Posts: 35
Joined: Tue Dec 22, 2015 2:09 am

Re: Nine Easy Ways to Improve Gameplay -- Simple XML edits.

Post by railage » Thu Mar 10, 2016 11:25 pm

Now for the options:
All these options are independent, so you can use any combination of one, a few, or all.

Quick, simple options:

1. Play without Patents.
Patents are very powerful. Winning a few of the best ones (McCoy's Lubricator, Pullman Palace Car) can decrease the difficulty of a Robber Baron game to around the difficulty of Investor level. This happens some years into the scenario, when you have a nice revenue base going already. The result is that your formerly adequate revenue base is instantly a cash cow. Managing your railroad efficiently doesn't matter anymore.

The other problem with patents is that they are random. If you get a strong one first, it can make a game far quicker and easier than if you get a couple of average ones.

What to do:
Follow the instruction in this thread, replacement file provided: viewtopic.php?f=46&t=4685.

This file is good for playing against AI because they will buy any patents that show up. You can't just decide not to buy them like in single player. Additionally, there is a game bug when you eliminate a company that holds expired patents. When the patent expired, the effects were applied to all companies. When you eliminate the company, the effects are applied a second time. It's possible to have 25% of normal maintenance costs and over 50% higher passenger revenue.

2. Decrease passenger and mail revenues.
As cities grow they are typically setup (in the Cities XML) to produce more express with each larger city size. So, the situation is that as cities grow there is more and more express revenue available. Extensive use of terminals and medium distance express routes at 50mph+ nets even more express revenue. Too much express revenue encourages simply linking cities together instead of managing the resource collection and finished good distribution from industries.

What to do:
Edit the map's Depot file.
Search for the tag <fPassengerAndMailModifier>.
This is a modifier. The base prices are multiplied by it. 1.5 means that revenue is 150% or 50% higher than normal. 0.95 means that revenue is 95% which could also be represented as 10% less than normal.
Change all three instances, Depot, Station and Terminal.
Suggested values to use for normal time maps 0.80; 0.95; 1.2.
For slow time maps, use lower figures (because the decay of express price is based on years elapsed not game ticks).

3. Increase the Cost of Track and Trains.
This is a straight-forward idea. Changing the difficulty settings themselves. This guide is meant as an alternative to just adjusting these figures, but these figures remain the only way I know to adjust track cost. There are no side effects I know of to adjusting train cost here, so may as well do that too.

What to do:
Edit the Difficulty XML file. You only need to edit the particular Level you will play at.
Example from the default Robber Baron level (typically the final section of the file):

Code: Select all

<Level>
    <szName>Robber Baron</szName>
    <fTrackCostModifier>1.4</fTrackCostModifier>
    <fTrainMaintModifier>1.4</fTrainMaintModifier>
    <fTrainCostModifier>1.4</fTrainCostModifier>
    <fDeliveryEarnModifier>0.80</fDeliveryEarnModifier>
    <iStartingCash>2000000</iStartingCash>
    <iStartingStock>3</iStartingStock>
As the names suggest, we again have modifiers. These are percentages of normal. 1.4=140% means track costs 40% more to build. 0.8=80% means we only receive 80% of base price for deliveries. We could say that we get 20% less revenue.

Changes to be made:
Track Cost:
Change the value of <fTrackCostModifier>
Suggested Track Cost Modifier: 1.6.
Please bear in mind when changing these settings that the AI has a fixed 1.0 setting for all the modifiers. Side note: I don't know a way to adjust track cost for the AI.

Maintenance:
There's a better way to deal with maintenance costs than increasing it here, see Option 8.

Train Cost:
Change the value of <fTrainCostModifier>
Suggested Train Cost Modifier: 2.0.
Balance this with maintenance cost setting/frequency of replacement. See Option 8.

Delivery Earning:
This is a powerful setting. Decreasing this will decrease the revenue received for all cargo. This will make the economy tighter overall. I prefer to try to balance things to remove some of the glaring imbalances. I tend to leave it at the Robber Baron level of 0.8.

Cash/stock:
The cash and stock options are mainly for the short term. When using all 9 options from this post, I tend to add a little more cash to decrease the risk of getting stuck without any revenue options at game start.
Cash and stock options affect the AI as well.

railage
Posts: 35
Joined: Tue Dec 22, 2015 2:09 am

Re: Nine Easy Ways to Improve Gameplay -- Simple XML edits.

Post by railage » Thu Mar 10, 2016 11:47 pm

Easy options:

4. Increase the cost of the Depot, Station, and Terminal.
The cost of connection to a town should represent building a railyard for freight, hotel for passengers, etc. $50,000 is so little compared to the revenue one receives and track cost for most connections.

Stations should cost more because they yield not only turnaround and express revenue benefits, but also allow a 4th active track.

What to do:
Edit the map's Depot XML file.
Search for <Cost>. The first 3 results are normally for the Depot, Station, and Terminal.
Increase the amounts at your discretion (for example double). Keep in mind that they are the costs of an upgrade: a Terminal really costs the combination of all three (50,000+100,000+150,000=300,000 in original specs).

Optional: Increase the remaining results for <Cost> which are for the annexes that allow a connection to any resources Farm/Mine etc. or industries that are outside city limits.
Karsten wrote: "Speaking of scenery, one of the good points of RRT III was that one often had to search for a good route through the mountains, constructing some spectacular but costly tunnels and bridges. That makes routing so much more fun than just cutting through mountains as if they consist of butter. "
5. Increase Bridge Costs.
Normally, bridges are so cheap that there is no reason not to build straight track across all obstacles. Here we are going to increase them in the simplest way. There is a lot more potential for spicing them up.
What to do:
Edit the map's Bridge XML file.
Search for <Cost>. Go through all the results.
Suggested to triple all values when playing against AI. Think twice before building, but not prohibitive.

The AI will never understand the increased cost, so raising this extremely high may bankrupt them.
Without AI, increase as desired.
There are different bridge types, so if you want to go further with this, work out which type is which and change those.

6. Increase Tunnel Costs:
Tunnels are even cheaper per section than bridges. That's not realistic, go figure.
What to do:
Edit the map's Tunnel XML file.
Search for <Cost>. Go through all the results.
Suggested to multiply all values by 5 when playing against AI.
Without AI, once again the sky is the limit.

railage
Posts: 35
Joined: Tue Dec 22, 2015 2:09 am

Re: Nine Easy Ways to Improve Gameplay -- Simple XML edits.

Post by railage » Thu Mar 10, 2016 11:59 pm

A little more work required:

7. Increase the cost to build Industries.
Especially on slow time maps, once an industry grows to large size it can make back it's build cost in a single year. Also, a 500k price for all industries is rather dull and doesn't represent their different profit potentials. Thankfully, this is easy to adjust.

What to do:

Edit the map's Industry XML file:
Search for <Cost>.
Go through all the results, skipping those that are -1. "-1" is for industries that the player cannot build during the game.
You could just multiple all results by a figure such as 2, but using the in-game prices for what they demand (pay the player for) gives a better result.

Most industries can easily handle a $1M to $2M price tag. Here's a sample of some pricing which I roughed up for one map:
Automobile Factory 2000000
War Factory 2000000
Hospital 1500000
Newspaper 1500000
Furniture Plant 1500000
Steel Mill 1500000
Paper Mill 1000000
Chemical Plant 1000000
Food Plant 1000000

8. Stabilize the maintenance costs of aging engines:

Every engine in the game costs more to run as it gets older. Every 1,000 ticks (turns) of any engine's life it's maintenance cost will go up by a fixed amount determined by the <fTrainMaintModifier> value in the Difficulty XML (refer to Option 3). The formula is 500*<fTrainMaintModifier>.

For Robber Baron, that's 500*1.4=$700. This is too much in proportion to the original maintenance cost. This large increase gave rise to the ideal strategy to replace an engine approximately every 10 years on normal time. Thankfully, with the help of a spreadsheet we can fix this.

This option is good to use on most maps. But, it's sorely needed on almost all single player slow-time maps.

The spreadsheet and additional info in this thread: viewtopic.php?f=46&t=4686.

What to do:
Collect this input for the spreadsheet:
Ticks per month
Open up your map's Scenario User XML file.
Search for <iTurnsPerMonth>.
If there is a match, take note of this number.
If there is no match, use "16".

For Custom Engines, also collect info for each Train:
Open the Trains XML
Search for <szName> to get all engine names
Enter these in order to the custom engine page of the spreadsheet
Search for <Cost> to get all their costs
Enter these in the spreadsheet
Search for <MaintenanceCost> to get all their maintenance costs
Enter these in the spreadsheet

Use the Spreadsheet.
Follow the directions in the Tutorial on using the spreadsheet. Try new values for <fTrainMaintModifier>, <fTrainCostModifier>, and the Manual Modifier until you find a combination that gives engune lifespan and running costs that you like.

Edit the Difficulty XML.
This option likely requires editing <fTrainMaintModifier> and <fTrainCostModifier> in the Difficulty XML. Make sure to change the entries in the particular difficulty level you are using. For example: Robber Baron. Refer to the format of this file in Option 2.

Optional Part:
Edit the base maintenance costs in the Trains XML file.
Search this file for <MaintenanceCost>.
Go through all the results and enter the new values that the spreadsheet generates in Column C.

9. Decrease the production rate of resources.

This is a great option for slow time maps where you want one train to be able to do more than just go back and forth on one route like a robot. By cutting the output rate for resources, one train could collect resources from two resources and perhaps even deliver those finished goods as well. The Resource Source (Mine/Farm/etc.) will also grow to Medium and eventually Large size much more slowly.

This option helps greatly in limiting the amount of track needed, as more track can be single and there is less reason to use multiple tracks for loading.

What to do:
Edit the Industries XML file.
Search the file for <InputOutputRatio>.
For each result, you will need to look at the preceding info in the file. Look for: <Input>None</Input>. The other results are the conversion industries.
The normal ratio is 1.0. Decrease this at your discretion as a percentage of what was before so 0.8 is 80% of former production.
Perhaps vary the figure among different products to favor some such as those in the ideal climate etc.

Good Luck, and Enjoy the Game! :)

Post Reply