[WIP][Mod] Roadbuilding Pioneers and Roadbuilding Unit

 

Well, it all comes from wanting that all pioneers could build roads, not only the mancers.

I have no idea of modding, and I have not seen a "guide for FE newbie modders yet", but Heavenfall showed me a code that seems to add the trait "roadbuilder" (https://forums.elementalgame.com/434562/page/3/#3284806)

And it worked: now all my faction pioneers got the roadbuilding trait. Here is the xml

http://dl.dropbox.com/u/24075181/RoadbuilderPioneer.rar

 

 EDIT:

Added a trainable Roadbuilder Unit for all factions. It has an upkeep of 0.9 gildar per turn, and 75 production

To install, just drop the xml file in /Mods folders and be sure the "Use Mods" option is on

http://dl.dropbox.com/u/24075181/RoadbuilderUnit.rar

------------------------------

 

But when testing, more things came to my mind.  I hope you can help me with this ;)

 1- I've noticed, but not sure, that the pioneers now take more to build. Is it related to this?

            <Cost>10</Cost>

 

 2- I though in creating a roadbuilder unit, instead, by using all the info of the pioneers, calling it

    <UnitType InternalName="Unit_Roadbuilder_Altarian">

 And deleting what seems to settle/create outpost  in  <GameModifier>

 All the rest was the same. But no new unit was available. What am I doing wrong to create that kind of unit?

 

3- I wanted to give an upkeep to that unit of o,3 gildar per member. But first, I need to create it.

Anyway, I've seen <HasWages>0</HasWages>

Is this related to it too? Should this go with 1?     

 And then add <WageOverride>0.3</WageOverride>?

4- Parrottmath suggested a cost per road they build. Like 2 gildar per road piece. I would like to know if I can do that too. If I can't easily  (for my scarce knowledge) create a roadbuilder unit, I find OK that each road piece costs 2 gildar. Maybe 5.

Thank you ;)

10,147 views 9 replies
Reply #1 Top

1, Don't know what's causing that. Production only comes from <AdditionalTrainingTurns>. Maybe your pioneers are missing a weakness? Keep in mind the FE editor was for 1.0. There may have been changes for FE 1.02. Try looking at CoreUnits.xml in the installation directory and see if you spot any differences between theirs and yours.

2. Delete this <IsStartingUnitType>1</IsStartingUnitType>and they should show up.

3. HasWages is a flip switch whether the unit costs wages at all, or not. It is 1 = true by default. If you have <HasWages>1 and <WageOverride>3 you'll get a unit that costs 3 gildar per member per turn. If you set <HasWages>0 and <WageOverride>3 you'll get a no-wage unit.

4. I can't think of a way to do this. Roadbuilding is a hardcoded function. You can create something to change the terrain under your feet, but it could potentially be used to destroy swamps, forests, even world resources.

Reply #2 Top

2. You need to add this unit to the racetypes.xml file.

Basically make a new xml file and create

<RaceTypes>

    <RaceType InternalName="Race_Type_Altarians">

        <StartingUnitType>Unit_Roadbuilder_Altarian</StartingUnitType>

    </RaceType>

</RaceTypes>

You would have to add this to each and every race, if heavenfall's method works then go with that one, it will save you time.

As to adding the gildar cost to the road building, I might have spoken too soon and I'll have to play with the game mechanics to see if this is indeed possible, but I think heavenfall might be right. I'll tell you what I find.

Reply #3 Top

1. It seems I changed the production costs and forgot to redo. It's Ok.

2. I deleted <IsStartingUnitType>1</IsStartingUnitType>and they showed now. Roadbuilders are here :)

3. I think 0.3 per member, a 0.9 total/turn is a fair price to pay.

I added 35 <AdditionalTrainingTurns>, so they have 75 production cost. More than a scout, not so much than a pioneer.

4. It took me a lot to manage with Roadbuilding and Roadbuilding_Level, and finally it did not serve. I'd like to have a cost for the roadbuilding, but with the new unit and the upkeep, that is better than the roadbuilding pioneers with no upkeep.

I'll edit OP if any interested in trying

Thank you :)

 

Reply #4 Top

you could give the mancers a unique version of the roadbuilder that doesn't require wage to balance things out :)

Reply #5 Top

Well, as the mancers can roadbuild with pioneers and they have no upkeep, I think it balanced as far as the game can be modded now. The idea  is that each road piece took some gildar, like 2 - 5, apart from the upkeep. Mancers got that for free. But roadbuilding seems to be hardcoded. If our experts find a way to attach a cost to each road piece, I'd be happy to do it.

Even more, I would like that each pice of road would take all the turn, not like now, that you can move-road-move in plains tiles...

 

Anyway, thinking about it, I could remove the wages in mancer roadbuilder too, so they have access to roadbuilding free and at a lower production cost than a pioneer...

Reply #6 Top
a couple questions then:

1) does the AI know how to use pioneers/roadbuilders to build roads?
 
2) can the roadbuilding ability be linked to "trading" technology
 
3) can the autoroads be disabled?
Reply #7 Top

I'm playtesting, but I have little hopes in AI using them. I never saw a mancer AI building roads but who knows...

About 2 and 3, I gues it is possible, but don't know how to.

 

Reply #8 Top

For 3 it would appear that you could just turn off the tech unlock. But this might require a core file overwrite though.

Reply #9 Top

and it's still of little use if the AI doesn't understand manual road building :D