Realistic Railroads- how?

Headlock

Nomnomnomnom
Joined
Sep 1, 2007
Messages
133
Location
Over there!
Hi All,

Okay, im sick of having my empires covered in railroads.

I want them to be built in a more realistic fashion- i.e. joining locations (cities/forts/mines/ quarries) in a linear array, rather than 'blobbing' all over the map. The intention is to stop the workers from constructing railroads over every possible patch of ground (and also make internal communications more vulnerable).

I reckon there is already some python code that could be co-opted:
1)The code for when you tell a worker to "link all resources". This makes the worker lay out a waypointed route to a given resource from a city, and then construct the road/raillroad along that route.
2) The air-lift code. This governs the connections between cities with airports. (more below)

The waypoint system I think is crucial.
This could probably be adapted to give a slightly different order "Build Railway Line ", with the insinuation being a Direct line between two cities.. I know this is already covered by default with the previous order (as Everything ends up getting connected, but hence there is a visual mess of railroads). I simply want to refine the original order- using railroads only where absolutely neccessary, and roads otherwise. Ive tried giving a penalty to say farms when a railroad is built on them, but then you just end up with crazy railroad routes, or reduced farms. This is annoying as i want to reduce the visual clutter.

I reckon another important requirement to making this work might be to provide anchor-points- ie.Railway Stations. Concieviably, a railroad could then only be built between two cities that both have a railway station. As the construction of the railway is udner the command of the Worker, and the construction of the Railway Staion si (at the moment) done within the City, then I would suggest recreating the Railway Station as an Improvement (providing lots of Cash & some happiness).

So, the command to "build Railway Line" would start off with the Worker going to the nearest city,building a Railway Station in a free plot adjoining the City (ie within the first square radius) and then laying out a direct route to the second city- and building another station there.

OR, one station could act as a hub- so one station could link to say, max 4 cites. This would remove the requiremnt for a Railway Station asa plot improvmeent; the worker would simply go to the nearest city with a Railway Station (as a Building), and then link 4 cities directly off it. THis would concievably create transport "Hubs", with all their associations.

I hope im being clear here.....
Comments? Is this feasible?

Regards,
HDK
 
Just curious, have you considered only increasing the time it takes a worker to make a railroad? If the time to construct is increased, the player will have to prioritize where he constructs railroads, and will have less time to just railroad every square under the sun.

The other ideas are interesting, but no sense in making a big change when a smaller one might do it.
 
Hi Jk,

Thanks, but yah i had. Over the course of a game the time cost doesnt really count in the end, The ai will still, eventually, build a mass of railroads.

hdk
 
Just curious, have you considered only increasing the time it takes a worker to make a railroad? If the time to construct is increased, the player will have to prioritize where he constructs railroads, and will have less time to just railroad every square under the sun.

The result is that he will just build more workers.

Sadly, I do not see how it is possible to make realistic roads and railroads until there is a genuine disadvantage to having them everywhere, like a true resource construction cost. As long as there is no disadvantage, it will continue to be done.

I do like the idea of a Railway Station very much, however. :king:
 
Hi Jk,

Thanks, but yah i had. Over the course of a game the time cost doesnt really count in the end, The ai will still, eventually, build a mass of railroads.

hdk

True, but the process will be slowed somewhat. <shrugs> Perhaps add a monetary cost to the construction of a railroad in each square? ($5? $10? $20?) True, the players will still eventually be able to railroad over everything, but again, the process will be slowed, and it will remain in their interest to focus only on the priority rail construction.

Another factor might be to, say, eliminate the use of railways during an attack. What if units that used rail movement were barred from attacking in the same turn?

'Course now we're getting complicated and that's what I didn't want to do...problem is that Gaius is right -- there's no easy way to create what you want here without some major surgery.
 
Yep, the major surgery is what Im afraid willbe needed :/

That is, i want to change the way railways are built, from scratch- ie. they can only be built as a link between two points. I think Chamedrys has already done a RailwayStation :)

So to simplify things it might be best to remove railroads from worker construction. A city would build a Railway station, a python function woudl then link it to anyquarries/mines ina 4 plot radius. Then another city wouldbuild a railway, and a python function would lay down a strip of railway joining the two cities directly.

Its still not satisfactory though- cos building stuff with your worker is FUN!:)
grrr...

Regards,
HDK
 
What's about tha :hammers: bonus the Railroad will give to certain improvements ? Maybe just make it avaiable with the Railroad tech, without actually building the railroad on those tiles ? Would make the tech pretty powerfull tho...
 
Sorry :D

I mean, if you only allow railroads between cities, as you described above, there will be no way to build a railroad on a mine to get the hammer bonus... (unless the mine is on the connection of course)

So instead... just give the bonus wheh the tech is researched ?
 
Yes that sounds reasonable.
Although, it should be concievable that subsidary railways would lik off the main route to any quarries/mines within say, 3 plots....

hmmmmm
HDK
 
There is a method in CvGameUtils.py called canBuild. Just grab railroad builds and determine if you want to allow them to be build on that tile.

Don't know what exact criteria you would want to check for, but the simple way would be to only allow so many railroads within a certain number of tiles. I think there was a thread from couple years back that layed out some detail about this topic. Might want to search for it.
 
Don't let workers build them at all :)

