Results 1 to 12 of 12

Thread: Change Faction/Family Attributes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Change Faction/Family Attributes

    Hello,
    I am trying to modify the traits for the individual family/faction that you get when you choose the faction you want to play the campaign as. (ie +6 conversion for Julii, +15% morale against barbarian faction for Family traits and +2 recruitment slots for Romans for Faction traits) I see that Radious does this in his mods and I would like to try and modify one of the existing families(as a new faction isn't possible due to CA restrictions if I am correct) with different traits to focus more on what I as a player deem important. I have looked though most of the files in both the vinilla files(data,data2,local_en...) and the Radious ones I downloaded(ai and econ) and figured how to change the text for a file name but cannot find a tutorial or anything mentioning that anyone has asked about doing this. If someone could point me to the correct file that would be great.
    Thanks

  2. #2
    Foederatus
    Join Date
    Jan 2016
    Location
    Northern France
    Posts
    26

    Default Re: Change Faction/Family Attributes

    Hi!
    Indeed i don't know any tutorials on what you are searching for either, but i've already done some mods, so i'll try to explain you a bit how you can change that faction traits.
    There are two main faction traits : one that is applied to its faction group and an other one that is to its playable political party.

    For the first one you may need to check the following db tables : 1-"faction_groups_tables"
    2-"faction_to_faction_groups_tables"
    3-"effects_bundles_tables"
    4-"effects_bundles_to_effects_junctions_tables"

    If you wanna create a new faction trait then go to tables 1 and 3. For example you mod the Ardhan faction, then create in table 1 a "rom_faction_group_ardhan" (if the faction is for GC, if it is for HATG then you can set to "pun_faction_group_..."). If the faction is already playable no need to create a new one, just go to the faction group made by CA in data_rome2.pack's tables.
    You will see that each faction group is linked to an "effect bundle". If you just want to change the caracteristics of the effect then skip this otherwise to create a new one then go to table 3 and create (if i keep my previous example) a "rom_faction_trait_ardhan" effect_bundle.

    Then to give the proper effects go to table 4 and add whatever effects you want to the effect_bundle you created. There you can also find an already existing faction trait and change its effects. Once that's done return to table 1, link your new effect to the faction group and finally link the faction group to the correct faction in table 2.

    Hoping it helps you
    I'm there if you need more explainations.

  3. #3

    Default Re: Change Faction/Family Attributes

    Thanks for the response,
    Maybe I'm just being dumb but looking through those tables I cant seem to find where the actual attributes are changed, all I see is:
    Faction_group_tables- has the key(ie rom_faction_group_rome) the link to the faction trait and the UI icon
    faction_to_faction_groups_junctions_tables(assuming this is the correct table as it is the closes I see in data2.pack) has just the faction key for what looks like the faction and its civil war partner and the faction group keys for the two of them
    effects_bundles_tables has the trait list, their discriptions, in game name, ui icon and the bundle target(faction,province,agent)
    effects_bundles_to_effects_junctions_tables- has the bundle key effect key effect scope something called value and advancement stage
    First off these are the correct tables right? Theyre in rome2.pack. I do feel that they are because looking at the tables I feel like I'm seeing what I need but not getting it if that makes sense.

    I think I follow how in table 1 I would make a key in the first column and assign it to an effects bundle in the second column.
    Then I column 2 from table 1 becomes column 1 in table 3 it is here that I would add a description and in game title and UI icon and scope(in my case scope would be faction)
    I am not really sure what table 2 is used for except to maybe assign column 1 from table 1 to something else, as it looks like column 1 from table 1 is column 2 here and column one is maybe the actual faction names? so its taking cultural faction group traits and assigning them to individual nations maybe?
    And table 4 contains the faction traits defined in table 3 but as to the rest of the table what does what? I understand the effect scope and advancement stage seems consistent but the effect key (column 2) and the value(column 4) I am unsure to their purpose but value seems like it might be what I'm missing but the numbers seem random, are they numerical values to effects defined elsewhere?

    Sorry if it rambled I am trying to make all the connections between the different tables.
    Thanks

  4. #4
    Foederatus
    Join Date
    Jan 2016
    Location
    Northern France
    Posts
    26

    Default Re: Change Faction/Family Attributes

    Firstly : yes those are the right tables
    I just forgot the "junctions_tables" at the end of table 2. Actually a faction group is what the game uses when a faction is playble to make it available on the campaign selection screen (where you can see some faction traits, usually 2, given by this faction group). A faction group should be set to ONLY one faction otherwise i think it would crash.

    To be more precise : column 1 of table 2 is the actual faction name. If i take again my last example it would be rom_ardhan. Second column is the faction group, aka column 1 of table 1. In the table 2, the second column is the effect set in the 3rd table 1st column. All right?

    Then is this third table there are three other columns. Localised description and title are of no use (they are used by the Assembly kit but assuming we work with the Pfm...). Just put a "x" in each of those lines. Now the icon is the image linked to your effect that will be shown in the Politics screen in Campaign. I suggest you to use already done vanilla models. They are located in data.rome2, ui, campaign ui, effect bundles. Finally last column must always be "faction" in our case if we want the game to apply the traits correctly to the faction.

    Now for the last table : each "effect_bundle" you or CA have created is link there to its actual effects. First column is the effect name, aka column 1 table 3. The column 2 corresponds to the effects. There you tell the game what applies to a faction that get the effect bundle. There are many already done effects, to which correspond a unique effect key. For example "pun_faction_trait_arevaci_horsemanship" is the trait that gives to the Arevaci faction the 20% less cav recruitment costs. So next column "effect_scope" is to what extend the unique effect key applies. With my example that is "in_all_your_provinces_unseen" which means the cav costs applies to every in game region you own. Then value is -20 which is our 20% off.
    And "start_turn_completed" in last column means that the effect applies since you start your campaign. Almost every effects are set like that.

    One last thing you seemed to be interested in : if you wanna add a name to your effect, then open your local_en.pack. There go to "text", db, effects_bundles.loc. You will see there all effects names.
    So you will be able to add that text to a new pack and add to it whatever trait name you want.
    In same section you'll see faction_groups.loc which speaks for himself.

    I hope i've helped a little more
    I know what you may feel, it seems very difficult to learn at the beginning but after some practice it becomes kind of automatism lol. I remember i didn't know TWC when i first modded two years ago and learnt everything on Db working by checking various mods to see how they managed to do what i wanted to, but it was really a harsh time...

  5. #5

    Default Re: Change Faction/Family Attributes

    Ok so let me see if I have the process correct: (Say I am trying to add a trait similar to the Spartan one for increased ranks upon recruitment to the Roman faction as a whole)
    So if I want to add a faction trait to an existing faction I can bypass table 1, as I will be assigning a new trait to an already existing group so no need to create a new group.
    I can also skip over table 3 as the faction is already playable.
    Theoretically I can go straight to table 4 and add the line:
    effect_bundle_key: rom_faction_trait_rome
    effect_key: rom_faction_trait_greek_sparta_spartiate
    effect_scope: in_all_your_provinces_unseen
    give it a value and start_turn_completed
    however while this causes said trait to appear on the faction selection screen for rome (the one seen when starting a new GC) it has no effect. I assume this is because it is specific to spartan units. So unless I made a mistake here I need to create a effect_key but where are the effects keys defined?
    Thank you for your continued help

  6. #6
    Foederatus
    Join Date
    Jan 2016
    Location
    Northern France
    Posts
    26

    Default Re: Change Faction/Family Attributes

    Yeah you're all right with that process. I could try to explain you how to create new effects but really i never did it, seems to be a bit complicated... If on the GC selection screen you see the icon of your trait but with no text then don't worry that's only an ui bug caused by CA's vanilla game files. You should be able to see it in politics while playing your campaign. Anyway you could also find a useless trait of rome and replace it by that spartan one so there would not be ui bugs.

  7. #7

    Default Re: Change Faction/Family Attributes

    Well so my problem currently is that I was able to add a new line to table 4 (effects_..._junctions) and fill the rest of the line similarly to how the original Greek trait is (ie the last post I did) and this causes the attribute to appear in the correct spot in the selection window, however once the actual campaign starts it doesn't seem to make a difference, there is no XP applied to new roman recruits which leads me to think that maybe it is tied to Greek culture units. The only other file that I have found so far that mentions the effect_key in question is the effects table which looks like its only talking about pictures for the trait, as the files referenced are all of .png format. It also crashed PFM when I tried to add a new line. But currently there is no UI bug as the trait already existed. I am currently unaware of(probably my own misunderstanding) where a new trait gets its "power" so to speak, where what it does in game is defined. I think (possibly incorrectly) that these tables are just assigning existing traits to different groups that then distribute those groups to the correct nations.

  8. #8
    Foederatus
    Join Date
    Jan 2016
    Location
    Northern France
    Posts
    26

    Default Re: Change Faction/Family Attributes

    And yes the effects themselves are defined elsewhere but that is more complicated and i don't how to create new ones yet I only know how to create an effect for cultural conversion (temples).

  9. #9
    Foederatus
    Join Date
    Jan 2016
    Location
    Northern France
    Posts
    26

    Default Re: Change Faction/Family Attributes

    Sorry for answering that late but about your last sentence yep you're right. Each faction is assigned to a specific group that give it its effects. Sometimes a faction group is used for multiple factions giving general traits while the more caracteristic ones are assigned to the ruling political party.
    Anyway about your trait not working if you're talking about the trait Sparta has, that gives its infantry 3xp ranks then that's normal it doesn't work for Rome, it is only for Spartan units (Gre_Spartan_hoplites and so on). For example if you give that cavalry costs reduction trait i talked about previously to Rome it should work as it target every cav units of the game.

  10. #10

    Default Re: Change Faction/Family Attributes

    No worries.
    And darn... If I could find where the the thing is specifically defined then maybe I can remove the greek condition. Might make sparta a little more powerful but they keep dying so maybe thats not a bad thing. Thanks for the help.

  11. #11
    Foederatus
    Join Date
    Jan 2016
    Location
    Northern France
    Posts
    26

    Default Re: Change Faction/Family Attributes

    You're welcome.
    And if eventually you manage to find out how to create a brand new effect i'd be glad to know how to do it too

  12. #12

    Default Re: Change Faction/Family Attributes

    Hi i'm trying to add the





    rom_building_gdp_subsistence_faction_capital_hidden


    to syracuse in the effect bundle to effects junctions table. I have done this successfully fov every faction i've tried up to this point but cannot get it to work for syracuse. Do you happen to know why?
















    gaul_faction_trait_rome rom_building_gdp_subsistence_faction_capital_hidden this_faction 12000 start_turn_completed
    rom_faction_trait_syracuse rom_building_gdp_subsistence_faction_capital_hidden this_faction 5000 start_turn_completed


    This is an example straight from my mod file. the entry for rome works the one for syracuse does not. I have also tried rom_faction_trait_greek_syracuse but this still makes no difference.

    Do you have any ideas?

Posting Permissions

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