modmerger ..how to??

Users who are viewing this thread

JC LEON

Sergeant at Arms
hi I'm trying to create my own mod as I say in other post and thaks to Leikeze and other nice peoples I' going forward  step by step..

now i'm trying to use modmerge to merge freelancer 1.51 modhttp://www.moddb.com/mods/mount-blade-warband-freelancer-mod/downloads/freelancer-mod-ver-151-modmerger-source
with my native installation

so i downlaoaded modmerger kit 0.2.5 extracted it into my module system folder (1.166) and installed it as specified into readme clicking on "modmerger_installer.py" and entered "1" to install iwth cofirmation

after that followed this guide https://forums.taleworlds.com/index.php?topic=320834.0 and I Setted up the module system version to avoid build errors:

Module_system 1.166/modmerger_options.py
# check and fill in defaults for certain required variables
try:
    module_sys_info["version"]
except KeyError:
    # assume version to be latest version that modmerger was tested on
    module_sys_info["version"] = 1166

since I'm usin 1.166 module system and after hat


I extracted the freelancer1.51 modmerger rar and opied all files into my module system directory

after that I gone in


Module_system 1.166/modmerger_options.py

  Add new mod to mods_active list.


mods_active = [
# insert the active mod names here
  "freelancer", # description
#    "anothermod",
]



named my mod freelancer an saved


go built module!

launched my mod but never is changed...

thi is a screen of my modmerger_options.py


http://s11.postimg.org/90pptsj9v/modmerger.jpg


where i wrong??
sorry for my bad english


 
Do all of your module files have this at their end? If not then you did something wrong while installing Modmerger.

Code:
# modmerger_start version=201 type=2
try:
    component_name = "dialogs"
    var_set = { "dialogs" : dialogs }
    from modmerger import modmerge
    modmerge(var_set)
except:
    raise
# modmerger_end
 
Lord of Shadows said:
Do all of your module files have this at their end? If not then you did something wrong while installing Modmerger.

Code:
# modmerger_start version=201 type=2
try:
    component_name = "dialogs"
    var_set = { "dialogs" : dialogs }
    from modmerger import modmerge
    modmerge(var_set)
except:
    raise
# modmerger_end

no one of my module files have tihs code at he end .. only the freelancer*.py files from the freelancer 1.51 modmerger folder


tried to uninistall and reinstall modmerger but the result is the same...
 
tried at work computer (LOL) and modmerger installed successefully and i have the rigth lines of codes for all files in the modmerger modules

copied the freelancer_modmerger files into my module system folder and after i commented the floris code built the module and obtained this

Code:
 File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\proce
