Is it possible to make Prisoner managment a part skill

Users who are viewing this thread

Kvedulf

Sergeant Knight
Did a search but couldn't find anything.  As the title says.  Basically, is it possible for the player party to use an NPCs prisoner management skill instead of the player's like the other party skills?

 
Sure. Where the script in module_scripts checks for the player's Prisoner Management skill, just iterate through the Heroes in your party and look for the highest skill.
 
You can change the skill's flag to do it.
Add the flag sf_effects_party can make a skill to be a party skill.

  ("prisoner_management", "Prisoner Management",sf_base_att_cha,10,"Every level of this skill increases maximum number of prisoners by %d. (Leader skill)"),

Change sf_base_att_cha to sf_base_att_cha|sf_effects_party.
 
rubik has part of the answer, but not the whole answer.  Changing that flag allows it to be treated as a party skill, but actually use it as one you need to use the function party_get_skill_level instead of store_skill_level.  So script_game_get_party_prisoner_limit would change to:

  ("game_get_party_prisoner_limit",
    [
#      (store_script_param_1, ":party_no"),
      (assign, ":troop_no", "trp_player"),

      (assign, ":limit", 0),
      #(store_skill_level, ":skill", "skl_prisoner_management", ":troop_no"),
      (party_get_skill_level, ":skill", "p_main_party", "skl_prisoner_management"),

      (store_mul, ":limit", ":skill", 10),
      (assign, reg0, ":limit"),
      (set_trigger_result, reg0),
  ]),
 
Back
Top Bottom