PDA

View Full Version : Query - Compound (or is it composite?) building requierements



Betito
06-30-2007, 00:16
Those of you who played MTW1 may remember that usually your military units required more than one kind of a building in order to be trainable. A few examples i can recall right now are the JHI(Military academy + Master spearmaker, Chivalric knights (Baronial court + horse breeder's guild... i think am¿rmourer's guild too) or Lancers(Master horse breeder + master armourer + master spearmaker).

My personal opinion is that such compound (or composite...? sorry, i am not a native english speaker) requierements added depth to the game, and a bit more of strategy.

By the contrary, i can't see any of this in M2... which i think is a shame, because it may have been worth rescuing from the old TWs

My question is, is it possible to make something similar in M2TW?? If so, has any mod retaken the model?? or how can you do it?

Kobal2fr
06-30-2007, 06:29
This probably belongs more to the modding forums, but no matter.

Copying the building pre-requirements of buildings codes in recruit_pool lines in the EDB apparently does the trick. Example :


recruit_pool "Highland Rabble" 1 1 4 0 requires factions { scotland, } and building_present_min_level market great_market

In this case, Highland Rabble could only be recruited with said building AND a Great Market. I've tested this and it works. I assume by stringing "and"s you could stipulate multiple buildings required.

Betito
06-30-2007, 17:48
I see, many thanks, Kobal2fr!

Now,does anyone know if any existing mod is trying to do something like this? Just curious

El Jojo
06-30-2007, 18:36
Ultimate AI 1.5 does something close to what you're asking. For example, playing Milan you can only build Italian milita if you have only built barracks. You need a tanner to get Italian spear militia. Usually you need the training building and the weaponmaker or armormaker.
Problem is, it's a global mod which changes a lot of things apart from that. If you''re curious try it from TWcenter.

Kobal2fr
06-30-2007, 18:49
You know, that's actually not a bad idea at all - requesting the blacksmith level appropriate to a unit's base armour level before allowing them to be recruited...
Wonder what it would do to the AI, but I think I'm gonna try that for a spell.

John_Longarrow
06-30-2007, 20:24
Kobal,

It hurts the AI, at least as far as I can tell. The flip side is, where do you go to change the AI's build strategy? If you can change that, then you can definitly get the AI to do what needs to be done.

Kobal2fr
06-30-2007, 20:33
AFAIK, you can't.
Ah, well, was a nice idea anyway. Guess I'll have to make it HouseRule #253 :grin:

alpaca
07-01-2007, 15:52
Actually, doing this won't work according to my tests.
building_present_min_level doesn't work for recruit_pools, so you have to devise some really weird workarounds with event_counters if you want to do something like that, or make the building tree so that it works like you want it to.

Kobal2fr
07-01-2007, 18:28
Errr... I tested it. Actually tested it. Made Hobilars require a leatherworker by adding the line "and building_present_min_level castle_smith c_leather_tanner" after "requires faction {England}", fired up the game, built a horse breeder in Nottingham, couldn't recruit anything. Then I built a leather tanner and pop comes the recruiting pool. Destroyed the leather tanner and the recruiting slot disappeared.

Of course, I tested that in LTC, where castles don't allow any recruiting by themselves (ie. to recruit knights, you need the proper stables, you don't get "free" knights with the core_castle). That might be why your tests didn't work ? Or maybe it's something they have introduced in 1.2, for all I know.

The only weird problem is that the building browser kinda borks up. You can still right-click on the recruitment building (either in the browser or in settlement details) and it will say "Hobilars (maximum 4) Leather Tanner", but you can't right click on that to make the Hobilar unit card pop up. A right click on the unit pool works fine. Beats me as to why it is so though.

alpaca
07-01-2007, 19:56
Errr... I tested it. Actually tested it. Made Hobilars require a leatherworker by adding the line "and building_present_min_level castle_smith c_leather_tanner" after "requires faction {England}", fired up the game, built a horse breeder in Nottingham, couldn't recruit anything. Then I built a leather tanner and pop comes the recruiting pool. Destroyed the leather tanner and the recruiting slot disappeared.

Of course, I tested that in LTC, where castles don't allow any recruiting by themselves (ie. to recruit knights, you need the proper stables, you don't get "free" knights with the core_castle). That might be why your tests didn't work ? Or maybe it's something they have introduced in 1.2, for all I know.

The only weird problem is that the building browser kinda borks up. You can still right-click on the recruitment building (either in the browser or in settlement details) and it will say "Hobilars (maximum 4) Leather Tanner", but you can't right click on that to make the Hobilar unit card pop up. A right click on the unit pool works fine. Beats me as to why it is so though.
Now that's weird. There must have been some other problem when I tested it as it seems to work indeed; you're right about the core buildings, by the way. Giving recruit_pools a building_present_min_level requirement there crashes the game on campaign start, but I tested it with a unit and two other buildings and it also crashed when I constructed the building.

Thanks anyways, you just saved me a bit of work.