OSP Code SP [WB v1.127] Expanded nobility title system kit (v0.3.3)

Users who are viewing this thread

Panzercracker said:
Thank jrider, it work good for NPC now, but my character even become empress of my kingdom, her title is just Magistra not Regina.

the unmarried status was privileged for female unless the character was a king's spouse change the following in the quality computation of the main script (OP updated):

Code:
               (try_begin), # wife of faction leader
                    # v0.3.3 change +
                    (this_or_next|troop_slot_eq, ":troop_no", slot_troop_spouse, ":faction_leader"),
                    (eq, ":troop_no", ":faction_leader"), # is queen
                    # v0.3.3 change -
                    (assign, ":quality", 4),

I also made a little fix in the call placed in give_center_to_lord to prevent an opcode error if the center's attribution is deferred.

By the way, I don't think I though of saying thanks for the feedback.
 
For some reason, this was put onto OSPW. Could you add a manual for which files to edit to change the titles?

I would like to remove the titles for companions, ladies and the extra titles consensio, pius, etc given to some lords. Also changing the player faction ones based on which faction culture the player choses instead of Latin.
 
King Yngvar said:
For some reason, this was put onto OSPW.

I guess Bismarck liked it :smile: and as I said in the main post, it free for reuse or modifications.

Could you add a manual for which files to edit to change the titles?

I would like to remove the titles for companions, ladies and the extra titles consensio, pius, etc given to some lords. Also changing the player faction ones based on which faction culture the player choses instead of Latin.

module_strings.py for the titles strings themselves,

for the rest:
  • to disable companion title, simply comment the second block (Special titles for companions not used as vassals) in the main script (troop_set_title_according_to_faction_gender_and_lands)
  • to disable ladies titles, change kingdom_ladies_end to active_npcs_end in the same script
  • to disable the extra liege relation-based subtitles, comment out the compute troop relation to ruler suffix code block, or you can expand them to be faction based, if you don't want them just for some factions (just need extra strings for each faction and an extra bit of code to shift to the right starting faction block by faction number from zero x 10)
  • to make player's faction titles culture based, you need to change the way the first title index is computed to use culture instead of faction and substract the index of the first culture string

when I have some title, I'll tie in some constant to disable/enable some of the features.

I think the code is sufficiently commented to find all the parts quite easily.
 
Don't get me wrong, I love how you get different titles based on holdings. It's just some minor nitpicking details that did not match my preferences to Nords and Swadians, especially the latin titles for my own faction. I was hoping not to have to edit through python due to the fact that I then have to re-edit all the other changes I've done but it seems now I have to do it anyway to add more companions. I was simply hoping for a textfile solution but I have checked and there seems to be none. Will follow your instructions.

to disable the extra liege relation-based subtitles, comment out the compute troop relation to ruler suffix  code block, or you can expand them to be faction based, if you don't want them just for some factions (just need extra strings for each faction and an extra bit of code to shift to the right starting faction block by faction number from zero x 10)

I just changed it from ex. "pius" to "", hopefully this will read as nothing instead of causing errors.

to make player's faction titles culture based, you need to change the way the first title index is computed to use culture instead of faction and substract the index of the first culture string

I'm a bit noob when it comes to the module system, but could you please elaborate further on this if you have the time?
 
King Yngvar said:
Don't get me wrong, I love how you get different titles based on holdings. It's just some minor nitpicking details that did not match my preferences to Nords and Swadians, especially the latin titles for my own faction.

no worries, everyone has different tastes :smile:

I was hoping not to have to edit through python due to the fact that I then have to re-edit all the other changes I've done but it seems now I have to do it anyway to add more companions. I was simply hoping for a textfile solution but I have checked and there seems to be none. Will follow your instructions.

unfortunately, the strings are about the only thing that can be changed through the generated text files, the rest is a bit too complex for that given the way titles are handled by native.

to disable the extra liege relation-based subtitles, comment out the compute troop relation to ruler suffix  code block, or you can expand them to be faction based, if you don't want them just for some factions (just need extra strings for each faction and an extra bit of code to shift to the right starting faction block by faction number from zero x 10)

