Warband Refined & Enhanced Compiler Kit (v1.0.0 @ Mar 01, 2015)

Users who are viewing this thread

produno said:
The start up menus have been changed in my module files, for instance when choosing your characters background etc. If i use your compiler, it seems to try to revert the menus back to native, meaning dead ends and not being able to continue.
You're still explaining the situation in general terms. I need to know what is happening exactly, as "reverts back to Native" can be interpreted in a dozen different ways and tells me nothing about the problem.

Or maybe just send me your module_game_menus.py file for examination.
 
Okay, produno's code highlighted a difference between W.R.E.C.K. and vanilla compiler. When vanilla compiler encounters a reference in the code, it will search the respective list and match it to the first entry it finds. On the other hand, W.R.E.C.K. aims for a late binding, which means that first, all references are matched to numbers first, and only then they're actually replaced in the code. So in a situation when two or more entities with the same identifiers are present in the code, vanilla compiler will match references to first entry, while W.R.E.C.K. will match them to the last.

In produno's situation, this resulted in the first "mnu_start_game_1" menu being skipped in favor of vanilla second.

Oh well, I'll be releasing a fix in a moment, expect to see many warnings about duplicate entries. :smile:
 
W.R.E.C.K. v0.6.5 RC2 Released.
Download W.R.E.C.K. 0.6.5 RC2 (1.25 Mb file size) from:
Nexus Mods | Lav's Warband Workshop

Changelog for 0.6.5 RC2 said:
  • Compatibility fix: W.R.E.C.K. was matching the last entry to reference instead of first like vanilla compiler does.
  • Removed folder 'defaults' from W.R.E.C.K. installation as it's contents are now integrated as part of compiler.
  • It is now possible to control some aspects of compiler with command line parameters. You can either call 'compile.bat' with extra parameters, or add them to 'python compile.py' line in the 'compile.bat' file to make them permanent. Accepted parameters:
    • bw -- Run in black&white. If you can live without extra colors and wish to get rid of 'colorama' folder, this option is for you.
    • nodupe -- Suppress warnings about duplicate entry definitions in module files (other warnings are still generated).
    • silent -- After successful compilation, no errors, warnings or messages will be displayed.
    • errors -- After successful compilation, only errors will be displayed.
    • warnings  -- After successful compilation, only errors and warnings will be displayed.
    • notices -- Display all messages after compilation (default option).
Command line usage examples:
Code:
compile.bat bw warnings nodupe
Code:
@echo off
python compile.py silent
pause
 
Nord Champion said:
If WSE ever gets updated, would the compiler be able to compile it?
Sure, why not? You'll need to fix header_operations.py file (either copying new ops from WSE variant, or adding depth_operations list to it) but apart from that there shouldn't be any problems.
 
Lav said:
This is standard error when Python is misconfigured - if you reinstalled Python your path to it has probably changed, so you need to fix the system's %PATH% variable.
Where do I do that? I am sorry, but I am a complete amateur when it comes to programming. For the time being I just use your old compile.bat from 0.6.3 which works just fine with your new stuff. The problem seems to be solely related to the compile.bat, not the new compile.py and compiler.py.

Lav said:
Curious. This could happen if you work from a console window and didn't restart it after upgrading Python. Version 0.6.3 starts in a new console with all current settings, while 0.6.4 stays in the current console and won't get them. But that's a pretty rare scenario I guess, even if one quite familiar to myself as I happen to work primarily from Far. :smile:
Well, I have to admit I have no idea what you are talking about here. I sincerely wish my kowledge about programming and software would be better. (Not the least because then I could finally create the game I have always wanted to play.)

Thanks again for all your hard work for the modding community and your quick replies and help here!
 
DerGreif said:
Where do I do that? I am sorry, but I am a complete amateur when it comes to programming. For the time being I just use your old compile.bat from 0.6.3 which works just fine with your new stuff. The problem seems to be solely related to the compile.bat, not the new compile.py and compiler.py.
Extremely weird. Oh well, if compile.bat from 0.6.3 works without issues, it's variant from 0.6.5 should as well - I have removed all the junk lines there. Well, I hope it will.

