Author Topic: [WB] Warband Script Enhancer v3.2.0 (21/07/2013)  (Read 700956 times)

0 Members and 1 Guest are viewing this topic.

cmpxchg8b

  • Modder++
  • Count
  • *
  • Master of rglPool
    • View Profile
  • Faction: Vaegir
  • MP nick: cmp
  • M&BWBWF&SNW
[WB] Warband Script Enhancer v3.2.0 (21/07/2013)
« on: December 26, 2010, 03:43:34 AM »
WSE is no longer being developed. Source code can be downloaded here.

WSE - Warband Script Enhancer v3.2.0 for Warband 1.153

What is the Warband Script Enhancer?
A program that enhances the Warband engine by adding operations/scripts/triggers and changing hardcoded game mechanics.
You can check my YouTube channel to see some features that have been/will be/could be added to WSE.

I'm not a modder, should I be using the Warband Script Enhancer?
Absolutely.
WSE fixes some engine bugs, including one that causes very frequent crashes. It also log crash data, so that the ones still present might be reported and fixed easily.
In addition to that, there are some integrated tools that you might find useful, like the memory optimizer.
If you're hosting a server under Wine you might want to use the Script Enhancer to avoid an engine bug that causes global variable corruption and other issues.


Downloads

WSE v3.2.0 (for Warband 1.153)
WSE v2.8.1 (for Warband 1.143)
WSEProfilerGUI v1.1 (graphical user interface for reading profiling logs)
MBSE Profiler v1.000 (profiler-only version for Mount&Blade 1.011 Enhanced Edition)


Installation

Users
1. Download WSE
2. Extract the files anywhere
3. Edit wse_settings.ini
4. Run WSELoader

Modders
1. Download WSE
2. Enhance the Module System with the files in the WSESDK directory (see README.txt for more information)
3. Package WSE in your mod download


Changelog:
v3.2.0
- Added loader option to change server window name
- Fixed an issue that caused scripts to execute incorrectly
- Fixed global variables being clamped to 32 bit


Previous versions
(click to show/hide)


FAQ:

Who are you? I've never seen you. This seems fishy.
I'm a cRPG developer.

How do I know the executable is not a virus?
You don't. :)
Scan it, sandbox it, run it in virtual machine, whatever. If you don't want to run it then don't.

Isn't modifying/cracking game files illegal?
No game file is modified, at all.

Does this allow people who don't own Warband to play?
No.

When I try to run it, it says that a .dll file is missing.
Since version 1.020 there should be zero external dependencies. If you have unpacked the whole archive and still keep getting errors you can try installing the Microsoft Visual C++ 2012 Redistributable Package (x86).

My game crashes/shows weird errors.
Post here and paste the contents of the wse_log.txt and rgl_log.txt files in your game directory.

My log file has entries like WARNING: Unable to map WSE script code ...
Unless you're a modder, you can safely ignore warnings. It just means the current mod is not using all of WSE's features.

I want to add WSE to my mod. What do I do?
Add the required WSE files to your mod download. The latest version linked here might not be compatible with the one you used to compile the mod.


Credits:

- The cRPG team (aka donkey crew), for many ideas, support and being awesome in general
- Vincenzo, for the discussion that inspired me to create this tool
... and the countless modders who contributed with ideas and bug reports


External software:

- muParser
- Open Game Protocol


Disclaimer:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
« Last Edit: January 25, 2015, 11:36:57 AM by cmpxchg8b »

Someone_forgotten

  • Guest
Re: [WB] Warband Script Enhancer - string operations for the masses
« Reply #1 on: December 26, 2010, 09:57:17 AM »
This is so awesome and so useful! But It can be much more useful in the Forge - Mod Development. Thanks for sharing this.

Regards.

Cruger

  • Guest
Re: [WB] Warband Script Enhancer - string operations for the masses
« Reply #2 on: December 26, 2010, 10:04:20 AM »
:shock:

Holy **** that's awesome.

Arch3r

  • Count
  • *
  • >:I
    • View Profile
  • Faction: Rhodok
  • MP nick: CoR_Arch3r
  • M&BWBNW
Re: [WB] Warband Script Enhancer - string operations for the masses
« Reply #3 on: December 26, 2010, 10:49:04 AM »
Much love <3
                                                                                           

Slenderpeasants,
the evil minions of the Bonerlords

chadz

  • The man that does Donkey Shows on Thursdays
  • Baron
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: irc://chadz
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #4 on: December 26, 2010, 11:55:12 PM »
This thing is so awesome, I'm not sure where to start.

I hope for many patches and many added ops!
Don't mind the donkey.

GetAssista

  • Baron
  • *
  • TLD corovan robber
    • View Profile
  • Faction: Neutral
  • M&BWF&SWB
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #5 on: December 27, 2010, 10:32:09 AM »
Woah!

