Author Topic: [WB] Warband Script Enhancer v2.7.1 (04/04/2012)  (Read 104019 times)

0 Members and 2 Guests are viewing this topic.

cmpxchg8b

  • Modder++
  • Grandmaster Knight
  • *
  • Master of rglPool
    • View Profile
  • Faction: Vaegir
  • MP nick: cmp
  • M&BWBWF&SNW
[WB] Warband Script Enhancer v2.7.1 (04/04/2012)
« on: December 26, 2010, 04:43:34 AM »
WSE - Warband Script Enhancer v2.7.1 for Warband 1.143

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 v2.7.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:

v2.7.1
- Fixed operation troop_set_skill not working correctly

v2.7.0
- Fixed get_server_option_at_connect not working for Steam users
- Added operation player_stop_controlling_agent


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++ 2010 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: April 03, 2012, 11:05:04 PM by cmpxchg8b »
Warband Script Enhancer v2.7.1 - additional operations, game scripts and triggers for Warband modders

Someone_forgotten

  • Guest
Re: [WB] Warband Script Enhancer - string operations for the masses
« Reply #1 on: December 26, 2010, 10: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, 11:04:20 AM »
:shock:

Holy **** that's awesome.

Arch3r

  • Grandmaster Knight
  • *
  • >: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, 11:49:04 AM »
Much love <3

I am Space Khergit, and above pyramids.

chadz

  • The man that does Donkey Shows on Thursdays
  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: irc://chadz
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #4 on: December 27, 2010, 12:55:12 AM »
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

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

How does it work internally?

Lumos

  • Grandmaster Knight
  • *
  • Did you say anything?
    • View Profile
  • Faction: Nord
  • WB
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #6 on: December 27, 2010, 11:52:50 AM »
This looks like a must-have for when I start modding Warband... Great work.

cmpxchg8b

  • Modder++
  • Grandmaster Knight
  • *
  • 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, 04: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)
Warband Script Enhancer v2.7.1 - additional operations, game scripts and triggers for Warband modders

GetAssista

  • Grandmaster Knight
  • *
  • TLD corovan robber
    • View Profile
  • Faction: Neutral
  • M&BWF&S
Re: [WB] Warband Script Enhancer v1.000b2 - string operations for the masses
« Reply #8 on: December 27, 2010, 04: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++
  • Grandmaster Knight
  • *
  • 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, 05: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).
Warband Script Enhancer v2.7.1 - additional operations, game scripts and triggers for Warband modders

Dusk Voyager

  • Grandmaster Knight
  • *
  • Dem dayum drums
    • 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, 05:43:18 PM »
Wow, I've never seen a tool adding operations before.
(click to show/hide)
(click to show/hide)

Arch3r

  • Grandmaster Knight
  • *
  • >: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, 08: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?

I am Space Khergit, and above pyramids.

cmpxchg8b

  • Modder++
  • Grandmaster Knight
  • *
  • 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, 11: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
Warband Script Enhancer v2.7.1 - additional operations, game scripts and triggers for Warband modders

Arch3r

  • Grandmaster Knight
  • *
  • >: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, 11:50:29 PM »
Alright, ty.

I am Space Khergit, and above pyramids.

cmpxchg8b

  • Modder++
  • Grandmaster Knight
  • *
  • 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, 05: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

Warband Script Enhancer v2.7.1 - additional operations, game scripts and triggers for Warband modders