PDA

View Full Version : Adding a unit to a faction through the game.



zerathule
12-12-2006, 16:16
Hi all
I'm trying to make a 100 years war mod, and i'm faaaaar away from doing anything subtantial.
Anyway, i want to add a feature i havent seen proposed in a mod and i guess it could give some ideas to modders :
I would want a dynamic unit roster according to your allies and vassals.
Here is how i see things :
Each faction would have its units list, divided between levy, professional and elite.
Levy troops of a faction would be also available to any faction that managed to have that faction as a vassal. (example : Scotland is vassal of england, england can now recruit Highland pikemen).
Professional troops would be available as mercenaries to anyone in the current territory.
Allies could recruit the elite troops of his allies (example : france is allied to scotland, it can now recruit scot's guard).

Adding troops to the mercenary pools is doable, but we need the unpacker to have the TGAs directory and stuff ...
For the dynamical troop recruitment, we need those directories too, but more importantly i dont know how to script it.
I dont want to create an event for each case (faction A allied to B, Faction A allied to C, Faction B is vassal to A etc ...) and then add it in the recruitment requirements in the EDB but i doubt that the engine would accept it.
Any thoughs on how to implement and code this ?
Any help would be apreciated.

zerathule
12-12-2006, 17:59
You need the unpacker to fully add a unit to a faction roster.
But you can bypass this by adding these lines in the export_descr_unit :
with the Mercenary Arquebusiers description put instead of this line :


ownership slave

this line :


ownership slave, scotland

You'll be able to hire them in custom battle.
Now if you want them in campaign map add this in the export_descr_building :
Lets say you want to add these in the last level of the city barracks add this line :


huge_stone_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }
{
capability
{
recruit_pool "Conquistadores" 1 0.5 4 1 requires factions { spain, portugal, } and hidden_resource america

add this :


huge_stone_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }
{
capability
{
recruit_pool "Conquistadores" 1 0.5 4 1 requires factions { spain, portugal, } and hidden_resource america
recruit_pool "Mercenary Arquebusiers" 1 0.5 4 1 requires factions { scotland, } and hidden_resource america

Hope it helps :)

zerathule
12-12-2006, 18:12
Could you please delete the previous post ? I was on the wrong forums ... :embarassed:
Thanks :)