[WB] Warband Script Enhancer v4.9.5 for 1.174

Users who are viewing this thread

In the latest version try_for_players seems to no longer iterate over inactive players, which it does in vanilla warband. Please fix that, because iterating over all players, including inactive ones, is very useful.
 
There is a problem on some versions (including steam) when WSE refuses to start (including the GOG version) and writes that the hash checksum is not suitable there and version 1.174 is needed even after replacing the original EXE. But version 1.174! What to do? is it possible to somehow bypass the hash checksum calculation?
 
not a win32 application
WSE later versions included files to run under earlier versions of Windows (xp and etc.)
 
Hey K700, can you please fix the try_for_agents operation in multiplayer.
And also there is a bug in warband with the skin's scale factor where when you hit a scaled agent with a missile, this missile is also scaled by the agent's scale factor.
3Gzzl.jpg
Picture from this thread: https://forums.taleworlds.com/index...ents-using-scale-from-module_skins-py.350708/
Thank you.
 
In multiplayer this operation seems to not work at-all, I've made a script for printing the names of all agents' troop but nothing happens. Someone mentions this issue in the wse2 thread also.
 
Python:
("mgw_test", [ #used to dev
    (entry_point_get_position, pos1, 0),
    (store_current_scene, ":scene_no"),
    (modify_visitors_at_site, ":scene_no"),
    (add_visitors_to_current_scene, 0, "trp_kingdom_1_lady_1", 10, 0, 0),
    (try_for_agents, ":agent", pos1, 5000),
         (agent_get_troop_id, reg0, ":agent"),
         (display_message, reg0),
         (display_message, "@Ok."),
    (try_end),
]),
Nothing happens, I've tried to not using the position argument in try_for_agents but it's not working.
I will test it in vanilla warband.
If you need my entire source code for quick testing I can send it to you.
 
I've modified my script but it stills not working...
Python:
(ti_after_mission_start, 0, 0, [], [
    (assign, "$spawn", 1),
]),

(0, 0, 0, [], [
    (multiplayer_is_server),
    (eq, "$spawn", 1),
    (try_begin),
        (assign, "$spawn", 0),
        (store_current_scene, ":scene_no"),
        (modify_visitors_at_site, ":scene_no"),
        (add_visitors_to_current_scene, 0, "trp_kingdom_1_lady_1", 10, 0, 0),
    (try_end),
]),

(ti_inventory_key_pressed, 0, 0, [], [
    (multiplayer_is_server),
    (display_message, "@Ok"),
    (call_script, "script_mgw_test"),
]),

Now it's suppose to kill all non player agents but it's not working.
Python:
("mgw_test", [ #used to dev
    (try_for_agents, ":agent"),
        (agent_is_non_player, ":agent"),
        (agent_is_alive, ":agent"),
        (agent_get_troop_id, ":trp", ":agent"),
        (troop_set_health, ":trp", 0),
    (try_end),
]),
I've test it without WSE and it's not working, what it does, it displays Ok when I press the inventory button.

Maybe I'm using this operation the wrong way or maybe it's an engine bug.
 
You should try agent_set_hit_points instead of troop_set_health.
Code:
("mgw_test", [ #used to dev
    (try_for_agents, ":agent"),
        (agent_is_non_player, ":agent"),
        (agent_is_alive, ":agent"),
        (agent_set_hit_points, ":agent", 0),
    (try_end),
]),
Code:
agent_set_hit_points                   = 1721    # set absolute to 1 if value is absolute, otherwise value will be treated as relative number in range [0..100]
                        # (agent_set_hit_points,<agent_id>,<value>,[absolute]),

(remove_agent, ":agent"); should work aswell.

Does the agent spawning work in meanwhile? Or do they still not spawn?
 
You should try agent_set_hit_points instead of troop_set_health.
Code:
("mgw_test", [ #used to dev
    (try_for_agents, ":agent"),
        (agent_is_non_player, ":agent"),
        (agent_is_alive, ":agent"),
        (agent_set_hit_points, ":agent", 0),
    (try_end),
]),
Code:
agent_set_hit_points                   = 1721    # set absolute to 1 if value is absolute, otherwise value will be treated as relative number in range [0..100]
                        # (agent_set_hit_points,<agent_id>,<value>,[absolute]),

(remove_agent, ":agent"); should work aswell.

Does the agent spawning work in meanwhile? Or do they still not spawn?
I've used agent_deliver_damage_to_agent and it's work, thank you @Gotha.
Sorry K700 I've been dumb...

But if you want and have time the "scaled missile bug" worth to be fixed.
 
v4.8.2
-Added do_not_make_hands_parallel_to_ground module.ini option.

set to 1 to fix dead agents hands bug when scale of agents is not equal to 1.0
 
Back
Top Bottom