This is what I get:
It opens just like a normal python file.
It opens just like a normal python file.
Caba`drin said:I never have quite understood why sphere's creations didn't get a bit more attention when they came out, but in any case, I have found his ModMerger framework to be extraordinarily useful...so useful that I added a few functions and patched a few bugs I noted in the current wrappers, and I figured I might as well release it aside from any of my mods that get packaged with it in case others might find it useful.
ModMerger additions (to the 0.2.5 hotix'd version)
Two files are changed from the standard ModMerger download
-util_common
-util_wrappers
and a new file
-util_animations
The changes include:
Two New Wrappers
-Dialog
-GameMenuOption
Three New Wrapper Functions
-FindDialog
-FindDialog_i
-FindTrigger_i
One new general function
-list_find_first_containing_i
One new utility function set
-util_animations
A few small bugfixes to wrappers and their functions
Zirkhovsky said:Sorry for bringing such an old post up, but I found this thread the most suitable place:
After running modmerger_installer.py and installing it, it shows:
then the cmd closes itself.Traceback (most recent call last):
File "C:\Users\Spring\Desktop\Module Sys\Module_system 1.153\modmerger_installer.py", line 424, in (module)
main_menu ()
File "C:\Users\Spring\Desktop\Module Sys\Module_system 1.153\modmerger_installer.py", line 483, in main_menu
install_modmerger ()
File "C:\Users\Spring\Desktop\Module Sys\Module_system 1.153\modmerger_installer.py", line 339, in install_modmerger
if( brand_component_source_file(comp_name) ):
File "C:\Users\Spring\Desktop\Module Sys\Module_system 1.153\modmerger_installer.py", line 233, in brand_component_source_file
f - open(source_filename)
|OError| [Error 2] No such file or directory : 'module_animations.py'
HyperCharge said:Zirkhovsky said:Sorry for bringing such an old post up, but I found this thread the most suitable place:
After running modmerger_installer.py and installing it, it shows:
then the cmd closes itself.Traceback (most recent call last):
File "C:\Users\Spring\Desktop\Module Sys\Module_system 1.153\modmerger_installer.py", line 424, in (module)
main_menu ()
File "C:\Users\Spring\Desktop\Module Sys\Module_system 1.153\modmerger_installer.py", line 483, in main_menu
install_modmerger ()
File "C:\Users\Spring\Desktop\Module Sys\Module_system 1.153\modmerger_installer.py", line 339, in install_modmerger
if( brand_component_source_file(comp_name) ):
File "C:\Users\Spring\Desktop\Module Sys\Module_system 1.153\modmerger_installer.py", line 233, in brand_component_source_file
f - open(source_filename)
|OError| [Error 2] No such file or directory : 'module_animations.py'
Im sorry for this.But i have same error.Why she is doing that ?
Same,Cmd closing after one second.
What should i do ?
(module_system version is 1.15
How to add a new mission_template?
YourModName_mission_templates.py said:... default mt header .......
mission_templates = [
... here is the new mt ...
]
from util_common import *
from util_wrappers import *
def add_mission_templates(orig_mission_templates, add_mission_templates, check_duplicates = True):
addmode = ADDMODE_REPLACE_EXIST
if not check_duplicates:
addmode = ADDMODE_APPEND
return add_objects(orig_mission_templates, add_mission_templates, addmode)
def modmerge(var_set):
try:
var_name_1 = "mission_templates"
orig_mission_templates = var_set[var_name_1]
add_mission_templates(orig_mission_templates, mission_templates, True) # add a new mission_tmplt / добавить новую миссию
except KeyError:
errstring = "Variable set does not contain expected variable: \"%s\"." % var_name_1
raise ValueError(errstring)
Taragoth said:I'm no python wiz, but is anyone able to help me work out how to 'merge' the code from the *mymod_ files to the module system but not compile to text. I'm sure it has to be possible
G
wrwlf said:Has anyone ever found a way to do this?
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
File "process_global_variables_unused.py", line 6, in <module>
from process_operations import *
File "C:\Users\Noah\Desktop\M&B Modding 2.0\Expanded Calradia\Module_system 1.166\process_operations.py", line 30, in <module>
from module_presentations import *
File "C:\Users\Noah\Desktop\M&B Modding 2.0\Expanded Calradia\Module_system 1.166\module_presentations.py", line 11915, in <module>
modmerge(var_set)
File "C:\Users\Noah\Desktop\M&B Modding 2.0\Expanded Calradia\Module_system 1.166\modmerger.py", line 297, in modmerge
modmerge__(modcomp_name,var_dict)
File "C:\Users\Noah\Desktop\M&B Modding 2.0\Expanded Calradia\Module_system 1.166\modmerger.py", line 239, in modmerge__
_temp.__dict__[mergefn_name](var_dict)
File "C:\Users\Noah\Desktop\M&B Modding 2.0\Expanded Calradia\Module_system 1.166\modmerger.py", line 287, in modmerge
raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
from header_common import *
from header_presentations import *
from header_mission_templates import *
from ID_meshes import *
from header_operations import *
from header_triggers import *
from module_constants import *
from header_items import *
from module_items import *
import string
####################################################################################################################
# Each presentation record contains the following fields:
# 1) Presentation id: used for referencing presentations in other files. The prefix prsnt_ is automatically added before each presentation id.
# 2) Presentation flags. See header_presentations.py for a list of available flags
# 3) Presentation background mesh: See module_meshes.py for a list of available background meshes
# 4) Triggers: Simple triggers that are associated with the presentation
####################################################################################################################
presentations = [
("all_items", 0, mesh_load_window, [
(ti_on_presentation_load,
[
(presentation_set_duration, 999999),
(set_fixed_point_multiplier, 1000),
(create_combo_label_overlay, "$g_presentation_obj_1"),
(position_set_x, pos1, 500),
(position_set_y, pos1, 675),
(overlay_set_position, "$g_presentation_obj_1", pos1),
(overlay_add_item, "$g_presentation_obj_1", "@Weapons"),
(overlay_add_item, "$g_presentation_obj_1", "@Armors"),
(overlay_add_item, "$g_presentation_obj_1", "@Others"),
(overlay_set_val, "$g_presentation_obj_1", "$temp"),
## back
(create_game_button_overlay, "$g_presentation_obj_5", "@Done"),
(position_set_x, pos1, 900),
(position_set_y, pos1, 25),
(overlay_set_position, "$g_presentation_obj_5", pos1),
(str_clear, s0),
(create_text_overlay, "$g_presentation_obj_6", s0, tf_scrollable),
(position_set_x, pos1, 50),
(position_set_y, pos1, 100),
(overlay_set_position, "$g_presentation_obj_6", pos1),
(position_set_x, pos1, 890),
(position_set_y, pos1, 560),
(overlay_set_area_size, "$g_presentation_obj_6", pos1),
(set_container_overlay, "$g_presentation_obj_6"),
(assign, ":num_items", len(items)),
(assign, "$temp_2", 0),
## types
(try_begin),
(eq, "$temp", 0), # weapons
(try_for_range, ":item_no", 0, ":num_items"),
(item_get_type, ":type", ":item_no"),
(this_or_next|is_between, ":type", itp_type_one_handed_wpn, itp_type_goods),
(is_between, ":type", itp_type_pistol, itp_type_animal),
(val_add, "$temp_2", 1),
(try_end),
(else_try),
(eq, "$temp", 1), # armors
(try_for_range, ":item_no", 0, ":num_items"),
(item_get_type, ":type", ":item_no"),
(is_between, ":type", itp_type_head_armor, itp_type_pistol),
(val_add, "$temp_2", 1),
(try_end),
(else_try),
(eq, "$temp", 2), # others
(try_for_range, ":item_no", 0, ":num_items"),
(item_get_type, ":type", ":item_no"),
(this_or_next|eq, ":type", itp_type_horse),
(this_or_next|eq, ":type", itp_type_goods),
(this_or_next|eq, ":type", itp_type_animal),
(eq, ":type", itp_type_book),
(val_add, "$temp_2", 1),
(try_end),
(try_end),
(store_div, ":height", "$temp_2", 11),
(store_mod, ":offset", "$temp_2", 11),
(val_min, ":offset", 1),
(val_add, ":height", ":offset"),
(store_mul, ":pos_y", ":height", 80),
(val_sub, ":pos_y", 80),
(assign, ":pos_x", 0),
(assign, ":slot_no", 0),
(try_for_range, ":item_no", 0, ":num_items"),
(item_get_type, ":type", ":item_no"),
(try_begin),
(eq, "$temp", 0), # weapons
(try_begin),
(this_or_next|is_between, ":type", itp_type_one_handed_wpn, itp_type_goods),
(is_between, ":type", itp_type_pistol, itp_type_animal),
(assign, ":continue", 1),
(else_try),
(assign, ":continue", 0),
(try_end),
(else_try),
(eq, "$temp", 1), # armors
(try_begin),
(is_between, ":type", itp_type_head_armor, itp_type_pistol),
(assign, ":continue", 1),
(else_try),
(assign, ":continue", 0),
(try_end),
(else_try),
(eq, "$temp", 2), # others
(try_begin),
(this_or_next|eq, ":type", itp_type_horse),
(this_or_next|eq, ":type", itp_type_goods),
(this_or_next|eq, ":type", itp_type_animal),
(eq, ":type", itp_type_book),
(assign, ":continue", 1),
(else_try),
(assign, ":continue", 0),
(try_end),
(try_end),
(eq, ":continue", 1),
## item slot
(create_mesh_overlay, reg1, "mesh_inv_slot"),
(position_set_x, pos1, 800),
(position_set_y, pos1, 800),
(overlay_set_size, reg1, pos1),
(position_set_x, pos1, ":pos_x"),
(position_set_y, pos1, ":pos_y"),
(overlay_set_position, reg1, pos1),
(create_mesh_overlay, reg1, "mesh_mp_inventory_choose"),
(position_set_x, pos1, 640),
(position_set_y, pos1, 640),
(overlay_set_size, reg1, pos1),
(position_set_x, pos1, ":pos_x"),
(position_set_y, pos1, ":pos_y"),
(overlay_set_position, reg1, pos1),
(troop_set_slot, "trp_temp_array_a", ":slot_no", reg1),
## item
(create_mesh_overlay_with_item_id, reg1, ":item_no"),
(position_set_x, pos1, 800),
(position_set_y, pos1, 800),
(overlay_set_size, reg1, pos1),
(store_add, ":item_x", ":pos_x", 40),
(store_add, ":item_y", ":pos_y", 40),
(position_set_x, pos1, ":item_x"),
(position_set_y, pos1, ":item_y"),
(overlay_set_position, reg1, pos1),
(troop_set_slot, "trp_temp_array_b", ":slot_no", reg1),
(troop_set_slot, "trp_temp_array_c", ":slot_no", ":item_no"),
(val_add, ":pos_x", 80),
(val_add, ":slot_no", 1),
(try_begin),
(ge, ":pos_x", 880),
(assign, ":pos_x", 0),
(val_sub, ":pos_y", 80),
(try_end),
(try_end),
(set_container_overlay, -1),
## items
]),
(ti_on_presentation_mouse_enter_leave,
[
(store_trigger_param_1, ":object"),
(store_trigger_param_2, ":enter_leave"),
(try_begin),
(eq, ":enter_leave", 0),
(try_for_range, ":slot_no", 0, "$temp_2"),
(troop_slot_eq, "trp_temp_array_a", ":slot_no", ":object"),
(troop_get_slot, ":item_no", "trp_temp_array_c", ":slot_no"),
(troop_get_slot, ":target_obj", "trp_temp_array_b", ":slot_no"),
(overlay_get_position, pos0, ":target_obj"),
(show_item_details, ":item_no", pos0, 100),
(assign, "$g_current_opened_item_details", ":slot_no"),
(try_end),
(else_try),
(try_for_range, ":slot_no", 0, "$temp_2"),
(troop_slot_eq, "trp_temp_array_a", ":slot_no", ":object"),
(try_begin),
(eq, "$g_current_opened_item_details", ":slot_no"),
(close_item_details),
(try_end),
(try_end),
(try_end),
]),
(ti_on_presentation_event_state_change,
[
(store_trigger_param_1, ":object"),
(store_trigger_param_2, ":value"),
(try_begin),
(eq, ":object", "$g_presentation_obj_1"),
(assign, "$temp", ":value"),
(start_presentation, "prsnt_all_items"),
(else_try),
(eq, ":object", "$g_presentation_obj_5"),
(presentation_set_duration, 0),
(try_end),
]),
]),
]
def modmerge_presentations(orig_presentations, check_duplicates = False):
if( not check_duplicates ):
orig_presentations.extend(presentations) # Use this only if there are no replacements (i.e. no duplicated item names)
else:
# Use the following loop to replace existing entries with same id
for i in range (0,len(presentations)-1):
find_index = find_object(orig_presentations, presentations[i][0]); # find_object is from header_common.py
if( find_index == -1 ):
orig_presentations.append(presentations[i])
else:
orig_presentations[find_index] = presentations[i]
# Used by modmerger framework version >= 200 to merge stuff
def modmerge(var_set):
try:
var_name_1 = "presentations"
orig_presentations = var_set[var_name_1]
modmerge_presentations(orig_presentations)
except KeyError:
errstring = "Variable set does not contain expected variable: \"%s\"." % var_name_1
raise ValueError(errstring)
mods_active = [
"dsettlements", # Dynamic Settlements (Alpha 2) - Fire&Blood
MM-Modpack: rubik's Battle Minimap (from Custom Commander)
Version
1.1
Expose mod options via "camp" if xgm_mod_options is also active.
Download
version 1.1 - http://www.filedropper.com/mmccminimap110
version 1.0 - http://www.filedropper.com/mmccminimap100
Screenshot