Mount & Blade: Warband
0 of 0

File information

Last updated

Original upload

Created by

Lav

Uploaded by

Eleyvie

Virus scan

Safe to use

About this mod

W.R.E.C.K. is designed as replacement for the module system compiler provided by Taleworlds, providing drastically improved performance, enhanced error reporting and a number of advanced features potentially useful in Warband mod development.

Permissions and credits
Warband Refined & Enhanced Compiler Kit (W.R.E.C.K.)


W.R.E.C.K. Description and Features

W.R.E.C.K. is designed as replacement for the module system compiler provided by Taleworlds, providing drastically improved performance, enhanced error reporting and a number of advanced features potentially useful in Warband mod development.

Basic W.R.E.C.K. features:
  • Compilation speed is several times higher than vanilla compiler.
  • A number of potential errors which are not detected by vanilla compiler are actually detected and reported by W.R.E.C.K. Also, unlike vanilla compiler, W.R.E.C.K. will not flood your screen with tons of error messages because of a single bug.
  • W.R.E.C.K. provides modder with the tools to easily change item modifiers, game UI strings and user hints, which sometimes is extremely useful. For that purpose, it introduces three new optional modules: module_item_modifiers.py, module_ui_strings.py and module_user_hints.py, which are compiled into Data/item_modifiers.txt, languages/en/ui.csv and languages/en/hints.csv files respectively. If module files are missing from your module system, no files will be generated (making Warband fallback to standard ones).

Advanced W.R.E.C.K. features, which only become available after proper integration with Module System (see "Integration" chapter below):
  • Vanilla compiler requires two sets of entity references: static references contained in ID_*.py files (icon_player) and quoted references ("icon_player") which are calculated at compile-time. This creates a number of problems. For example, it's impossible to simply add a new icon and a new party which will use that icon: modder must add a new icon, compile the module to regenerate the ID files, and only then he can add a new party. W.R.E.C.K. offers a solution to this problem by introducing a dynamic reference (icon.player) which can be used freely and everywhere, replacing both types of vanilla references. Note that while W.R.E.C.K. sticks to standard Warband prefixes, strings are referenced as s.<string_name> instead of str.<string_name>. This is the only deviation from the scheme, necessitated by the fact that str is a global keyword in Python.
  • Global and local variables can also use this syntax, with ":variable" becoming l.variable, and "$variable" becoming g.variable.
  • More than that, new dynamic references can be freely used in mathematical expressions. For as long as the expression can be calculated at compile time, it will be calculated at compile time and the calculated value will be used in the resulting code.
  • To further expand on this feature, it is actually possible to use mathematical expressions that include run-time variables (locals, globals, registers) in the expressions within a code block. For such expressions, compiler will auto-generate the module system code which will calculate the mathematical expression and insert it into the code, completely transparently for the modder. Note that for obvious reasons it is not recommended to use this feature inside conditional operations which are part of this_or_next operation blocks.
  • Vanilla module system relies on header_skills.py file to correctly declare skill-related constants, which makes it unnecessarily difficult to alter game skills as any changes to module_skills.py must be mirrored manually in header_skills.py as well. W.R.E.C.K. compiler automatically and dynamically calculates all necessary constants.
  • Dynamic references (imod.<modifier> and imodbit.<modifier>) are available to be used instead of vanilla imod_* constants.[/li]
    [li]W.R.E.C.K. will transparently generate skl_*, knows_*_*, imod_* and imodbit_* constants from module files for backwards compatibility.
  • W.R.E.C.K. provides support for a fairly advanced plugin system. It is now possible to create plugin files which can include all types of module system data, inject code and data entries into the existing module system, extend operations syntax and perform arbitrary processing over module data. Plugin functionality is described in more detail below.
  • A number of artificial limitations have been lifted from the Module System. W.R.E.C.K. supports numeric, string and position registers up to reg127, s127 and pos127 respectively. There are no artificial limits on item weight and max_ammo parameters (not very useful for ammo items, but may be pretty nice for food and trade goods).
  • New ATTR() and SKILLS() functions are provided to be used in troop definitions in module_troops.py file. Modder can use ATTR(8, 9, 6, 4, 3) instead of str_8|agi_9|int_6|cha_4|level(3) and SKILLS(trade = 2, riding = 6) instead of knows_trade_2|knows_riding_6, resulting in better readable code. Additional benefit is that this syntax is not limited by the constants defined in header_troops.py, making it easy to define attributes values above 30 and skill levels above 10.