Total War: WARHAMMER II

Total War: WARHAMMER II

Dogs of War: Cross-Faction Unit Recruitment + Mercenary Camps
sn0wsh00 3 Sep, 2020 @ 6:42pm
Adding custom units
I've created some custom units and I would like to make those units selectable through this mod. The description mentions creating a submod, but how exactly do I do that?
< >
Showing 1-5 of 5 comments
sn0wsh00 10 Sep, 2020 @ 4:28pm 
I finally figured out how to add my custom units to this mod. To do this:

  1. I copied the LUA script from the Skavin Unit Pack and added that LUA file into <packfile name>/script/campaign/mod
  2. Then I modified the line race_name to a custom race, which, in my case, was named "Cheap Sea Guards"
  3. For the local localization_string_to_check, I set the value to "land_units_onscreen_name_cheap_sea_guards," which was my .loc name for that unit
  4. Finally, under the local units section, I added an entry for my custom unit's main_units name, which, in my case was "cheap_sea_guards"

You can download my custom units below:
https://drive.google.com/file/d/1DQxTiHFRDb59EVpksL8tKCljHmFGrHRt/view?usp=sharing

And you can see my LUA script below for those who want to use it as a template:
https://drive.google.com/file/d/1veoileCBux9olPsvwvFMBdj-4xsdpzaX/view?usp=sharing
Last edited by sn0wsh00; 10 Sep, 2020 @ 4:30pm
prop joe  [developer] 13 Sep, 2020 @ 10:52am 
hey, good job, that all looks correct
sn0wsh00 16 Sep, 2020 @ 8:12pm 
I also managed to add a recruiting cost to my custom unit without it interfering with the costs of the other units. To do this:

  1. I added a LUA file inside the <packfile name>/script/campaign/mod/pj_dogs_of_war folder, which, in my case, I named unit_to_cost_cheap_sea_guards.lua
  2. Inside unit_to_cost_cheap_sea_guards.lua, I copied the unit to cost format of the original unit_to_cost.lua
  3. Back in pj_dogs_of_war_cheap_fast_sea_guards.lua in the script/campaign/mod/ folder, I added the following block of code:

    for unit_name, unit_cost in pairs(require("pj_dogs_of_war/unit_to_cost_cheap_sea_guards")) do PJDOW.unit_to_cost[unit_name] = unit_cost end

I've updated my previously posted pack file[drive.google.com] and LUA file[drive.google.com] to reflect this
Last edited by sn0wsh00; 16 Sep, 2020 @ 8:18pm
Joangar_Wrathfal 14 Oct, 2020 @ 6:50pm 
Any chance someone could make a stupid people friendly version?
Chubbynator 6 Feb, 2021 @ 3:45am 
hey i know this sound cool and all that but can you make a video about that :)))
< >
Showing 1-5 of 5 comments
Per page: 1530 50