Results 1 to 7 of 7

Thread: Possible to Restrict Unit Recruitment to Particular Region?

  1. #1

    Default Possible to Restrict Unit Recruitment to Particular Region?

    Hi all,

    First, please know I'm just a novice modder, but can do some basic tinkering here and there!

    I've been playing - and thoroughly enjoying - the Radious mods as the Empire and have just finished my first full campaign. The effort and detail in the mods are astonishing and I truly take my hat off to the team for such awesome work.

    The range of units is incredible, but many of them seem to be bunched in the barracks or available from too many different buildings - and I found myself steamrolling virtually everything once I got Blazing Sun infantry, so I thought I'd tinker and start restricting some units to more lore-friendly buildings before my next campaign. I know enough to do most of this without any problems so, for example, I can restrict Blazing Sun and Ulric's Warrior Priests to their respective strongholds; restrict Huntsmen to settlements with Timber AND Woodworkers Shops; and move Leopold's Leopard Company variants to Taverns and Coaching Houses.

    But I'd also like to restrict some of Radious' regional units to their respective Provinces. Altdorf Honour Company, Hochland Long Rifles, and Death's Head variants (to Ostermark), for example. I'd also like to restrict most of the Drakwald variants to the Drakwald regions as well.

    Does anyone know if there's a way to restrict recruitment of a particular unit to certain provinces on the map? I'd like to avoid delving into creating unique settlement buildings if I can.

    Of course, when I've finished my troop reshuffle, I'll send the results to Radious on the off-chance that the team want to incorporate the changes in future mods, as a general matter of courtesy.

    Thanks all, your knowledge and experience is greatly appreciated.

    Regards,

    Salthan

  2. #2

    Default Re: Possible to Restrict Unit Recruitment to Particular Region?

    Hey Salthan,

    It's been some time since you've made this thread, so you might have already found a solution, or someone else has, but for all my searching I can't find anything, and seeing as there are no other posts on this thread, I thought I'd share my experience.

    This is my first time posting on here after a long time of just lurking and reading threads, and my first ever time of modding a game (I say modding, but I'm only just tweaking Radious's mod).

    And I feel the exact same way. I adore the new units Radious implemented, baring a few lore-unfriendly ones like black ork archers, or some that I personally found redundant like the veteran swordsmen and the like for the Empire (I personally don't enjoy being able to build a higher tier unit that is better in every way than the previous unit, without any restrictions other than monetary. But that's just me). The units that I didn't like I could easily mod out by tweaking the units mod, and adjusting the garrisons so that they don't include those units. But it really breaks my immersion to see region specific units built by every province in the game. I can self control myself not to train Nuln Engineers outside of Nuln for example, but the AI can't. And for most of the units I don't really mind too much that they're region restricted (I do mind, but it doesn't stop me from having fun), but some really just shoot my immersion straight out of the water. Fighting Middenland that fields Altdorf Companies of Honor in their armies for example.

    So like you, I tweaked it so that certain units are restricted to certain special building chains to simulate region restrictions. Nuln units could only be built in the Nuln Gunnery School for example, and the Altdorf Company of Honor coud only be built in the unique Altdorf settlement building. But Darkwald units for example I've restricted to the Great Temple of Ulric, Knights of the Panther Chapterhouse, Marienburg Docks, and the Altdorf settlement building. This makes no sense when it comes to the purpose of those buildings, but, all of those buildings are built only in the settlements of Middenheim, Carroburg, Marienburg and Altdorf, which all border the Darkwald forest. It only seems logical that whoever controls those cities can train Darkwald units, and those buildings were the only uniquie things to these particular settlements that I could bind the units to. Now I admit that I haven't fully tested this, as I haven't played the game a whole lot by this point and I am not entirely sure if the AI ever builds those unique buildings.

    So that's what I did, and am trying to tweak with. And if you, or anyone else seeing this has found a good solution by now, I would be incredibly thankfull if you'd share it. I hope anything I've said proves to be helpful, and I again apologize if this post is something redundant by now. Like I've said, I have just started modding (tweaking*) for the first time and I feel like I'm preaching to the choir here.

    Another note, I played Rome 2 a lot, but it was a while ago, and I remember that Rome had the auxiliary barracks building chain that provided different units depending on the region it was in. And I think it was just one identical building chan for every region, if I recall correctly. Could it be possible to make such unit restrictions to the Empire barracks, stables and so on?

  3. #3

    Default Re: Possible to Restrict Unit Recruitment to Particular Region?

    Quote Originally Posted by Stevanevus View Post
    And for most of the units I don't really mind too much that they're region restricted
    That they're NOT region restricted, is what I meant to say.

  4. #4

    Default Re: Possible to Restrict Unit Recruitment to Particular Region?

    In the main_units table is an entry for region_unit_resource_requirement which is linked to the region_unit_resoureces table. Thats the way the system was implemented in RomeII. So far its not used for Warhammer and all entries in that table are old values from RomeII. The specific region used to be defined in the start pos. I assume that it still works in Warhammer, too. You could try around a bit and see if you get it to work.

  5. #5

    Default Re: Possible to Restrict Unit Recruitment to Particular Region?

    Thank you very much for that input Larynja! I'll definitelly dig into that immediately. Having region specific units like the axuiliaries in Rome 2 sounds absolutely wonderfull. I doubt I'll make anything noteworthy before some more experienced modder does, but I'll post my results once I make something that works and if theres nothing better until then.

  6. #6
    Commissar Caligula_'s Avatar The Ecstasy of Potatoes
    Join Date
    Dec 2013
    Location
    The alcoves in the Koningin Astridpark
    Posts
    5,876

    Default Re: Possible to Restrict Unit Recruitment to Particular Region?

    Magnar did a Youtube video on this two years ago for Rome 2, that might help.
    Last edited by Commissar Caligula_; September 07, 2016 at 08:22 PM.



  7. #7

    Default Re: Possible to Restrict Unit Recruitment to Particular Region?

    Yep! That did it! Thank you very much for your help guys. Editing the region_resource, main_unit, and startpos.esf did exactly what I was hiping for. Granted I've only tested in on a few units, but it doesn't show any issues. The only real problem it has is that hovering over the barracks still shows all the new units that were added, but once you construct that barracks and go to the recruitment screen, even though the unit icon on the barracks is yellow meaning that it can be recruited, it doesnt show in the unit screen unless you're in the region that allows it's recruitment. It makes the barracks building a little cluttery still, but it's far from a big deal.

    Making every new unit restricted to a specific region will take a bit of work, (especially as my PFM keeps crashing often for whatever reason) but it can definitely be done. I'll get to work immediately to modify it to my liking, but I believe I could do it for every unit in Radiouses unit mod. If you guys want I could do that, then upload the file to the workshop, but seeing how simple it is I'm sure some other more experienced modder, or the Radious team themselves will do the job sooner or later.

    But yeah, to recap, its just how Magnar explained it.
    -Import the region_unit_resources table from the games vanila data.pack
    -Replace or rename the rows so that you have a row for every new unit that should be locked to a specific region, example Nuln_Repeaters (no space characters). The key collumn is what needs to be replaced or renamed, the string collumn you essentially won't even use, so just enter whatever.
    -Then open the main_units table and enter text you filled in the key collumn of the previous table into the required units region_unit_resource_requirement collumn of this table. Example, I'd find the Nuln engineers with repeaters row and add Nuln_Repeaters into the region_unit_resource_requirement collumn.
    -Then enter the startpos.esf (that you should have added by now in the campaign/main_warhammer directory), and find the list of regions.
    -Then finally just add the entry, like mine for example Nuln_Repeaters, to their specific regions, in my case the city of Nuln. Just watch Magnars video that Caligula posted and do it exactly like he does.
    -And thats everything!

    Thank you all again, I am incredibly satisfied now that I can lock units to their home regions, and that I've learned just a little bit about modding, with your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •