Headlock
Nomnomnomnom
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
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