Archive for wc3lib

wc3lib on GitHub and Port to Qt5 and Windows

Posted in technical with tags , , on 2016-11-06 by Baradé

wc3lib is my project to support Blizzard’s file formats used in Warcraft III: Reign of Chaos and Warcraft III: The Frozen Throne.

It provides interface to access BLP (texture), MPQ (data archive), W3M (map) files and others. Besides it offers GUI tools like a custom MPQ, Object or Trigger editor.

Recently I’ve ported the project from Qt4 to Qt5. I dropped all dependencies to KDE 4 SC/KF5 so even the GUI applications do not depend on KDE anymore. This should make it much easier to compile the wc3lib project on Windows. I tried so on Fedora using the MinGW cross compiler and cross-compiled binaries of the Boost C++ Libraries etc. which Fedora luckily does already provide. I’ve created a Windows setup. Check out the resource on Hive Workshop which I will update from time to time: http://www.hiveworkshop.com/threads/wc3lib.275380/

Continue reading

Object Editor

Posted in technical with tags , , , , , , on 2014-09-02 by Baradé

Hello there,
it has been some time (again) since the last article but don’t expect me to stop development of wc3lib. There has been some great changes recently which made it possible to write and improve
World Editor modules such as the famous Object Editor.

If you do not want to read all this, just scroll down to the screenshots.

Continue reading

Desktop Integration

Posted in technical with tags on 2013-10-03 by Baradé

Work goes on very well. After improving the newly written trigger editor module loading trigger data and strings became really annoying when testing the latest version.

Of course I just could have written some command line arguments or automatic scripts but since selecting valid sources like MPQ archives or simple directories is a major part of the editor module it had to be checked why it still was not working.

The concept itself is to provide a list of sources (directories/archives) with specific priorities for a module or the World Editor. Whenever a file has to be loaded like “UI/TriggerData.txt” it goes through all source entries (ordered by their priority) and appends the path to the directory or archive path to load the file. This should be the same way Warcraft III does it when loading any data from the MPQ archive. For example, the War3Patch.mpq archive should always have the highest priority because it contains the latest valid files.

Unfortunately, neither saving the sources list nor reading from MPQ files via KDE slaves did work until then.

Initial attempts implementing a KIO slave failed when I tried to derive from KArchive since it doesn’t seem to exist for any plugin extension. Finally, I decided to use “SMPQ”‘s example, a great tool which does exactly the same my own slave should do except it uses StormLib’s API. Thanks to the authors work I did not have to spend much time in becoming familiar with KIO slaves or implementing some parsing functions ;).

So this is the latest work’s result:

mpqslave

The file manager dolphin using my own “mpq” protocol slave which itself uses wc3lib’s MPQ API to load all files. As you can see some directory entries exist two times. That’s because actually they’re case insensitive (defined by the hash algorithm of MPQ) but (listfile) contains different cases. By now I’ve fixed that. The invalid date occurs because now “(attributes)” file could have been loaded which would contain the time stamps which is optional for MPQ.

There’s one other great thing about desktop integration in wc3lib:

icons

The Qt image plugin qblp has been out there for a while but I finally fixed some bugs AND wrote a “.desktop” file which allows you to use BLP images as normal image files in KDE.

For Gentoo Linux you could use my custom ebuilds to install wc3lib.

 

For the future I try to write more Unit Tests and improve the debugging process to get things more usable since I used much time for API revisions and core implementations in the past.

 

Trigger Editor

Posted in technical with tags on 2013-08-24 by Baradé

Hi there,

as I wrote in the most recent article, I’ve been trying to use Boost Spirit to parse Warcraft’s .txt files. When I finally had fixed my parser (thanks to StackOverflow) I continued implementing classes for storing trigger data and trigger strings.

Since everything went well from there on, it’s a great pleasure to present you my first working results reimplementing a trigger editor:

trigger editor

variables

trigger action

Although the GUI looks rather unpleasant at the moment, I am very proud the have some general functionality which makes use of my “map” module to show all triggers, trigger functions and variables.

At the moment I am concentrating on supporting Warcraft III only (not Frozen Throne)  but bear in mind that Frozen Throne adds only some minor features like comment triggers etc.

 

To decrease compile time and make the project modular modules have been divided up into sub targets/directories and can be loaded on request now. As all modules can run as standalone application I am able to start a trigger editor itself without any other modules.

Of course I have to load “TriggerData.txt” and “TriggerStrings.txt” manually if there’s no MPQ archive selected:

loading trigger data

Maybe the trigger editor isn’t the module which you really need to improve from its original version, but it’s still a great achievement on the way supporting the whole World Editor. It would be possible to create a trigger data editor as well which allows you to define your own trigger functions very easily.

 

If you have any ideas for functions which could improve the trigger editor, please leave a comment.

 

 

wc3lib changes

Posted in technical with tags , , , on 2013-08-04 by Baradé

This new PDF summarizes most of the changes made in the last two years:

wc3lib changes

wc3lib: old projects, new website

Posted in technical with tags , , , , on 2012-07-25 by Baradé

Although I had not much time for continuing the work on wc3lib – mainly because of the complicated TriggerData.txt file support which should be realized using Boost Spirit – I’ve released some more source code and other stuff in my project on Gitorious.org which is related to wc3lib:

  • warblender – modified version of the original Blender import/export plugin for MDX files which should be more compatible to Blender 2.4
  • syntaxhighlightings – modified and newly created syntax highlighting files for Kate, gedit and Notepad++
  • vjassdoc – Doxygen-like tool for JASS and vJass (generates HTML API documentation based on special comments in your code)
  • vjasstrans – gettext-like tool for JASS and vJass (internationalization tool for generating .wts string files and translating your map into other language)
  • vjasside – obsolete, unfinished Qt-based IDE for vJass

Aside from vjasside and warblender all projects are still used by me for “Die Macht des Feuers”. warblender could be one of the most important tools if its development state was much further than it actually is.

Besides I’ve purchased the wc3lib.org domain to provide some project information at a central place.

Would be great to see some volunteer developers who might contribute to some of the projects (especially warblender).

Advanced Script Library 1.3

Posted in technical with tags , , , , , , on 2011-11-21 by Baradé

On 12th September 2010 I released version 1.2. Since then I tried to spend more time for my other project wc3lib but finally went back to “Die Macht des Feuers” from time to time which relies on the ASL. Therefore I had to improve ASL 1.* tree. Actually, the planned 2.0 version got much improvement and revisions, as well but still based on the current vJass version supported by JassHelper which lacks of some heavily required features. Continue reading