Results 1 to 11 of 11

Thread: How to make any faction playable - quick and comfortable way [All campaigns]

  1. #1

    Default How to make any faction playable - quick and comfortable way [All campaigns]

    Hi
    Exist some tutorials how to make other factions playable in Shogun 2 campaign, but their way isn't very comfortable. This is for reason that they basically based on "switching" factions keys (playable with no-playable) in all places in db and startpos (and also in scripts). Sounds like much work, right? Especially if do you want create overhaul mod with larger amount of playable factions than in vanilla.

    So I decided to write this tutorial where I will show better way (which I used for my Last Alliance project). Here you also need switching faction keys but in one place - ui file and you don't have to use factions keys from vanilla. This way works for Sengoku campaign, for RotS and FotS you need do additional steps - informations in comment below.

    Update: I wrote tutorial about adding new faction buttons to menu of new campaign - is here, but you should read this tutorial first.

    What you need:
    - Assembly Kit for Shogun 2 (you can also use esf editor to do it, but in this tutorial I use Assembly Kit)
    - Assembly Kit's Update Pack 1.2 (unofficial patch for Assembly Kit, necessary if you want to edit vanilla campaign, but recommended also if you work on fully new campaign)
    - UI converter by TAW (it needs Python to work)
    - Notepad++ or something like it
    - And of course RPFM or PFM

    I hope that you have basic knowledge about use Assembly Kit and RPFM or PFM, if not you should go to other tutorials first to learn it

    Important note: Key of one playable faction can't be fully included in key of another playable faction. It causes bug, where button of one faction is showing another faction. So, if you give keys for your factions e.g. kingdom1 and kingdom1_vassal and set both as playable, it can cause problems. You have to give them names e.g. kingdom1_main and kingdom1_vassal.

    Go to binaries folder in Assembly Kit and run TWeak.Release, in left top side click Tools and select DAVE. Next click View and open Table Launcher.

    Find start_pos_factions and open. Find faction which do you want make playable (here it is Saito Clan) and in column "playable" change "false" to "true" and apply changes.


    Optional. If you want have right faction name under faction button in faction selection menu (not applicable to the name of the faction above the faction description) then go to ui_component_localisation, add new record and create new key in component_label column and write faction name in localised_string column. And apply changes.


    Now you can close TWeak and run BOB. In BOB in raw_data column go to EmpireDesignData -> campaigns -> jap_shogun and click box beside jap_shogun and select all. Next you can click start (but before make sure that you have run steam). BOB will run Shogun 2 launcher, if faction is from your mod, then you have to select mod pack of your mod before launch game (but if you create mod with new factions in campaign then probably you know it). When you launch game, BOB will create startpos file and will close game automatically.


    If you edit ui_component_localisation, then in BOB select raw_data column -> EmpireDesignData -> ui_component_localisation and run export proces.

    Exported files you will find in working_data folder of Assembly kit, startpos file will be in campaigns\jap_shogun folder, ui_component_localisation will be in text folder. Add both to your mod pack (use RPFM or PFM to it).
    If you want to play this faction in multiplayer campaign, you not have do to more.


    Next use RPFM of PFM to open vanilla data.pack and go to ui -> frontend ui and here you will find grand_campaign_japan file - extract it.


    Now you have to use ui_converter, it the best to put folder with it on your desktop and put in the same folder grand_campaign_japan file. Next hold shift and right click somewhere inside of this folder and open command window. In command window write this code:
    Code:
    Python convert_ui.py -u grand_campaign_japan grand_campaign_japan.xml
    and click enter.


    You will receive new xml file, open it in notepad++ (or in other text editor). Here you can change one faction button to another faction button. For example I will change Hojo button to Saito button. So you have to search all button_[faction key which you want hide] and edit it to button_[faction key which you want add to menu].




    In this file you will find links to tga button file - you can change it to your button tga files (of course you have to prepare them manually).


    You will find also <stateText>[faction name]</stateText> - you can edit it to new playable faction name, and under it you will find localisationID - here write key from ui_component_localisation.


    Save changes and back to command window and write code:
    Code:
    Python convert_ui.py -x grand_campaign_japan.xml grand_campaign_japan
    You will receive new grand_campaign_japan file, add it to your mod pack.


    Now you have playable Saito in singleplayer campaign ^^ (I didn't add new button, because I'm lazy >.<)


    I hope that this tutorial will be useful for someone and that all is clean (I'm not good teacher...) - this process is really easy and enough quickly
    Last edited by Sara Temer; July 12, 2021 at 09:25 AM.
    Wolf girl who likes to draw anime girls ❤️ DeviantArt, Twitter
    Also mad creator of

    One Ring to rule them all, One Ring to find them,

    One Ring to bring them all, and in the darkness bind them,
    TWCenter Forum, MODDB, Patreon

  2. #2

    Default Re: How to make any faction playable - quick and comfortable way [Sengoku campaign]

    If someone want to make faction playable via edition of startpos.esf file then you have list what you need to change (I hope that I not missed something):

    Spoiler Alert, click show to read: 
    startpos.esf/campaign_startpos/compressed_data/campaign_env/campaign_model/world/faction_array


    startpos.esf/campaign_startpos/compressed_data/campaign_preopen_map_info/faction_infos


    startpos.esf/campaign_startpos/compressed_data/campaign_preopen_map_info/campaign_players_setup/players_array


    startpos.esf/campaign_startpos/campaign_preopen_map_info/faction_infos


    startpos.esf/campaign_startpos/campaign_preopen_map_info/campaign_players_setup/players_array
    Wolf girl who likes to draw anime girls ❤️ DeviantArt, Twitter
    Also mad creator of

    One Ring to rule them all, One Ring to find them,

    One Ring to bring them all, and in the darkness bind them,
    TWCenter Forum, MODDB, Patreon

  3. #3

    Default Re: How to make any faction playable - quick and comfortable way [All campaigns]

    Update: How to make any faction playable for Fall of the Samurai and Rise of the Samurai campaign (I tested it only for FotS but for RotS also should work):

    Like for Sengoku campaign - switch chosen faction in startpos to playable and generate startpos (or manually edit startpos.esf for RotS or FotS campaign).

    But in pack file manager put new startpos file not in campaigns/jap_gempei or jap_boshin but in campaigns/jap_shogun (and add here also scripting.lua file from RotS or FotS campaign):


    Next like above edit grand_campaign_japan ui file and change faction keys from sengoku campaign to faction which you want to make playable. Next add edited ui file to your mod pack.

    When you run mod you should can select your new playable faction in sengoku campaign main menu.

    Imporant notes in FotS case:
    - Faction which you want make playable can't use "bos" prefix in faction key. So, if your faction use this prefix, you need to change it. Problem probably is not for RotS factions.
    - Of course you need to have vanilla Shogun 2 and FotS expansion, if you have only FotS, it will not work.

    Because I mostly modding sengoku campaign, then I didn't test this too much. If you will find bugs, let me know.
    Last edited by Sara Temer; September 27, 2020 at 08:33 AM.
    Wolf girl who likes to draw anime girls ❤️ DeviantArt, Twitter
    Also mad creator of

    One Ring to rule them all, One Ring to find them,

    One Ring to bring them all, and in the darkness bind them,
    TWCenter Forum, MODDB, Patreon

  4. #4

    Default Re: How to make any faction playable - quick and comfortable way [All campaigns]

    This looks like a really great guide and really comprehensive! However, I'm currently having a problem on the processing step in BOB.

    It successfully processes the ui localization files but when it comes to startpos.esf, it just refuses to process it giving this error:

    "Failed to save startpos.esf in c:/modding tools/working_data/campaigns/jap_shogun/!
    =====================================
    Duration: 1 min(s)"

    I've attempted to look up the issue online before asking for help but turns out that nobody has found a working solution. Well, there was one that suggested ticked mods in the launcher were conflicting with the startpos file as the game launched. However, I've deleted all of my downloaded mods and it still fails.

    SOS

  5. #5

    Default Re: How to make any faction playable - quick and comfortable way [All campaigns]

    Your mod change only playable factions or adding something more? If second option then you have to select your mod pack when BOB run mod manager

    EDIT. Oh, or try go to your modding folder/binaries and check whether in game_path.txt is your Shogun 2 localisation (if not, then edit file, save and run BOB again)
    Last edited by Sara Temer; October 04, 2020 at 06:53 AM.
    Wolf girl who likes to draw anime girls ❤️ DeviantArt, Twitter
    Also mad creator of

    One Ring to rule them all, One Ring to find them,

    One Ring to bring them all, and in the darkness bind them,
    TWCenter Forum, MODDB, Patreon

  6. #6

    Default Re: How to make any faction playable - quick and comfortable way [All campaigns]

    Oop, nevermind: I got it to work last night. I think it was a typo or something because I retried the steps from scratch and it processed correctly. Thanks anyhow!

  7. #7

    Default Re: How to make any faction playable - quick and comfortable way [All campaigns]

    New resource in progress, I increased amount of playable factions in singleplayer campaign to 15 and I want to add more, but I have to edit rest of UI here
    Wolf girl who likes to draw anime girls ❤️ DeviantArt, Twitter
    Also mad creator of

    One Ring to rule them all, One Ring to find them,

    One Ring to bring them all, and in the darkness bind them,
    TWCenter Forum, MODDB, Patreon

  8. #8

    Default Re: How to make any faction playable - quick and comfortable way [All campaigns]

    Progress of work, 25 factions playable:
    Wolf girl who likes to draw anime girls ❤️ DeviantArt, Twitter
    Also mad creator of

    One Ring to rule them all, One Ring to find them,

    One Ring to bring them all, and in the darkness bind them,
    TWCenter Forum, MODDB, Patreon

  9. #9

    Default Re: How to make any faction playable - quick and comfortable way [All campaigns]

    Updated first post - I added important note
    Wolf girl who likes to draw anime girls ❤️ DeviantArt, Twitter
    Also mad creator of

    One Ring to rule them all, One Ring to find them,

    One Ring to bring them all, and in the darkness bind them,
    TWCenter Forum, MODDB, Patreon

  10. #10

    Default Re: How to make any faction playable - quick and comfortable way [All campaigns]

    Hi Sara, I'm using your "All factions playable" mod and unfortunately it conflicts with "12 moves per year".
    May I ask you to combine these mods?
    Sorry for mistakes, I used Google translator

  11. #11
    Tiro
    Join Date
    Jan 2011
    Location
    http://gh.ffshrine.org?r=192330
    Posts
    267

    Default Re: How to make any faction playable - quick and comfortable way [All campaigns]

    I hit a snag trying to convert the grand_campaign file. Installed pythin and followed all the steps



Posting Permissions

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