I just changed it from ex. "pius" to "", hopefully this will read as nothing instead of causing errors.

actually never use an empty string in scripts, it causes an error when loading the strings text file, use a string with a single space character in it (the way it's done with the str_empty_string entry at the beginning of module_strings.py).

extending subtitle to be faction based (and moving the - from the main title string to the subtitle) would allow control of the subtitle for each faction through the text file.

to make player's faction titles culture based, you need to change the way the first title index is computed to use culture instead of faction and substract the index of the first culture string

I'm a bit noob when it comes to the module system, but could you please elaborate further on this if you have the time?

after looking at the code (OSPW with Diplomacy integrated), it's actually a bit simpler to code.

using Diplomacy (or OSPW) as a code basis, culture is handled through the "$g_player_culture" global variable and hold the faction value corresponding to the current player's culture.  Diplomacy put the  culture value selected through dialogs in "$g_player_culture".

Title string index being the only faction based output, in order to use culture for player's faction the code should be changed like this (though the block can be put just at the beginning of the script since we get faction from the parameters) :
Code:
          # Find title index in strings block
# to use culture (if set) for player's faction title +
          (try_begin),
              (eq, ":faction_no", "fac_player_supporters_faction"), # limit change to player faction
              # ensure the value is within valid active faction, the player may start   with No Faction which would do strange things if used
                (is_between, "$g_player_culture", kingdoms_begin, kingdoms_end), # that includes player faction
              (assign, ":faction_no", "$g_player_culture"), # the global holds a faction so simply re-assign it to the local ":faction" variable.
          (try_end),
# to use culture (if set) for player's faction title -
          (store_sub, ":title_index", ":faction_no", kingdoms_begin), # 0 player, 1 swadian ...
 
actually never use an empty string in scripts, it causes an error when loading the strings text file, use a string with a single space character in it (the way it's done with the str_empty_string entry at the beginning of module_strings.py).

extending subtitle to be faction based (and moving the - from the main title string to the subtitle) would allow control of the subtitle for each faction through the text file.

Yes, I now have characters like Hertug- Aedin... I really just wanted to move the subtitle all together.

I tried to just remove the script along with the hero titles but got this error from the .bat

Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Exporting troops data
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Exporting party_template data...
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Exporting quest data...
Traceback (most recent call last):
  File "process_scripts.py", line 4, in <module>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "C:\Users\YV\Desktop\Module_System\process_operations.py", line 20, in <m
odule>
    from module_scripts import *
  File "C:\Users\YV\Desktop\Module_System\module_scripts.py", line 51687

    ^
SyntaxError: invalid syntax

______________________________

Script processing has ended.
Press any key to exit. . .

Missing something?
 
the "-" is inside the main string, probably should have put it in the subtitle string to keep things modular.

Missing something?

You just were just a little bit too comment happy :wink:

the end of script marker shouldn't be commented :
Code:
  ]),
 
It worked, thank you :smile:

Onto the culture specific player faction titles...

          # Find title index in strings block
# to use culture (if set) for player's faction title +
          (try_begin),
              (eq, ":faction", "fac_player_supporters_faction"), # limit change to player faction
              # ensure the value is within valid active faction, the player may start  with No Faction which would do strange things if used
                (is_between, "$g_player_culture", kingdoms_begin, kingdoms_end), # that includes player faction
              (assign, ":faction", "$g_player_culture"), # the global holds a faction so simply re-assign it to the local ":faction" variable.
          (try_end),
# to use culture (if set) for player's faction title -
          (store_sub, ":title_index", ":faction_no", kingdoms_begin), # 0 player, 1 swadian ...

I have tried putting it several places, do you know the exact line I should put it? It has caused error in the places I have tried so far.

To be more exact, here is the error:

ERROR: Usage of unassigned local variable: :faction
WARNING: Local variable never used: faction, at: troop_set_title_according_to_faction_gender_and_lands
 
King Yngvar said:
It worked, thank you :smile:

