Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
That was actually the tutorial I just came from, lol.

In terms of code examples, one thing I'm trying to do is spawn 20 of the same troop type, but I don't want to have to copy paste the same spawn_agent and accompanying code over and over again. Hoping that would be possible to do with loops.

I don't really have a background in programming, so any outside resource I look at tends to have a lot of prerequisite knowledge required to understand.

Thanks for the quick response!
 
Got Guitarma? said:
In terms of code examples, one thing I'm trying to do is spawn 20 of the same troop type, but I don't want to have to copy paste the same spawn_agent and accompanying code over and over again. Hoping that would be possible to do with loops.

sure you can use a loop for that, but first check if the operation cant already solve your problem. As a example if you are still on setup phase you have

Code:
set_visitors                                 = 1264  # (set_visitors, <entry_no>, <troop_id>, <number_of_troops>),
                                                     # Save as (set_visitors), but spawns an entire group of some troop type.

or how the game handles reinforcements waves
Code:
add_reinforcements_to_entry              = 1930  # (add_reinforcements_to_entry, <mission_template_spawn_record>, <wave_size>),
                                                 # For battle missions, adds reinforcement wave to the specified spawn record (not the entry point). Additional parameter determines relative wave size. Agents in reinforcement wave are taken from all parties of the side that the entry point belongs to due to mtef_team_* flags.
 
Is it normal that upon using the tf_guarantee_polearm on a troop it always spawn but never uses said polearm?

I've run some tests with Swadian Footmen. By default, they can spawn with swords, picks and spears, and they will use any of those for combat.

Upon applying the tf_guarantee_polearm flag to them (I'm using the 1.171 module system), all Swadian footmen (I've run 200 x 200 footmen on custom battles just to test it) spawn with spears in addition to swords or picks. However, they never use said spears, always keeping them in their backs, giving preference to onehanded weapons.

I've buffed the Footmen polearm proficiency up to 100, 20 points above onehanded proficiency.

Same situation actually applies to any troop who receives onehanded+polearm via the troop flag.
 
JhonBrazil said:
Is it normal that upon using the tf_guarantee_polearm on a troop it always spawn but never uses said polearm?

base game AI is quite simple, with simple rules. Give a spear to a troop (plus a secondary weak weapon like a dagger), and it will use the spear. If you try something more complicate like a sword and spear, then you need to experiment with the boundaries for the calculation of what is the best weapon (engine-wise).

OSP Formations, as a example, implements this logic on the modsys instead, so you can choose parameters like if you should consider just damage, damage plus reach, speed, etc, when choosing the best weapon.

You also have battle commands for manual selection (use polearms, use blunt, no ranged weapons, etc). Some orders are Native, others would require coding.

Either keep it simple or use a custom AI code for weapons.
 
Hello, i'm getting this error while trying to merge Custom Troop Trees Feature

Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting faction data...
Exporting item data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting scene data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting troops data
Exporting particle data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_party_tmps.py", line 2, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting quest data...
Exporting info_page data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
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 3, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting postfx_params...

What's wrong. I even cannot understand the compiler
 
KnightV said:
Hello, i'm getting this error while trying to merge Custom Troop Trees Feature

Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting faction data...
Exporting item data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting scene data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting troops data
Exporting particle data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_party_tmps.py", line 2, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting quest data...
Exporting info_page data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
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 3, in <module>
    from process_operations import *
  File "D:\Others\The Last Calradia Module System\process_operations.py", line 1
7, in <module>
    from module_party_templates import *
  File "D:\Others\The Last Calradia Module System\module_party_templates.py", li
ne 346, in <module>
    modmerge(var_set)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 297, in mo
dmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 239, in mo
dmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\Others\The Last Calradia Module System\modmerger.py", line 287, in mo
dmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting postfx_params...

What's wrong. I even cannot understand the compiler

  Everyone gets that.  You can't use build_module.bat  you have to use WRECK  compile.bat
it's one of the weaknesses of custom troops.  The mod author doesn't really have time for support so its something you just have to figure out by yourself.
Or at least, that's what I did.  You'd think since modmerger was involved you could do something clever with wreck but actually it works fine.  I usually on any other add-in would have used WRECK to check for syntax errors (much faster than build_module.bat) but ran build_module.bat anyway for the final build for the public.  They tend to see different problems.  it's possible I was just too shy to pester him; I never actually asked.  He might have quickly walked me through something, but if you use WRECK you can get the add-in up and running.  It gave me the needed heads up to get upstab spear animations going (although you sort of have to again know what you're doing - he has it turned off by default).  It also has the option to start as king, which I broke out and merged by hand for my v156 build Phantasy 2018.  So been there/done that, all sides of the puzzle.

  Although I did use custom troop trees in v155 Phantasy 2018, in my opinion it could stand some further reforms.  The custom troop trees seem twitchy when exporting a savegame from one PC to another, which I do often, and they don't repopulate as nicely as I'd like, possibly because I use many skins not just male and female human.  I've decided to try to not modmerge next time but to insert the code by hand next time, as it seemed to not get along gracefully with Tournament Play Enhancements from Floris.  But I might be doing something foolish.  If you close your eyes and use compile.bat from a correctly installed WRECK this add in works.

  Good luck

  - GS
 
