Making a profit in Railway Empire 2

To increase profit (or reduce losses) you can make adjustments to your empire.

Keep a train lines profitable

Train completed last tour without freight

If the train frequently leaves a station without freight, set the minimum number of wagons to 4 for that station. The train will wait at the station until at least 4 wagons are loaded. Add a track to the station for the train to wait on, so other trans can also use the station.

If you set the other end of the line with the same restriction, it is possible, that the train will very rarely return to this station.  

  • Click the triangle to select the line
  • Click the Edit Rail Line button
  • Hover above the station and click the Edit Station button
  • Set the preferred track, the minimum number of wagons to 4 and click the check mark.
  • Click the Confirm button

Train has been waiting for a free track for some time now

Assign the lines to the tracks of the station. By default trains select the shortest route using the same track of the station.

  •  Select the station
  • Select the Routes using this station button
  • Select a line
  • Click the Edit Rail Line button
  • Hover above the panel of the station and click the Edit Station button
  • Select a track for the line

Keep the businesses profitable

  • Do not oversize the industry. If the level is too high for the demand, the higher operating costs will reduce or eliminate the profit. Slowly increase the level, because if the utilization falls below 60%, the business starts to lose money. This happens if the inflow of raw materials is not enough, or the business cannot sell the products. Make sure you run enough trains to supply the raw materials and ship the products to cities where there is demand for them. Farms do not lose money if the production is mostly continuous.

Error: MUI: The data grid component requires all rows to have a unique id property

Error: MUI: The data grid component requires all rows to have a unique id property.
Alternatively, you can use the getRowId prop to specify a custom id for each row.
A row was provided without id in the rows prop:

The Material UI Data Grid needs to have a unique ID to identify the rows.

To specify the column with the unique numbers, use the getRowId property. 

      <DataGrid
        rows={rows}
        getRowId={(row) => row.MY_ID_COLUMN}
        columns={columns}
      />

Error: EACCES: permission denied, rename ‘/usr/local/lib/node_modules

When a software update changes folder permissions we can lose access to Node.js module locations.

In case of the error message

Error: EACCES: permission denied, rename ‘/usr/local/lib/node_modules

  • Change the folder permission with
sudo chown -R $USER /usr/local/lib/node_modules

Railway Empire 2 industry needs chart

This chart contains the needs of each industries in Railway Empire 2.

The industry needs of Railway Empire 2

To get the information

When a city opens for a new industry

  • Save the game with the name “INDUSTRY LIST in [name of the city]”. This will allow you temporarily open the saved game and explore the industry needs any time.
  • Click the name of the city
  • Select the Construct City Buildings icon
  • Select the Factories icon
  • Select an industry and check the type and quantity of the required raw materials at the bottom of the panel

Build a high traffic railway station in Railway Empire 2

If only one main line runs through your railway station, but the traffic is very high, build a station with 8 tracks. To allow trains to use any track of the station, we could use 8 track gridirons, but those require long parallel tracks. We can use four 2 track gridirons, and combine the tracks with curved tracks in a much smaller footprint. We will also add an 8 track supply tower to refill trains on all tracks.

To prepare the site for the construction,   

  • Lay down 8 parallel tracks with the length of 5 dots. This will smoothen the terrain for the construction.
  • Place four 2 track gridirons as close to the station as possible
  • Place an 8 track supply tower 3 times the tower length from the gridirons
  • Temporarily place another 8 track gridiron 3 times the tower length from the first supply tower to measure the necessary track length for the maintained trains. Later we will delete this tower.
  • Delete the closest track to the main line
  • Build a curved track to join the third track to the first
  • Set the direction of the new curved track
  • When all curves have been created, demolish the second, temporary supply tower

Data access in Remix React.js web applications

Remix vastly simplifies access to backend processes by auto-generating all API calls between the browser and the web server. We only need to create the “loader()” function to get data from the server and the “action()” function to submit a form.

Reading Environment variable values

For security reasons the Node.js web application environment variables are not available in the browser, as those usually contain sensitive information, like database access credentials.

The “loader()” function can read and expose selected environment variables to the browser via the API.

Make sure you have created the /app/routes/_footer.tsx file to display the name of the environment. See Footer in the previous post.

Add the “loader()” function

  • Add the loader() function to the _index.tsx page to get the value of the “environment” environment variable.
  • We will pass the “environment” variable to the Footer to display the value there.
import { LoaderArgs, json} from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";

export default function Index() {

  // -----------------------------------------
  // Get the data from the server side

  // Use "|| {}" to avoid TypeError: Cannot destructure property 'incidents' of 'useLoaderData(...)' as it is null.
  const { environment} = useLoaderData<typeof loader>() || {} ;
  
  // -----------------------------------------


  return (
    <div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}>

      {/* Display the Header component */}
      <Header />

      <div className="pagecontent">
        Hello
      </div>

      {/* Display the Footer component */}
      <Footer environment={environment} />

    </div>
  );
}

Railway station with one main line and one branch line in Railway Empire 2

To connect a branch line to a main line at a railway station in Railway Empire 2, create a station with four platforms. In the example below the mainline is on the left side on tracks #1 and #2, the branch line arrives to tracks #3 and #4 at the bottom from the right. 

Connect the branch line to the station

To allow any train to reach any track, we will place a four track gridiron where the branch line arrives.

  • Run the four tracks long enough parallel to leave enough room for the four track gridiron. The two white dots indicate the approximate length of the four track gridiron.
  • Make sure the number of tracks is set to Max
  • Place the gridiron on the four tracks

Connect tracks #3 and #4 to the main line

At the top we will connect tracks #3 and #4 to the main line, so the branch line trains can continue on the main line, and main line trains on the branch line.

