Advanced Script Library 1.3

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.

In the meantime, I moved to Gitorious.org with most of my projects, so you can checkout the latest version of the ASL following this link. All 2.0 stuff is available, too in the same repository but still not usable. At the moment there is no 1.3 release since two systems (A_MAP and ARoutine) still need to be fixed for the release and I want to take a look on some other systems I usually don’t use myself which makes them hard to be maintained for me. However, this article should give you a digest of the most important changes and of course of all remaining issues.

First of all, I am proud to mention that JassHelper option [forcemethodevaluate] is fully supported by ASL 1.3 which helps you to optimize your function calls. The next “big” thing in 1.3 is the fact that there are many stub “on<identifier>” methods for most structures now which allow you to redefine behavior by extending structures not only by passing custom function objects.  Amongst many many bug fixes, I improved the API documentation based on the Doxygen syntax massively but since my own tool vjassdoc hasn’t been updated by me yet and there is no similar tool I still cannot create a proper HTML API documentation. Anyway, it might help users to understand functions easier (including myself as I’ve figured out when reading old code). I’ve added some text from the German tutorials (of course translated) and documented some Blizzard JASS functions, as well. Besides, I’ve added various sections explaning specific topics like containers.

Please bear in mind that this version may break with the old API completely at some points since I made really big revisions for some systems (such as ARoutine, ATalk and AVideo). This version won’t drop all static initialization stuff but I’ve already made some systems more dynamic which do use default values for dynamic members instead of an annoying .init() method.

Since the creation of the ASL, missing vJass features have always been a big problem because they prevented me from adding some really cool stuff. I really don’t want to blame anyone and I am very happy that the JassHelper has been created but today there isn’t anyone left who is able to maintain it. Vexorian had been the only maintainer at all and this isn’t ever going to change. I’ve taken several looks at JassHelper’s Pascal/Delphi/whatever source code and even if I was familiar with that language I probably wouldn’t be able to maintain it for a long time. Additionally, there is the bad fact that it depends on Windows. In his announcement Vexorian mentioned that he was going to create a new, much better tool but because this announcement was made in February 2010 I wouldn’t expect any initial release anymore. On hiveworkshop.com I’ve seen some ideas for a new scripting language but without any usable results. Using Spirit I could try it on my own but I really, really don’t have the time to create another project, especially if there isn’t anyone who could help me. Let’s see what the future brings to vJass and the ASL. You can check out the file “doc/vJass/vJass suggestions.txt” if you would like to get a list of all annoying lacks of vJass/JassHelper.

Text macro A_MAP has seen a huge revision to make its lookups and insertions as fast as usual dictionary implementations (O(log n)). As mentioned above the revision hasn’t been completed yet, so you’ll have to wait some time for the final 1.3 release. All default container types generated and used by the ASL itself got a huge increase of size required by “Die Macht des Feuers”. Over the weekend, I revised ARoutine completely and dropped many methods which took much performance but provided less features. ATalk and AInfo got much more documentation and dynamic members. There’s more debugging functionality now (including more cheats). Global strings can be configured using custom constants now (look into README file for further information). Deprecated module AObjects has been removed and AVideo provides better actor and custom function support. Some important bug fixes have been made, mainly related to structures AAbstractQuest, AVideo, AUnitCopy, AHeroIcon and functions ShowInterface() and CopyUnit(), as well as debugging cheats. Furthermore, I’ve fixed many compilation issues when setting specific options. The README file includes more details about tool support (e. g. jAPI) and trigger editor integration which is a quite unfinished feature but brings many German strings to your trigger editor since I started with the German version which includes a translation of the existing GUI actions.

The following lists of new features and changes might be incomplete. Please use the ChangeLog file to get all detailed information about the new version.

New functions:

  • waitForCondition()
  • GetPlayerColorValue()
  • GetPlayerColorRed()
  • GetPlayerColorGreen()
  • GetPlayerColorBlue()
  • player only effect functions
  • WaitCheckingCondition()
  • GetDistanceBetweenPointsWithoutZ()
  • KeyIsValid() – available without debug mode now
  • CopyItemToItem()
  • IsTimeOfDay()

New structures:

  • AVideoCharacterData
  • AVideoPlayerData
  • AUnitSpell

New debugging cheats:

  • “remove”
  • “execution”

Finally, there aren’t any screenshots this time 🙂 but I want to thank the user “Pali” for his awesome tool SMPQ which uses StormLib to provide a KDE IO slave and a simple prompt tool. Both helped me to create various bash scripts which make testing “Die Macht des Feuers” including ASL much faster and easier than before. If you’re interested in any contribution please contact me. ASL really needs much better documentation and to become more stable to be used more generally. At the moment, it is very limited to my own project “Die Macht des Feuers” because I usually try to fix stuff which doesn’t work in my modification. If you’re interested in seeing my modification to be finished as soon as possible, you could contribute, as well by creating graphical stuff etc. Any contribution will always be appreciated!

Advertisements

4 Responses to “Advanced Script Library 1.3”

  1. Regarding the new Language/vJass version: There are multiple ways to get what you want.
    One would be hacking on the JassHelper source. Probably the worst option.
    Then you could create your own vJass-Compiler. Since vJass is a rather simple Language it would be *kind of* easy, if you ever worked on something similar. But to get it right, it probably would cost you more time than hacking on the JassHelper source.

    A third option is to only hack a compiler for the features you want and then let the rest be compiled by JassHelper. Here (http://www.wc3c.net/showpost.php?s=97f3c5712e04f36c40fbf3a3abc34031&p=971680&postcount=7) PipeDream hacked generics into vJass.
    For example your `//! if` should be rather easy on it’s own, should’t it?

    Even if i’m not really a fan of c++ most people kind of *know* it. That means, if you have just a small tool, like doing all `//! `-kinds of stuff, the chances are good that you would get some help.

    • Baradé Says:

      I prefer creating a new tool but it will take more time. At the moment I am trying to get familiar with Boost Spirit since I have to parse TXT files from Warcraft for my project wc3lib. When I’ve learned enough about Boost Spirit, grammars, building compilers I will try to create a little JASS parser using Boost and maybe one day a vJass compiler. There is a really small number of people left to Warcraft III modding who actually know enough to create such tools and is willing to do. I’ve already used much of my time to get custom BLP, MDLX and MPQ support to wc3lib and I think it would be really, really cool to have JASS support, as well from one single cross-platform library for Warcraft III modding.

      • > I prefer creating a new tool but it will take more time. At the moment I am
        > trying to get familiar with Boost Spirit since I have to parse TXT files from
        > Warcraft for my project wc3lib. When I’ve learned enough about Boost
        > Spirit, grammars, building compilers I will try to create a little JASS parser
        > using Boost and maybe one day a vJass compiler.

        If you use the right tools, parsing atleast isn’t that hard. Doing something interesting with the result is where you can spend a good potion of your time.

        > There is a really small number of people left to Warcraft III modding who actually know enough to
        > create such tools and is willing to do.

        I’m probably not one of those, but currently i do some experiments regarding (Jass) parsing and doing something interesting with it. Maybe i’ll even release something :p

        > I’ve already used much of my time to get custom BLP, MDLX and MPQ support to
        > wc3lib and I think it would be really, really cool to have JASS support, as well
        > from one single cross-platform library for Warcraft III modding.

        What do you mean by “JASS support”? Just generating the AST? Or something different?

      • Baradé Says:

        Exactly, only some small JASS syntax analyzer but I don’t have enough time at the moment for this. First I have to finish TriggerData.txt parsing support to get trigger editor support in wc3lib.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: