Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
KnightV said:
KnightV said:
i have add a new brf new textures but in game one armor is white what is wrong&&
What about it ??? And how to put scripts from file module_scripts_addon? I have pasted their in the end of file but appear errors " usage of unassign end variable"
I say about wse
Make sure the textures brf loads prior to the actual brf containing the materials.
So the resource loading order in module.ini should allways represent the following:
1. textures
2. materials
3. meshes

Just comment out the content of the WSE scripts untill you're going to use them.
 
Code:
#script_wse_multiplayer_message_received
# Called each time a composite multiplayer message is received
# INPUT
# script param 1 = sender player no
# script param 2 = event no
("wse_multiplayer_message_received", [
	(store_script_param, ":player_no", 1),
	(store_script_param, ":event_no", 2),
]),

#script_wse_game_saved
# Called each time after game is saved successfully
("wse_game_saved", [
]),

#script_wse_savegame_loaded
# Called each time after savegame is loaded successfully
("wse_savegame_loaded", [
]),

#script_wse_chat_message_received
# Called each time a chat message is received (both for servers and clients)
# INPUT
# script param 1 = sender player no
# script param 2 = chat type (0 = global, 1 = team)
# s0 = message
# OUTPUT
# trigger result = anything non-zero suppresses default chat behavior. Server will not even broadcast messages to clients.
# result string = changes message text for default chat behavior (if not suppressed).
("wse_chat_message_received", [
	(store_script_param, ":player_no", 1),
	(store_script_param, ":chat_type", 2),
]),

#script_wse_console_command_received
# Called each time a command is typed on the dedicated server console or received with RCON (after parsing standard commands)
# INPUT
# script param 1 = command type (0 - local, 1 - remote)
# s0 = text
# OUTPUT
# trigger result = anything non-zero if the command succeeded
# result string = message to display on success (if empty, default message will be used)
("wse_console_command_received", [
	(store_script_param, ":command_type", 1),
]),

#script_wse_get_agent_scale
# Called each time an agent is created
# INPUT
# script param 1 = troop no
# script param 2 = horse item no
# script param 3 = horse item modifier
# script param 4 = player no
# OUTPUT
# trigger result = agent scale (fixed point)
("wse_get_agent_scale", [
	(store_script_param, ":troop_no", 1),
	(store_script_param, ":horse_item_no", 2),
	(store_script_param, ":horse_item_modifier", 3),
	(store_script_param, ":player_no", 4),
]),

#script_wse_window_opened
# Called each time a window (party/inventory/character) is opened
# INPUT
# script param 1 = window no
# script param 2 = window param 1
# script param 3 = window param 2
# OUTPUT
# trigger result = presentation that replaces the window (if not set or negative, window will open normally)
("wse_window_opened", [
	(store_script_param, ":window_no", 1),
	(store_script_param, ":window_param_1", 2),
	(store_script_param, ":window_param_2", 3),
]),

#script_game_missile_dives_into_water
# Called each time a missile dives into water
# INPUT
# script param 1 = missile item no
# script param 2 = missile item modifier
# script param 3 = launcher item no
# script param 4 = launcher item modifier
# script param 5 = shooter agent no
# script param 6 = missile no
# pos1 = water impact position and rotation
("game_missile_dives_into_water", [
	(store_script_param, ":missile_item_no", 1),
	(store_script_param, ":missile_item_modifier", 2),
	(store_script_param, ":launcher_item_no", 3),
	(store_script_param, ":launcher_item_modifier", 4),
	(store_script_param, ":shooter_agent_no", 5),
	(store_script_param, ":missile_no", 6),
]),

#script_wse_get_server_info
# Called each time a http request for server info received (http://server_ip:server_port/)
# OUTPUT
# trigger result = anything non-zero replace message text for response info 
# result string =  message text for response info 
("wse_get_server_info", [
]),


How and where to put properly this from module_scripts addon( wse)

And another, kalarhan, can you repeat about opcode 8. I am some stupid at this and becides as you know, i am bad in English. Face that i am nooooooooobie and give me instruction )
 
