Author Topic: Is it possible to make Prisoner managment a part skill  (Read 864 times)

0 Members and 1 Guest are viewing this topic.

Kvedulf

  • Sergeant Knight
  • *
    • View Profile
  • Faction: Neutral
Is it possible to make Prisoner managment a part skill
« on: February 09, 2009, 05:07:02 AM »
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?


HardCode

  • Sergeant Knight at Arms
  • *
  • Return of Rosario Dawson
    • View Profile
  • Faction: Bandit
Re: Is it possible to make Prisoner managment a part skill
« Reply #1 on: February 09, 2009, 05:12:04 AM »
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 please some of the people some of the time, but you can ban all of the people all of the time too" - Archonsod


rubik

  • Squire
  • *
    • View Profile
  • Faction: Vaegir
Re: Is it possible to make Prisoner managment a part skill
« Reply #2 on: February 10, 2009, 07:07:49 PM »
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.

Quote
  ("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.

Jinnai

  • Sergeant at Arms
  • *
    • View Profile
  • Faction: Khergit
Re: Is it possible to make Prisoner managment a part skill
« Reply #3 on: February 10, 2009, 07:17:13 PM »
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:

Quote
  ("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),
  ]),
Native Expansion - A mod for M&B version 1.010/11