And what is your system environment? Where are you running the compiler from? Did you reboot your PC after you upgraded Python?
 
Lav said:
Extremely weird. Oh well, if compile.bat from 0.6.3 works without issues, it's variant from 0.6.5 should as well - I have removed all the junk lines there. Well, I hope it will.

And what is your system environment? Where are you running the compiler from? Did you reboot your PC after you upgraded Python?
Environment: WinXP 64 (yes, I know, should upgrade to win 7, and I will, but configuring my pc all anew right now is not in the cards until I am done with my latest workload). Strangely enough, 0.6.5 does not work either (but #-error line is now missing, so that change of yours was registered). I replaced compile.bat, but both compile/r.py with the 0.6.5 version, and it did not work. Then I just replaced the compile.bat wit the old one and all compiled smoothly.

To run I just doubleclick on the compile.bat from the folder where it is stored. I am using a partition though with the msys stored on, whereas python is installed on the primary harddrive. I rebooted my PC multiple times after the Python upgrade.

Well, as I said, I have no idea what I am doing here. I am always surprised, when my mod programming works as I intended it.  :oops:
 
That's... weird, to say the least.

Okay, let's see here:

Code:
@start python compile.py
Code:
@echo off
python compile.py %1 %2 %3 %4 %5 %6 %7 %8 %9
pause

The only thing that can *potentially* cause anything of the sort is the 'start' operation (even if I haven't the foggiest why). Well, if you're interested in experiment, try creating two files:

Code:
@start compile_test2.bat
Code:
@echo off
python compile.py
pause
exit

Hopefully, the first bat-file will launch the second through 'start', thus resolving whatever Python access issues you seem to be experiencing, and the second will run normally in a separate window, closing it after finishing.
 
Some experiments with execution stack traceback proved interesting:



If there are other typical modding errors, please post them here, it would be interesting to teach the compiler to detect them and provide hints for easier debugging.

And then I'll teach W.R.E.C.K. how to fix those mistakes on it's own, and maybe even to make new mods. :lol: :lol: :lol:
 
Feel free to post your impressions and especially if you run into any problems (even if you manage to fix them yourself). :smile:
 
W.R.E.C.K. v0.6.6 RC2 Released.
Download W.R.E.C.K. 0.6.6 RC2 (1.25 Mb file size) from:
Nexus Mods | Lav's Warband Workshop

Changelog for 0.6.6 RC2 said:
  • Compiler will now attempt to detect the 'missing comma' error and provide hints.
  • Bugfix: was crashing in situation where plugin syntax extension failed to return anything. Will terminate gracefully now with proper messages.
  • New command line parameter has been introduced: `tag`. With this parameter W.R.E.C.K. will apply entity tags to most references, resulting in almost 100% match between files generated by W.R.E.C.K. and vanilla compiler. This parameter is added by default in compile.bat file.

Plugins plugin_ms_extension and plugin_presentations have been tested and are bundled with this version.

Note that entity tags are entirely optional - Warband seems to ignore them completely and it doesn't matter if you use them, skip them or even use incorrect ones. However not using them results in txt files being different, which in turn results in TweakMB not working with files generated by W.R.E.C.K. This could be a bug or a feature (depends on your point of view), but it's definitely a bug in the eyes of many players who abuse this tool. :smile:

Also, now that there's a possibility to force W.R.E.C.K. to generate almost identical output with vanilla compiler's, I decided to run some compatibility tests between W.R.E.C.K. and vanilla process_* files.

  • actions.txt
    Files are 99.9% identical (W.R.E.C.K. always converts zero values to formatted 0.000000, vanilla compiler abbreviates that to just 0.0 in certain occasions).
  • conversation.txt
    Files are 99% identical if `tag` parameter is used, otherwise W.R.E.C.K. variant is smaller due to skipping on reference tags. Also, there are some differences due to different ordering of dialog_states.
  • dialog_states.txt
    W.R.E.C.K. handles dialog_states a bit differently, so the order in which dialog states are listed in this file, as well as their references in conversation.txt may differ slightly.
  • factions.txt
    Files are 100% identical.
  • info_pages.txt
    Files are 100% identical.
  • item_kinds1.txt
    Files are 100% identical with fixed vanilla if `tag` parameter is used. Using base vanilla results in several differences due to vanilla compiler's HP overflow bug and different items being referenced when items with duplicate IDs are present in module files.
  • map_icons.txt
    Files are 99.9% identical (W.R.E.C.K. always converts zero values to formatted 0.000000, vanilla compiler abbreviates that to just 0 in certain occasions).
  • menus.txt
    Files are 100% identical if `tag` parameter is used, otherwise W.R.E.C.K. variant is smaller due to skipping on reference tags.
  • meshes.txt
    Files are 100% identical.
  • mission_templates.txt
    Files are 100% identical with fixed vanilla if `tag` parameter is used. Using base vanilla results in several differences due different items being referenced when items with duplicate IDs are present in module files.
  • music.txt
    Files are 100% identical.
  • particle_systems.txt
    Files are 99.9% identical (W.R.E.C.K. always converts zero values to formatted 0.000000, vanilla compiler abbreviates that to just 0.0 in certain occasions).
  • parties.txt
    Files are 100% identical.
  • party_templates.txt
    Files are 100% identical.
  • postfx.txt
    Files are 100% identical.
  • presentations.txt
    Files are 100% identical if `tag` parameter is used, otherwise W.R.E.C.K. variant is smaller due to skipping on reference tags.
  • quests.txt
    Files are 100% identical.
  • quick_strings.txt
    Files are 100% identical.
  • scene_props.txt
    Files are 100% identical if `tag` parameter is used, otherwise W.R.E.C.K. variant is smaller due to skipping on reference tags.
  • scenes.txt
    Files are 100% identical.
  • scripts.txt
    Files are 100% identical if `tag` parameter is used, otherwise W.R.E.C.K. variant is smaller due to skipping on reference tags.
  • simple_triggers.txt
    Files are 100% identical if `tag` parameter is used, otherwise W.R.E.C.K. variant is smaller due to skipping on reference tags.
  • skills.txt
    Files are 100% identical.
  • skins.txt
    Files are 100% identical.
  • sounds.txt
    Files are 100% identical.
  • strings.txt
    Files are 100% identical.
  • tableau_materials.txt
    Files are 100% identical if `tag` parameter is used, otherwise W.R.E.C.K. variant is smaller due to skipping on reference tags.
  • triggers.txt
    Files are 100% identical if `tag` parameter is used, otherwise W.R.E.C.K. variant is smaller due to skipping on reference tags.
  • troops.txt
    Files are 100% identical with fixed vanilla. Using base vanilla results in several differences due different items being referenced when items with duplicate IDs are present in module files.
  • variable_uses.txt
    W.R.E.C.K. does not generate this file.
  • variables.txt
    Files are 100% identical.

HOTFIX: W.R.E.C.K. v0.6.6.1 RC2.
Download W.R.E.C.K. 0.6.6.1 RC2 (1.25 Mb file size) from:
Nexus Mods | Lav's Warband Workshop

Hotfix deals with a critical bug that applies to adapted module systems only - for as long as you use 'copy_n_forget' files, you can ignore the hotfix. Of course, if you're downloading W.R.E.C.K. for the first time, it's still better to use the fixed version.
 
Lav said:
That's... weird, to say the least.

Okay, let's see here:

Code:
@start python compile.py
Code:
@echo off
python compile.py %1 %2 %3 %4 %5 %6 %7 %8 %9
pause

The only thing that can *potentially* cause anything of the sort is the 'start' operation (even if I haven't the foggiest why). Well, if you're interested in experiment, try creating two files:

Code:
@start compile_test2.bat
Code:
@echo off
python compile.py
pause
exit

Hopefully, the first bat-file will launch the second through 'start', thus resolving whatever Python access issues you seem to be experiencing, and the second will run normally in a separate window, closing it after finishing.
Sadly that did not work. I always get the same error message. The moment I add a @start before python it works. But even with your trick with two compile.bat files it does not work. I need an @start in the second compile.bat, too, to make it work. Since your 0.6.5 compile.py files in combination with a modified 0.6.5 compile.bat (with @start added before python) or the old 0.6.3 compile.bat are not pausing after compilation (so I have no idea what the error messages were), I have reverted completely to the 0.6.3 version (compile.py files and compile.bat).

I will try out your latest version some time in the evening. Thanks again for all your great work and help!
 
DerGreif said:
Sadly that did not work. I always get the same error message. The moment I add a @start before python it works. But even with your trick with two compile.bat files it does not work. I need an @start in the second compile.bat, too, to make it work. Since your 0.6.5 compile.py files in combination with a modified 0.6.5 compile.bat (with @start added before python) or the old 0.6.3 compile.bat are not pausing after compilation (so I have no idea what the error messages were), I have reverted completely to the 0.6.3 version (compile.py files and compile.bat).

I will try out your latest version some time in the evening. Thanks again for all your great work and help!
Okay, this is seriously weirding me out. :smile:

Anyway, sent you a PM.
 
Lav said:
Okay, this is seriously weirding me out. :smile:

Anyway, sent you a PM.
Thank you again! I will try it out in the evening.

It could very well be that it has nothing to do with your program but with my system. As I said, I am running win xp professional with the last update in 2014, and the system was set up in 2009. My registry, software and harddrive look probably like a trench around Verdun anno 1916.  :wink:
 
*sees this thread for the first time*
:shock:
*reads with interest*

**** you, Lav. I love you.

Considering this WRECK* has got a plugin thingie with code injection (and I'm currently possessed by a dependency injection fetish, so everything with "injection" in it sounds awesome as hell), what's your position on modmerger, and stuff made to work with modmerger? (Note: I did skim over a few parts of the first post, so if you've listed something there, I've not seen it and it's entirely my fault.)

* I suggest the next massive thing you do be something along the lines of "Technical Reorganisation (of the) Artificial Intelligence (in) Native", and ship it directly with WRECK, preferably appended before it, with a slash. That'd be the best thing after buttered toast. :lol:
 
Ah... Actually I wrote about ModMerger at the very end of the first post, in "Compatibility" section.

I'm afraid you won't be able to use ModMerger with any advanced W.R.E.C.K. features. You will only get fast compilation and better error reporting from it.
 
W.R.E.C.K. v0.6.7 RC2 Released.
Download W.R.E.C.K. 0.6.7 RC2 (1.25 Mb file size) from:
Nexus Mods | Lav's Warband Workshop

Changelog for 0.6.7 RC2 said:
  • Bugfix: finally defeated all problems when running compiler on adapted sources with `tag` parameter.
  • New command line parameter: `wait`. Will make the compiler request user to press Enter at the end of compilation. Only useful if you prefer to launch the compiler with `@start python compile.py` command instead of normally.
  • Invoked some serious Python magic to solve the problem of globals exported by a plugin being unaccessible in other plugins (weirdly enough, syntax extensions worked fine without any tricks, despite relying on the same export mechanism). Function register_plugin() now can also detect plugin name automatically and can be called without any parameters.
  • A number of bugfixes for a few rare plugin-related situations.
  • Tweak: slightly modified output to fully match output of vanilla module system compiler (with a very few unimportant exceptions, output of vanilla and W.R.E.C.K. on the same module system will be identical).
  • W.R.E.C.K.'s `integrated_ms` pack now contains all fixes from tweaked and fixed 1.165 Module System.

Test Suite Pack
Download Test Suite Pack for 0.6.7 RC2 (0.99 Mb file size) from:
Nexus Mods | Lav's Warband Workshop

Test Suite Pack is the tool I'm using during W.R.E.C.K. development to compare it's output to vanilla compiler. It is fully isolated - just extract it to a separate folder and run the bat file in the main folder. Suite Pack will automatically proceed to generate txt files with vanilla compiler and with two variants of W.R.E.C.K. installation. Note that W.R.E.C.K. compilers are running in black&white mode so it should be easy to redirect it's output to a file if you wish so.
 
Back
Top Bottom