Changing Faction Relation

正在查看此主题的用户

So I've been searching all over the forum and picked up some of the unofficial tweaking programs and I can't find something I was hoping existed.  I have a problem in my game where I joined a faction as a mercenary and have racked up a really good faction relation.  I now wish to become a lord, but when you do that it resets your faction relation to 12.  So I'm hoping someone can tell me where that number is so I can change the starting faction relation to what my current relation is just so when I join up I won't lose any points.  It seems a bit silly that you get well liked by these people then when you say your giving them your oath that they like you less.

Anything will be helpful.
 
There is a script that set your maximum relation with the faction you join at 12... dunno why. :???:

Anyway, the code is here, file module_script.py:
插入代码块:
  ("player_join_faction",
    [
      (store_script_param, ":faction_no", 1),
      (assign,"$players_kingdom",":faction_no"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_ai_state, sfai_default),
##      (try_for_range, ":kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end),
##        (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
##        (eq, ":kingdom_hero_faction", "fac_player_supporters_faction"),
##        (call_script, "script_change_troop_faction", ":kingdom_hero", ":faction_no"),
##      (try_end),
      (assign, "$players_oath_renounced_against_kingdom", 0),
      (assign, "$players_oath_renounced_given_center", 0),
      (assign, "$players_oath_renounced_begin_time", 0),
      (try_for_range,":other_kingdom",kingdoms_begin,kingdoms_end),
        (faction_slot_eq, ":other_kingdom", slot_faction_state, sfs_active),
        (neq, ":other_kingdom", "fac_player_supporters_faction"),
        (try_begin),
          (neq, ":other_kingdom", ":faction_no"),
          (store_relation, ":other_kingdom_reln", ":other_kingdom", ":faction_no"),
        (else_try),
          (store_relation, ":other_kingdom_reln", "fac_player_supporters_faction", ":other_kingdom"),
          (val_max, ":other_kingdom_reln", 12),
        (try_end),
        (call_script, "script_set_player_relation_with_faction", ":other_kingdom", ":other_kingdom_reln"),
      (try_end),
To remove the limit of 12, you can simply comment out the last 12 lines (both 12 are just a coincidence :grin:). So finally you get:
插入代码块:
  ("player_join_faction",
    [
      (store_script_param, ":faction_no", 1),
      (assign,"$players_kingdom",":faction_no"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_ai_state, sfai_default),
##      (try_for_range, ":kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end),
##        (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
##        (eq, ":kingdom_hero_faction", "fac_player_supporters_faction"),
##        (call_script, "script_change_troop_faction", ":kingdom_hero", ":faction_no"),
##      (try_end),
      (assign, "$players_oath_renounced_against_kingdom", 0),
      (assign, "$players_oath_renounced_given_center", 0),
      (assign, "$players_oath_renounced_begin_time", 0),

Try that and next time you join a faction your relation should remain unchanged.
 
First let me thank you for bothering to take the time to answer.  I appreciate that and next time your on a board that I know something about I'll be sure to help out.  :smile:

In the mean time I have Python, the most recent module, found the part needed to be modified, however, I am having trouble exporting just that one bit of code into the module that has my saved game, I mean it works it just deletes all my saves.  So how would I modify that for my current module I'm playing in without destroying my character?

EDIT:  So I got it to work, however, it seems that all that did was make it so when I joined as a lord my relation with my new nation dropped to -40.  I'm gonna try and see what went wrong.

EDIT2: I still don't know what went wrong, but did figure out that I can just change that 12 to whatever I currently have and that way there is no loss.  Thank you very much for your efforts.
 
No problem. :wink:
Anyway, you are right, my advice wasn't so smart. Instead of removing that part you could change the 12 alone, otherwise relations will not be handled properly. However, I was thinking, another way that could work in any game you play, is to add 12 to whatever relation you have with that faction (it makes sense to me). It should be like this, if you want to try:
插入代码块:
  ("player_join_faction",
    [
      (store_script_param, ":faction_no", 1),
      (assign,"$players_kingdom",":faction_no"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_ai_state, sfai_default),
##      (try_for_range, ":kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end),
##        (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
##        (eq, ":kingdom_hero_faction", "fac_player_supporters_faction"),
##        (call_script, "script_change_troop_faction", ":kingdom_hero", ":faction_no"),
##      (try_end),
      (assign, "$players_oath_renounced_against_kingdom", 0),
      (assign, "$players_oath_renounced_given_center", 0),
      (assign, "$players_oath_renounced_begin_time", 0),
      (try_for_range,":other_kingdom",kingdoms_begin,kingdoms_end),
        (faction_slot_eq, ":other_kingdom", slot_faction_state, sfs_active),
        (neq, ":other_kingdom", "fac_player_supporters_faction"),
        (try_begin),
          (neq, ":other_kingdom", ":faction_no"),
          (store_relation, ":other_kingdom_reln", ":other_kingdom", ":faction_no"),
          (call_script, "script_set_player_relation_with_faction", ":other_kingdom", ":other_kingdom_reln"),
        (else_try),
          (call_script, "script_change_player_relation_with_faction", ":faction_no", 12), # here you add 12
        (try_end),
      (try_end),

However whatever works for you is the right solution.
 
后退
顶部 底部