KnightV said:
And another, kalarhan
I mentioned before: I don`t do MP or WSE, so I can't help with that. Why don't you try asking the general modding community instead? Its a open thread after all  :razz:

KnightV said:
about opcode 8

header_operations.py
Code:
call_script             =    1  # (call_script, <script_id>, [<script_param>...]),
                                # Calls specified script with or without parameters.
try_begin               =    4  # (try_begin),
                                # Opens a conditional block.
else_try                =    5  # (else_try),
                                # If conditional operations in the conditional block fail, this block of code will be executed.
3 operations above. Each has a OPCODE (1, 4 and 5). See your extended tool (WSE) for new operations and how to use them. It is not part of Native Warband.
 
Kalarha ouuuuu

Name me map editors. I use Thorgrim but it bad. When i change map all are good but when i working with towns castles villages all are bad.  The results aren't save
 
KnightV said:
Name me map editors. I use Thorgrim but it bad. When i change map all are good but when i working with towns castles villages all are bad.  The results aren't save

You can try Swyter Cartographer: https://forums.taleworlds.com/index.php/topic,183658.0.html
 
(troop_get_slot, ":amount", ":troop_id", slot_troop_prebattle_alt_division_amount), #Count
      (val_add, ":amount", 1),
(troop_set_slot, ":troop_id", slot_troop_prebattle_alt_division_amount, ":amount"),
    (try_end),

it is offtop but can you help me to fix problem with "amount"
What and where i may write to fix it&
 
KnightV said:
(troop_get_slot, ":amount", ":troop_id", slot_troop_prebattle_alt_division_amount), #Count
      (val_add, ":amount", 1),
(troop_set_slot, ":troop_id", slot_troop_prebattle_alt_division_amount, ":amount"),
    (try_end),

it is offtop but can you help me to fix problem with "amount"
What and where i may write to fix it&


Whats the error?
 
KnightV said:
Code:
#script_wse_multiplayer_message_received
# Called each time a composite multiplayer message is received
# INPUT
# script param 1 = sender player no
# script param 2 = event no
("wse_multiplayer_message_received", [
	(store_script_param, ":player_no", 1),
	(store_script_param, ":event_no", 2),
]),

#script_wse_game_saved
# Called each time after game is saved successfully
("wse_game_saved", [
]),

#script_wse_savegame_loaded
# Called each time after savegame is loaded successfully
("wse_savegame_loaded", [
]),

#script_wse_chat_message_received
# Called each time a chat message is received (both for servers and clients)
# INPUT
# script param 1 = sender player no
# script param 2 = chat type (0 = global, 1 = team)
# s0 = message
# OUTPUT
# trigger result = anything non-zero suppresses default chat behavior. Server will not even broadcast messages to clients.
# result string = changes message text for default chat behavior (if not suppressed).
("wse_chat_message_received", [
	(store_script_param, ":player_no", 1),
	(store_script_param, ":chat_type", 2),
]),

#script_wse_console_command_received
# Called each time a command is typed on the dedicated server console or received with RCON (after parsing standard commands)
# INPUT
# script param 1 = command type (0 - local, 1 - remote)
# s0 = text
# OUTPUT
# trigger result = anything non-zero if the command succeeded
# result string = message to display on success (if empty, default message will be used)
("wse_console_command_received", [
	(store_script_param, ":command_type", 1),
]),

#script_wse_get_agent_scale
# Called each time an agent is created
# INPUT
# script param 1 = troop no
# script param 2 = horse item no
# script param 3 = horse item modifier
# script param 4 = player no
# OUTPUT
# trigger result = agent scale (fixed point)
("wse_get_agent_scale", [
	(store_script_param, ":troop_no", 1),
	(store_script_param, ":horse_item_no", 2),
	(store_script_param, ":horse_item_modifier", 3),
	(store_script_param, ":player_no", 4),
]),

#script_wse_window_opened
# Called each time a window (party/inventory/character) is opened
# INPUT
# script param 1 = window no
# script param 2 = window param 1
# script param 3 = window param 2
# OUTPUT
# trigger result = presentation that replaces the window (if not set or negative, window will open normally)
("wse_window_opened", [
	(store_script_param, ":window_no", 1),
	(store_script_param, ":window_param_1", 2),
	(store_script_param, ":window_param_2", 3),
]),

#script_game_missile_dives_into_water
# Called each time a missile dives into water
# INPUT
# script param 1 = missile item no
# script param 2 = missile item modifier
# script param 3 = launcher item no
# script param 4 = launcher item modifier
# script param 5 = shooter agent no
# script param 6 = missile no
# pos1 = water impact position and rotation
("game_missile_dives_into_water", [
	(store_script_param, ":missile_item_no", 1),
	(store_script_param, ":missile_item_modifier", 2),
	(store_script_param, ":launcher_item_no", 3),
	(store_script_param, ":launcher_item_modifier", 4),
	(store_script_param, ":shooter_agent_no", 5),
	(store_script_param, ":missile_no", 6),
]),

#script_wse_get_server_info
# Called each time a http request for server info received (http://server_ip:server_port/)
# OUTPUT
# trigger result = anything non-zero replace message text for response info 
# result string =  message text for response info 
("wse_get_server_info", [
]),
How and where to put properly this from module_scripts addon( wse)
Doesn't matter at all, aslong as you put it into the scripts-list of module_scripts.
It's largely self-explanatory to be honest...

kalarhan said:
KnightV said:
And another, kalarhan
I mentioned before: I don`t do MP or WSE, so I can't help with that. Why don't you try asking the general modding community instead? Its a open thread after all  :razz:
Stalking is real... isn't it great?
 
