Search results for query: *

  1. Shcherbyna

    SP Other [WB][OSP] Language Education Module (Modmerger pack)

    Yes, is possible.
    Maybe later I find time to explain "how to" =)

    This is my old manual. I don't remember exactly what it means but you can try =)
    How to add a new study level (new language) in?

    ===[StudyMod]===
    1) studyMod_dict.py - Create a list of new words, num-codes and script-loader for it (studyMod_code_loader_lvl_XX(language)).
    2) studyMod_strings.py - Create a lists of strings based on new word-code-list from studyMod_dict.py. Every string_ID must be unique!
    3) studyMod_constants.py - (# Level Indexes) Add a new begin_ id of new lvl (en_begin = "str_en_a" en_level_2 = "str_en_one" ... en_end = "str_en_end") each item in appropriate list before closing .._end.
    4) studyMod_dict.py - (# LANGUAGE Dict start indexes list from studyMod_constants) Add new begin_ id (from prev step) in appropriate lists (en_lvl_indexes = [en_begin, en_begin, en_level_2, ..new_index.., en_end]) for each language.
    5) studyMod_scripts.py - create code-loader-scripts.
    6) studyMod_dict.py - scripts from prev step add to script-lists (en_lvl_code_loaders = ['script_load_jp_alphabet_codes', 'script_load_jp_alphabet_codes', 'script_load_en_codes_lvl_2', ...])
    7) studyMod_presentations.py - increase max study lvl (assign, "$g_studyMod_max_lng_level", 3),
    PS: for new language increase max langs count (assign, "$g_studyMod_langs_num", 4),
    ===[StudyBook]===
    8 ) studyBook_strings.py - add link for new study-lvl on Index-page
    9) add checking for loading new lvl if need (store_add, ":translated_str_id", jp_level_3_reading, ":str_no"),
    ===[KanjiMahjong]===
    10) add checking for loading new lvl (for kanji only) (store_add, ":kanji_reading_str", reg2, jp_level_3_reading),
    Also you need to add appropriate fonts.
  2. Shcherbyna

    OSP Code QoL MB Warband - Helmet View

    Download link updated. Check source files.
  3. Shcherbyna

    [HELP REQUEST] adding additional items into the cheatmenu(WARBAND)

    Alternative dev-menu: Advanced Cheatmenu, but I'm not sure it works whit your module_sys version.. 1.43 required.
  4. Shcherbyna

    Notepad++ syntax highlighting for M&B scripts

    http://forums.taleworlds.com/index.php/topic,320675.0.html
  5. Shcherbyna

    OSP Oriental World Map MB Warband Japan Map Icons Animation (ModMerger Kit) & Japanese Town Map Icons

    ...how to make player use the faction icon where he's in. For example if player is a vassal of Jerusalem he would use Jerusalem icon, is this possible? Thanks a lot in advanced.

    You have to change active_parties_simple_triggers.py. For example:
    replace_block = (0,
      [(troop_get_inventory_slot, ":cur_horse", "trp_player", 8 ), #horse slot
      (store_faction_of_troop, ":player_faction", "trp_player"), # get player's faction
        (assign, ":new_icon", -1),
        (try_begin),
          (eq, "$g_player_icon_state", pis_normal),
          (try_begin),
            (ge, ":cur_horse", 0), # case1: if player has a horse
    (try_begin),
    (eq, ":cur_horse", "itm_palanquin"),
    (assign, ":new_icon", "icon_palanquin"),
    (else_try),
    (assign, ":new_icon", "icon_player_horseman"),
    (try_end),

    (try_begin),
        (eq, ":player_faction", "fac_kingdom_1"),
        (assign, ":new_icon", "icon_player_horseman_fac1"), # set horseman faction1 icon ...
    (else_try),
        (eq, ":player_faction", "fac_kingdom_2"),
        (assign, ":new_icon", "icon_player_horseman_fac2"), # set horseman faction2 icon ...
    (else_try),
        ....
    (try_end),

          (else_try),
          ...
          ...
    Of course for this code you must have custom faction player's icons.
  6. Shcherbyna

    Creating New Mounts

    http://forums.taleworlds.com/index.php/topic,313392.msg7454517.html#msg7454517
  7. Shcherbyna

    [Plugin] MB Warband API (Sublime Text 3 Syntax Plugin)

    v1.165.0 up

    + module  system v1.165
    + plugin command to clean *.pyc
    + plugin moved to repository, so now it available for install via Package Control.
    [!] If you have a previous version of plugin in SublimeText3\Data\Packages\MB Warband API - remove it manually and install new version via Package Control (see first topic).
  8. Shcherbyna

    OSP Kit SP MB Warband - Harbour & Ship Navigation (WIP)

    Alundra said:
    still looking for the codes for the sea faring and sea trade for my mod till now. if possible i want a new updated tutorial  :neutral: some mods had it good when there were people who help them do their modsys when they started
    Thanks for your attention. The project still in progress.. Fixed small scene restriction. Now we remake port scene and trying to add naval battle ability.
  9. Shcherbyna

    BLENDER PROBLEMS

    You can't modify the mb skeletons.. skeleton animation only.
    Use last software version http://steamreview.org/BlenderSourceTools/

    First import skin, after animation:
          1.  File -> Import -> .smd -> human_skin_A.SMD
          2. File -> Import -> .smd -> stand_man.SMD (for example)

    human_skin_A.SMD & stand_man.SMD you can export from OpenBRF
  10. Shcherbyna

    OSP Code Optimisation Language detection

    Thanks for str2int idea. So now, for example, i can detect user localization language and set Mother_Language item in "language_combo_box" or another settings, right?

    PS: Sorry, didn't see this before http://forums.taleworlds.com/index.php/topic,313636.msg7436826.html#msg7436826
  11. Shcherbyna

    B Tutorial Other ModMerger usage

    Thanks a lot, I forgot about this because just deleted this check from my scripts =)
  12. Shcherbyna

    OSP Code QoL MB Warband - Helmet View

    Lord Kensington said:
    Hmpf! :razz: Have been looking for such a modification for a loooong time.. love it.. just I'm not experienced with M&B modding, so I can't manage to get it to work :razz: Could someone explain to me in some steps how to "install / activate" it?

    I've placed most of the files in the according directories of the mod I'm currently playing, but I don't know what to do with the python files that execute the commands for the view modification... So if someone could explain to me what to do with the content of the zip here, I would very much appreciate :wink: Thanks!

    How to install modmerge-pack
  13. Shcherbyna

    B Tutorial Other ModMerger usage

    Scripts:

    Nothing to be scripted. Just create a list of new scripts. Example:
    harbour_scripts.py said:
    # [OSP] Harbour
    # Harbour visit.
    # MB Warband v1.158+
    # Code v1.0 by: Shcherbyna
    # Additional code vX.X: by
    # -*- coding: UTF-8 -*-


    ... default header from module_scripts.py ...

    scripts = [
       
      #script_harbour_visit - load mission template when visit town_harbour
      # INPUT: none
      # OUTPUT: none

      ("harbour_visit",
        [
          (set_jump_mission, "mt_town_harbour"),
          (jump_to_scene, "scn_town_harbour"),
          (change_screen_mission),

      ]),

    (.. script 2 ...),
    (.. script 3 ...),

    ]
    For this purpose used a search and replacing directives. Example:
    sitting_lords_scripts.py said:
    ... defaul header from module_scripts.py ...

    from util_wrappers import *
    from util_scripts import *

    # Find and replace.
    scripts_directives = [
    # [SD_OP_BLOCK_REPLACE, <script_name>, <position_flags>, <position_value_1>, <position_value_2>, <op_block>,  <lines_to_remove>(default 1)]
    [SD_OP_BLOCK_REPLACE, "init_town_agent", D_SEARCH_FROM_TOP | D_SEARCH_SCRIPTLINE, (assign, ":stand_animation", "anim_stand_lady"), 0 , [(assign, ":stand_animation", "anim_sitting_woman_seiza")], 1],
    [SD_OP_BLOCK_REPLACE, "init_town_agent", D_SEARCH_FROM_TOP | D_SEARCH_SCRIPTLINE, (assign, ":stand_animation", "anim_stand_lord"), 0 , [(assign, ":stand_animation", "anim_sitting_man_seiza")], 1],
    ]

    def modmerge_scripts(orig_scripts):
    process_script_directives(orig_scripts, scripts_directives)

    def modmerge(var_set):
    try:
    var_name_1 = "scripts"
    orig_scripts = var_set[var_name_1]
    modmerge_scripts(orig_scripts) # perform the replacement

    except KeyError:
    errstring = "Variable set does not contain expected variable: "%s"." % var_name_1
    raise ValueError(errstring)

    ]
    This example shows how to add a new script and then it is called from the other:
    active_parties_scripts.py said:
    ... default module_scripts.py header ...

    # A new script
    scripts = [

      # script_update_ai_party_icon
      # INPUT: none
      # OUTPUT: none

      ("update_ai_party_icon",
      [
      (store_script_param_1, ":party_no"),
      ...
      ...
      ]),

    ]

    # A new code for exist script updating
    update_script_create_kingdom_hero_party = [
         
    (call_script, "script_update_ai_party_icon", "$pout_party"),
            ....

    ]


    from util_wrappers import *
    from util_scripts import *

    # Adding a new code from block update_... at the end of create_kingdom_.. .
    scripts_directives = [
    [SD_OP_BLOCK_INSERT, "create_kingdom_hero_party", D_SEARCH_FROM_BOTTOM | D_SEARCH_LINENUMBER | D_INSERT_BEFORE, 0, 0, update_script_create_kingdom_hero_party], #ADD TO END.
    ]

    def modmerge_scripts(orig_scripts):
    process_script_directives(orig_scripts, scripts_directives)

    def modmerge(var_set):
    try:
    var_name_1 = "scripts"
    orig_scripts = var_set[var_name_1]
    add_scripts(orig_scripts, scripts, True) # first inserting a new scripts
    modmerge_scripts(orig_scripts) # after, update old one

    except KeyError:
    errstring = "Variable set does not contain expected variable: "%s"." % var_name_1
    raise ValueError(errstring)

    ]

    Items:

    Nothing to be scripted. Just add a new item rows. Example:
    mahjong_items.py said:
    ... default module_items.py header ...

    items = [

    ["kanji_mahjong_for_tavern", "Kanji Mahjong", [("mahjong_box",0)], itp_type_one_handed_wpn|itp_primary|itp_secondary, itc_longsword, 200, weight(1.5)|spd_rtng(80)|weapon_length(20)|swing_damage(2,blunt),imodbits_none], # not merchandise, tavern use only
    ["kanji_mahjong","Kanji Mahjong", [("mahjong_box",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_secondary, itc_longsword, 50, weight(1.5)|spd_rtng(80)|weapon_length(20)|swing_damage(2,blunt),imodbits_none],

    ]

    Sounds:

    Nothing to be scripted. Just add a new sounds. Example:
    mahjong_sounds.py said:
    # [OSP] Kanji Mahjong
    # Registering of mahjong game sounds
    # MB Warband v1.158+
    # Сode v1.0: by Shcherbyna
    # Additional code vX.X: by
    # -*- coding: UTF-8 -*-


    from header_sounds import *

    sounds = [

    ("mahjong_intro", sf_2d|sf_vol_15,["quest_completed2.ogg"]),
    ("mahjong_round_complete", sf_2d|sf_vol_15,["mahjong_round_complete.wav"]),
    ("mahjong_nomatches", sf_2d|sf_vol_15,["mahjong_nomatches.wma"]),
    ...

    ]

    Meshes:

    Nothing extra code. Just add new objects. Example:
    mahjong_meshes.py said:
    ... default module_meshes.py header ...

    meshes = [

      ("mahjong_start_screen", 0, "mahjong_start_screen", 0, 0, 0, 0, 0, 0, 1, 1, 1),
     
      ("mahjong_table_1", 0, "mahjong_table_1", 0, 0, 0, 0, 0, 0, 1, 1, 1),
      ("mahjong_table_2", 0, "mahjong_table_2", 0, 0, 0, 0, 0, 0, 1, 1, 1),
      ("mahjong_table_3", 0, "mahjong_table_3", 0, 0, 0, 0, 0, 0, 1, 1, 1),
      ("mahjong_table_4", 0, "mahjong_table_4", 0, 0, 0, 0, 0, 0, 1, 1, 1),
      ("mahjong_table_5", 0, "mahjong_table_5", 0, 0, 0, 0, 0, 0, 1, 1, 1),
      ("mahjong_table_6", 0, "mahjong_table_6", 0, 0, 0, 0, 0, 0, 1, 1, 1),
      ...

    ]

    Map_icons:

    Nothing to be scripted. In this example, the standard player's icon is replaced by a new one, a new icon is added for ninja and replaces the standard icon of the town:
    YourModName_map_icons.py said:
    ... default module_map_icons.py header ...

    map_icons = [
     
      ("player",0,"ronin", avatar_scale, snd_footstep_grass, 0.15, 0.173, 0),
      ("shinobi",0,"shinobi", avatar_scale, snd_footstep_grass, 0.15, 0.173, 0),
      ...
      ("town", mcn_no_shadow, "map_jtown_a", 0.35, 0),
    ]

    Presentations:

    Nothing to be scripted. just add new presentations. Example:
    YourModName_presentations.py said:
    ... default module_presentations.py header ...

    presentations = [

      (.. a new presentation ...),
      (.. a new presentation 2...),
    ]

    Game_menus:

    Nothing to do extra. This example adds one new menu (studyMod_exit_to_main_menu) and one full replaced (start_game_0):
    YourModName_game_menus.py said:
    ... default module_game_menus.py header ...

    game_menus = [
      ("start_game_0",menu_text_color(0xFF000000)|mnf_disable_all_keys,
        "Welcome, adventurer",
        "none",
        [(start_presentation, "prsnt_studyMod_startMenu")], # Language selecting menu
        []
      ),

      ("studyMod_exit_to_main_menu", 0, "@", "none", [(change_screen_quit)],[]),

    ]
    This example adds one new menu (mnu_ship_departure) and one option (mno_sail_from_port) an existing menu (mnu_town) completely replaced by a new code:
    YourModName_game_menus.py said:
    ... default module_game_menus.py header ...

    game_menus = [
      ("ship_departure",menu_text_color(0xFF000000)|mnf_disable_all_keys,
        "You continue sea passage...",
        "none",
        [],
        [
        ("continue",[],"Continue...",
          [(change_screen_map),
          ]),
        ]), 
    ]

    # Show port option in the town menu
    update_menu_town_block = [

          ("sail_from_port",
          [
            (party_slot_eq, "$current_town", slot_party_type, spt_town), # If this is town
            (party_get_position, pos1, "p_main_party"),
            (map_get_water_position_around_position, pos2, pos1, 6), # and there is water in radius
          ],
          "Go to port", # Show this menu option
          [
            (set_jump_mission, "mt_town_harbour"),
            (jump_to_scene, "scn_town_harbour"),
            (change_screen_mission),
          ]),
    ]

    from util_wrappers import *
    from util_common import *

    # Adding new game menu function
    def add_game_menus(orig_game_menus, game_menus, check_duplicates = True):
        addmode = ADDMODE_REPLACE_EXIST
        if  not check_duplicates:
            addmode = ADDMODE_APPEND
        return add_objects(orig_game_menus, game_menus, addmode)

    # Menu option replacing function
    def modmerge_game_menus(orig_game_menus):
        try: #full replace mno_sail_from_port in mnu_town
            menu_Town = list_find_first_match_i(orig_game_menus, "town") # get "Town" menu
            menu_Town_options_list = GameMenuWrapper(orig_game_menus[menu_Town]).GetMenuOptions() # get option list
            for option_i in range(len(menu_Town_options_list)): # checking all menu options
                option_id = GameMenuOptionWrapper(menu_Town_options_list[option_i]).GetId() # take the name of current menu_option
                if (option_id == "sail_from_port"): # if is target option
                    menu_Town_options_list[option_i] = update_menu_town_block[0] # full replace it by new code

        except:
            import sys
            print "Injecton 1 failed:", sys.exc_info()[1]
          raise

    def modmerge(var_set):
      try:
            var_name_1 = "game_menus"
            orig_game_menus = var_set[var_name_1]
            add_game_menus(orig_game_menus, game_menus, True) # 1 - add new menu
            modmerge_game_menus(orig_game_menus) # 2 - replace by new code
        except KeyError:
            errstring = "Variable set does not contain expected variable: "%s"." % var_name_1
          raise ValueError(errstring)

    Troops:

    No extra scripting. Example:
    studyMod_troops.py said:
    ... default module_troops.py header ...

    troops = [
     
    # These are used as arrays in the scripts.
      # lvl boundaries dict indexes

      ["studyMod_lvl_indexes_container","{!}","{!}", tf_inactive, 0, 0, fac_neutral,[],0,wp(60),0,0],
      # this slot-container needs for dynamic selecting lvl-code-script-loader
      ["studyMod_lvl_code_loaders_container","{!}","{!}", tf_inactive, 0, 0, fac_neutral,[],0,wp(60),0,0],
      # study word's codes holder, loads in before start mission_templates
      ["studyMod_code_container","{!}","{!}", tf_inactive, 0, 0, fac_neutral,[],0,wp(60),0,0],
     
    ]

    Strings:

    Nothing to do extra, in the file only the new rows. Use double quotes rather, it allows you to write in a row apostrophes ("O'Really"). Example:
    YourModName_strings.py said:
    strings = [
     
      ("startMenu_next_str_kanji_reading", "Tsugi e"),
      ("startMenu_next_str_0", "Next"),
      ("startMenu_next_str_1", "次へ"),
      ("startMenu_next_str_2", "Продолжить"),
     
    ]

    Simple_triggers:

    In this example, searches for the right trigger on a unique line, after which the trigger is completely replaced by a new code from replace_block:
    active_parties_simple_triggers.py said:
    ... default module_simple_triggers.py header ...

    replace_block = (0,
      [(troop_get_inventory_slot, ":cur_horse", "trp_player", :cool:, #horse slot
        (assign, ":new_icon", -1),
        (try_begin),
        ....
        ....
        (neq, ":new_icon", "$g_player_party_icon"),
        (assign, "$g_player_party_icon", ":new_icon"),
        (party_set_icon, "p_main_party", ":new_icon"),
        ])


    from util_wrappers import SimpleTriggerWrapper

    def modmerge_simple_triggers(orig_simple_triggers, search_line, replace_block):
    for trigger_i in range(len(orig_simple_triggers)): # Run on all lines of the file simple_triggers
    opblock = SimpleTriggerWrapper(orig_simple_triggers[trigger_i]).GetOpBlock().Unwrap() # take the current trigger code
    for line_i in range(len(opblock)): # Run through the lines of code of current trigger
    if (opblock[line_i] == search_line): # if the current line of code is target
    orig_simple_triggers[trigger_i] = replace_block # completely replace current trigger

    def modmerge(var_set):
      try:
            var_name_1 = "simple_triggers"
            orig_simple_triggers = var_set[var_name_1]
    # Complete replacement of the trigger, which contains a line of code (assign, ":new_icon", "icon_player_horseman")
            modmerge_simple_triggers(orig_simple_triggers, (assign, ":new_icon", "icon_player_horseman"), replace_block)
        except KeyError:
            errstring = "Variable set does not contain expected variable: "%s"." % var_name_1
            raise ValueError(errstring)
    In this example performs search for the first 12-hours trigger from top.  Then in the end adds a new line of code. In addition, if uncomment prints can immediately see the trigger code before and after injection.
    ship_navigation_simple_triggers.py said:
    ... default module_simple_triggers.py header ...

    from util_wrappers import SimpleTriggerWrapper

    def modmerge_simple_triggers(orig_simple_triggers, search_interval, insert_block):
    for trigger_i in range(len(orig_simple_triggers)): # Run on all lines of simple_triggers file
    if (SimpleTriggerWrapper(orig_simple_triggers[trigger_i]).GetInterval() == search_interval): # if current trigger interval is 12
                #add to the end of the trigger new line of code
                #print orig_simple_triggers[trigger_i]

                orig_simple_triggers[trigger_i] = list(orig_simple_triggers[trigger_i]) # convert immutable tuple-trigger to variable trigger-list (a list of 2 elements: interval and opblock-list)
                orig_simple_triggers[trigger_i][1].append(insert_block) # attached to op-bloсk-list a new element (line of code)
                orig_simple_triggers[trigger_i] = tuple(orig_simple_triggers[trigger_i]) # restore the structure of trigger's op-block (collect a list of items in the immutable tuple)
                #print "========= injected ============"
                #print orig_simple_triggers[trigger_i]

                break

    def modmerge(var_set):
      try:
            var_name_1 = "simple_triggers"
            orig_simple_triggers = var_set[var_name_1]
    # Add a new line to the end of the first found the 12-hour Simple Trigger
            modmerge_simple_triggers(orig_simple_triggers, 12, (call_script, "script_navigation_init_wind"))
        except KeyError:
            errstring = "Variable set does not contain expected variable: "%s"." % var_name_1
            raise ValueError(errstring)

    Parties:

    Nothing to be scripted. In this example, some towns have new coordinates and names:
    static_parties_parties.py said:
    ... default module_parties.py header ...

    parties = [

          ("town_1","Funai",  pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-127.496864, -99.361931),[], -176.353),
          ("town_2","Hatinohe",    pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(83.973747, 25.65699:cool:,[], 0),
          ("town_3","Tokushima",  pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-78.504913, -83.375710),[], 153.912),
          ("town_4","Okayama",    pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-101.799500, -67.782112),[], 431.234),
          ("town_5","Kyoto",  pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-47.491726, -68.609337),[], 104.61),
          ("town_6","Niigata",  pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(33.883018, -8.784881),[], 239.225),
          ("town_7","Toyama",  pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-22.662624, -37.36145:cool:,[], 166.94:cool:,
        ...
    ]

    Particles:

    No extra scripting, only new particles . Example:
    YourModName_particle_systems.py said:
    ... default module_particle_systems.py header ...

    particle_systems = [

          ... new particles ...
    ]

    Scene props:

    Scene_prop list is a ordinary Python-list and subordinated to certain actions over the list: https://docs.python.org/2/tutorial/datastructures.html#more-on-lists. In this example performs a search of specified prop-objects and inserting the new ones before:
    YourModName_scene_props.py said:
    ...default module_scene_props.py header ...

    def modmerge_scene_props(orig_scene_props):
    # Inserting new tuples BEFORE searched objects
            # The result of the injection can be checked in ID_scene_props.py

    for n in range(len(orig_scene_props)): # Run through all the rows of the list scene_props
    if orig_scene_props[n][0] == "ship_b" and orig_scene_props[n-1][0] != "small_blue_ship": #  if the current object is the desired and before him are no new yet
    orig_scene_props.insert(n, ("small_blue_ship",0,"small_blue_ship","bo_ship", [])) # insert new object before the found
    elif orig_scene_props[n][0] == "ship_c_sail_off" and orig_scene_props[n-1][0] != "ship_b_sail_off": # else, if the current object is the second desired and before him are no new
    orig_scene_props.insert(n, ("ship_b_sail_off",0,"ship_b_sail_off","bo_ship_b_sail_off", [])) # insert second new object before the found
    elif orig_scene_props[n][0] == "ramp_small_a" and orig_scene_props[n-1][0] != "ship_d_sail_off": # else, if the current object is the third desired and before him are no new
    orig_scene_props.insert(n, ("ship_d_sail_off",0,"ship_d_sail_off","bo_ship_d_sail_off", [])) # insert third new object before the found

    def modmerge(var_set):
      try:
            var_name_1 = "scene_props"
            orig_scene_props = var_set[var_name_1]
            modmerge_scene_props(orig_scene_props) # Adding new scene_props in specified places list
        except KeyError:
            errstring = "Variable set does not contain expected variable: "%s"." % var_name_1
            raise ValueError(errstring)
  14. Shcherbyna

    B Tutorial Other ModMerger usage

    ru-board: http://rusmnb.ru/index.php?topic=8964.msg332618#msg332618 How to install modmerger-pack 1. Download, unzip the latest module system: Module System (TaleWorlds Download Server) 2. Download, install Python 2.7. Take better .msi, do not have to configure Path. 3. Copy the module Native...
  15. Shcherbyna

    [Plugin] MB Warband API (Sublime Text 3 Syntax Plugin)

    Yes.. Sublime3 + MB API plugin is a new level of Warband Scripting =) Is [MUST HAVE] convenience and speed.

    The plugin has a simple realisation based on snippets, so do not even require knowledge of Python to edit or add new staff such as new langs, snippets, syntax colors, etc:

    mb_warband_api.py - F1-help functions (show F1 window, insert selected operator)
    warband_api_help_en.json - EN help data base
    warband_api_help_ru.json - RU help data base
    val_sub.sublime-snippet - operator snippet
    mb_warband_api.JSON-tmLanguage - source of syntax colors
    mb_warband_api.tmLanguage - syntax colors (compiled)


    For example a new structure operator new_script which unfolds to:

        # "script_name"
        # Description
        # Input: none
        # Output: none

        ("name",
        [
            |
        ]),

    is snippet:
    new_script.sublime-snippet said:
    <snippet>
        <content>
    <![CDATA[# "script_${1:name}"
    # ${2:grin:escription}
    # Input: ${3:none}
    # Output: ${4:none}
    ("${1}",
    [
        ${5}
    ]),
    ]]>

    </content>
        <tabTrigger>
    new_script</tabTrigger>
        <scope>
    source.mb_warband_api</scope>
        <description>
    Script STRUCTURE</description>
    </snippet>
  16. Shcherbyna

    [Plugin] MB Warband API (Sublime Text 3 Syntax Plugin)

    Ikaguia said:
    I wish this was for N++, whatever, great job mate!
    Before this time N++ was my favore code editor.. But when Projects consisted of more than a dozen files, and between them have to constantly switch, I switched to Sublime with his side bars, python-based plugins, multiline editing, others nice features and no regrets.

    Cheers =)
  17. Shcherbyna

    [Plugin] MB Warband API (Sublime Text 3 Syntax Plugin)

    Ru-board: http://rusmnb.ru/index.php?topic=19691.0 Download: mb_warband_api_1.165_sublime3_plugin.zip New in ver: 1.165.0 + Support M&B module system v1.165 + New plugin command: Command Palette ⇒ cb (MB Warband API: Clear Bytecode (*.pyc)) + Plugin install: via Package Control unzip to...
  18. Shcherbyna

    Abandoning a castle or town? Pillage Script?

    wld427 said:
    or simply add a function in the town or castle menu to abandon the town or castle, and it returns to the last owner.
    Take a look "village_loot_no_resist" menu option for looting.
    Slot_town_lord keeps a castle_owner_id. You must restore it after capture or reset.
    script_give_center_to_faction_aux said:
    (party_set_slot, ":center_no", slot_town_lord, stl_unassigned),
    (party_set_banner_icon, ":center_no", 0),#Removing banner
Back
Top Bottom