Place two 2 track gridirons on the tracks

We will place two separate 2 tracks gridirons, one on tracks #1 and #2, and another on tracks #3 and #4. A four track gridiron would also work, but it requites twice as long parallel tracks.

  •   Place a two track gridiron on the main line
  • Extend track #3 to leave room for the other two track gridiron.
  • Right-click to terminate the track without connecting it to anything
  • Click the Build button
  • Extend track #4 too.
  • Set the gridiron size to 2
  • Place the other two track gridiron on tracks #3 and #4

Connect tracks #3 and #4 to the main line

  • Select the Demolish icon
  • Trim tracks #3 and #4 to the gridiron

  • Connect track #3 to track #1
  • Track #4 to track #2

Set the track directions

  • Select the Track Direction button
  • Set the direction of the tracks

 

Getting started with Railway Empire 2

Configuration

– Automatic Pause stops the game when we open the track building panel. This prevents traffic jams, but stops the game and progress unnecessarily.
– When the window loses focus the game and progress stops.
– Edge scrolling is very fast and sensitive in Railroad Empire 2. To disable automatic edge scrolling.

  • On the Controls tab select
    • Off for Automatic Pause
    • Off for Pause when Window Loses Focus
    • LMB + Drag for Mouse Scrolling

– It is helpful to see the topography during track construction.

  • On the Display tab set
    • Topography Map During Track Construction to On

– After a while opponents regularly repeat the same insults, at least we can silence them.

  • On the Sound tab set the volume of
    • Voices to 0
  • Click the Back button

Troubleshooting

If the game or the tutorial stops advancing

Check if the game is paused

By default the game automatically pauses and stays in pause mode when you open the track construction panel. In this state even the tutorial stops responding. We can turn off Automatic Pause on the Controls tab of Options (see Configuration above).

Make sure
  • The round pause button indicates the paused game.
  • Click the round button to start the game. The arrow indicates the running game.
  • Click the button again to speed up the game

The expected freight type is not yet transported

  • In the transfer tutorial you need to wait until all expected freight type is transferred

The city is not growing

An industry in the city grows if the demand is at least 60% satisfied.

Goods don’t arrive

Your main city needs a type of goods

Another city supposed to produce and send it, but for the industry to activate the population has to reach a minimum level

  • Satisfy the current demands of the small city to promote growth, so it will produce the needed goods for your main city.

No demand for the goods

When you try to add a new station to a line, and the directly connected cities do not need the type of good it supplies, the message appears:

According to the settings you made, your train line cannot perform any actions at the station of …

You should check the settings so that the trains do not have to make unnecessary stops.

To help to distribute the goods to other cities, create a warehouse at a station which has another lines, and add the types to the warehouse on that station:

Issues during track building

This station cannot be reached from the previous station and therefore can not be added to the list.

The trains cannot switch between tracks to make the round trip between the stations.

  • Place a station gridiron on the tracks close to the station for the trains to be able to switch between the tracks.

Building a new rail line

Build a station

When you connect the first track to the station the track you use determines the size and cost of the platforms. For rural stations use the first two tracks closest to the building to minimize the cost.

Build the tracks

  • Make sure to place grid irons to each station to allow trains to switch tracks, and set the direction of the rails.
  • Add supply towers to each line

Create a new rail line

  • Open the new real line panel
  • Select the stations of the line
  • Select the locomotive and click the Confirm button

Freight transfer between lines

To transfer freight between lines in cities and rural stations those have to have a warehouse. The transfer happens if there is no direct rail, and the way by rail is at most twice as long as the direct way by road. 

Warning: The warehouse does not supply the place where it is placed. Its only purpose is to supply the connected cities, so the hosting city will not get from the stock. Use the warehouse only for goods which are not needed in that city, or set up a separate freight station to supply the city with lines from the suppliers.

To keep the freight type for the city

  • Remove the type from the warehouse

To prevent a line carrying a freight type

  • Select the line
  • Edit the line
  • Hover above the station name and click the Edit Station button
  • The first click on the good type sets it to high priority (green arrow), the second click prevents the transfer (red sign). The third click clears the marks.

If you still need a warehouse

Research the warehouse
  • Click the research button
  • Drag the timeline with the left mouse button to 1830
  • Click the warehouse button to unlock it
  • Click the checkmark to unlock the development
  • Close the Research panel in the upper right corner
Add the warehouse to the station
  • Select the train station
  • Select the station and click the Construct Extension button
  • Click the Warehouse button and click the checkmark at the bottom of the panel
Specify the type of goods the warehouse can transfer

Warning: the selected good types will not supply the place hosting the warehouse, only places with connected rail lines!

  • Select the Warehouse button
  • Select the goods the warehouse can transfer. Click the trash can to remove a type.
  • Click the X in the upper right corner of the station panel to close all station related panels

Passenger and mail transfer between lines

Passengers and mail can transfer between lines in cities, but rural stations have to have a hotel.  The transfer happens if there is no direct rail, and the way by rail is at most twice as long as the direct way by road.

 Research the hotel

  • Click the research button
  • Drag the timeline with the left mouse button to 1840
  • Click the hotel icon to unlock it
  • Close the research panel in the upper right corner

Add the hotel to the station

  • Select the station and click the Construct Extension button
  • Select the Hotel button and click the check mark at the bottom of the panel

Game play

To make the game more relaxing

Disable mergers before starting the game

If another company acquires 100% of your stocks, the game is over. To remove this possibility disable mergers.

Optimize staff

When in one area more than 50 employees work for you, start to optimize your staff.

 

Transporting goods

Perishable

If you place refrigerator cars on the line the revenue of meat, vegetables, fruits, milk and dairy products increases by 25%.