Warband Script Enhancer 2 (v1.1.2.0)

Users who are viewing this thread

te.jpg


This op:send_post_message_to_url_advanced still use 'get' method
game.send_post_message_to_url_advanced(url, '', '', "script_cf_esai_parse_url_response", "script_cf_esai_parse_failed_response", 1)
 
Hi! :smile: I was wondering, is it possible to fix flying hands for dead agents with the help of wse2? I'm talking about VC, but I think it's the same for all mods, when an agent dies, the hands go all over the place
 
te.jpg


This op:send_post_message_to_url_advanced still use 'get' method
game.send_post_message_to_url_advanced(url, '', '', "script_cf_esai_parse_url_response", "script_cf_esai_parse_failed_response", 1)
I'll fix it in the next update, as a temporary solution, set something in post data
 
When I checked a script named wse_multiplayer_message_received,
Code:
("wse_multiplayer_message_received", [
    (store_script_param, ":player_no", 1),
    (store_script_param, ":event_no", 2),
]),
This is a player info when server received, but How do Sever send message to player?
Is there a message script for player?

About op
Code:
multiplayer_send_composite_message_to_player
multiplayer_send_composite_message_to_server
 
When I checked a script named wse_multiplayer_message_received,
Code:
("wse_multiplayer_message_received", [
    (store_script_param, ":player_no", 1),
    (store_script_param, ":event_no", 2),
]),
This is a player info when server received, but How do Sever send message to player?
Is there a message script for player?

About op
Code:
multiplayer_send_composite_message_to_player
multiplayer_send_composite_message_to_server
for server player_no = 0
 
There is a bug in operation
Python:
overlay_button_set_type = 4902 #(overlay_button_set_type, <overlay_no>, <toggle_or_not>, <deselectable_or_not>),
                              #Sets <overlay_no>'s <toggle_or_not> and <deselectable_or_not>
1) <toggle_or_not> - should make a button visible but pressed down as description says. But it just makes button invisible like vanilla operator <overlay_set_display = 947>. This is a bug.
2) <deselectable_or_not> - Seting it to 0 makes button text grayed out and not selectable. I think <selectable_or_not> would be more appropriate description.
 
This is an operation from the Caribbean. The strange description is taken from there, then I will correct it. The code itself works as it should, check wse sources

Code:
void OverlayButtonSetType(WSEPresentationOperationsContext *context)
{
#if defined WARBAND
    int overlay_no;
    bool showed, enabled;

    context->ExtractOverlayNo(overlay_no);
    context->ExtractBoolean(showed);
    context->ExtractBoolean(enabled);

    rgl::widget *overlay = warband->cur_presentation->overlays[overlay_no];

    if (overlay->get_type() == rgl::wt_simple_button || overlay->get_type() == rgl::wt_image_button || overlay->get_type() == rgl::wt_game_button)
        overlay->flags = (showed ? 0 : rgl::wf_hidden) | (enabled ? 0 : rgl::wf_disabled);
#endif
}
 
I see. But can you change it's behavior to be pressed down instead? If not than just change description to
Python:
overlay_button_set_type = 4902 #(overlay_button_set_type, <overlay_no>, <visible_or_not>, <selectable_or_not>),
                              #Sets <overlay_no>'s <visible_or_not> and <selectable_or_not>
 
It looks like game.key_clicked() could not works on Lua. because they do not return a value.
But How Lua could do Keyboard detection?
What.png
test.png
 
Last edited:
Hi K700,
WSE2 is great, the loading speed is so impressive, and the fps in battle field also improved much!
A crash happens in I my mod East1135.
I use "troop_set_inventory_slot" and "troop_set_inventory_slot_modifier" to exchange item between a companion and the player in a GUI. This function works well in warband. But it crashed in wse2.

"troop_get_inventory_slot_modifier" return a invalid modifier value (255). If move mouse onto the exchanged item in inventory, it crashes.


the crash info is below:

(troop_set_inventory_slot_modifier, ":eek:ld_troop", ":eek:ld_item_slot_no", ":new_imod"),
(troop_get_inventory_slot, ":new_item", ":new_troop", ":new_item_slot_no"),
(troop_get_inventory_slot_modifier, ":new_imod", ":new_troop", ":new_item_slot_no"),
(assign, reg90, ":new_item_slot_no"),
(assign, reg91, ":new_troop"),
(assign, reg92, ":new_item"),
(assign, reg93, ":new_slot"),
(assign, reg94, ":new_imod"),
(display_log_message, "@{!}d7: new_item_slot_no={reg90}, new_troop={reg91}, new_item={reg92}, new_slot={reg93}, new_imod={reg94}"),