Arthur_Pendragon said:
KnightV said:
(troop_get_slot, ":amount", ":troop_id", slot_troop_prebattle_alt_division_amount), #Count
      (val_add, ":amount", 1),
(troop_set_slot, ":troop_id", slot_troop_prebattle_alt_division_amount, ":amount"),
    (try_end),

it is offtop but can you help me to fix problem with "amount"
What and where i may write to fix it&


Whats the error?


usage of unassigned global variable @:amount@
 
Does anyone know is there is a way to make a shortcut for warband that automatically selects a mod &/or starts the game(skipping the launcher).

I know vikingr used to auto select the mod, but when I tried to do the same thing '-m ModName' it didnt work, seems to be a WSE addition.
 
thanks :smile:

edit:
it also works on steam:
Code:
steam -applaunch 48700 -sm Native
or just
Code:
-sm Native
on the warband launch options

edit2:

also, do you know if there is a list somewhere with all the options the warband .exe accepts?
I tried doing "warband.exe --help" and simillar but didnt find anything
 
(troop_get_slot, ":amount", ":troop_id", slot_troop_prebattle_alt_division_amount), #Count
      (val_add, ":amount", 1),
(troop_set_slot, ":troop_id", slot_troop_prebattle_alt_division_amount, ":amount"),
    (try_end),

error  usage of unassigned glob var :amount what i may write and where to fix this
 
I'm curious, if there is no error in the module.bat , is it also mean that will no error/bug in the game? so we don't need 'test' our game first?

and about copyright. is this kind of mod legal?
http://www.moddb.com/mods/romance-of-the-three-kingdoms-dynasty-warriors
 
whydott said:
I'm curious, if there is no error in the module.bat , is it also mean that will no error/bug in the game? so we don't need 'test' our game first?

no. It just means some basic syntax rules were not broken. It has nothing to do with actual working code, and much less with logical errors.
 
Code:
raceback (most recent call last):
 File "process_animations.py", line 61, in <module>
   write_actions(animations,len(action_codes),action_codes,"actions.txt")
 File "process_animations.py", line 30, in write_actions
   file.write(" %s %d %d "%(action_codes[i_action_code],action[1], action[2]))
print flags
ypeError: %d format: a number is required, not list
xporting meshes...
xporting sounds...
What is wrong&






About first problem
Code:
 ],
  ["spearwall_hold", acf_thrust|acf_enforce_all|acf_align_with_ground,
   [4.0, "anim_human", 7310, 7310, arf_blend_in_6],
 ],






Code:
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Local variable never used: player_agent, at: 0
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
WARNING: Variable name used for both local and global contexts:spear_dist
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

______________________________

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





Code:
spearwall_trigger_8 = (0.1, 0, 0, [(eq,"$spear_in_position",1)], [
        (get_player_agent_no,":player"),
        (agent_is_alive,":player"),
        (agent_get_slot,":speartimer",":player",slot_agent_spearwall),
        (ge,":speartimer",10),
        (assign,":victim",-1),
        (agent_get_position,pos1,":player"),
        (try_for_agents,":possible_victim"),
           (agent_is_alive,":possible_victim"),
           (neg|agent_is_human,":possible_victim"),
           (agent_get_rider,":rider",":possible_victim"),
           (ge,":rider",0),
           (neg|agent_is_ally,":rider"),
           (agent_get_position,pos2,":possible_victim"),
           (get_distance_between_positions,":dist",pos1,pos2),
           (assign, "$spear_dist", 0),
           (lt,":dist","$spear_dist"),
           (neg|position_is_behind_position,pos2,pos1),
           (agent_get_slot,":speed",":possible_victim",slot_agent_speed),
           (ge,":speed",120), # Remember to change this if the timing on speed checks changes
           (assign,":victim",":possible_victim"),
        (try_end),
        (gt,":victim",-1),
        (agent_play_sound,":victim","snd_metal_hit_high_armor_high_damage"),
        (store_agent_hit_points,":hp",":victim",0),
        (store_agent_hit_points,":oldhp",":victim",1),
        (val_div,":speed",2), # Remember to change this if the timing on speed checks changes
        (val_sub,":speed",15),
        (val_sub,":hp",":speed"),
        (val_max,":hp",0),
        (agent_set_hit_points,":victim",":hp",0),
        (agent_deliver_damage_to_agent,":victim",":victim"),
        (agent_set_slot,":player",slot_agent_spearwall,0),
        (store_agent_hit_points,":hp",":victim",1),
        (val_sub,":oldhp",":hp"),
        (assign,reg1,":oldhp"),
        (display_message,"@Spear-wall dealt {reg1} damage!"),
        ])
