Page 1 of 2 12 LastLast
Results 1 to 20 of 24

Thread: Creating & Editing Unit Recruitment

  1. #1

    Default Creating & Editing Unit Recruitment

    This tutorial will explain how to edit Mercenary recruitment entries in a new startpos created by the kit. Please note the kit is not out yet, but this method works for Attila so I am hoping it will work for Thrones.

    If you want to edit existing Mercenary entries without the kit, you can simply use PFM or EditSF to manually change them in the FACTION ARRAYs. Magnar has a tutorial on how to do that I believe. The basics of editing an existing startpos for mercenaries is to open the startpos, find the FACTION ARRAY you want to edit, and find the Factional Mercenaries section. In there you can edit/remove entries and also duplicate an entry to add a new one. I would recommend Magnar's video tutorial on the subject if you are interested in doing these edits now. Here is an example of editing an existing startpos entry:
    Spoiler Alert, click show to read: 

    However, if you want to do mass editing or are creating your own startpos, this is the method to use (once we get the kit):

    1. Create a new mod pack with the following tables in it:
    - faction_to_mercenary_set_junctions
    - main_units
    - mercenary_pool_to_group_junctions
    - mercenary_pools
    - mercenary_units_groups
    - province_to_mercenary_set_junctions
    (This assumes you want to create new mercenary pools, if you want to use vanilla pools & groups you don't need all of these tables).

    2. Add your units to the main units table with their unit keys but make sure the rest of the entries in that table are vanilla (just copy/paste the same entry for every land_unit, caste, audio, etc entry).

    3. Create any new mercenary pools and groups you want. Assign the units to the proper mercenary groups. Assign the mercenary groups to the right pools or to your own pool. Assign those pools to a faction or province. (See below for more information on mercenary tables)

    4. Here is an example pack with the changes outlined: http://www.mediafire.com/file/g9sr99...enarytest.pack (This pack is for Attila) . It has 3 new test units all assigned to the Sassanids as factional mercenaries. Note that this pack uses table fragments so it doesn't have the vanilla entries, but you can use vanilla tables if you want and just add your changes onto them. I think using table fragments is easier because you won't have to update this pack with any changes made to vanilla entries.

    5. Make sure the mod pack you created is saved as a movie type pack (File - change pack type - movie, then save)

    6. Put the new mod pack file in the data folder with the other pack files. Make sure no other mod packs are activated in mod manager.

    7. Go to assembly_kit/binaries and double click on Bob.AssemblyKit.exe
    8. Output a startpos, it should look like this:
    Spoiler Alert, click show to read: 
    9. It will take awhile for Attila to output it, probably a few minutes at least. The splash screen will be there for a long time and may seem like it crashed, just let it go.

    10. After it completes, go to /assembly_kit/working_data/campaigns and find the startpos.esf file you output. The units should now be in there:
    Spoiler Alert, click show to read: 



    Anytime there is a startpos update or you want to add new units/change units, you can just make your changes to the pack file and then output a new startpos. Individual changes to units are also possible by editing the startpos in PFM or EditSF if its just smaller changes.


    Also note you can change the replenishment time, starting amount, total amount, etc in the pack file.


    ------------------------------


    Mercenary Group tables - Here is how Mercenary groups and pools work:
    - Each unit is assigned to a Mercenary group in the mercenary_unit_groups table. You can also change replenishment, etc. in this table.
    - Each Mercenary group is then assigned to a Mercenary pool in the mercenary_pool_to_groups_junctions table. These require ID numbers to be unique and also require a reference to the mercneary_pools table (each entry for a mercenary pool must have its ID key in that table)
    - Each Mercenary pool is assigned to a faction or province in either the faction_to_mercenary_set table or the province_to_mercenary_set_table.


    Note: This method can also be used to change other startpos aspects that normally aren't editable by the kit, such as starting unit sizes (set in main_units), garrisons, etc.
    Last edited by Dresden; May 06, 2018 at 05:48 PM.

    ----> Website -- Patreon -- Steam -- Forums -- Youtube -- Facebook <----

  2. #2

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    Great post, thanks for helping everyone out. Gonna try swapping a faction for the norman roster.
    If yer going to leave some rep be sure to leave your name so I can return the favor
    "I am Andrew Ryan, and I'm here to ask you a question; Is a man not entitled to the sweat of his brow? No! Says the man in Washington, it belongs to the poor. No! Says the man in the Vatican, It belongs to God. No! Says the Man in Moscow, It belongs to everyone. I rejected those answers, instead I choose something different... I chose the impossible... I choose.... Rapture. A city where the artist would not fear the censor, where the scientist would not be bound by petty moralities, where the great would not be constrained by the small. And with the sweat of your brow, Rapture can become your city as well..."
    "A MAN CHOOSES! A SLAVE OBEYS!"
    -Andrew Ryan

  3. #3

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    Huge thanks to Dresden for posting this very informative tutorial!

    I will post here some additional information. As we know the system has changed how the recruitment of the custom units in the campaign has to be modded.


    Language system

    The language system is the same as in Attila. Therefore the custom texts from modders will be only visible in game if the language is set to English. All other languages need again a language mod like the Unit Pack Compatibility Languages Project. Only then are the custom texts from modders visible for players who use other languages than English. Thrones of Britannia features 13 languages.

    I created the Unit Pack Compatibility Languages Project (UPC-TOB) for the community and it supports all available languages.
    http://www.twcenter.net/forums/showthread.php?782250

    All modders can download these base files and use it if they need it for their own mods to add custom texts regarding foreign languages. Also the UPC-TOB can be used to fix errors in the vanilla texts. I will include again as usual like in previous games any possible custom texts from several mods. All modders can fully use my UPC-TOB for their own needs and adapt it.


    Database tables

    These technology db tables are optional to define if a custom unit will be upgraded to another unit or if it requires a certain technology to be unlocked.

    technology_unit_upgrades
    unit_required_technology_junctions


    Compatibility problems regarding the startpos.esf

    Below are the big problems with this new recruiting system regarding the compatibility between mods.

    - The startpos.esf will be only loaded once a campaign has been started. If there are changes afterwards from Creative Assembly due to patches or by the modder itself, then a new campaign start is needed that changes of the startpos.esf apply in game.

    - Mods which have their own startpos.esf are incompatible to each other. If a player want to use several mods which have all an own custom startpos.esf, then they can only use one mod in the current campaign as only one startpos.esf will be loaded and they are incompatible to each other. And with each change they will have to start a new campaign, that the new added units or changes in the startpos.esf will be enabled.

    Of course all these incompatibility problems can't be solved at the moment and I posted this here just as additional information.

    Here is some additional information about all the faction_array numbers for each faction in the startpos.esf.

    C:\Program Files (x86)\Steam\steamapps\common\Total War Saga Thrones of Britannia\data\campaigns\vik_attila\startpos.esf

    compressed_data/campaign_env/campaign_model/world/faction_array/faction_array - */faction

    faction_array - * / faction
    Spoiler Alert, click show to read: 

    0 vik_fact_west_seaxe
    1 vik_fact_east_engle
    2 vik_fact_mierce
    3 vik_fact_gwined
    4 vik_fact_northymbre
    5 vik_fact_strat_clut
    6 vik_fact_circenn
    7 vik_fact_sudreyar
    8 vik_fact_mide
    9 vik_fact_dyflin
    10 vik_fact_cerneu
    11 vik_fact_dorsaete
    12 vik_fact_defena
    13 vik_fact_suth_seaxe
    14 vik_fact_cent
    15 vik_fact_east_seaxe
    16 vik_fact_steinnborg
    17 vik_fact_veidrborg
    18 vik_fact_grantebru
    19 vik_fact_bedeborg
    20 vik_fact_heimiliborg
    21 vik_fact_ledeborg
    22 vik_fact_hwicce
    23 vik_fact_gwent
    24 vik_fact_gliwissig
    25 vik_fact_brechinauc
    26 vik_fact_dyfet
    27 vik_fact_seisilwig
    28 vik_fact_powis
    29 vik_fact_djurby
    30 vik_fact_hellirborg
    31 vik_fact_hylrborg
    32 vik_fact_holdrness
    33 vik_fact_westmoringas
    34 vik_fact_northleode
    35 vik_fact_jorvik
    36 vik_fact_cumbra
    37 vik_fact_westernas
    38 vik_fact_athfochla
    39 vik_fact_airer_goidel
    40 vik_fact_fortriu
    41 vik_fact_orkneyar
    42 vik_fact_gallgoidel
    43 vik_fact_aileach
    44 vik_fact_ulaid
    45 vik_fact_airgialla
    46 vik_fact_breifne
    47 vik_fact_connacht
    48 vik_fact_brega
    49 vik_fact_laigin
    50 vik_fact_veisafjordr
    51 vik_fact_osraige
    52 vik_fact_vedrafjordr
    53 vik_fact_hlymrekr
    54 vik_fact_caisil
    55 vik_fact_tuadmuma
    56 vik_fact_iarmuma
    57 vik_fact_desmuma
    58 vik_fact_myrrborg
    59 vik_fact_separatists_circenn
    60 vik_fact_separatists_dyflin
    61 vik_fact_separatists_east_engle
    62 vik_fact_separatists_english
    63 vik_fact_separatists_gwined
    64 vik_fact_separatists_irish
    65 vik_fact_separatists_sudreyar
    66 vik_fact_separatists_mierce
    67 vik_fact_separatists_mide
    68 vik_fact_separatists_northymbre
    69 vik_fact_separatists_scottish
    70 vik_fact_separatists_strat_clut
    71 vik_fact_separatists_viking
    72 vik_fact_separatists_welsh
    73 vik_fact_separatists_west_seaxe
    74 vik_fact_dene
    75 vik_fact_dubgaill
    76 vik_fact_finngaill
    77 vik_fact_haeden
    78 vik_fact_normaunds
    79 vik_fact_norse
    80 vik_fact_nordmann
    81 vik_fact_wicing

  4. #4
    Radious's Avatar I came, I saw, I modded
    Join Date
    Mar 2009
    Location
    Czech Republic
    Posts
    11,083

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    Tutorial works great, but leads only to a thing that this TURD game has super outdated UI for recruitment tab which wont allow to add custom units cause it simply wont adapt for more units in recruitment screen..... Damn this game seriously.

    Winner of the 2011, 2012. 2014, 2015, 2016 and 2017 Modding Awards in Total War Shogun 2, Rome 2, Attila, Warhammer 1 and Warhammer 2.
    Follow us here - Team Radious




  5. #5

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    I´m starting a mod that requires twelve factions, each with a unique roster.
    How do i go about this? which tables do i need to edit? Do i need to create culture a culture/military group for each faction?

  6. #6

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    Only 2 small things - you dont need the province_to_mercenary_set_junctions, but you need ad first for working with kit the land_units table

  7. #7

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    I am sorry but you can help me how to add mercenary pool unit array for Langobard. I was stuck in creating it because Langobard dont have mercenary pool unit array

  8. #8

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    yes - for me is alltime the same, no mercenary pool unit array entry - the kit is not working right, you must edit it in PFM

  9. #9

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    Hey guys: You could be experiencing what I ran into when trying to build additional slot templates. The problem is that Asskit needs to actually have the database files in it, and also that asskit is bugged and doesn't move the files around correctly.

    How to export startpos in Thrones for these bugged areas of the startpos:
    1. Do your stuff in Asskit
    2. Export single tables, and export your stuff
    3. Open up raw data/EmpireDesignData Find the .xml files that coorespond to what you edited. If one is missing thats fine, just grab any that are here. Copy them. Go to raw data/EmpireDesignData/campaigns/vik_attila, and then press paste
    4. Open up working data, DB. Find the folders that coorespond to the tables you changed. Copy them same as before. Go back to raw data/EmpireDesignData/campaigns/vik_attila then paste the tables there.
    5. Open up mr. Bob In bob, DO NOT select the process start pos thing in working data. Instead go to raw data," database". Yes, database, not db or EmpireDesignData. Find the tables you edited, then check them off from the list, including the specific startpos tables. Now select the start pos and create pack like normal. Wait for it to process, Thrones takes an extra long time.

    This method is I believe only necessary for certain factions.

  10. #10

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    OK - Dresden is right, i do all the steps again and its working now!

    @ Dresden
    THX for that +rep

  11. #11

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    I want to give again huge thanks and +rep to Dresden for posting this very informative tutorial and for his recent help for my mod!

  12. #12
    ♔Greek Strategos♔'s Avatar THE BEARDED MACE
    Artifex Moderator Emeritus

    Join Date
    Feb 2008
    Location
    Athens, Greece
    Posts
    11,588

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    Quote Originally Posted by Swiss Halberdier View Post
    I want to give again huge thanks and +rep to Dresden for posting this very informative tutorial and for his recent help for my mod!
    Talking about helpful members and your name is still on my top 5 list Swiss

  13. #13

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    Quote Originally Posted by ♔Greek Strategos♔ View Post
    Talking about helpful members and your name is still on my top 5 list Swiss
    Thanks a lot Greek Strategos and you are also since a long time a very helpful member of this community!

  14. #14
    ♔Greek Strategos♔'s Avatar THE BEARDED MACE
    Artifex Moderator Emeritus

    Join Date
    Feb 2008
    Location
    Athens, Greece
    Posts
    11,588

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    Quote Originally Posted by Swiss Halberdier View Post
    Thanks a lot Greek Strategos and you are also since a long time a very helpful member of this community!
    Thank you very much for your kind words my friend!

  15. #15

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    This method is no longer working for me with this latest update. Might want to give it a try.

  16. #16

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    First of all again huge +rep to our modding mastermind Dresden that he shares so many times his big modding wisdom to us.

    Dresden is since years a cornerstone and true inspiration for all modders!


    Quote Originally Posted by tullyccro View Post
    This method is no longer working for me with this latest update. Might want to give it a try.
    Probably there is a problem in your main_units table while doing the whole process with an own created processing file, as in this table we could do the most errors. (oh yes I did it too... )

    Try my step by step tutorial and for me it worked.
    Spoiler Alert, click show to read: 

    1. launch TOB and deactivate all mods in the mod launcher screen

    2. check that no other custom "movie" type .pack files are in the TOB data folder. Normal custom mod files can be in this folder.

    C:\Program Files (x86)\Steam\steamapps\common\Total War Saga Thrones of Britannia\data

    3. create a file startpos_creation.pack file as "movie" type pack in the data folder

    In PFM > File > change pack type

    4. extract these vanilla tables from the vanilla data.pack and add them to the mod

    main_units (all vanilla content)
    mercenary_pool_to_groups_junctions (all vanilla content)
    mercenary_unit_groups (all vanilla content)

    These tables below are only needed if you create own specific custom mercenary pools:

    faction_to_mercenary_set_junctions
    mercenary_pools
    units_to_groupings_military_permissions

    5. don't change the vanilla database table names. don't remove or touch any vanilla rows in these tables.

    6. add all custom rows from your mod into these tables at the end of each table.

    mercenary_pool_to_groups_junctions (so it should look like all vanilla content + own content of your tables at the bottom)
    mercenary_unit_groups (so it should look like all vanilla content + own content of your tables at the bottom)

    7. open the main_units table

    Clone the vanilla entry "wel_valley_spearmen" (row number 437) so many times as you got rows in your mod.

    Then just copy/paste your real unit_IDs over the cloned ones in the first column "unit". Do the same with the column "unique_index" and copy/paste these numbers over the cloned ones in the related column.

    main_units (so it should look like all vanilla content + own special content at the bottom)

    8. start C:\Program Files (x86)\Steam\steamapps\common\Total War Saga Thrones of Britannia\assembly_kit\binaries\BOB.AssemblyKit.exe

    9. click in the middle screen "Working data" on "campaigns\vik_attila\startpos.esf" (only this file is activated)

    10. press the "Start" button and the tool processes the new startpos and launches TOB (it takes quite some minutes to finish)

    11. the changelog which appears afterwards should show all log entries in "green"

    12. press the "Exit" button

    13. the new processed file startpos.esf has been created in this folder

    C:\Program Files (x86)\Steam\steamapps\common\Total War Saga Thrones of Britannia\assembly_kit\working_data\campaigns\vik_attila


    14. remove the "movie" type file startpos_creation.pack from the data folder

    15. add the new startpos.esf to your mod


    Optional check:

    Check the related faction arrays in the startpos.esf if the units have been added

    COMPRESSED DATA - CAMPAIGN ENV - CAMPAIGN MODEL - WORLD - FACTION ARRAY - FACTION - FACTION MERCENARY POOL - MERCENARY POOL - MERCENARY POOL UNIT ARRAY

    I referenced the mercenary_unit_groups and mercenary_pool_to_groups_junctions to know what column/values are in this array.

    unit_ID
    starting initial unit count
    chance_to_replenish
    max_count
    max_replenish_per_turn
    max_count ? is always the same as max_count above
    is always 0
    unknown > must be an unique number in the mercenary pool unit array of the related faction
    no value
    no value
    no value
    unknown > must be an unique number in the mercenary pool unit array of the related faction

    These are the faction array numbers of the main playable factions.

    0 vik_fact_west_seaxe
    1 vik_fact_east_engle
    2 vik_fact_mierce
    3 vik_fact_gwined
    4 vik_fact_northymbre
    5 vik_fact_strat_clut
    6 vik_fact_circenn
    7 vik_fact_sudreyar
    8 vik_fact_mide
    9 vik_fact_dyflin

  17. #17

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    I think I found the issue on my end but still need to test. The Launcher is treating CA's Blood DLC as a movie file. Might try removing that and re-launching. Will post my results when I get to it.

  18. #18

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    Disregard. I have double-checked all tables, removed all movie packs, etc... I don't know if it's the new launcher or what but this method no longer works for me. Can anyone else confirm or deny?

  19. #19

    Default Re: [Tutorial] Creating & Editing Unit Recruitment

    @tullyccro
    I tried it again too and yes it doesn't work anymore. But I think the method itself isn't the problem. It's the new buggy launcher and sometimes it shows cryptic-written mods within the mod window even if all mods are disabled. As we know with this method it's mandatory to deactivate all mods within the launcher before starting the process.

    Did you try to revert back to the old launcher? I guess this can be done in the Steam Game options of TOB. Probably then it will work again until CA fixes the new launcher again.

  20. #20
    Malcolm's Avatar Miles
    Join Date
    Mar 2011
    Location
    Scotland
    Posts
    355

    Default Re: Creating & Editing Unit Recruitment

    **UPDATED POST**

    Hi all,

    So I'd really like to start a mod that brings back areas of recruitment and I figured that this place is the best place to find people who will have an idea of where to go. Thanks to this thread and others I started playing around and trying to get it to work but I am hitting some odd problems that hopefully someone knows where I'm going wrong.

    So the basic workflow:
    - I am trying to add a unit to the Circenn faction, but this unit should only be recruited in the Circenn region.
    - I picked an existing Irish unit (freemen spearmen) to add to the Circenn region.
    - I duplicated the unit in "main_units" and renamed the first entry "sco_freemen_spearmen" - everything else was kept the same as the original "iri_freemen_spearmen"
    - I added a new mercenary_pool called "circenn"
    - I added the unit to mercenary_unit_groups.
    - I added this new unit to mercenary_pool_to_group_junctions.
    - I set up the province for the pool in province_to_mercenary_set_junctions
    - I added the unit to vik_sco in the units_to_groupings_military_permissions table.

    At this point I went through and exported the tables (I was using assembly kit). I followed all the instuctions for the assembly kit, including pasting the correct files to the correct folders before running bob.

    Then I ran bob, created a new pack file containing all the edited files and a new startpos. Everythign came up green.

    But here is the problem. Now when I am in game as Circenn, Freemen Spearmen are now available in the province of Circenn - all good there. But they are also available in the other province of Monadh and oddly enough, there are two of them available in Monadh (pictures of that below)

    Spoiler Alert, click show to read: 
    Click image for larger version. 

Name:	pic1.jpg 
Views:	15 
Size:	616.1 KB 
ID:	359571 Click image for larger version. 

Name:	pic2.jpg 
Views:	12 
Size:	602.3 KB 
ID:	359572


    If anyone can see what has gone wrong here, please let me know. If you need any more info or screenshots, just ask and I can get some more uploaded.

    Thanks
    Attached Thumbnails Attached Thumbnails 20190922181533_1.jpg   20190922181544_1.jpg  
    Last edited by Malcolm; September 22, 2019 at 12:38 PM.

Page 1 of 2 12 LastLast

Posting Permissions

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