Results 1 to 4 of 4

Thread: How to create or modify general and agent skilltrees

  1. #1

    Default How to create or modify general and agent skilltrees

    This tutorial will go through the process of modifying or creating a brand new skill tree for generals or agents.

    You will need:


    • PFM editor


    • A basic knowledge of how to edit the database. Feel free to ask me in this thread if I skipped a step you need explained better.


    And I recommend:


    • A spreadsheat editor if you plan on making a completely new skill tree. OpenOffice Calc is free and works like a charm.


    • That you delete all the lines in the database that you don't change, to keep the mod clean and avoid confilcts with other mods or updates to the game. If your mod is for the original campaign, start by removing all boshin and gempei lines, for example.


    • Start out with something simple, don't try to do an entire skill-tree in the first go. Aim to either modify, change the position or add a single new skill. Once you are more familiar with the interactions of all the tables, you can go on to more complex mods.
    • Keep all tags in the database lowercase, it makes it easier when moving on to text and icons.


    STEP ONE - grabbing what we need and creating our mod:

    First off, we open the latest patch in PFM, and extract the database elements.
    Then we open the data.pack in PFM and extract the icons
    Then we open the lokal_en.pack and extract the text element

    Then we create a new mod, and add all the extracted elements.


    Your mod should now look like this:

    Spoiler Alert, click show to read: 


    Last step before we continue is to rename all the database elements not the folder, but the lines with - "version" after them, and the text element by adding a prefix. For example I use vragos_ so it becomes vragos_character_experience_tiers.


    I havn't done it on the rest of the pictures, but have a look in the example I attached if you are in doubt. It is
    very important that you rename the text element - but do it for the database elements too.

    STEP TWO - So what is all this?
    There are three main things we need to keep seperated in our minds. They are the skill ID
    , the skill node and the skill effect.

    If you want to make it easy on yourself, you do as CA did in the original campaign, and keep the same name for
    skill ID and skill effect. The game has no problem with this, and you avoid some confusion. For skill nodes I simply add a _node_ in the middle of the name.

    Let's have a look at the character_skill_node_sets table first to get our bearings.
    This tables links our agents to a
    skill type ID. Our main problem here, is our inability to actually delete entries from the original campaign. I recommend leaving this table unchanged, and you can delete it. It really just shows the link between the Agent and theskill type ID that we will encounter later.
    Spoiler Alert, click show to read: 


    Next up is the
    character_experience_skill_tiers tables.
    This table determines how much XP our general or agent needs for each level
    and how many points they get at each level. If you simply want a mod that changes that, this is the only table you need.
    If there is no text in the campaign column it means it is for the original Shogun 2 campaign.
    We don't want to add anything here, but only adjust the skillpoints or the XP required to fit your needs.

    Spoiler Alert, click show to read: 


    STEP 3 - Actually fiddeling with the skills

    We start with the character_skills table.

    This table connects the
    skill ID to a skill effect. The description and name columns don't actually do anything, just leave a word or letter there. The actual names and descriptions that appear in the game we will edit later in the text table.
    This is where you add a line with your own
    skill ID and skill effect if you want to add new skills.

    Spoiler Alert, click show to read: 


    The next table we look at is the character_skill_nodes table.
    This table connects skill effect to a skill node. A skill node is essentially what get's translated into the thing we click in the game.
    If you added a new
    skill effect in the character_skills table then you need to create a new skill node for it here.
    The horisontal position column is where the actual icon will show up in the game. 0 is all the way to the left, 50 is all the way to the right. I usually stay between 4 and 48.
    The tier column is the vertical position, also indicating at what level the agent unlocks the skill. 0 is the top of the screen, and the first level up. 4 is the bottom of the screen and lvl 6.
    If you just want a mod that changes the tiers of skills this is the only table you need. For example you can move Poet or Ambush to tier 0 to make it available the first time a general levels up.


    Spoiler Alert, click show to read: 


    So, now we got our effect, and our node.

    There is just one more step before we can do the first test of our mod. That is adding a list of effects for each point we put into a skill in the game. Don't try to test your mod before doing this, the game will crash if there is a
    skill effect without a corresponding list of effect to apply when selected.

    We go to general_character_skill_level_to_effects_junctions tables for this purpose.
    This table is has the
    skill effect in the first column followed by an effect IDref. The third column is how many points has been put into the skill, and the fourth is the magnitude of the effect IDref.

    If you just want to add effects to
    existing
    skill effects or modify the magnitude of them, this is the only table you need.

    If you added a new
    skill effect in the previous tables, you will need to hook it up with effect IDrefs here. Remember to add a line for each skill point you want to be able to put into the skill. For example, if you want night battles unlocked at 1, 2 and 3 points in Ambush, you need to have three lines with it here, one for each skill point.
    Spoiler Alert, click show to read: 


    STEP 4 - test it
    We are now ready to test the mod. If you added new skills, they should show up with a default icon and no text or description.

    STEP 5 - Text and Icons

    For the skill text, we go to the text - db - character_skills.loc table.
    Delete everything you don't need, and just keep a set of lines with _name and _description for each of the new skills you added. Change the tag to yours, and add a name and a description.
    Be aware, that it is the
    skill effect tag you need here, not the skill ID.

    Spoiler Alert, click show to read: 

    To add icons to new skills, simply rename them to the skill effect.tga
    It is as with the text, not your skill ID that is used here.

    That's it. All done. Happy modding.
    Last edited by Vragos; July 30, 2012 at 03:22 PM.

  2. #2

    Default Re: How to create or modify general and agent skilltrees

    Well done, excellent tutorial! Could I dare you to do one for techs?

  3. #3

    Default Re: How to create or modify general and agent skilltrees

    Quote Originally Posted by Livebyte View Post
    Well done, excellent tutorial! Could I dare you to do one for techs?
    Sure, it is more or less the same principles - and it is one of the places I havn't touched up on in my campaign lately.

    I'll fiddle with it, and add a couple of new techs - I got a few in mind that I feel are missing. Once that is done, I should have everything fresh in mind, and it won't take long to make a tutorial.

    I hope to be able to do it in a weeks time or so.

  4. #4
    AngryTitusPullo's Avatar Comes Limitis
    Join Date
    Jan 2006
    Location
    Kuala Lumpur
    Posts
    13,018

    Default Re: How to create or modify general and agent skilltrees

    So if I just wanted to add skill pints in vanilla Shogun 2 I just need to edit character_experience_skill_tiers file ? Is it the same name using Tweak ? What's the best points to use so that each general/agents all the points needed for a single tree ?


    CIVITATVS CVM AVGVSTVS XVI, MMVI
    IN PATROCINIVM SVB Dromikaites SVB MareNostrum SVB Quintus Maximus
    Want to know more about Rome II Total Realism ? Follow us on Twitter & Facebook

Tags for this Thread

Posting Permissions

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