creating a new type of road

chibirobo1

Chieftain
Joined
Dec 23, 2010
Messages
30
i want to create a custom road just for one civilization like having Roman be able to build a gravel road instead of a normal road. i looked at the inca info on how they can build there own terraces and i saw a code that made it only for that civ. thanks in advance
 
This wouldn't necessarily be possible, as roads and railroads are considered "routes" instead of "improvements." They're in a separate table, and there doesn't appear to be a Civilization column (or anything similar) in the Routes table, nor any related tables which would let you limit it to civilizations.

I suppose you might be able to do so by having a civ-specific technology, but then, I'm not even sure that adding in new types of routes works properly.
 
I suppose you might be able to do so by having a civ-specific technology, but then, I'm not even sure that adding in new types of routes works properly.

I've tried adding a new Route type. It did not go well.

As for the civ-specific technology, yes, that'd be the easiest way to do it. Except that this brings up a bunch of other issues, like espionage systems (which some mods add) or tech prerequisites. Also, you'd have to adjust things like the road movement bonus at Machinery to apply to your alternate road type as well, and the math on this isn't as simple as I'd like.
 
ok so how would i go about adding in a civ-specific technology to allow the construction of a road. also if i add the road in after machinery would that allow me to bypass that whole situation. to be honest i didn't think that this was gonna be this hard just to get a new type of road into the game.
 
ok so how would i go about adding in a civ-specific technology to allow the construction of a road.

Effectively, you create two techs, both of which have the Disabled flag. The Romans get one tech at the start of each game, everyone else gets the other. Then, you create a duplicate version of The Wheel that requires this TECH_ROMAN in addition to its normal prereqs, while the original The Wheel requires the TECH_NOT_ROMAN tech in addition to its normal ones. At that point you just make your new route type use the alternate Roman Wheel tech instead of the standard version. The other benefits of that tech would have to be similarly duplicated (which in the case of Wonders would just not work).

Yes, it's as messy as it sounds. This method is not recommended for making civ-specific things.

The other way to do it would be to add the new route type at whatever tech you wanted, and then give the Romans a unique version of the Worker that has an additional Build action available, say, BUILD_ROMAN_ROAD. You wouldn't have to mess around with custom techs or anything, but on the other hand you'd need to give the Romans that alternate worker unit, which screws up a lot of other balance issues.

to be honest i didn't think that this was gonna be this hard just to get a new type of road into the game.

Well, there's your mistake. And no, I'm not joking.

Look, modding is very limited. We can do a lot right now, but only within the framework of what was provided for us. There are three things you can do that are specific to a given civilization: custom buildings, custom units, and racial traits. Anything beyond that cannot be done, unless they also depend on one of those three (which very few things do). Likewise, there are a lot of building/wonder effects that we'd like to award with a Policy, or vice versa, but we can't do so under the current system.

When (if) we're given DLL access then we'll be able to do far more. But until then, a lot of great ideas run up against the limitations of what we have access to. Adding a new route type isn't that bad. Making it unique to a specific civilization, on the other hand, is NOT easy and will just not work well with the tools we have.
 
When (if) we're given DLL access then we'll be able to do far more. But until then, a lot of great ideas run up against the limitations of what we have access to. Adding a new route type isn't that bad. Making it unique to a specific civilization, on the other hand, is NOT easy and will just not work well with the tools we have.

Short of DLL access, I would have liked the devs to just give us some xml keys and events that are useful for modding. There would be need to get into the DLL if they just gave us a few extra tools.
 
Top Bottom