22:10:17 - d in2: selected troop=0, cur item=196, item slot no=16, cur imod=0
22:10:17 - d in2: selected troop=0, cur item=908, item slot no=10, cur imod=2
22:10:18 - d in1: selected troop=0, cur item=414, slot no=0, cur imod=3
22:10:19 - d in2: selected troop=0, cur item=908, item slot no=10, cur imod=2
22:10:19 - d1: old item slot no=0, selected troop=0, old item=414, old slot=0, old imod=3
22:10:19 - d4: new item slot no=10, pool troop=0, new item=908, new slot=10, new imod=2
22:10:19 - d5: new item slot no=10, new troop=0, new item=908, new slot=10, new imod=2
22:10:19 - d6: old item slot no=0, old troop=0, old item=414, old slot=0, old imod=3
22:10:19 - d7: new item slot no=10, new troop=0, new item=414, new slot=10, new imod=255
22:10:19 - d8: old item slot no=0, old troop=0, old item=908, old slot=0, old imod=3
22:10:19 - d in2: selected troop=0, cur item=414, item slot no=10, cur imod=255
22:10:19 - SCRIPT ERROR: Invalid Item Modifier ID: 255
22:10:19 - - Presentation prsnt_equip_npcs trigger no: 3 (line 38, opcode 972, modifier 0x0)
22:10:20 - d in1: selected troop=0, cur item=908, slot no=0, cur imod=2
22:10:20 - d in2: selected troop=0, cur item=414, item slot no=10, cur imod=255
22:10:20 - SCRIPT ERROR: Invalid Item Modifier ID: 255
22:10:20 - - Presentation prsnt_equip_npcs trigger no: 3 (line 38, opcode 972, modifier 0x0)
22:10:32 - EXCEPTION_ACCESS_VIOLATION (0xC0000005, 0x00000000, 0x8788E520)
22:10:32 - Dumping call stack...
22:10:32 - - 0x00CF4CFF mb_warband_wse2.exe+0x7C4CFF (_output_l+0x119)
22:10:32 - - 0x00CEA980 mb_warband_wse2.exe+0x7BA980 (_vsnprintf_l+0x81)
22:10:32 - - 0x00CEA8FA mb_warband_wse2.exe+0x7BA8FA (_vsnprintf+0x16)
22:10:32 - - 0x00BB0E7A mb_warband_wse2.exe+0x680E7A (rglFormat+0x2A)
22:10:32 - - 0x009FBA72 mb_warband_wse2.exe+0x4CBA72 (mbItem::getName+0x132)
22:10:32 - - 0x009F5DA3 mb_warband_wse2.exe+0x4C5DA3 (mbInventoryWindow::showItemTooltip+0x63)
22:10:32 - - 0x009F9B34 mb_warband_wse2.exe+0x4C9B34 (mbInventoryWindow::updateGridActions+0x134)
22:10:32 - - 0x009F5707 mb_warband_wse2.exe+0x4C5707 (mbInventoryWindow::frameMove+0x2F7)
22:10:32 - - 0x00995272 mb_warband_wse2.exe+0x465272 (mbCoreGame::frameMove+0xF2)
22:10:32 - - 0x009A268A mb_warband_wse2.exe+0x47268A (CD3DApplication::FrameMove+0x3A)
22:10:32 - - 0x009A185C mb_warband_wse2.exe+0x47185C (CD3DApplication::Render3DEnvironment+0x48C)
22:10:32 - - 0x009A22CC mb_warband_wse2.exe+0x4722CC (CD3DApplication::Run+0xEC)
22:10:32 - - 0x00B37E29 mb_warband_wse2.exe+0x607E29 (WinMain+0xD59)
22:10:32 - - 0x00CEB818 mb_warband_wse2.exe+0x7BB818 (__tmainCRTStartup+0xF1)
22:10:32 - - 0x775800C9 KERNEL32.DLL+0x200C9 (BaseThreadInitThunk+0x19)
22:10:32 - - 0x77E37B4E ntdll.dll+0x67B4E (RtlGetAppContainerNamedObjectPath+0x11E)
22:10:32 - - 0x77E37B1E ntdll.dll+0x67B1E (RtlGetAppContainerNamedObjectPath+0xEE)
22:10:32 - - 0x77E37B1E ntdll.dll+0x67B1E (RtlGetAppContainerNamedObjectPath+0xEE)
22:10:32 - Dumping memory status...

Hope you can have a look at this issue, thanks a lot!
 
Last edited:
Back
Top Bottom