Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I added 5 cultures:

        (else_try)   
          (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
     
          (faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_scrope_deserter"),
          (faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_scrope_sergeant"),
          (faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_scrope_messenger"),
          (faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_scrope_prison_guard"),
          (faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_scrope_castle_guard"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_a, "pt_kingdom_7_reinforcements_a"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_b, "pt_kingdom_7_reinforcements_b"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_c, "pt_kingdom_7_reinforcements_c"),
        (else_try),
          (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_8"),
     
          (faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_grey_deserter"),
          (faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_grey_sergeant"),
          (faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_grey_messenger"),
          (faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_grey_prison_guard"),
          (faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_grey_castle_guard"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_a, "pt_kingdom_8_reinforcements_a"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_b, "pt_kingdom_8_reinforcements_b"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_c, "pt_kingdom_8_reinforcements_c"),
        (else_try),
          (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_9"),
     
          (faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_delapole_deserter"),
          (faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_delapole_sergeant"),
          (faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_delapole_messenger"),
          (faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_delapole_prison_guard"),
          (faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_delapole_castle_guard"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_a, "pt_kingdom_9_reinforcements_a"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_b, "pt_kingdom_9_reinforcements_b"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_c, "pt_kingdom_9_reinforcements_c"),
        (else_try),
          (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_10"),
     
          (faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_clifford_deserter"),
          (faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_clifford_sergeant"),
          (faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_clifford_messenger"),
          (faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_clifford_prison_guard"),
          (faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_clifford_castle_guard"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_a, "pt_kingdom_10_reinforcements_a"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_b, "pt_kingdom_10_reinforcements_b"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_c, "pt_kingdom_10_reinforcements_c"),
        (else_try),
          (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_11"),
     
          (faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_mowbray_deserter"),
          (faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_mowbray_sergeant"),
          (faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_mowbray_messenger"),
          (faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_mowbray_prison_guard"),
          (faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_mowbray_castle_guard"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_a, "pt_kingdom_11_reinforcements_a"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_b, "pt_kingdom_11_reinforcements_b"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_c, "pt_kingdom_11_reinforcements_c"),
        (try_end),
      (try_end),
]),

Entire screwup here:

Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Exporting troops data
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Exporting party_template data...
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 4, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\process
_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files\Mount&Blade Warband\Modules\Module_system 1.125\module_
scripts.py", line 6049, in <module>
    (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
TypeError: 'int' object is not callable
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
 
Say, I build a new module with Module Editor thingy, its the latest version. Now, I tried to use Troop Editor to modify the party names and items and such. But the only thing I managed to edit was the looters, I switched their names and equipment, but when I try to touch any other faction, the game crashes at the street ambush part of the game. Anyone know why?
 
Hi, does someone know how I can get the player id (or agent id from which i can extract player id?) of an agent/player that attacks a sceneprop? Or at least someway to discover if that player has attacked the sceneprop.

It would be VERY helpful if a talented coder could answer this, I would be in your debt!

EDIT: For a multiplayer server
 
(position_get_x, ":attacker_agent_id", pos2),
(agent_get_player_id, ":attacker_player_id", ":attacker_agent_id"),
This only works on the server or single player, at least according to the conditions on ti_on_scene_prop_hit.
 
I tried that, couldnt get it to work.
Invalid agent id I believe.

EDIT: (I sent message to server with that agent/player as one of the parameters, when I tried to use the agent/player there, didn't work).
Other ideas?
 
A question:

I have a simple flat 400 tri mesh in Wings 3d file, that refuses to be exported - specifically, export runs w/o errors but output file is empty (no matter format). At the same time Wings saves/loads it into its own file format just fine.
Export is empty even when I assign hole material to all the triangles except one, or select arbitrary subsets. Cleanup does not help too.

So I essentially have the stuff, but can't get my hands on it somehow..  Any takers?



WookieWarlord said:
I tried that, couldnt get it to work.
Invalid agent id I believe.
When exactly it did not work? In part obtaining agent ID as Somebody wrote, or in part about sending ID btween server/client? Put some debug display_message -s in your code.
 
I found that stuff in module_scene_props, inside ti_on_scene_prop_hit, which apparently stores the id of the attacker inside the x component of pos2 (some hardcoded trigger magic), so if you use it outside, pos2 will be unassigned and the agent is invalid.
Also, I forgot this - (set_fixed_point_multiplier, 1), which might also explain whatever invalid value you get since ids are ints.
 
WookieWarlord said:
I tried that, couldnt get it to work.
Invalid agent id I believe.

EDIT: (I sent message to server with that agent/player as one of the parameters, when I tried to use the agent/player there, didn't work).
Other ideas?
Did you put it in the "ti_on_scene_prop_hit" trigger?

EDIT: Ninja'd
 
And now to noob questions! Or actually only one...


What means: Remember to link this entry via update path or party.templates? I guess that is required for custom troops, but I can't figure what I have to do. This text appears in Morgh's tools, in Warband when completing new troop.
 
You should probably ask this in Morgh's thread. Oh wait, you already did.
Nonetheless, the game has no way to know that your new troop exists, and so you have no way to access it. So you must find a preexisting troop (mercenaries are fair game), and make it upgrade to your new troop. Either that, or insert your new troop in a party template (it's a different menu option), so that it will show up in-game in some parties.
 
I already made it so that French militia upgrade to French Spearman ( my troop) and that they upgrade to French Pikeman (another).

But it doesn't happen in-game.

More precisely there isn't button to upgrade French Militia to French Spearman, there is only the button to upgrade it to Skirmisher/footman. Does the game allow more than two options? Because that may cause it...

E: Didn't work with only 2 options either...
 
Is there a way to port units from a vanilla MB mod to another?
I really want to port 268 BC units to Warband.

Edit: Items are possible too?
 
Elfy said:
I already made it so that French militia upgrade to French Spearman ( my troop) and that they upgrade to French Pikeman (another).

But it doesn't happen in-game.

More precisely there isn't button to upgrade French Militia to French Spearman, there is only the button to upgrade it to Skirmisher/footman. Does the game allow more than two options? Because that may cause it...

Start a new game. Troop upgrade trees are changed, but troop names and equipment aren't.
The Raven said:
Is there a way to port units from a vanilla MB mod to another?
I really want to port 268 BC units to Warband.

Edit: Items are possible too?
As long as you have the source, anything is possible.
As to text port - for items just add a new line and " 0" at the end (before the 0 that's already there), and you're good to go. As for troops, you'd have to change everything manually, since your item id changed and upgrade ids have also been changed, flags and facecodes are fair game though.
 
Status
Not open for further replies.
Back
Top Bottom