[WB] Warband Script Enhancer v3.2.0 (21/07/2013)

Users who are viewing this thread

Status
Not open for further replies.
Update.
cmpxchg8b said:
v1100
- Added string operations: str_split, str_store_join, str_store_replace_spaces_with_underscores, str_store_replace_underscores_with_spaces, str_store_server_password_admin, str_store_server_password_private.
- Added a string-indexed dictionary datatype that can be saved and loaded from files. Dict operations: dict_create, dict_free, dict_load_file, dict_load_dict, dict_save, dict_clear, dict_is_empty, dict_has_key, dict_get_size, dict_get_str, dict_get_int, dict_set_str, dict_set_int.
- Added network operations: multiplayer_send_chat_message_to_player, server_set_password_admin, server_set_password_private.
- Replaced server_set_max_num_players with a counterpart that handles Warband's 250 player limit properly.
- Internal changes.
 
It looks pretty cool. It reminds like an Iron Launcher in a hax0r way with added capabilities. But memory hooks are legal?
You're modifying the game code at runtime.

PS: If this is the case, I want to try, if you don't mind :razz:

PS2: Have you tried the game behavior when your redirector isn't present. Crashes or ignores the opcode jumping the stack?


EDIT: Oh, You have an eye for detail. Great.
Code:
str_store_md5 = 2624 #(str_store_md5, <string_register_id>, <string_1>), #MD5 encrypts <string_1> and stores it into <string_register_id>


EDIT2: Also, as good brother in arms of coding I should recommend you to pack every single file (libs included) with upx.sf.net  :idea: To shrink then by half.
 
Swyter said:
It looks pretty cool. It reminds like an Iron Launcher in a hax0r way with added capabilities. But memory hooks are legal?
You're modifying the game code at runtime.
I'm modifying my memory. :grin:
But no, I'm pretty sure it's not illegal. Ever heard of the Oblivion Script Extender? It works in a similar way, and the guys at Valve even added an exception to make it work with Steam. I doubt they'd do that if it was illegal.
Swyter said:
PS2: Have you tried the game behavior when your redirector isn't present. Crashes or ignores the opcode jumping the stack?
Unrecognized opcode %d.
That is, if you don't use (neg|is_vanilla_warband) to isolate WSE specific code.
Swyter said:
EDIT2: Also, as good brother in arms of coding I should recommend you to pack every single file (libs included) with upx.sf.net  :idea: To shrink then by half.
I'll give that a look.
 
Very awesome work, some of these features are well due.
Taking out the need for the separate 2010 c++ download and install helps a lot :smile:
 
If this works than it could be a very very big possibilities.
I could use this to make a very easy system for my mod.
The possibility to save data externally is the most useful operation ever.
 
Awesome indeed!
About dicts: can they be saved in single player? I mean, when you save a game, dicts are saved too or what?

Would be wonderful to have lists too. With at least the simpliest sorting and min/max methods.
 
Oh, no luck:

AppName: mb_warband.exe AppVer: 1.0.0.0 ModName: d3dx9_42.dll
ModVer: 9.27.952.3001 Offset: 00005c90

Error: Failed to wait for remote function thread to exit
Windows API error
Code: 1411
Message: Класс не существует (Class doesn't exist)

However i'm sure there's something i'm doing wrong.

[edit]
failed to read remote process for function parameter, Code 5, access denied

no logfile is created
 
agrippa said:
Oh, no luck:

AppName: mb_warband.exe AppVer: 1.0.0.0 ModName: d3dx9_42.dll
ModVer: 9.27.952.3001 Offset: 00005c90

Error: Failed to wait for remote function thread to exit
Windows API error
Code: 1411
Message: Класс не существует (Class doesn't exist)

However i'm sure there's something i'm doing wrong.

[edit]
failed to read remote process for function parameter, Code 5, access denied

no logfile is created
Could be some incompatibility with cyrillic characters. I'll investigate that.
Btw, what operating system do you use?
agrippa said:
Awesome indeed!
About dicts: can they be saved in single player? I mean, when you save a game, dicts are saved too or what?
They can be saved, but you have to save them by yourself. I guess I could add a game script wse_on_save_game or something like that so you can save them when the game is saved.
agrippa said:
Would be wonderful to have lists too. With at least the simpliest sorting and min/max methods.
MadocComadrin said:
I would love stacks and ques...although, I don't have a use for them at the moment :XD:
K, I'll add more data container types (it's more of a lazyness thing though, both stacks and queues can be implemented with the MS :grin:).
MadocComadrin said:
Also, some more slot operations would be awesome.
Like what?
 
Just the simple stuff, like arithmetic operations along with less than. Anything that let's us skip Assigning the slot value to a variable, acting on it and setting it again.
 
Thanks for the answer. It's XP Pro SP2. Warband version is original, not localized.
And wse_on_save_game (and wse_on_load_game) would be great of course ) I guess you could read savegame files modified/access dates each second with an additional thread, at least before you find out where in the code games are saved. And i remember there is a record in the memory storing last the loaded savegame filename, maybe it's a good way to start searching for the save/load code.
 
Mhm, Able to throw a bunch of strings in a array and sorting them alphabetically can be made with what you offer but would probably perform badly against your implementing that in C++.

Nice work so far.
 
agrippa said:
Thanks for the answer. It's XP Pro SP2. Warband version is original, not localized.
But the system language uses cyrillic characters, right? In the Warband path for example...
agrippa said:
I guess you could read savegame files modified/access dates each second with an additional thread, at least before you find out where in the code games are saved.
I already know where games are saved/loaded. :grin:
Vincenzo said:
Mhm, Able to throw a bunch of strings in a array and sorting them alphabetically can be made with what you offer but would probably perform badly against your implementing that in C++.
Sorting a range of string registers - I'll add that.
 
MadocComadrin said:
Just the simple stuff, like arithmetic operations along with less than. Anything that let's us skip Assigning the slot value to a variable, acting on it and setting it again.
(neg|x_slot_ge, x, slot, value),
is less than.

x_slot_gt would be nice, though.
 
cmpxchg8b] But the system language uses cyrillic characters said:
(neg|x_slot_ge, x, slot, value),
is less than.

x_slot_gt would be nice, though.

This can be done by modifying header_operations:
say,
troop_slot_ge = 560
troop_slot_gt=neg|troop_slot_ge
 
agrippa said:
In warband path - nope, Documents and Settings/blablabla/cyrilliccharacters/Mount&Blade Warband/rlg_config.txt - yep
Hmm, there must be another reason then.
Where did you put WSELoader.exe? In the Warband directory? Did you extract all files from the archive?
When I have a moment I'll create a more verbose version of the loader, hopefully it will be easier to find the problem.
agrippa said:
This can be done by modifying header_operations:
say,
troop_slot_ge = 560
troop_slot_gt=neg|troop_slot_ge
That's troop_slot_lt, not troop_slot_gt.
The easiest way to do troop_slot_gt right now is
Code:
troop_slot_ge
neg|troop_slot_eq
but still, one operation is better than two. I'll add it. :grin:
 
Status
Not open for further replies.
Back
Top Bottom