If you add a 'rail station' building that allows a rail connection to another city with a rail station you can just make the connection automagically, of course it may not be a perfect route but it wil be a single route. Then, at the first unworkable tile you encounter you can put a 'rail yard' improvement and use it as a destination for future routes.

This eliminates the hassle of ensuring the AI understands it and allows you to make exceptions such as creating railroads to mine & lumbermill tiles for the production bonus.
 
I've thought about this as well, there was another thread started by me somewhere, but I forgot where it is... :mischief: basically, my initial suggestion went something like this:

1. Tile improvements themselves give a movement bonus (build time needs adjustment).
2. Roads only give movement bonuses, when there is no tile improvement.
3. Roads are still needed to connect resources and trade routes.
Effect: You need a lot less roads in the early game. Connecting your cities and resources will do. Map will look tidy.
4. Railroads can still only be built on roads, and ONLY by using the route-to command from city to city/resources. Route-to command will not be available outside cities.
5. The worker AI cannot build any roads, except when using the trade network mode.

I have no idea how to do this. But I think it might be a reasonable solution. For the player it will still be possible to make roads everywhere if you must, but your benefit is limited to the road movement bonus. The AI probably won't do it. Once railroads become available, it should be impossible to upgrade the entire road network due to the railroad building restriction.
 
Sadly, I do not see how it is possible to make realistic roads and railroads until there is a genuine disadvantage to having them everywhere, like a true resource construction cost.

Is it possible to give railroads a financial cost to build and some minor form of maintenance fee (say, 0.1 gold per turn per tile? perhaps less?) to deter them from being spammed absolutely everywhere?
 
I'm not sure I understand. Every Major city I've been to has an extensive railroad system throughout it's metropolitan area and beyond (represented by the fat cross in Civ). I've never seen the AI spam road or railroad between city areas. The most I've seen is a couple of connections between cities (which is fairly realistic, i would have thought). Admittedly I haven't watched the AI's road-building procedure too closely. Perhaps the answer is to make the graphical representation of rail less invasive and obvious?
 
I also don't see any problem with the fat cross "urban sprawl" as many population centers have lots of railroads. The UK, USA and Russia (to name the most obvious) tend to have major railroad lines drawn on maps but when you look closer, there are hundreds of other 'main lines, secondary lines and branch lines that run through the same area.

The railroad graphics in Civ 4 are way too much on the eye with lines going in all directions. I personally hate looking at the way connections are formed especially when touching river!

If someone made more straight and simple railroad graphics that replaces the current 'in your face' look then it would be aesthetically pleasing to the eye.
 
The main problem I see is not with railroads themselves, but the fact that railroads endup almost completly replacing roads. Ideally tiles would be able to have both roads and railroads with railroad use requiring some kind of train unit or train station city building/tile improvement.

But its alot easyer and more realalistic to just mod railroads to only be built by some criteria.
 
Here was that other thread... link
 
Hi All,

Okay, im sick of having my empires covered in railroads.

I want them to be built in a more realistic fashion- i.e. joining locations (cities/forts/mines/ quarries) in a linear array, rather than 'blobbing' all over the map. The intention is to stop the workers from constructing railroads over every possible patch of ground (and also make internal communications more vulnerable).

Well ... that's not actually terribly realistic. Railroads don't tend to be just lines joining locations in a linear fashion in the real world. They tend to be more of a sprawling web. Only the main trunk lines look like what you've described, and even they tend to get like a web in a dense areas. Here's a few examples from different places and time periods:

http://images.nationmaster.com/images/motw/historical/baedeker_n_germany_1910/german_rail_1910.jpg

http://images.nationmaster.com/images/motw/historical/baedeker_s_france_1914/france_railway_1914.jpg

http://www.candle-web.co.uk/choomti/choomti-images/maps/map-india-railways-large.jpg

http://history.sandiego.edu/gen/maps/1800s/1851railroadsbg.jpg
 
The main problem I see is not with railroads themselves, but the fact that railroads endup almost completly replacing roads. Ideally tiles would be able to have both roads and railroads with railroad use requiring some kind of train unit or train station city building/tile improvement.

But its alot easyer and more realalistic to just mod railroads to only be built by some criteria.

I agree with the bolded text 100% there. Extensive rail networks around major cities are quite common. I know as someone who lives in the suburbs of one of the largest cities in the world that there's railroads criss-crossing through many neighborhoods on the outskirts of the city.

But I do agree that it's a shame to see roads become completely replaced... and they ARE inevitably replaced. The reality, of course, though is that roads (after a brief time spent in virtual obsolescence) have once again regained their position of importance. Whereas trains were an important means of transporting troops, today the interstate highway system has become much more common for that task. Heck, there's even requirements that there be periodic long stretches of highway to allow for planes to land in the event of an emergency. And I don't have any statistics in front of me of what quantity of goods are transported by truck across country vs. rail in the USA, but I would guess that trucks are at least giving trains a run for their money.

In game terms, however, a hard limit on the number of railroaded tiles in a given space of tiles is a bad idea to me since it could force the player into a position where there was good reason to build a railroad in one direction earlier, and now later it would be better to go another direction and it can't because it's reached the cap.

It's a shame though to have roads replaced since I'd like to give them new bonuses with technology like Combustion.

I know that there's something about "flat movement" in the RouteInfos file, but I've never looked into exactly what that means. If it's not this, then I think it should be this: Railroads should give the same movement to all units. Movement points should not be taken into account at all when moving along a railroad line.
 
Back
Top Bottom