Would any of you happen to know if there is a way to set a cap on how many of a certain unit can be recruited in the campaign?
I have a mod for BI that I want to restrict certain units within and I just can't seem to nail that down.
Would any of you happen to know if there is a way to set a cap on how many of a certain unit can be recruited in the campaign?
I have a mod for BI that I want to restrict certain units within and I just can't seem to nail that down.
Like as Medieval II ?... Its not possible in RTW-BI-ALX engines. There are some ways for put limit on recruitment by areas in the strategy map, using hidden_resources... or stop completely the recruitment, using one building where the unit isnt there... but none of that way is similar to that you want, I think.
greetings.
AFAIK It's not possible. However the closets thing you can do is increasing the recruitment times of the unit so it will discourage players (and maybe AI) to not train that unit yet still allow the unit's owner to retrain them. I.e: The Spartan Hoplite in EG do take 20 turn to train.
My OC characters, be sure to meet them both
http://nhinhonhinho.deviantart.com/a...e-V2-489172364
My mod Genghis Khan Total War
http://www.moddb.com/mods/genghis-khan-total-war
moved this to the correct location
Rise of Mordor 3D Modelers Wanted
Massive Overhaul Submod Units!
Under the proud patronage of
Frunk of the house of Siblesz
This will probably not be what you are looking for but if you need to limit some unit, like Lombard Berserkers, to 4 units total my suggestion would be to place them all on the map in Descr_strat, then in the export_descr_unit file change the ownership to slave only. When playing the game neither you nor anyone else will be able to recruit them BUT when you have the correct building you will be able to retrain them.
I´snt there an unique unit atrribut? So you can only recuit on unit or is that only for medival 2?
I just tried that; brilliant, works very well and is great with mercenaries as well. With this I made Balearic Slingers retrainable but not trainable for Spain. The only problems are that the unit is no longer available for Spain in custom battles, and any unit that has this will always use its rebel colours.
As for unit caps you could probably also create a script that gives the unit somewhere on the map under certain conditions but it seems direct unit caps are impossible. That is what modders say and I'm not really a modder.
I would say you're already a modder.
Show me how tutorial (maybe simpler if you're going for that), all you'd have to do is script in the units spawning and then subtract an amount from the players treasury to simulate recruitment:
https://forums.totalwar.org/vb/showt...pting-How-To-s
Here is another more "advanced" tutorial, as an option if you want to really get into more scripting:
https://www.twcenter.net/forums/showthread.php?169689-How-to-Add-a-background-script-to-your-mod
And here is a link to all available commands in barbarian invasion and (almost all of them) vanilla RTW. It shouldn't be too hard to cook up a simple show me how script which appears
Last edited by z3n; February 22, 2020 at 03:55 PM.
The AI Workshop Creator
Europa Barbaroum II AI/Game Mechanics Developer
The Northern Crusades Lead Developer
Classical Age Total War Retired Lead Developer
Rome: Total Realism Animation Developer
RTW Workshop Assistance MTW2 AI Tutorial & Assistance
Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)