Warband Script Enhancer 2 (v1.1.2.0)

Users who are viewing this thread

About the savefiles: I was adding troops to my party little by little to see how many more of them I need to have to reset the behaviour with WSE2 to how it is in vanilla - it reset to how it should be when the battle advantage close to 0 as if it rounds up. When I have 317 troops, the AI thinks it can easily overpower me, but when I have 5 more troops, it decides to be defensive :smile:
 
Did you send me the right save file? I have 191 people in the army
It's the same situation as in the file I sent to you before, here: https://file.io/ujt2ViZZjYA1
The Weak Dog save has more troops but the same issue, my party power there is on the verge of changing the behaviour of the AI to vanilla.
The Strong Dog save has a few more troops and it reverts the behaviour to how it is in vanilla even with 191 or 317 troops
 
Last edited:
I want to see what triggers error, but server did not create rgl log file.
rglR4.jpg
 
rglR5.jpg


This is server config without any change.It looks like sample with you post

[Log]
bAutoFlushLog=true
bBackupOnExit=true
iMaxNumStoredLogs=50
sLogPath=rgl_log.txt
sStoredLogDirectory=Logs

Maybe the error num must bigger than 50, the program will create the file
 
I tried it and it really does its work very well, great mod. Does it affect any in-game feature or Steam achievements and add anything that isn't normally in Native module? And is there a way to run WSE from Steam?
 
Last edited:
It look like third time, the agent no is error.
what puzzled is first and second time is no error.
Code:
function get_nearest_enemy(agent_no)
    print('now_agent_no', agent_no)
    local ai_pos_index = 15
    local player_pos_index = 16
    local cur_distance = 1000 * 1000
    local cur_player_agent_no = -1
    local temp = 0
    game.set_fixed_point_multiplier(1)
    game.agent_get_position(0, ai_pos_index, agent_no)
    local ai_pos = game.preg[ai_pos_index]
    local x1 = ai_pos.o.x
    local y1 = ai_pos.o.y
    local x2, y2
    for curAgent in game.agentsI(ai_pos_index, 2000) do
        print('curAgent', curAgent)
        local is_active = game.agent_is_active(curAgent)
        local is_alive = game.agent_is_alive(curAgent)
        local is_human = game.agent_is_human(curAgent)
        local is_player = game.agent_is_non_player(curAgent)
        is_player = not is_player
        if is_active and is_alive and is_human and is_player then
            game.agent_get_position(0, player_pos_index, curAgent)

agent_get_position = 1710 # (agent_get_position, <position>, <agent_id>),

rgl :
[20:09:32] sender player id8
[20:09:32] SCRIPT ERROR: Invalid Agent ID: 16
[20:09:32] - Lua (line 0, opcode 1710, modifier 0x0)
[20:09:32] - script: esai_code (line 13, opcode 5112, modifier 0x0)
[20:09:32] - script: game_receive_network_message (line 1564)
[20:09:32] Lua error: Modules\PW_4.5.5S\lua\esAiWeb.lua:80: attempt to perform arithmetic on local 'x1' (a nil value)
[20:09:32] #Time: 20:9:32:209
[20:09:32] stack traceback:
[20:09:32] Modules\PW_4.5.5S\lua\esAiWeb.lua:80: in function 'get_nearest_enemy'
[20:09:32] Modules\PW_4.5.5S\lua\esAiWeb.lua:130: in function <Modules\PW_4.5.5S\lua\esAiWeb.lua:101>

server cmd:
Input: sender player id8
action 4
playerId:8,agent_no:15,team_no:0
now_agent_no 14
curAgent 14
curAgent 15
SCRIPT ERROR: Invalid Agent ID: 16
 
You are using the operations incorrectly, agent_get_position is not an lhs operation.
game.agent_get_position(ai_pos_index, agent_no)
game.agent_get_position(player_pos_index, curAgent)

Check header_operations.py lhs_operations list.
 
1.0.9.1
-Fixed an agents spawning bug which caused the operation mission_tpl_are_all_agents_spawned to work incorrectly.
-Fixed transparency for displayed messages.
-Fixed the display of scripting errors for operations performed from lua.
-Fixed lua constants loading.
-Fixed crashes for modules with incorrect item carry flags.
 
1.0.9.1
-Fixed an agents spawning bug which caused the operation mission_tpl_are_all_agents_spawned to work incorrectly.
-Fixed transparency for displayed messages.
-Fixed the display of scripting errors for operations performed from lua.
-Fixed lua constants loading.
-Fixed crashes for modules with incorrect item carry flags.
i just downloaded the new version did everything correct but im having problem rn, says ''d3dx9_43.dll'' and ''MSVCR120.dll'' missing. cant start the game
 
Hi, I'm getting some errors with 1.0.9.1:
20:09:48 - Lua error: Modules\Napoleonic Wars\lua\modules\helper.lua:22: arg 2 must have type LUA_TUSERDATA|LUA_TTHREAD but is number
20:09:48 - #Time: 20:9:48:505
20:09:48 - stack traceback:
20:09:48 - [C]: in function 'propInstI'
20:09:48 - Modules\Napoleonic Wars\lua\modules\helper.lua:22: in function 'init_plant_grid'
20:09:48 - Modules\Napoleonic Wars\lua\modules\helper.lua:118: in function <Modules\Napoleonic Wars\lua\modules\helper.lua:114>
20:09:48 - Modules\Napoleonic Wars\lua\modules\eventMgr.lua:108: in function 'dispatch'
20:09:48 - Modules\Napoleonic Wars\lua\modules\eventMgr.lua:44: in function <Modules\Napoleonic Wars\lua\modules\eventMgr.lua:43>

20:09:55 - Lua error: Modules\Napoleonic Wars\lua\modules\helper.lua:90: attempt to call method 'dist' (a nil value)
20:09:55 - #Time: 20:9:55:197
20:09:55 - stack traceback:
20:09:55 - Modules\Napoleonic Wars\lua\modules\helper.lua:90: in function <Modules\Napoleonic Wars\lua\modules\helper.lua:47>
20:09:55 - Modules\Napoleonic Wars\lua\modules\eventMgr.lua:108: in function 'dispatch'
20:09:55 - Modules\Napoleonic Wars\lua\modules\eventMgr.lua:121: in function <Modules\Napoleonic Wars\lua\modules\eventMgr.lua:113>

helper.lua:22
Code:
for inst in game.propInstI(i, game.const.somt_flora) do
    table.insert(plant_props, inst)
end

helper.lua:90
Code:
local origin = game.preg[0].o
if not game.position_is_behind_position(1, 0) and origin:dist(game.preg[1].o) > 2 then
    ...

This code worked fine in WSE1.
 
Hi. about removeTrigger, I have a request.
if next update have function removeLuaTriggers: to remove all lua triggers.
 
Last edited:
Back
Top Bottom