Onto the culture specific player faction titles...
....
I have tried putting it several places, do you know the exact line I should put it? It has caused error in the places I have tried so far.

my mistake, shouldn't write code on the fly while posting  :mrgreen: , use ":faction_no" instead of ":faction" and you'll be fine (fixed the code in my previous answer).
 
That took care of the error message. I got this bug however, and I am not quite sure which of these things may have caused it, but I figured maybe you have run into it?

mb_warband2010-08-2114-46-36-96.jpg

My new lord Hersir- Baronsfru- Ymira(Morale: 99) Ymira Lezalit is having some identity issues.

And he is not alone...
mb_warband2010-08-2115-54-26-00.jpg
 
Nope, didn't encounter that one (away from home and code atm), though as Lumos says there's probably a string badly overwritten, I'd say at the call for relation with faction leader for subtitles
 
So it is all in module_strings?

##diplomacy end


# Jrider + TITLES v0.0 specialization strings, you can put these at the end of the file
  #("hero_titles_none", "Hero {s0}"),
  #("hero_titles_diplomat", "Missi {s0}"),
  #("hero_titles_tactician", "Tassein {s0}"),
  #("hero_titles_scout", "Ausculare {s0}"),
  #("hero_titles_physician", "Fisique {s0}"),
  #("hero_titles_trader", "Empori {s0}"),
  #("hero_titles_party", "Palantinus {s0}"),

  #("hero_specdesc_none", "none"),
  #("hero_specdesc_diplomat", "Diplomacy (Persuasion)"),
  #("hero_specdesc_tactician", "Tactical matters (Tactics, Engineer and Trainer)"),
  #("hero_specdesc_scout", "Scouting (Spotting, Tracking and Path finding)"),
  #("hero_specdesc_physician", "Healing (Wound treatment, Surgery and First aid)"),
  #("hero_specdesc_trader", "Trade (Trading, Looting and Foraging)"),
# Jrider -
# Jrider + TITLES v0.3 relation to ruler suffix, you can put these at the end of the file
  #("ruler_relation_mnus_100_ns", "vindicta"), # -100 Vengeful
  #("ruler_relation_mnus_80_ns",  "ultio"), # -80 Vengeful/revengeful
  #("ruler_relation_mnus_60_ns",  "invisus"), # -60 Hateful
  #("ruler_relation_mnus_40_ns",  "dolor"), # -40 Resentful
  #("ruler_relation_mnus_20_ns",  "fremo"), # -20 Grumbling
  #("ruler_relation_plus_0_ns",  "placeholder shouldn't appear"),# 0...19
  #("ruler_relation_plus_20_ns",  "consensio"), # cooperative
  #("ruler_relation_plus_40_ns",  "faveo"), # supportive
  #("ruler_relation_plus_60_ns",  "pius"), # gracious
  #("ruler_relation_plus_80_ns",  "confero"), # devoted
# Jrider -


#  TEMPERED STRINGS BEGIN

Can any of this be the cause?

