Results 1 to 2 of 2

Thread: Faction Unlocker Tutorial

  1. #1

    Default Faction Unlocker Tutorial

    This is NOT my tutorial, it is copied here from a post by Cyclone Jack so that it's easier for people to find.
    This tutorial is working as of 31 January 2017

    Since I am working on a Crooked Moon Goblins mod, I am using the Crooked Moon faction in the examples below (I typed this up a while back). You can use the same steps to enable any other faction you want, just make the appropriate changes. You'll need to install the TW:WH Assembly Kit (in Steam), the inside there go Tools -> DAVE, View -> Table Launcher. Search for, and modify, the following tables.

    start_pos_factions


    • Set the search filter to “moon” to show only the Crooked Moon entries.
    • Set playable = true
    • Set is_major = true
    • Fill in your desired description and long_description
    • Apply and Close



    effect_bundles


    • Add Record
    • Set your key entry using a similar format of other keys.
    • Set your localized_title, localized_description entries as you see fit.
    • Copy and paste the remaining entries from any other Lord.
    • Apply and Close



    faction_groups


    • Add Record
    • Set your key entry using a similar format of other keys.
    • Copy and paste the remaining entries from the primary faction. In this case, I would copy from the wh_main_fact_group_greenskins line and add it to my own.
    • Set the order to a number that is not already taken. I set mine to 7.
    • Apply and Close



    frontend_factions


    • Add Record
    • Select your faction from the drop down. You can type in a partial name, like “moon” to filter the list.
    • Set your localized_mechanics, localized_playstyle entries as you see fit.
    • Copy and paste the video field from your parent faction (eg: greenskins).
    • Apply and Close



    faction_to_faction_groups_junctions


    • Set the search filter to “moon” to show only the Crooked Moon entries.
    • Change the faction_group_key to your new faction. You can type in a partial name, like “moon” to filter the list.
    • Apply and Close



    frontend_faction_top_units


    • Add Record x 3
    • In the first column, set the faction to your new faction.
    • In the second column, select one of the 3 units you want to be shown on the main faction selection screen. You can type in key words to filter the list, like "arach" for the Arachnarok, or "doom" for the Doom Divers. With entries like wolf_riders_0 and _1, the 0 is usually the melee unit and the 1 is usually the ranged unit. If you are unsure, you can look in the land_units table to see which is which.
    • Apply and Close



    political_parties


    • Add Record x 2
    • In the first entry, set the key to your faction_ruler, using a similar format as the other entries. In the second entry, set the key to your faction_separatist_council.
    • Copy and paste the remaining entries from similar entries from your parent faction. For example, I used the greenskins_ruler and greenskins_separatist_council entries.
    • Apply and Close



    frontend_faction_leaders


    • Add Record
    • Set your key to match your faction_ruler, similar to the other entries.
    • Set the localized_description, localized_actions_points, and loading_screen_text as you see fit.
    • Copy and paste the remaining entries from another lord of your faction.
    • Delete the prelude_battle entry, unless you want the Enable Prelude Battle option to show up on your leader selection in-game.
    • Apply and Close



    political_parties_frontend_leaders_junctions


    • Add Record
    • Set both to your new faction. You can type in a partial name, like “moon” to filter the list.
    • Apply and Close



    battle_siege_vehicle_permissions


    • Add Records x 2
    • For the vehicle, set one to your parent faction’s battering_ram and the other to their siege_tower. You can filter the list by typing in the 3 letter code for your parent faction, such as grn for greenskins.
    • For the faction, choose your new faction.
    • Apply and Close



    campaign_mp_coop_groups_to_factions


    • Add Record
    • Add your faction, and set the mp_coop_group to wh_main_coop. (I believe this enables the faction to be used in co-op)
    • Apply and Close



    faction_political_parties_junctions


    • Add Record x 2
    • For the faction, choose your new faction.
    • For the political_party_key, set one entry to your faction’s ruler and the other to your faction’s separatist_council.
    • Apply and Close



    frontend_faction_groups_to_factions



    • Set the faction_key to your new faction
    • Choose Order or Destruction for your faction_group
    • Set your sort_order (this is the position it will take on the faction picker screen, it can & will displace other factions)
    • Set is_major_faction to true


    start_pos_starting_general_options


    • Add Record
    • Note the new id, this will be used later.
    • For the general and replaces_general fields, choose your general. You can type in the name, like “sour” to filter the search.
    • Set turns_locked = 10
    • Set precedence = 0
    • Set frontend_faction_leader to your new faction_ruler.
    • Set effect_bundle to your lord’s effect. You can type in the name, like “sour” to filter the search.
    • Set ui_tooltip_lock_reason = placeholder
    • Apply and Close



    start_pos_land_units


    • Set the filter for <general> and type in your faction’s lord to only show their starting units.
    • You may change the unit_type here.
    • Apply and Close



    start_pos_characters


    • Set the filter for <name> and type in your faction’s lord to show only their entry.
    • Set unique = True
    • Apply and Close



    start_pos_starting_general_option_additional_units


    • Add Record x 3
    • In the general field, select your general’s id number, noted from start_pos_starting_general_options.
    • In the unit field(s), select the additional units you wish your general to start with.
    • I did 3 additional units, but I believe you can add more.
    • Apply and Close



    Note: If BOB crashes during the compile, remove the changes to start_pos_starting_general_option_additional_units and then try it. If it then compiles, copy the mod into your TW dir, enable the mod, launch the game, exit, then add the changes back to start_pos_starting_general_option_additional_units. I noticed this peculiar behavior and made note of it.

    Second Note: I made this list before the latest DLC, so there may be some very minor changes, but TWEAK should let you know of them, and then you can look at the other entries to see what you need to put in the added field(s).



    Now use PFM (http://www.twcenter.net/forums/showthread.php?730823-PFM-4-1-2-Warhammer-support) to open the data.pak.
    (Select the entry, right click -> Extract Selected)
    Extract \ui\flags\wh_main_grn_greenskins

    You'll want to make a
    \Total War WARHAMMER\assembly_kit\working_data\ui\flags\wh_main_grn_crooked_moon folder and copy the newly extracted mon_64_glow.png into that folder. That will fix the yellow box around your faction selection icon when selected, and add the new Map image on the General Selection Screen.

    This was added with the Beastmen patch:
    Extract
    \ui\frontend ui\startpos_maps

    You'll want to make a \Total War WARHAMMER\assembly_kit\working_data\ui\frontend ui\startpos_maps folder and copy the newly extracted wh_main_grn_greenskins.png into that folder and rename it to the name you use for your frontend_factions entry. That will fix the new Map image on the General Selection Screen.

    At this point, you should be able to Export -> Export Changes to Binary and then use BOB to compile the mod, which will be in your \Total War WARHAMMER\assembly_kit\retail\data folder. Copy this into your \Total War WARHAMMER folder. You might need to rename this file (my TW deleted any mod named mod.pack when I launch it).

    In BOB you only have to select "campaigns" from the center column. A popup window will appear, in the top box select
    Campaign / Process start pos (main_warhammer).(If you mod affects other campaigns you will need to select them) In the bottom box select Pack / Create pack file (mod.pack) then click "Start" in the bottom right hand corner.

  2. #2
    Frunk's Avatar Form Follows Function
    took an arrow to the knee

    Join Date
    Jun 2009
    Location
    Gold Coast
    Posts
    6,503

    Default Re: Faction Unlocker Tutorial

    Thread moved from DB Editing & Scripting, to Tools, Tutorials and Resources.

    Cyclone Jack's original post can be found here.

Posting Permissions

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