
Originally Posted by
Sundjata Keita
I'm making a Zulu mod and I was thinking of making Zulu units available by region but that would only be for the Zulu factions.
I've been watching, it's looking really good.
Something like that would be straightforward entry in ebd:
Code:
recruit "impi" 0 requires factions { zulu, } requires hidden_resource zulu
This would allow impi only to be recruited by the Zulus wherever there was a zulu hidden_resource.
This isn't strictly relevant, but IMO one of the cool things about the ZOR mod is that it's compatible with the vanilla edb. So if you just want to play around with a few of the hidden resources and swapping factions then you can work from the vanilla edb forwards, rather than from the full ZOR edb back.
For example, one of my bugbears is that the egyptians can recuit nubians wherever they conquer in the world, even from northern germany.
So, just using the vanilla edb I can change the nubian spearman entry to read:
Code:
recruit "egyptian nubian spearmen" 0 requires factions { egyptian, } and hidden_resource egyptian
and it will confine the recruitment and retraining of nubians to the initial egyptian cultural lands.
Even further, if I think that they would be prepared to fight for the numidians as easily as the egyptians I can just change it to read:
Code:
recruit "egyptian nubian spearmen" 0 requires factions { egyptian, numidia, } and hidden_resource egyptian
so both numidia can recruit them too, but only in the initial egyptian cultural lands. And with the ZOR files in place, it means you don't have to also update the edu or the unit card because it's already done for you. There's nothing new about anything in the ZOR mod, everything here was discovered long ago and has been used far more artfully in other mods. it's just something to make life a little easier if you don't want to get in too deep.
---------
Here's the section on the mod mechanics from the readme:
Mod Mechanics
This mod functions by changing the conditionals for recruitment from a faction-basis to a territory basis.
- It achieves this by changing the recruitment conditional in export_descr_buildings to a hidden resource. A hidden resource has been placed in every province as detailed in descr_regions corresponding (normally) to the default culture of the province.
- descr_model_battle has been changed to help the computer know which graphic files to reference when representing the unit on the battlefield.
- export_descr_unit has been changed to allow all the factions ownership of the units and to tie through to a couple of new entries in descr_model_battle.
So the progression would be as follows:
I (say, Carthage) control a province with the briton hidden_resource in which I have a level 1 barracks.
The level 1 barracks listing in edb includes:
Code:
recruit "barb infantry briton" 0 requires hidden_resource britons
This allows any faction which controls a territory with a Briton hidden_resource and has a level 1 barracks to build the unit barb infantry briton.
In edu, barb infantry briton is owned by all factions (this is why all the units appear for every faction on the custom battle screen) and ties through to the model barb_infantry_longshield_briton in dmb.
In dmb, barb_infantry_longshield_briton looks like this:
Code:
type barb_infantry_longshield_briton
skeleton fs_spearman, ; combat spear
indiv_range 40
texture britons, data/models_unit/textures/unit_barb_warband_longshield_briton.tga
model_flexi data/models_unit/unit_barb_warband_longshield_briton_high.CAS, 8
model_flexi data/models_unit/unit_barb_warband_longshield_briton_med.cas, 15
model_flexi data/models_unit/unit_barb_warband_longshield_briton_low.cas, 30
model_flexi data/models_unit/unit_barb_warband_longshield_briton_lowest.cas, max
model_sprite britons, 60.0, data/sprites/britons_barb_infantry_longshield_briton_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f
Unchanged from vanilla. The texture line tells the game when it comes to generate the unit in battle which skin to use. In this case there is no Carthage line, so strictly the game shouldn't retrieve a skin at all (and the unit would appear white). However, in the vast majority of cases, where no texture line is defined for the faction the game retrieves the default skin for the type. In this case, unsurprisingly, the default skin is briton. Therefore even though I am Carthaginian I get a Briton unit with a Briton skin (which is what I'm aiming for).
barb_infantry_longshield_briton also ties through to the barb_infantry_longshield_briton description in export_units so no problems there. However, when the game goes to find the unit card it only looks inside the Carthaginian folder, so the barb_infantry_longshield_briton unit card needs to be placed there, otherwise you get the dark peasant default unit card.
It gets more complicated where the default skin is inappropriate or missing:
This is barb_infantry_longshield from dmb:
Code:
type barb_infantry_longshield
skeleton fs_spearman, ; combat spear
indiv_range 40
texture gauls, data/models_unit/textures/unit_barb_warband_longshield_gaul.tga
texture dacia, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture romans_julii, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture armenia, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture britons, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture romans_brutii, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture carthage, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture egypt, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture germans, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture greek_cities, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture macedon, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture numidia, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture parthia, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture pontus, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture romans_scipii, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture scythia, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture seleucid, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture romans_senate, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture spain, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture thrace, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
texture slave, data/models_unit/textures/unit_barb_warband_longshield_dacia.tga
model_flexi data/models_unit/unit_barb_warband_longshield_high.CAS, 8
model_flexi data/models_unit/unit_barb_warband_longshield_med.cas, 15
model_flexi data/models_unit/unit_barb_warband_longshield_low.cas, 30
model_flexi data/models_unit/unit_barb_warband_longshield_lowest.cas, max
model_sprite dacia, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite gauls, 60.0, data/sprites/gauls_barb_infantry_longshield_sprite.spr
model_sprite slave, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite thrace, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite spain, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite scythia, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite numidia, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite greek_cities, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite armenia, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite britons, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite germans, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite pontus, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite parthia, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite carthage, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite seleucid, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite egypt, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite macedon, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite romans_senate, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite romans_scipii, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite romans_brutii, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_sprite romans_julii, 60.0, data/sprites/dacia_barb_infantry_longshield_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f
Now this model references two units in edu, a Dacian warband and a Gaul warband. The default skin is Gaullish, this means that whether you're in Gaul or in Dacia if you're neither faction then the unit skin will appear as Gaul. The defaults vary over lots of different barbarian (and other) units, so for the sake of conformity I picked a cultural 'generic' so if a model had various different skins I'd always go with one of them.
For barbarians I picked the Dacians as their brown was the most non-descript. But this leads to the above where I had to define every single faction to point at the Dacian skin.
So if you're Gaul you recruit Gaullish warbands in both Gaul and Dacia (fair enough) and if you're any other faction you recruit Dacian-'looking' warbands in Dacia and Gaul.
Again the unit cards add a discrepancy. They'll hold true to the edu entry you're recruiting, so it will show a Gaullish or a Dacian depending on where you recruited them from (which, while inconsistent, I think is kind of cool as it reminds you where your troops came from).
The solution to this would be to define a new entry in dmb and so split out the Gaullish and Dacian models. Which is perfectly do-able, but there's very little headroom in dmb (only about 45 entries) so I didn't want to reduce it on something that users may not consider important.
The factions that fare the best are those like the Britons who (because of their spikey hair) are largely separate within dmb.
Unit cards become more of an issue when a single entry in edu caters for several different factions, for example the Eastern Infantry. There you have to start looking for a default unit card as well, otherwise it may appear as though you're recruiting Parthian infantry while you're in Pontus. Again you can split out new entries in edu and dmb if that was what was important to you.
There are some interesting default skins in the game that aren't used, some of which I've referred to in the mod. I'll see if I can post some pictures.
Bookmarks