Or maybe it is more likely that I have made something wrong here
# Jrider + Begin new scripts
  # TITLES v0.3.3 #####
  # script troop_set_title_according_to_faction_gender_and_lands
  # calculate and set new title for lords, ladies and companions
  # use s0 and s1
  # change v0.3: use s61 and reg10
  ("troop_set_title_according_to_faction_gender_and_lands",
  [     
      (store_script_param, ":troop_no", 1),
      (store_script_param, ":faction_no", 2),

          # Find title index in strings block
# to use culture (if set) for player's faction title +
          (try_begin),
              (eq, ":faction_no", "fac_player_supporters_faction"), # limit change to player faction
              # ensure the value is within valid active faction, the player may start  with No Faction which would do strange things if used
                (is_between, "$g_player_culture", kingdoms_begin, kingdoms_end), # that includes player faction
              (assign, ":faction_no", "$g_player_culture"), # the global holds a faction so simply re-assign it to the local ":faction" variable.
          (try_end),
# to use culture (if set) for player's faction title -
          (store_sub, ":title_index", ":faction_no", kingdoms_begin), # 0 player, 1 swadian ...

      # Ensure we process only npcs member of a kingdom, including player
      (try_begin), # Npcs serving as lord and ladies
          # v0.1 change +
          (is_between, ":faction_no", kingdoms_begin, kingdoms_end), # normaly this one should exclude companions that are not vassals
          (neg|is_between, ":troop_no", pretenders_begin, pretenders_end), # exclude pretenders
          (this_or_next|is_between, ":troop_no", active_npcs_begin, kingdom_ladies_end), # v0.3.1 change to include player
          (eq, ":troop_no", "trp_player"), # include player player # v0.3.1 change
#          (neq, ":troop_no", "trp_player"), # exclude player # v0.3.1 commented, wasn't relevant anyway

          (faction_get_slot, ":faction_leader", ":faction_no", slot_faction_leader),
          (str_store_troop_name_plural, s0, ":troop_no"),
          # v0.1 change -
          # External computation blocks
          # Get Gender
          (troop_get_type, ":gender", ":troop_no"),
          # NPC's largest fief (works for male and female, compute spouse fief as well)
          # 1 no fief, 2 village, 3 castle, 4 town
          (assign, ":largest_fief", 0),
          (try_for_range, ":cur_center", centers_begin, centers_end),
                (troop_get_slot, ":spouse_no", ":troop_no", slot_troop_spouse),
                (neq, ":troop_no", ":faction_leader"), # exclude research for ruler
                (neq, ":spouse_no", ":faction_leader"), # exclude research for ruler's wife
                (lt, ":largest_fief", 3),
                (party_slot_ge, ":cur_center", slot_town_lord, 0),
                (this_or_next|party_slot_eq, ":cur_center", slot_town_lord, ":spouse_no"),
                (party_slot_eq, ":cur_center", slot_town_lord, ":troop_no"),

                (try_begin),
                  (party_slot_eq, ":cur_center", slot_party_type, spt_town),
                  (lt, ":largest_fief", 3),
                  (assign, ":largest_fief", 3),
                (else_try),
                  (party_slot_eq, ":cur_center", slot_party_type, spt_castle),
                  (lt, ":largest_fief", 2),
                  (assign, ":largest_fief", 2),
                (else_try),
                  (party_slot_eq, ":cur_center", slot_party_type, spt_village),
                  (lt, ":largest_fief", 1),
                  (assign, ":largest_fief", 1),
                (try_end),
          (try_end),

          # base title(s) computation blocks
          # Determine NPCs quality in order of importance
          # for male NPCs: 4 Ruler, 3 town, 2 castle, 1 village, 0 landless
          # for female NPCs: 5 unmarried (kingdom lady only), 4 queen, 3 wife or town, 2 wife or castle, 1 wife or village, 0 wife or landless
          (assign, ":quality", 0),
          (try_begin), # Male npcs
              (eq, ":gender", 0),
              (try_begin),
                  (eq, ":troop_no", ":faction_leader"), # is king
                  (assign, ":quality", 4),
              (else_try),
                  (assign, ":quality", ":largest_fief"),
              (try_end),
          (else_try), # Female npcs, a bit more complex queen, landowner, companions without a fief,
              (try_begin), # wife of faction leader
                    # v0.3.3 change +
                    (this_or_next|troop_slot_eq, ":troop_no", slot_troop_spouse, ":faction_leader"),
                    (eq, ":troop_no", ":faction_leader"), # is queen
                    # v0.3.3 change -
                    (assign, ":quality", 4),
              (else_try), # is a landowner - index 1 to 3
                    (gt, ":largest_fief", 0),
                    (assign, ":quality", ":largest_fief"),
              (else_try), # a companion vassal without fief
                    (is_between, ":troop_no", companions_begin, companions_end),
                    (assign, ":quality", 0),
              (else_try), # married lady whose husband has no fief
                    (troop_slot_ge, ":troop_no", slot_troop_spouse, 0),
                    (assign, ":quality", 0),
              (else_try), # unmarried lady without fief
                    (assign, ":quality", 5),
              (try_end),
          (try_end),

          # v0.3 changes +
          # compute troop relation to ruler suffix
          #(try_begin),
            # (neq, ":troop_no", ":faction_leader"), # exclude from suffix if king v0.3.2 change
              #(call_script, "script_troop_get_relation_with_troop", ":troop_no", ":faction_leader"),
              #(assign, ":relation", reg0),
              #(str_clear, s61),
              #(assign, reg10, 0),
              #(try_begin), # update reg10
              # (this_or_next|gt, ":relation", 19),
                #(lt, ":relation", -19),
                #(assign, reg10, ":relation"),
                #(store_add, ":normalized_relation", ":relation", 100),
                #(store_div, ":str_offset", ":normalized_relation", 20),
                #(val_clamp, ":str_offset", 0, 10), # does 10 work ? only 10 strings in there
                #(store_add, ":str_rel_id", "str_ruler_relation_mnus_100_ns",  ":str_offset"),
                #(str_store_string, s61, ":str_rel_id"),
              #(try_end),
          #(else_try), # clear register and string
          #  (str_clear, s61),
            #  (assign, reg10, 0),   
          #(try_end),
          # v0.3 changes -

          # Find title index in strings block
          (store_sub, ":title_index", ":faction_no", kingdoms_begin), # 0 player, 1 swadian ...
          (try_begin), #male, 5 title entries
                (eq, ":gender", 0),
                (val_mul, ":title_index", 5),
                (val_add, ":title_index", kingdom_titles_male_begin),
          (else_try), # female, 6 title entries
                (val_mul, ":title_index", 6),
                (val_add, ":title_index", kingdom_titles_female_begin),
          (try_end),
          (val_add, ":title_index", ":quality"),

          # Set title and party name block
          # assign title
          (str_store_string, s1, ":title_index"),
          (troop_set_name, ":troop_no", s1),
          # rename party
          (troop_get_slot, ":troop_party", ":troop_no", slot_troop_leaded_party),
          (try_begin),
          # v0.2 change to prevent opcode error
            (gt, ":troop_party", 0),
            (str_store_troop_name, s5, ":troop_no"),
            (party_set_name, ":troop_party", "str_s5_s_party"),
          (try_end), # v0.2 change
      (try_end),
  ]),

      # Special titles for companions not used as vassals
    # (try_begin),
        # (neg|eq, ":faction_no", "fac_player_supporters_faction"), # v0.2 change
        # (neg|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), # v0.3 change, exclude companion if he became a kingdom lord
        # (is_between, ":troop_no", companions_begin, companions_end),
          # Store the plural name
        # (str_store_troop_name_plural, s0, ":troop_no"),
          # Set the title
        # (try_begin), # Male npcs
          #    (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_player_companion),
          #    (str_store_string, s1, "str_hero_titles_party"),
        # (else_try),
          #  (call_script, "script_get_troop_specialisation", ":troop_no", ":faction_no"),
          #  (assign, ":title_index", reg0),
          #  (val_add, ":title_index", hero_titles_begin),
          #  (str_store_string, s1, ":title_index"),
          #(try_end),
          # assign title
        # (troop_set_name, ":troop_no", s1),
      #(try_end),

  # Script get_troop_specialisation
  # Assess companion current skills to find the strongest trend
  #("get_troop_specialisation",
  #[
      # (store_script_param, ":troop_no", 1),
      # (store_script_param, ":faction_no", 2),
      # (try_begin),
        #  (neg|eq, ":faction_no", "fac_player_supporters_faction"), # v0.2 change
        #  (is_between, ":troop_no", companions_begin, companions_end),
          # Other titles according to function in group
          # Scout (Ausculare) - PathFinding, Tracking and Spotting
          # (store_skill_level, ":scout", "skl_spotting", ":troop_no"),
          #(store_skill_level, ":scout_skill", "skl_pathfinding", ":troop_no"),
          #(val_add, ":scout", ":scout_skill"),
          #(store_skill_level, ":scout_skill", "skl_tracking", ":troop_no"),
          #(val_add, ":scout", ":scout_skill"),

          # Physician (Fisique) - Wound Treatment, Surgery, First Aid
          #(store_skill_level, ":physician", "skl_wound_treatment", ":troop_no"),
          #(store_skill_level, ":physician_skill", "skl_first_aid", ":troop_no"),
          #(val_add, ":physician", ":physician_skill"),
          #(store_skill_level, ":physician_skill", "skl_surgery", ":troop_no"),
          #(val_add, ":physician", ":physician_skill"),

          # Tactician (Tassein) - Tactics, Engineer, Trainer
          #(store_skill_level, ":tactician", "skl_tactics", ":troop_no"),
          #(store_skill_level, ":tactician_skill", "skl_engineer", ":troop_no"),
          # (val_add, ":tactician", ":tactician_skill"),
          # (store_skill_level, ":tactician_skill", "skl_trainer", ":troop_no"),
          # (val_add, ":tactician", ":tactician_skill"),

          # Trader (Empori) - Trade Looting, Foraging (foraging is a new skill I'm working on)
          # (store_skill_level, ":trader", "skl_trade", ":troop_no"),
          # (store_skill_level, ":trader_skill", "skl_looting", ":troop_no"),
          # (val_add, ":trader", ":trader_skill"),
          #(store_skill_level, ":trader_skill", "skl_foraging", ":troop_no"), # uncomment if using foraging
          #(val_add, ":trader", ":trader_skill"), # uncomment if using foraging
          # (val_mul, ":trader", 3), # comment if using foraging
          # (val_div, ":trader", 2), # comment if using foraging

          # Diplomat (Missi) - Persuasion
          # (store_skill_level, ":diplomat", "skl_persuasion", ":troop_no"),
          # (val_mul, ":diplomat", 3),

          # (try_begin), # Just your basic hero
          #    (eq, ":diplomat", 0),
          #    (eq, ":tactician", 0),
          #    (eq, ":scout", 0),
            #  (eq, ":physician", 0),
            #  (eq, ":trader", 0),
              # (assign, reg0, 0),
          #(else_try), # Diplomat - skilled in Persuasion and Trainer
            #  (gt, ":diplomat", 0),
            #  (ge, ":diplomat", ":tactician"),
              # (ge, ":diplomat", ":scout"),
              #(ge, ":diplomat", ":physician"),
              #(ge, ":diplomat", ":trader"),
              #(assign, reg0, 1),
          #(else_try), # Tactician - skilled in Tactics and Engineer
            #  (gt, ":tactician", 0),
            #  (ge, ":diplomat", ":scout"),
              # (ge, ":diplomat", ":physician"),
              #(ge, ":diplomat", ":trader"),
              #(assign, reg0, 2),
          #(else_try), # Scout - skilled in Spotting, Tracking and Pathfinding
            #  (gt, ":scout", 0),
            #  (ge, ":diplomat", ":physician"),
              # (ge, ":diplomat", ":trader"),
              #(assign, reg0, 3),
          #(else_try), # Physician - skilled in Wound Treatment, Surgery and First Aid
            #  (gt, ":physician", 0),
            #  (ge, ":physician", ":trader"),
              # (assign, reg0, 4),
          #(else_try), # Trader - skilled in Trade
            #  (gt, ":trader", 0),
            #  (assign, reg0, 5),
          #(try_end),
        #(try_end),
  # ]),
# Jrdier -
 
I got it to work. This script is brilliant!  :grin:

I am getting a warning message when I am building the module (which I believe was already pointed out by someone else). However, I have tested the module and it works fine. The warning message is:
"Local variable never used: custom_name, at: troop_set_title_according_to_faction"
 
Nice! One problem however. IMHO Rhodoks should have Spanish titles and not Scottish/Gaelish, but that's just me.
 
Aquiles02 said:
This script is for Mount & Blade: Fire and Sword?
I do not know how to apply it in my M&B.
This script is for Warband (hence the WB in the subject). It would likely work for WFaS, but the source code (the module system) is yet to be released for it so there isn't any way to get it to work.
 
Back
Top Bottom