PDA

View Full Version : Soldiers of the death empires.



SwordsMaster
11-12-2004, 11:02
Hi all modders out there.

I've had the idea long ago, but never finally got to implement it.
Here is the idea:

During the period the game is set in many tribes/cities served in different armies under different factions but always keeping their own war-waging tactics, equipment and habits.

So, my question is: is it possible to make a mod that would allow to be recruited as mercs the units of a defeated faction in that faction's original homelands?

For the sake of the agrument say you are playing Julii. You exterminate Spain. After you exterminated Spain, if you keep spanish buildings in the spanish homelands, you can recruit spanish units as mercs. (You can recruit every unit that was available at the moment you defeated the faction).

Of course this should be more specific, as you cant help but upgrading the Governors residence and some other buildings, but you should keep the original unit producing structures.

I put the proposition forward in the general boards as I dont have enough modding experience as to make a serious attempt on this one, but I would love to see this idea become a mod.

So, what do you all guys think?

Sinner
11-12-2004, 11:36
A good idea, but not completely possible since you can't tie the availability of mercenaries to the existance of a faction. The closest you could come to it would be to create mercenary graphics for all troops - or just copy the originals if you don't want it perfect - then create a series of new mercenary pools which cover each of the factions starting provinces and are populated with the appropriate troops. Anybody in the province, including the original owning faction, could then hire those troops.

This could create some game balance issues, imagine getting an Urban Cohort in the first few turns of a campaign for example. To address this you'd either have to limit what units can be picked up as mercenaries instead of allowing them all, alternatively you'd have to make the higher tech units have a very low replenishment rate so that they hardly ever appear in the hiring pool, in effect removing them.

SwordsMaster
11-12-2004, 12:05
Cheers m8,

Thats a pity tho....
Can you tie the mercs available to buildings?

Sinner
11-12-2004, 12:38
Nope, can't do that either.

Mercenaries only appear through a semi-random method. There are a number of mercenary pools covering one or more provinces, each with one or more different troop types available from that pool.

Each troop type has the following details...
- An experience level - so mercenaries from one region can be better than the same type recruited elsewhere.
- A hiring cost - could also vary between pools.
- A replenishment rate, which is a range to allow for a random factor. A commonly occuring unit might have a range of 0.125 - 0.25, rarer units might be 0.02 - 0.08 for example. Presumably each turn the replenishment points are calculated based upon the available range then added to the running total, when the total reaches 1 or greater a new unit appears for hire.
- The maximum number that will ever be available to hire.
- The number of units that are available for hiring upon the start of the game - can be 0 to whatever.

SwordsMaster
11-12-2004, 12:49
Thanks again Sinner.

Do you know what files should I look into?
I might start playing with it a bit just to see what happens.
Im thinking that maybe mercs up to level 2 cities (6000?) should be available from the beginning, and the rest should be triggered with the Marius reforms.

Can that be done?

Also the elite units (Praetorians, Spartan hoplites, War elephants and the like) would have a reappearance rate almost 0. Im not quite sure about the trigger thing tho...

Sinner
11-12-2004, 15:28
You need to check in the descr_mercenaries.txt file for what mercenaries are assigned to what pool, the format is fairly obvious.

You wouldn't be able to include the reforms as a trigger of any kind.

For making a non-mercenary unit available as mercenary there's a lot of work to do, you'll need to edit the following files...

export_descr_unit.txt - the basic unit stats, copying the desired unit and making the changes to produce a mercenary version.

eg. Mercenary Hastati...

type merc hastati
dictionary merc_hastati ; Mercenary Hastati
category infantry
class light
voice_type Light_1
soldier roman_hastati, 40, 0, 1
attributes sea_faring, hide_forest, can_sap, mercenary_unit
formation 1, 2, 2, 3, 4, square
stat_health 1, 0
stat_pri 10, 2, pilum, 35, 2, thrown, blade, piercing, spear, 25 ,1
stat_pri_attr prec, thrown ap
stat_sec 6, 2, no, 0, 0, melee, simple, piercing, sword, 25 ,1
stat_sec_attr no
stat_pri_armour 3, 4, 4, metal
stat_sec_armour 0, 1, flesh
stat_heat 3
stat_ground 2, 0, 0, 0
stat_mental 5, normal, trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 420, 150, 50, 70, 440
ownership slave

export_units.txt - the unit description.

{merc_hastati} Mercenary Hastati

{merc_hastati_descr}
Hardy\nSapping Ability\n\nYoung Roman men chosing to fight for money rather than their city. They are armed with two pila that are thrown at the enemy at close range before they close to fight hand-to-hand. They are equipped with a sword, a bronze helmet, a large shield and a breastplate. The pilum (plural, pila) is a cleverly designed spear with a soft iron shaft behind the point; it bends on impact so that it can’t be thrown back and if it’s stuck in someone or something it is a real hindrance to movement.

{merc_hastati_descr_short}
Young Roman men to fight for money rather than their city.

export_descr_unit_enum.txt - the link between the above 2 files.

merc_hastati
merc_hastati_descr
merc_hastati_descr_short

