Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Carlos Danger said:
Can I make the soldiers dance instead of fight? and kinda have a dance off instead of fighting, and when ones loses they go unconscious?

what the ****

You could replace the punching animations with dance moves, and remove all weapons from soldiers. But I'd seriously dl that mod.

oh, for some reason my module won't compile, does anyone have any insights?

Error
Code:
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
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:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
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:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
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:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Exporting party_template data...
Traceback (most recent call last):
  File "process_parties.py", line 5, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "C:\Users\Andrew\Documents\redwars\Module System\process_operations.py",
line 18, in <module>
    from module_parties import *
  File "C:\Users\Andrew\Documents\redwars\Module System\module_parties.py", line
 112, in <module>
    ("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, f
ac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
NameError: name 'icon_castle_rhodok' is not defined
Exporting postfx_params...

______________________________

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

Snippet from module_parties
Code:
("castle_1","Fort_Culmarr",icon_castle_rhodok|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
  ("castle_2","Fort_Mayalurg",icon_castle_khergit|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(97.5, -2.2),[],75),
  ("castle_3","Bulugha_Fort",icon_castle_vaegir|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(47.5, 111.3),[],100),
  ("castle_4","Fort_Raghodir",icon_castle_vaegir|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(13.84,72.2),[],180),
  ("castle_5","Fort_Tehlrog",icon_castle_nord|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-20.8, 71.7),[],90),
  ("castle_6","Fort_Tilbaut",icon_castle_swazi|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(37.6, 17.1),[],55),
  ("castle_7","Fort_Sungeteche",icon_castle_vaegir|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(109.5, 41.5),[],45),
  ("castle_8","Fort_Jeirbe",icon_castle_vaegir|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(35.2, 89),[],30),
  ("castle_9","Fort_Jamiche",icon_castle_rhodok|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-7.5, -82.6),[],100),
  ("castle_10","Alburq_Fort",icon_castle_nord|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(26.85,80),[],110),
  ("castle_11","Fort_Curin",icon_castle_nord|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-27.50, 83.46),[],75),
  ("castle_12","Fort_Chalbek",icon_castle_nord|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(10.03, 75.77),[],95),
  ("castle_13","Fort_Kelredan",icon_castle_swazi|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-10.6, 17.6),[],115),

snippet from module_map_icons
Code:
("castle_swazi",mcn_no_shadow,"map_castle_swazi", 0.35,0),
  ("castle_nord",mcn_no_shadow,"map_castle_nord", 0.35,0),
  ("castle_balion",mcn_no_shadow,"map_castle_balion", 0.35,0),
  ("castle_khergit",mcn_no_shadow,"map_castle_khergit", 0.35,0),
  ("castle_sarranid",mcn_no_shadow,"map_castle_sarranid", 0.35,0),
  ("castle_helvetia",mcn_no_shadow,"map_castle_helvetia", 0.35,0),
  ("castle_vaegir",mcn_no_shadow,"map_castle_vaegir", 0.35,0),
  ("castle_rhodok",mcn_no_shadow,"map_castle_rhodok", 0.35,0),
 
@ScreamingCommie try double clicking on process_map_icons.py and after that run build_module.bat. (normally you should add map_icons, then compile, then add the parties that uses that map_icon)

EDIT: comment out your parties that uses that map icon, then compile the module, then uncomment those parties. If you are using those parties in scripts(and commenting them will make new errors), then change the map icon to a native one, then compile, then change them back to your map icons.
 
Gout a couple of events that add some troops to your party in case you choose a specific answer, like this:

Code:
      ("choice_27_2",[],"Offer them a place in your warband.",
       [
                (display_message, "@He joins you."),
          (party_add_members, "p_main_party", "trp_event_religious_fanatic_oldtown", 5),
	   (change_screen_return),
        ]
       ),

But haven't been able to figure out how to make that option only appear if there's actually room for 5 new troops in your party. Anyone got any ideas?
 