How does it work internally?

Lumos

  • Probably Not a Help Desk
  • Moderator
  • *
  • Mens INsana in corpore sano
    • Steam - lumosx
    • YouTube - LumosX
    • View Profile
  • Faction: Nord
  • WBWF&SNWM&BVC
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #6 on: December 27, 2010, 10:52:50 AM »
This looks like a must-have for when I start modding Warband... Great work.

cmpxchg8b

  • Modder++
  • Count
  • *
  • Master of rglPool
    • View Profile
  • Faction: Vaegir
  • MP nick: cmp
  • M&BWBWF&SNW
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #7 on: December 27, 2010, 03:13:33 PM »
Woah!

How does it work internally?
1) the loader forces Warband to load the WSE library
2) in certain parts of the original code the WSE library redirects program flow to handler functions
3) lots of abstraction and c++ code
4) eventually program flow is redirected back into the original code (not necessarily in the same part)

Changing behavior of Warband functions requires lots of low-level work, while adding new operations is fairly trivial now that some sort of "framework" is in place. For example, the str_equals operation looks like this:
(click to show/hide)

GetAssista

  • Baron
  • *
  • TLD corovan robber
    • View Profile
  • Faction: Neutral
  • M&BWF&SWB
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #8 on: December 27, 2010, 03:47:26 PM »
2) in certain parts of the original code the WSE library redirects program flow to handler functions
3) lots of abstraction and c++ code
4) eventually program flow is redirected back into the original code (not necessarily in the same part)

Changing behavior of Warband functions requires lots of low-level work, while adding new operations is fairly trivial now that some sort of "framework" is in place.
Woah #2!  This is just awesome  :idea:
What kind of WB generated data do you have access to in #2? Can it be used for some more indepth actions like operating agents/props?

cmpxchg8b

  • Modder++
  • Count
  • *
  • Master of rglPool
    • View Profile
  • Faction: Vaegir
  • MP nick: cmp
  • M&BWBWF&SNW
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #9 on: December 27, 2010, 04:25:11 PM »
What kind of WB generated data do you have access to in #2? Can it be used for some more indepth actions like operating agents/props?
Technically, everything in the game can be accessed and modified. However, I must know the layout of data structures and memory addresses of methods.
I don't know much about either scene prop instances or agents yet, but it's only a matter of time (could be a very long time, though).

Dusk Voyager

  • Count
  • *
  • Cannot into couching.
    • View Profile
    • PoP Dev Forum
  • Faction: Rhodok
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #10 on: December 27, 2010, 04:43:18 PM »
Wow, I've never seen a tool adding operations before.

Arch3r

  • Count
  • *
  • >:I
    • View Profile
  • Faction: Rhodok
  • MP nick: CoR_Arch3r
  • M&BWBNW
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #11 on: December 27, 2010, 07:30:20 PM »
Sooo many things can be done with this...how does this work with a dedicated server though? You have to run WSELoader.exe first and than the .bat file (or the .exe if that's what you use) that runs the server? Or does the WSELoader.exe replace the dedicated server exe?
                                                                                           

Slenderpeasants,
the evil minions of the Bonerlords

cmpxchg8b

  • Modder++
  • Count
  • *
  • Master of rglPool
    • View Profile
  • Faction: Vaegir
  • MP nick: cmp
  • M&BWBWF&SNW
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #12 on: December 27, 2010, 10:09:19 PM »
Sooo many things can be done with this...how does this work with a dedicated server though? You have to run WSELoader.exe first and than the .bat file (or the .exe if that's what you use) that runs the server? Or does the WSELoader.exe replace the dedicated server exe?
WSELoader.exe passes the command line to the dedicate server, so you only need to change the batch file (.bat) from:
Code: [Select]
mb_warband_dedicated.exe -r Sample_Battle.txt -m Nativeto
Code: [Select]
WSELoader.exe -r Sample_Battle.txt -m Native

Arch3r

  • Count
  • *
  • >:I
    • View Profile
  • Faction: Rhodok
  • MP nick: CoR_Arch3r
  • M&BWBNW
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #13 on: December 27, 2010, 10:50:29 PM »
Alright, ty.
                                                                                           

Slenderpeasants,
the evil minions of the Bonerlords

cmpxchg8b

  • Modder++
  • Count
  • *
  • Master of rglPool
    • View Profile
  • Faction: Vaegir
  • MP nick: cmp
  • M&BWBWF&SNW
Re: [WB] Warband Script Enhancer v1.010 - string operations for the masses
« Reply #14 on: December 28, 2010, 04:08:41 AM »
Update!
v1010
- WSE now refuses to start if the game is running in trial mode
- String operations moved from plugin to core library
- New string operations: str_get_ascii, str_to_int, str_is_alpha, str_is_digit, str_is_whitespace
- Added error handling to operations
- Lots of internal changes