descr_model_battle.txt - this links the unit to the appropriate skeleton and graphic files, so you don't have a spearman looking and moving like an elephant.

If you've created your own textures so that mercenary Hastati are green like the other sellswords...

type roman_hastati
skeleton fs_javelinman, fs_swordsman
indiv_range 40
texture mercenary, data/models_unit/textures/unit_roman_hastati_merc.tga
texture romans_julii, data/models_unit/textures/unit_roman_hastati_julii.tga
texture romans_brutii, data/models_unit/textures/unit_roman_hastati_brutii.tga
texture romans_scipii, data/models_unit/textures/unit_roman_hastati_scipii.tga
texture romans_senate, data/models_unit/textures/unit_roman_hastati_senate.tga
texture slave, data/models_unit/textures/unit_roman_hastati_slave.tga
model_flexi_m data/models_unit/unit_roman_hastati_high.cas, 15
model_flexi_m data/models_unit/unit_roman_hastati_med.cas, 30
model_flexi_m data/models_unit/unit_roman_hastati_low.cas, 40
model_flexi data/models_unit/unit_roman_hastati_lowest.cas, max
model_sprite 60.0, data/sprites/merc_roman_hastati_sprite.spr
model_sprite slave, 60.0, data/sprites/slave_roman_hastati_sprite.spr
model_sprite romans_senate, 60.0, data/sprites/romans_senate_roman_hastati_sprite.spr
model_sprite romans_scipii, 60.0, data/sprites/romans_scipii_roman_hastati_sprite.spr
model_sprite romans_brutii, 60.0, data/sprites/romans_brutii_roman_hastati_sprite.spr
model_sprite romans_julii, 60.0, data/sprites/romans_julii_roman_hastati_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f

Or if I'm just going to reuse existing textures/sprites, in this case the convenient Slave graphics...

type roman_hastati
skeleton fs_javelinman, fs_swordsman
indiv_range 40
texture mercenary, data/models_unit/textures/unit_roman_hastati_slave.tga
texture romans_julii, data/models_unit/textures/unit_roman_hastati_julii.tga
texture romans_brutii, data/models_unit/textures/unit_roman_hastati_brutii.tga
texture romans_scipii, data/models_unit/textures/unit_roman_hastati_scipii.tga
texture romans_senate, data/models_unit/textures/unit_roman_hastati_senate.tga
texture slave, data/models_unit/textures/unit_roman_hastati_slave.tga
model_flexi_m data/models_unit/unit_roman_hastati_high.cas, 15
model_flexi_m data/models_unit/unit_roman_hastati_med.cas, 30
model_flexi_m data/models_unit/unit_roman_hastati_low.cas, 40
model_flexi data/models_unit/unit_roman_hastati_lowest.cas, max
model_sprite 60.0, data/sprites/slave_roman_hastati_sprite.spr
model_sprite slave, 60.0, data/sprites/slave_roman_hastati_sprite.spr
model_sprite romans_senate, 60.0, data/sprites/romans_senate_roman_hastati_sprite.spr
model_sprite romans_scipii, 60.0, data/sprites/romans_scipii_roman_hastati_sprite.spr
model_sprite romans_brutii, 60.0, data/sprites/romans_brutii_roman_hastati_sprite.spr
model_sprite romans_julii, 60.0, data/sprites/romans_julii_roman_hastati_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f

Lastly you'll need to copy/create unit cards so the correct graphic appears when you are selecting units in retrain queues and armies, plus the larger picture that appears when you view the unit details. The simplest & quickest method would be just to copy & rename the already existing files and place them in the appropriate folder for mercenaries.

To be able to copy then edit/rename the current graphic files you will need to extract them first from the PAK archives using the XPAK tool, check the other modding threads on where to get it & how to use it. Similarly there are also other threads on editting the graphics files, something that's not really my forte since I'm about as artistic as 2 year old with a box of crayons.

Hopefully I haven't made too many errors with that, if I have no doubt somebody will be able to pick them up for you. ~:)

SwordsMaster
11-12-2004, 16:00
Thanks a LOT m8, great info.
Again copy/paste is our best friend....

Last question can I use the textures of the Brutii to make them green? That would save some hassle wouldn it?

Sinner
11-12-2004, 16:06
Use whatever you'd prefer ~:). If you don't create your own texture, sooner or later you run the risk of fighting a battle with troops on both sides looking the same, maybe not a huge issue although it could cause some frustration.

SwordsMaster
11-12-2004, 16:53
..mmm yeah, havent considered that option... I´ll think about it...

The Evil Emperor Mindstation
11-12-2004, 17:29
You could give all the mercenarys different headdresses, shoulder plates ect. to be able to distinguish between them. Then the only problem would be when two units of the same class fight eachother. :duel:


-Emp

SwordsMaster
11-12-2004, 19:35
Thats a good consideartion, I could even transform existing textures in totally different ones, however I dont have the time. I dont have long 2-3 hour breaks to sit and draw, but instead I have lots of short ones of 40-45 mins which doesnt actually give me time to get to grips with it.

I'll do what I can.

