Need help with a Civilization Trait

Bob Flumpton

Chieftain
Joined
Dec 30, 2025
Messages
4
I am currently creating my first civilization 5 mod, and I wanted to make a civ get railroads at wheel instead of the railroad tech. Is there anyways to set the prereq tech of railroads to wheel or do I need to make a unique improvement for it?. I also tried looking at Whoword69's XML data list for the actual improvement, but could not find railroads amongst them. All I currently know modding wise about them is that railroads are called route_railroad.
 
Roads and railroads aren't improvements, they're routes.

I'm looking at the table for routes, and unfortunately it doesn't seem like you can set their prereq tech. They have a boolean attribute for Industrial (0 for Road, 1 for Railroad), but nothing for required techs.

1767125503734.png
 
Was not aware of the fact they were not improvements, thats cool to know at least, Sucks theres no easy way to set them to unlock earlier.

I guess I could just try setting the civ to start with the railroads tech, but I’m pretty sure that would be a balance nightmare if I did that.

Thanks for checking for me though, Will probably just shift the power of the civ from having early railroads to improving railroads through yields or combat bonuses if I can for mid/late game.
 
Wait, I think you can implement your idea by giving Workers of your civ a special ability to construct Railroads. I've never done it myself, but there are some mods that implement something similar, that is to say a custom ability for units to perform certain actions,

but that would involve coding in LUA
 
Hmm, I could try looking into it, I Have seen some civs workers start the game with unique improvements they can instantly build. I’m not huge with lua I will admit that, but it would be a interesting experiment/learning experience.

Might test by editing a roman legionnaire since they already have build road as a function.
 
but that would involve coding in LUA
Or probably not. I see here you can set Builds for Units (this is how the Roman Legion is able to build Roads while the Samurai is able to build Fishing Boats). What you may need to do is make your civ's replacement for the Worker and give him the BuildType for Railroads

1767126365960.png
 
Or probably not. I see here you can set Builds for Units (this is how the Roman Legion is able to build Roads while the Samurai is able to build Fishing Boats). What you may need to do is make your civ's replacement for the Worker and give him the BuildType for Railroads

View attachment 752356
I do find it very funny we both immediately thought of the Roman Legion, which I guess to be fair makes sense, since they are one of the few units who can build besides workers.
 
Back
Top Bottom