PitchPL said:
First check that you create loop trought all players.
Then read something about mp events


https://forums.taleworlds.com/index.php/topic,94854.0.html

I have already been using this:

(multiplayer_send_2_int_to_player, ":player_no", multiplayer_event_set_attached_scene_prop, ":player_agent_id", ":parachute_instance_id"),

Wouldn't that do the job?
 
kalarhan said:
JhonBrazil said:
Is it normal that upon using the tf_guarantee_polearm on a troop it always spawn but never uses said polearm?

base game AI is quite simple, with simple rules. Give a spear to a troop (plus a secondary weak weapon like a dagger), and it will use the spear. If you try something more complicate like a sword and spear, then you need to experiment with the boundaries for the calculation of what is the best weapon (engine-wise).

OSP Formations, as a example, implements this logic on the modsys instead, so you can choose parameters like if you should consider just damage, damage plus reach, speed, etc, when choosing the best weapon.

You also have battle commands for manual selection (use polearms, use blunt, no ranged weapons, etc). Some orders are Native, others would require coding.

Either keep it simple or use a custom AI code for weapons.


Thanks kalarhan, setting most onehanded weapons as secondary weapons worked fine.

EDIT: actually, it did not. I forgot that setting a weapon as secondary only makes it impossible to be draw  :facepalm:
Since having unusable swords on the belt is only beneficial for looks, I guess i'll follow through with spear-only armed footman.
 
pete99 said:
PitchPL said:
First check that you create loop trought all players.
Then read something about mp events


https://forums.taleworlds.com/index.php/topic,94854.0.html

I have already been using this:

(multiplayer_send_2_int_to_player, ":player_no", multiplayer_event_set_attached_scene_prop, ":player_agent_id", ":parachute_instance_id"),

Wouldn't that do the job?

Nevermind, may have just found the solution. Thanks.
 
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting faction data...
Exporting item data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting scene data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting troops data
Exporting particle data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting party_template data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting quest data...
Exporting info_page data...
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_scripts.py", line 4, in <module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_mission_tmps.py", line 5, in <module>
    from module_mission_templates import *
  File "D:\The Last Calradia Module System\module_mission_templates.py", line 25
63
    bird_system = (15, 0, 0,
                ^
SyntaxError: invalid syntax
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
ERROR Must be called from a module_*.py, called from module: modmerger.py
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
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 3, in <module>
    from process_operations import *
  File "D:\The Last Calradia Module System\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "D:\The Last Calradia Module System\module_scripts.py", line 76451, in <m
odule>
    modmerge(var_set)
  File "D:\The Last Calradia Module System\modmerger.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 239, in modmerge_
_
    _temp.__dict__[mergefn_name](var_dict)
  File "D:\The Last Calradia Module System\modmerger.py", line 287, in modmerge
    raise ValueError(errstring)
ValueError: Must be called from a module_*.py, called from module: modmerger.py
Exporting postfx_params...

i am getting this while trying to implement PBOD again
 
Hello again everyone,

I'm trying to make a multiplayer mod that requires some new key bindings. I looked thru lav's header_operations.py and found the key_clicked operation, but it only allows you to store the key that's pressed, not the player/agent ID that pressed it. I'm assuming this would cause all players to react as if they had just pressed the key, rather than just the one actually pressing the key. Either that, or it's only a singleplayer function. Whatever happens, I need to find some kind of work around.

Anyone got any ideas?

While I'm here, I'd also like to know if all of the orders listed in headers_mission_templates.py actually work in Native, even the ones that aren't used in the base game.

Any and all help is appreciated.

Thanks!
 
Guitarma said:
Hello again everyone,

I'm trying to make a multiplayer mod that requires some new key bindings. I looked thru lav's header_operations.py and found the key_clicked operation, but it only allows you to store the key that's pressed, not the player/agent ID that pressed it. I'm assuming this would cause all players to react as if they had just pressed the key, rather than just the one actually pressing the key. Either that, or it's only a singleplayer function. Whatever happens, I need to find some kind of work around.

Anyone got any ideas?

While I'm here, I'd also like to know if all of the orders listed in headers_mission_templates.py actually work in Native, even the ones that aren't used in the base game.

Any and all help is appreciated.

Thanks!

It is technically a client operation. You can run a mission trigger or presentation on a client and listen for a key input. This can then be sent to the server using the multiplayer_send_message_to_server or one of the multiplayer_send_int_to_server operations.
 
Status
Not open for further replies.
Back
Top Bottom