BTW, how do I link a merc unit to a specific region?

Sinner
11-12-2004, 21:09
Edit descr_mercenaries.txt for that.

Thrudvang
11-15-2004, 09:35
Maybe only have the faction mercenaries available in the capital of each faction and the type of mecenaries available depends on how that faction starts in the game (population and stuff). Obviously backwoodsy places wont have many to recruit. And remember to make their prices higher than training cost or find some balance, so people playing those factions dont get insta troops.

SwordsMaster
11-15-2004, 10:37
Ok, this is part of the final distribution:

Roman Mercs: available in: All of the Italian peninsula plus Ilyria plus Sicily.

Greek mercs: available in: greece except the part controlled by Macedon, Rhodes, Crete.

Seleucid mercs: Available in Antioch, Damascus, Seleucia.

Egiptian mercs: available in Alexandria, Thebes, Memphis.

Carthaginian mecs: available in Africa, from Egypt to Tingi, Spain, Sicily.

Spanish mercs, avalable in Spain, Balearic Islands, Carthage (city).

Gauls: Gaul, mediolanum, patavium, North of Spain.

Havnt looked into the rest of them yet. Urban Cohorts, Sacred band infantry, silver shield pikemen, etc... probability is something like: 0.017.

So they shouldnt pop up til the marius reforms are around.

SwordsMaster
11-15-2004, 10:41
But at the same time I would like to stick to my original idea and make it worth keeping the original buildings... Maybe make an invisible resource for each faction and make those faction specific units buildable if the resource is there....

That way it might make it worth fighting rebellions to be able to build that unit.

Im quite busy these days anyway, so brainstorming is all I can offer at the moment.

Sinner
11-15-2004, 11:21
Unfortunately for what you want, you can't link mercenaries to any building, resource or anything other than location and chance.

To get the closest to what you want, you'd have to make every unit usable by every faction, then start setting up and using hidden resources...

- Edit descr_model_battle.txt to add texture and sprite entries for every faction as per my example above
- Create/copy the appropriate graphics files.
- Edit export_descr_unit.txt so that the ownership of every unit - less the general's units and common ones like peasants - includes every faction. You could use cultures instead of factions for brevity.
- Edit descr_regions.txt and add appropriate resources to each region. The resource names simply need to be unique and you can't have more than 63 (the limit is 64 but the base game already has a hidden resource for Sparta). For what you want, call the resources something like merc_rome for all the Roman provinces, merc_carth for the Carthaginian provinces, merc_brit for the Britons, etc.
- Delete the map.rwm and map_heights.hgt files. The latter seems unnecessary and the former will be recreated next time you start the game. if you don't do this, the added hidden_resources will not work.
- Edit export_descr_buildings.txt and add all your new hidden resources - seperated by commas - to the hidden_resources field at the beginning of the file. eg. hidden_resources sparta, merc_rome, merc_carth, merc_greek, merc_mace...
- Still in export_descr_buildings.txt, copy every unit build line - apart from peasants and any other common unit - adding the copied line to the same building editting it like this...

recruit "roman praetorian cohort i" 0 requires factions { roman, } becomes...

recruit "roman praetorian cohort i" 0 requires factions { barbarian, ct_carthage, eastern, parthia, egyptian, greek, } and hidden_resource merc_rome

Using the cultures instead of individual factions saves time, but it's your choice what you'd prefer in case you'd want to limit some factions.

Most important of all: back up everything first!

EDIT: It could possibly be argued either way as to whether conquered people would fight for their conquerors using their own traditional styles, or even if the conqueror would want them to. History provides examples both for and against. What I personally would do would be to only allow the more common units to be built, leaving out any elite or prestige units, for example allow Hastati but not Princeps or Triarii, Legionaires but not Praetorians or Urban Cohorts, etc. This allows factions to keep some individuality and also cuts down on the amount of work. By removing the higher end units, it also allows you to move the 'merc' troops up a building level or two, so that Hastati require the Legion Barracks instead of the Militia Barracks for example.

SwordsMaster
11-15-2004, 14:54
Thanks a LOt, man, I wouldnt know where to start if left on my own! ~:cheers:

Most important of all: back up everything first!

Yeah!, I already found out why. ~;)
EDIT: It could possibly be argued either way as to whether conquered people would fight for their conquerors using their own traditional styles, or even if the conqueror would want them to. History provides examples both for and against. What I personally would do would be to only allow the more common units to be built, leaving out any elite or prestige units, for example allow Hastati but not Princeps or Triarii, Legionaires but not Praetorians or Urban Cohorts, etc. This allows factions to keep some individuality and also cuts down on the amount of work. By removing the higher end units, it also allows you to move the 'merc' troops up a building level or two, so that Hastati require the Legion Barracks instead of the Militia Barracks for example.

The idea is to make the "general" units available to build, but to make available "elite unis" as mercs with a really low frequency.

I also thought that similarity in weapons would have some influence. Ie its easier to recriuit triarii in greece than in Spain, because spain traditionally used swords better than spears. So I might make triarii buildable/available for greece but not for spain.

Not too convinced about that last thing yet tho....