spearwall_trigger_9 = (0, 0, 2, [(key_clicked, key_b),(eq,"$setting_use_spearwall",1)],
       [(assign, "$setting_use_spearwall", 0),(assign,":continue",0),
        (get_player_agent_no,":player"),
        (agent_is_alive,":player"),
        (agent_get_wielded_item, ":handone", ":player", 0),
        (agent_get_wielded_item, ":handtwo", ":player", 1),
        (assign,"$spear_dist",145),
        (try_for_range,":spear","itm_tutorial_spear","itm_Annu_spear"),
            (this_or_next|eq,":handone",":spear"),
            (eq,":handtwo",":spear"),
            (assign,":continue",1),
              (try_begin),
                 (eq,":spear","itm_war_spear"),
                 (assign,"$spear_dist",160),
              (else_try),
                 (eq,":spear","itm_spear"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_light_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_heavy_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_pike"),
                 (assign,"$spear_dist",255),
              (else_try),
                 (eq,":spear","itm_ashwood_pike"),
                 (assign,"$spear_dist",255),
              (else_try),
                 (eq,":spear","itm_awlpike"),
                 (assign,"$spear_dist",170),
              (else_try),
                 (eq,":spear","itm_pitch_fork"),
                 (assign,"$spear_dist",164),
              (else_try),
                 (eq,":spear","itm_military_fork"),
                 (assign,"$spear_dist",145),
              (else_try),
                 (eq,":spear","itm_battle_fork"),
                 (assign,"$spear_dist",152),
              (else_try),
                 (eq,":spear","itm_boar_spear"),
                 (assign,"$spear_dist",167),
              (else_try),
                 (eq,":spear","itm_glaive"),
                 (assign,"$spear_dist",167),
              (else_try),
                 (eq,":spear","itm_poleaxe"),
                 (assign,"$spear_dist",190),
              (else_try),
                 (eq,":spear","itm_polehammer"),
                 (assign,"$spear_dist",140),
              (else_try),
                 (eq,":spear","itm_shortened_spear"),
                 (assign,"$spear_dist",130),
              (else_try),
                 (eq,":spear","itm_jousting_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_double_sided_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_staff"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_quarter_staff"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_iron_staff"),
                 (assign,":continue",0),
              (try_end),
        (try_end),
        (eq,":continue",1),
        (agent_get_horse,":horse",":player"),
        (neg|gt,":horse",0),
        (neq, "$spear_in_position", 1),
        (display_message,"@Bracing spear for charge.",0x6495ed),
        (agent_set_animation, ":player", "anim_spearwall_hold"),
        (assign, "$spear_in_position", 1),
        (store_agent_hit_points,"$spear_hp",":player",1),
        ])
Helpppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad:
 
so lately i managed to lower the waiting time when lunching a new game with 30 factions (removed the others till i find another fix) and so it takes few minutes to lunch and that's okay from my side
but the weird thing i'm having is reinforcement aren't coming for some clans (kingdoms) i checked the relevant files but everything seems okay some clans get their troops (few for testing purpose) as for other clans they get nothing the lords will keep on staying in their castles/towns with 1 troop(themselves) and towns and castles have 0 garrisoned troops which other clans took the opportunity and started besieging 10s and 10s of castles expanding quickly so anyone might have passed on something similar can help me out !

and another problems is the meshes (the note window where you check the factions) where can i find them ? which file ? because i want to change them to the flag of the clan (meshes half of them don't get loaded by the game for some unknown reason) thanks!
 
Status
Not open for further replies.
Back
Top Bottom