| 04-06-2007, 05:10 PM | #1 |
Hi. The reason I'm looking for some library for jass is because I'm making a tool for Warcraft 3 map named "DotA Allstars". I want some library that will read entire jass file and then will provide me the following functions: 1. Get function body by it's name, or even better - execute the function and then report what did the function do during execution (like provide me some data that will "tell me" that: Unit with id "Edem" got his ability "AOcr" replaced by ability "AHad"). 2. List all the declared variables and also note where are they used/what functions call them. When I say "report" or "note" I do NOT mean some textual representation. For example, ability replacement can be described by specifying some ID like ABIL_REPLACE and then its parameters... I do not know if such funcitons exists so that's why I'm trying to imagine how this can be implemented. I can do some ugly implementation of it myself, but since I'm using C# it will be slow, and I'm too lazy to make a library in C++ (haven't programmed in C++ about 3 years or more). So, my question is: Is there any library or source code that process jass and gather all info into usable form. I think the jass parsers will be no use for me since they only check the syntax and nothing else (well they do omptimize code and blah-blah-blah ... but that's not what I need). |
| 04-06-2007, 05:16 PM | #2 |
Why would you need this, seriously? It is useless unless what you want to do is "unprotecting it" But Dota was already opened by some russians so this is not necessary at all. Then there is your excuse, who would in hell care about speed for this kind of appliation? And what's worse is that this can pretty much be done manually so this tool would be kind of totally useless... |
| 04-06-2007, 05:22 PM | #3 |
I'll tell you more about it. It's a tool that reads data from dota map and then display a list of all heroes and items in a cute looking UI :). You can then pick your hero, pick items that you want him to have and see how strong he gets. here is a screenshot of my program: ![]() I have alredy optimized map loading time to 2.5 seconds from 14 seconds and I do not want to waste a lot of time for jass-processing since string-functions are slow in .net (compared to same in c++). |
| 04-06-2007, 05:25 PM | #4 |
I have forgot to answer why I need jass :). It's because some items can only be combined by some heroes and that is triggered in jass code. some abilities are also appears due to triggers written in jass, so i need to process it in order to make my program simulate the in-game stuff |
| 04-06-2007, 05:30 PM | #5 |
I just don't see such a good Jass parsing taking less than 2 seconds anyways, even if you made it in assembler. And loading a C++ program from .net could pretty much screw speed as well. Considering maps don't change too often, you could just save the result data in a file to be open later (with zero map parsing) so next time you just open the data file instead of the map... Even without that feature anybody could stand waiting 1 minute for a map to be processed, loading time in game takes even more than that and everybody waits for it. |
| 04-06-2007, 05:36 PM | #6 |
Well, what I'm looking for is some .dll library for that. I'm already using dll for blp->bitmap conversion written in c++. And it's fast enough (2.5 sec load time as I said, while blp->bmp takes only ~0.5 seconds of that time) I just don't want to spent a lot of time writing it myself and then to find out that such library already exists :). If it does not exists then fine, I'll start gathering more info about jass and will implement some ugly looking functions :). |
| 04-06-2007, 05:39 PM | #7 |
Short story: Such library doesn't exist. Isn't this a little way too ambitious anyways? There are a tonload of stuff you can do with Jass, I doubt you'll ever get to deduce how item recipes and that stuff work even if you had this library. And if it could then it would be specific to DOTA's ways so it would fail on other maps, until you add support for those maps, but then it wouldn't have too much sense for a general use tool... |
| 04-06-2007, 05:51 PM | #8 |
Well I'll try to make it work :). I'm already doing some simple manual data extraction from jass, like: call F6('rots','rump','mcri',0,'bfhr') call F6('stwa','tbar','rsps',0,'tfar') ... means that 'bfhr' item,for example, will appear in your inventory when you have {'rots','rump','mcri'} items. Of course I have analysed that part of the code first, then implemented reading funcs. Anyway... I guess this topic can be closed now :). The library does not exists and thus I'll start doing it myself. |
| 04-08-2007, 06:59 PM | #9 |
Hey danat (remember me from wc3jass.com?) how did you make that interface? and is it overlayed onto an already running warcraft III game? and are you going to release your current version? |