ss_operations.py", line 22, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Exporting faction data...
Exporting item data...
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\proce
ss_operations.py", line 22, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Exporting scene data...
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\proce
ss_operations.py", line 22, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Exporting troops data
Exporting particle data...
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\proce
ss_operations.py", line 22, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\proce
ss_operations.py", line 22, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\proce
ss_operations.py", line 22, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Exporting party_template data...
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_parties.py", line 4, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Exporting quest data...
Exporting info_page data...
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\proce
ss_operations.py", line 22, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\proce
ss_operations.py", line 22, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_game_menus.py", line 5, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\proce
ss_operations.py", line 22, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_dialogs.py", line 6, in <module>
    from module_dialogs import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_dialogs.py", line 26293, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_dialogs.py", line 197, in modmerge
    pos = FindDialog_i(orig_dialogs, anyone|plyr, "lord_talk", "lord_leave_priso
n")
NameError: global name 'FindDialog_i' is not defined
Injecton 4 failed: global name 'GameMenuOptionWrapper' is not defined
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\proce
ss_operations.py", line 22, in <module>
    from module_game_menus import *
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modul
e_game_menus.py", line 14518, in <module>
    modmerge(var_set)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\modme
rger.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 446, in modmerge
    modmerge_game_menus(orig_game_menus)
  File "C:\Games\Mount&Blade Warband\Modules\NativeMod\Module_system 1.166\freel
ancer_game_menus.py", line 407, in modmerge_game_menus
    menuID = GameMenuOptionWrapper(menulist[i]).GetId()
NameError: global name 'GameMenuOptionWrapper' is not defined
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
 
I'm trying now to add freelancer 1.51 but when i build the module i have no errors but freelancer ingame dont work

I noticed that frrelancer_*.py files are untouched during the build procees ....is this normal
??

this is my modmerger_options.py file

http://s18.postimg.org/7a2x6a3bd/modmerger_options.jpg
 
ok thanks.. now freelancer files were mergd but i have some error on compiling..

i know that in feelancer merger kit there are some floris codes... i searched for them in every file and commented the floris source but have some error on compile even freelancer works ingame appearently

this is compile errors

Code:
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
WARNING: Usage of unassigned global variable: $g_next_pay_time
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
Error: Unable to find object:itm_trade_bread
ERROR: Illegal Identifier:itm_trade_bread
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: $g_next_pay_time
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
 
Code:
#+FREELANCER start
freelancer_version = 15
#Floris or no Diplomacy:
#freelancer_can_use_item = "script_troop_can_use_item" 
#with Diplomacy: 
freelancer_can_use_item = "script_dplmc_troop_can_use_item"

Code:
  # Can a troop qualify to use this item?
  # Returns 1 = yes, 0 = no.
  ("dplmc_troop_can_use_item",
    [
      (store_script_param, ":troop", 1),
      (store_script_param, ":item", 2),
      (store_script_param, ":item_modifier", 3),

      #(item_get_slot, ":difficulty", ":item", dplmc_slot_item_difficulty),
      (item_get_difficulty, ":difficulty", ":item"),
      (item_get_type, ":type", ":item"),
      (try_begin),
        (eq, ":difficulty", 0), # don't apply imod modifiers if item has no requirement
      (else_try),
        (eq, ":item_modifier", imod_stubborn),
        (val_add, ":difficulty", 1),
      (else_try),
        (eq, ":item_modifier", imod_timid),
        (val_sub, ":difficulty", 1),
      (else_try),
        (eq, ":item_modifier", imod_heavy),
        (neq, ":type", itp_type_horse), #heavy horses don't increase difficulty
        (val_add, ":difficulty", 1),
      (else_try),
        (eq, ":item_modifier", imod_strong),
        (val_add, ":difficulty", 2),
      (else_try),
        (eq, ":item_modifier", imod_masterwork),
        (val_add, ":difficulty", 4),
      (try_end),

      (item_get_type, ":type", ":item"),
      (try_begin),
        (eq, ":type", itp_type_horse),
        (store_skill_level, ":skill", skl_riding, ":troop"),
      (else_try),
        (this_or_next|eq, ":type", itp_type_crossbow),
        (this_or_next|eq, ":type", itp_type_one_handed_wpn),
        (this_or_next|eq, ":type", itp_type_two_handed_wpn),
        (this_or_next|eq, ":type", itp_type_polearm),
        (this_or_next|eq, ":type", itp_type_head_armor),
        (this_or_next|eq, ":type", itp_type_body_armor),
        (this_or_next|eq, ":type", itp_type_foot_armor),
          (eq, ":type", itp_type_hand_armor),
        (store_attribute_level, ":skill", ":troop", ca_strength),
      (else_try),
        (eq, ":type", itp_type_shield),
        (store_skill_level, ":skill", skl_shield, ":troop"),
      (else_try),
        (eq, ":type", itp_type_bow),
        (store_skill_level, ":skill", skl_power_draw, ":troop"),
      (else_try),
        (eq, ":type", itp_type_thrown),
        (store_skill_level, ":skill", skl_power_throw, ":troop"),
      (try_end),

      (try_begin),
        (lt, ":skill", ":difficulty"),
        (assign, reg0, 0),
      (else_try),
        (assign, reg0, 1),
      (try_end),
    ]),
 
Lord of Shadows said:
Code:
#+FREELANCER start
freelancer_version = 15
#Floris or no Diplomacy:
#freelancer_can_use_item = "script_troop_can_use_item" 
#with Diplomacy: 
freelancer_can_use_item = "script_dplmc_troop_can_use_item"

Code:
  # Can a troop qualify to use this item?
  # Returns 1 = yes, 0 = no.
  ("dplmc_troop_can_use_item",
    [
      (store_script_param, ":troop", 1),
      (store_script_param, ":item", 2),
      (store_script_param, ":item_modifier", 3),

      #(item_get_slot, ":difficulty", ":item", dplmc_slot_item_difficulty),
      (item_get_difficulty, ":difficulty", ":item"),
      (item_get_type, ":type", ":item"),
      (try_begin),
        (eq, ":difficulty", 0), # don't apply imod modifiers if item has no requirement
      (else_try),
        (eq, ":item_modifier", imod_stubborn),
        (val_add, ":difficulty", 1),
      (else_try),
        (eq, ":item_modifier", imod_timid),
        (val_sub, ":difficulty", 1),
      (else_try),
        (eq, ":item_modifier", imod_heavy),
        (neq, ":type", itp_type_horse), #heavy horses don't increase difficulty
        (val_add, ":difficulty", 1),
      (else_try),
        (eq, ":item_modifier", imod_strong),
        (val_add, ":difficulty", 2),
      (else_try),
        (eq, ":item_modifier", imod_masterwork),
        (val_add, ":difficulty", 4),
      (try_end),

      (item_get_type, ":type", ":item"),
      (try_begin),
        (eq, ":type", itp_type_horse),
        (store_skill_level, ":skill", skl_riding, ":troop"),
      (else_try),
        (this_or_next|eq, ":type", itp_type_crossbow),
        (this_or_next|eq, ":type", itp_type_one_handed_wpn),
        (this_or_next|eq, ":type", itp_type_two_handed_wpn),
        (this_or_next|eq, ":type", itp_type_polearm),
        (this_or_next|eq, ":type", itp_type_head_armor),
        (this_or_next|eq, ":type", itp_type_body_armor),
        (this_or_next|eq, ":type", itp_type_foot_armor),
          (eq, ":type", itp_type_hand_armor),
        (store_attribute_level, ":skill", ":troop", ca_strength),
      (else_try),
        (eq, ":type", itp_type_shield),
        (store_skill_level, ":skill", skl_shield, ":troop"),
      (else_try),
        (eq, ":type", itp_type_bow),
        (store_skill_level, ":skill", skl_power_draw, ":troop"),
      (else_try),
        (eq, ":type", itp_type_thrown),
        (store_skill_level, ":skill", skl_power_throw, ":troop"),
      (try_end),

      (try_begin),
        (lt, ":skill", ":difficulty"),
        (assign, reg0, 0),
      (else_try),
        (assign, reg0, 1),
      (try_end),
    ]),

ok thanks.. but i cannot manage to find the second code.. in which file  must I search??
 
Lord of Shadows said:
You need to add it to module_scripts because it doesn't exist and then use the "with Diplomacy" option as shown in the first code.

but this even if i use the native module standard as base of my mod without diplomacy??
 
ok thanks...

I' doing differlently now.

I'm using warband 1.158( are there noticeable differences with 1.166 or I can continue to use 1.158?) and I'm using how source diplomacy 4.2 and module compiled and worked fine
merged pbod 0.92 and module compiled and worked fine
merged freelancer 1.151 and I have these errors on compile

Code:
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
Error: Unable to find object:itm_trade_bread
ERROR: Illegal Identifier:itm_trade_bread
exporting triggers...
exporting dialogs...
Checking global variable usages...
Imported 20 global variables for saved-game compatability that are not used.
Exporting postfx_params...

______________________________

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

only these two strings

Error: Unable to find object:itm_trade_bread
ERROR: Illegal Identifier:itm_trade_bread

 
Lord of Shadows said:
Just remove "trade" from it's name.

NOW ALL WORKS..great.. many thanks...

btw I must use 1.158 and no 1.166... there are substantial differecnes between the two version or I can continue to use 1.158 without worries..

firstly i was using warband verson .167 and modul system 1.166  ..could be that the cause of my problems?? (now I'm using 1.158 with mod_sys 1.15:cool:
 
Back
Top Bottom