PDA

View Full Version : Creative Assembly Hidden Resources



Sinner
10-20-2004, 01:33
A few people have voiced complaints that they can't build First Cohorts, thus making it impossible to replenish a depleted unit after combat losses. Using the example of the Spartan Hoplite which is limited to being built in Sparta and Syracuse (not really sure why the later, but... ) I modded in the ability to build the First Cohorts in Rome.

The first file to mod is descr_regions.txt (found in \Data\world\maps\base), adding in a label for your intended hidden resource...

Latium

Rome
romans_senate
Latins
52 13 198
dogs, pigs
5
8

changes to...

Latium

Rome
romans_senate
Latins
52 13 198
dogs, pigs, rome
5
8

I would guess that the added label has to be unique, so the name of the settlement in the province is a convenient choice. By setting up an appropriately named and unique hidden resource in every province, you can easily produce province-specific units.

Next you need to delete the map.rwm and map_heights.hgt files in the same directory. RTW rebuilds the former file from the various base text and graphic files to give the 3D campaign map; the latter file appears to be unused, but since other mods that change the map say to get rid of it, who am I to quibble? LOL

Now you need to edit the export_descr_buildings.txt file in \Data. At the top you'll see a line like this...

hidden_resources sparta

...which you need to change to this...

hidden_resources rome, sparta

Then you need to add the entries for the First Cohorts under the appropriate buildings:

Under city_barracks...

recruit "roman legionary first cohort i" 0 requires factions { roman, } and marian_reforms and hidden_resource rome

Under army_barracks and royal_barracks...

recruit "roman legionary first cohort i" 0 requires factions { roman, } and marian_reforms and hidden_resource rome
recruit "roman legionary first cohort ii" 0 requires factions { roman, } and marian_reforms and hidden_resource rome

So each First Cohort can be built at the same time as the appropriate Legionary Cohort, but only in Rome itself. If I wanted them to be built in every original Roman province, I could either add the hidden resource of rome to each province in the descr_regions.txt file - but that would lose the ability to have something unique to Rome alone - or have multiple entries of the recruit "roman legionary... lines in export_descr_buildings.txt, with the hidden resource value changed each time to the required province.

The idea could be extended to add provinces to cultural/regional groups, so I could have the hidden resource of roman added to each of the starting Roman provinces - Brutii, Julii, Scipii and Senate - plus perhaps the 3 northern Italian provinces in Gallic and rebel hands and the remainder of Sicilly, in addition to their unique individual hidden resources. I could then alter the Hastati, Princeps, Triarii, Early Legionary Cohorts, Legionary Cohorts, Praetorian Cohorts and Urban Cohorts so that they all require the roman hidden resource and thus can only be built in Italy and Sicilly, meaning that only Auxilia could be recruited in non-Italian provinces once they've been conquered.

Extending the idea further, a province could have more than one cultural group hidden resource, with Cisalpine Gaul (Mediolanium) and Venetia (Patavium) having the resources of both roman and gallic.

There's more that can be done with this in combination with the export_descr_buildings.txt file, allowing certain regions to produce a particular unit type with an experience bonus for example.

EDIT: I should add that existing campiagns don't seem to pick up the changes, so you'll have to start a new one to take benefit of any modding. My guess is that the the savefile includes details of each provinces resources, with them being set when the campaign starts.

metatron
10-20-2004, 04:51
Bravo! I wanted to do this with Urban Cohorts as well, and now I know how. Thanks.

Encaitar
10-20-2004, 15:14
If you want the ability to 'retrain' First Cohorts, but not recruit new ones, another option is to give them some rediculously long build time (e.g. 999 turns). You can still retrain them in 1 turn, but obviously you're not going to waste time recruiting them.

Spino
10-20-2004, 15:24
You're a clever man Sinner, a very clever man. You just gave the modding community the means to make province specific units. Thank you!


If you want the ability to 'retrain' First Cohorts, but not recruit new ones, another option is to give them some rediculously long build time (e.g. 999 turns). You can still retrain them in 1 turn, but obviously you're not going to waste time recruiting them.