@Cozur, you could try this, havent tested it though

Code:
 ("choice_27_2", [(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
                        (ge,":free_capacity",5), # as you have 5 members being added
                        ],
        "Offer them a place in your warband.",
       [(display_message, "@5 Men join you."),
        (party_add_members, "p_main_party", "trp_event_religious_fanatic_oldtown", 5),
	(change_screen_return),
        ]
       ),


   ("choice_27_2b",  [(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
                     (lt,":free_capacity",5), # as you have 5 members needing added
                    ],
    "Leave (you dont have enough room for 5 men in your party )",
       [(change_screen_return),
        ]
       ),


 
The_dragon said:
@ScreamingCommie try double clicking on process_map_icons.py and after that run build_module.bat. (normally you should add map_icons, then compile, then add the parties that uses that map_icon)

EDIT: comment out your parties that uses that map icon, then compile the module, then uncomment those parties. If you are using those parties in scripts(and commenting them will make new errors), then change the map icon to a native one, then compile, then change them back to your map icons.

Huh, I never knew you had to do that. I backed up my module parties before I replaced the icons.

Thanks man!
 
ScreamingCommie said:
Carlos Danger said:
Can I make the soldiers dance instead of fight? and kinda have a dance off instead of fighting, and when ones loses they go unconscious?

what the ****

You could replace the punching animations with dance moves, and remove all weapons from soldiers. But I'd seriously dl that mod.
...that'll work nicely...
edit: works.
 
Good, can't wait for the release.

You could also replace the text that says "troop1 was knocked unconscious by troop2" to "troop1 was epicly served by troop2 and fainted". Dunno where that bit would be though.
 
@ScreamingCommie you can find that string in warband folder/languages/en/ui.csv

Make a copy of the folder 'en' and place it in your_mod/languages/
Then edit it.

________
Question: Couldn't the module system compile much much faster if there would be only one file that will call all compile functions? In this way getting rid of loading/saving all global vars/quick strings (loading/saving between each process) and also less parameters to call functions (most of them has variable_list and quick strings)?
 
The_dragon said:
Question: Couldn't the module system compile much much faster if there would be only one file that will call all compile functions? In this way getting rid of loading/saving all global vars/quick strings (loading/saving between each process) and also less parameters to call functions (most of them has variable_list and quick strings)?
Not by much according to my own compiler profiling results. Though to be fair, I've stuffed a lot of extra functionality in it that Native compiler doesn't have. At my estimates it could be at least 50% faster without all the fancy stuff, maybe even twice as fast.
 
It would appear my writer has made a mistake that has caused all the companion NPC dialogue to be mixed up, but it doesn't appear to have caused an error when compiling the modsys, is there any thing I should look out for that can cause such a glitch?

Another glitch (This time it's my own) has caused certain uniforms to have a washed out grey tone to them, fortunately this can only be seen in the inventory and notes, is there a way to fix this?
 
Hm, I'm struggling.

Is it possible to make the common_battle_inventory appear and disappear per click like the battle_order_panel?
I have made it so that pressing i in battle makes the troop ratio bar (http://forums.taleworlds.com/index.php/topic,53062.msg1368604.html#msg1368604) appear but I'd like to be able to let it disappear again by pressing the same button.

The only way I had until now for appear and disappear was to bind it to the battle_order_panel (so whenever a commando or the panel was activated, the troop ratio bar disappeared and one must click i again to have it shown), but I want it to work independently.
 
Lav said:
The_dragon said:
Question: Couldn't the module system compile much much faster if there would be only one file that will call all compile functions? In this way getting rid of loading/saving all global vars/quick strings (loading/saving between each process) and also less parameters to call functions (most of them has variable_list and quick strings)?
Not by much according to my own compiler profiling results. Though to be fair, I've stuffed a lot of extra functionality in it that Native compiler doesn't have. At my estimates it could be at least 50% faster without all the fancy stuff, maybe even twice as fast.
Actually I have to take my words back - measured vanilla and my own compiler and it's 24.9 seconds for a batch file with a bunch of python scripts vs 6.25 for a single python script. Heh, didn't even know I did such a good job. :lol:
 
Hello, is there a way to reduce an agent's attack speed? I have been working with agent_set_damage_modifier and agent_set_speed_modifier, but I still haven't found a way to reduce the attack speed.
 
Damian97 said:
Hello, is there a way to reduce an agent's attack speed? I have been working with agent_set_damage_modifier and agent_set_speed_modifier, but I still haven't found a way to reduce the attack speed.
IIRC attack speed is governed by weapon speed and troop's weapon proficiency. So there are two options:

1. Create several weapon duplicates with different speeds and replace them (quite a cumbersome solution).
2. Change troop proficiency during mission (not sure if it'll help though and it will affect all agents of the troop in question).
 
Lav said:
Damian97 said:
Hello, is there a way to reduce an agent's attack speed? I have been working with agent_set_damage_modifier and agent_set_speed_modifier, but I still haven't found a way to reduce the attack speed.
IIRC attack speed is governed by weapon speed and troop's weapon proficiency. So there are two options:

1. Create several weapon duplicates with different speeds and replace them (quite a cumbersome solution).
2. Change troop proficiency during mission (not sure if it'll help though and it will affect all agents of the troop in question).

Oh thanks, I didn't think about creating weapons with different speeds, and now I guess it's the only solution, but yes, it's quite cumbersome. I had tried changing troop proficiency during mission, but it hadn't worked. Thanks for your answer.
 
I added a nation chooser menu at character creation to wfas.
Could you help me to add items for the player before he sets the face of his character?
Choosing his nation happens in a monitor (?) called start_game_2. Wfas don't use start_character_ monitors.
I tryed to put the lines to some places but he remains naked or the converter reports bugs.

The shortened code:
Code:
      (try_begin),
        (eq,"$background_type",cb_belorussian),
        (troop_add_item, "trp_player","itm_mosk_armyak",0),
        (troop_add_item, "trp_player","itm_ukrine_prosta_shapka",0),
        (troop_add_item, "trp_player","itm_bread",0),
        (troop_add_item, "trp_player","itm_dried_meat",0),
        (troop_add_item, "trp_player","itm_cabbages",0),
        (troop_add_item, "trp_player","itm_cabbages",0),
      (else_try),
        (eq,"$background_type",cb_westerneu),
        (troop_add_item, "trp_player","itm_evropa_odejda_sela_b",0),
        (troop_add_item, "trp_player","itm_evropa_shlapa_b",0),
        (troop_add_item, "trp_player","itm_bread",0),
        (troop_add_item, "trp_player","itm_bread",0),
        (troop_add_item, "trp_player","itm_smoked_fish",0),
        (troop_add_item, "trp_player","itm_dried_meat",0),
      (try_end),

The following wfas lines after start_game_2:
Code:
  (
    "choose_skill",mnf_disable_all_keys,"You spot a battle-ready men in the distance.", 
    "none",
    [(assign,"$current_string_reg",10)],
    [
      ("begin_adventuring",[],"See what trouble is afoot.",[
           (set_show_messages, 0),
        ]),
    ]
  ),
 
Dusk Voyager said:
You can also reduce the troop agility on spawn to slow down the attack speed of the next agent.
Hmm, good idea, if agent stats get cached at spawn it might work. Though I would still rather modify weapon proficiency instead of agility - no side-effect of slowing down agent movement.
 
Lav said:
Hmm, good idea, if agent stats get cached at spawn it might work. Though I would still rather modify weapon proficiency instead of agility - no side-effect of slowing down agent movement.
You can always compensate by increasing their speed modifier (assuming the latter only affects their movement). Besides, lowering weapon proficiencies also has the side effect of reducing damage and accuracy by your logic (which can also be negated, but still).
 
Status
Not open for further replies.
Back
Top Bottom