Or you could simply make First Cohorts obscenely expensive to recruit in the first place. But your method would certainly discourage a wealthy AI faction from recruiting lots of them.

JeromeGrasdyke
10-20-2004, 16:07
A few people have voiced complaints that they can't build First Cohorts, thus making it impossible to replenish a depleted unit after combat losses. Using the example of the Spartan Hoplite which is limited to being built in Sparta and Syracuse (not really sure why the later, but... ) I modded in the ability to build the First Cohorts in Rome.

Very good, very good indeed. Nice idea. Changing the Spartan Hoplites to only be recruitable in Sparta is quite a big change for the game balance, but we may incorporate the change for First Cohorts into the 1.2 patch. It also neatly solves the issue of recruiting them after the Civil War has begun, at which point you're no longer in the Senate's good books and so won't get any more from them...

zarkis
10-20-2004, 16:13
Great! I tried to make hidden resources myself but it didn't come to me that deleting the map file would do the trick. Now if only CA would lift the 300 unit limit....

Sinner
10-21-2004, 14:34
I started work last night on a mod using the hidden resources to limit where factions can build their troops. Personally it just doesn't feel right to me for Egyptians, for example, to somehow end up conquering Gaul and start being able to locally recruit Nubian Spearmen and Camel Archers. Yes, over time the conquered people might be replaced or adapt to their conquerors ways, but sometimes the reverse was true with the conquerors eventually becoming nigh-on indistinguishable from those they once vanquished. So there are perhaps arguments for and against my mod.

The individual province hidden resources are easy, although I'm sometimes flipping a coin for the cultural/regional groupings since I'm not doing any major research at this stage, just setting up the basic mechanics. One further idea I'm possibly going to add or use instead is another level of hidden resources that take account of the typical terrain of a region... it seems a little odd to me to recruit steppe-style horse archers in the mountainous areas of europe, or camel units from the freezing wet north.

My current idea is to make the core, elite units of each faction only buildable in their starting provinces plus selected neigboring or similar regions, eg. horse archers would be recruitable in any of the steppe regions. Lesser units, the Roman's Auxilia being a perfect case, would be recruitable anywhere.

I do have one major worry and that's how it will effect the composition of AI armies. Since they can only recruit their best troops in limited areas, they might end up with the equivilant of MTW's peasant horde, but for differing reasons. In addition I doubt the AI will be clever enough to know it has to send its units back to the home regions to be able to replenish battle losses, further weakening them.

So far I'm just putting it together, haven't seen how it plays yet, so there'll no doubt need to be lots of tweaking.

I also intend to address a few other issues in my mod: ditching the fantasy units, amending the oddities such as the armour of the desert axemen, and making naval combat more decisive, for example.

A possible future extension - although one that would require me to learn how to edit textures & sprites - would be to produce versions of each faction's troops, probably with reduced stats or higher expense, that conquerors could recruit, although this is brushing too close to fantasy for me to be completely comfortable with the idea, plus I might find the AI so adversely effected that I have to drop the idea anyway or limit the effect to special cases, such as camels only in deserts, etc.

SigniferOne
10-21-2004, 20:52
Wait wait, you have to delete the .rvwm file?? No wonder I couldn't find the hidden_resource sparta when I was trying to solve this problem weeks earlier. So when you force the engine to generate the map anew, it will add hidden_resource sparta to the export_descr_buildings.txt file?

Sinner
10-21-2004, 22:49
Nope, the sparta resource was always there... first declared in descr_regions.txt, and then flagged as hidden at the beginning of export_descr_buildings.txt - I only amended the hidden_resources entry, I didn't create it or have it autogenerated when the map was rebuilt.

The key to adding new hidden resources was deleting the map files, without that you could add all the hidden resources you liked, but they wouldn't be picked up.

khelvan
12-31-2004, 06:57
Guys, this is great help, but do you also have information on how to add a standard (non-hidden) resource?