| 04-26-2006, 12:27 PM | #1 |
Hi, a substantial part of my work on my current map these days has gone into my personal mapscript Pre-processors. It's purpose is to make it easier to manage large projects and to automate some common tasks. It assembles several .j file into one file and inserts it into the war3map.j file, does some magic preprocessing, checks the syntax with pjass and warns you if something is wrong, then rebuilds the map archive with a custom datadir of include-files. It does all this in about 2 seconds, so it makes testing extremely easy. It currently works like this: You have a main.j with the following syntax: JASS://! include system_utility.j //! include bag_data.j //! include game_utility.j etc. Then the script parser will assemble the mentioned files into one script and finally insert this into war3map.j, right after the globals declaration. If any of the files has a globals section, they will be appended to war3map.j's globals section. This means you can declare globals in all the .j files (although it's no excuse for overusing globals). Then the Preprocessor runs, which modifies the scripts according to special commands that can be put in functions. Possible commands at this time are:
So this function will automaticall be run during the initialization of the map: JASS:function SomeInitFunc takes nothing returns nothing //! initfunc call Something() endfunction And this function will automatically be called when ability with rawcode '$203' begins it's effect: JASS:function Ability_SuperLaser takes nothing returns nothing //! BeginEffect '$203' //Do super laser stuff endfunction I personally find this very useful and comfortable to work with, but it is certainly a bit more advanced than most mappers need. I could release this tool (along with some other tools i.e that can automatically insert references to any data in the .slk files into scripts), but the question is: Does anyone at ALL have any use for it, beyond myself? Well, at least I have posted about it, if anyone needs this it's up to them to tell me. |
| 04-26-2006, 10:34 PM | #2 |
That sounds nice. Personally it's not enough power for me (yet) to lose out on windowwe, but I'm sure that could be integrated. However, I see no reason not to release it. |
| 04-27-2006, 03:26 AM | #3 |
I have my doubts about how practical it would be. It would be awesome if everything on the map depended on JASS, but it doesn't. There are a lot of things that you need the editor for. And having to leave the editor and use the prepropressor to compile the script before doing anything else would slow me down instead of making me more efficient which I think is the objective of the preprocessor. |
| 04-27-2006, 08:18 AM | #4 | ||
Quote:
This tool isn't meant to replace the world editor. I don't even know how anyone got that impression. Save map in WE, run tool (takes 2 seconds), test map. Methods for making WE refer "outside" functions (those that are only inserted after parsing) has been made. Quote:
As for "no reason not to release it": Making a release with installer and documentation and general usability takes time. I don't have plans of making a career as a tool-maker (this tool was made to deal with the complexity of VoD), but I felt it would be silly of me to not at least offer the thing in case someone *really* wants it. |
| 04-27-2006, 10:31 AM | #5 |
Well, if someone wants it, I'm sure they'll ask ![]() |
| 04-27-2006, 04:19 PM | #6 |
im still a little confused as to what exactly it does |
| 04-27-2006, 06:19 PM | #7 |
I assume it's 10-12 lines of python. Just paste it here, no need for an installer and your documentation already looks sufficient in first post. |
| 04-27-2006, 09:52 PM | #8 | |
Quote:
10-12 lines wouldn't even be enough to import the libraries I use ;) It totals about 375 lines, 300 or something if all comments are stripped. Add to that 200 lines to include the tool that inlines data directly from external .slk files into scripts. As Mezzer says, if someone wants it, they'll ask, and that's what this post is here for. (At least if that person is clever enough to search for Preprocessor.) |
| 04-27-2006, 10:05 PM | #9 | |
Quote:
|
| 04-27-2006, 10:21 PM | #10 |
My advice: post it and have Vex work on it, I'm sure he's got nothing better to do ![]() |
| 04-27-2006, 10:43 PM | #11 |
Are you on crack? I have thousands of better things to do |
| 04-27-2006, 10:45 PM | #12 |
Just messin with ya but still, someone might wanna make it a fully functioning tool |
| 04-28-2006, 09:35 AM | #13 | |
Quote:
I don't understand what on earth you mean by this. It IS a fully functional tool. And I have like 10 years of programming experience, I add features to the tool faster than you can write a forum post ;) This thread serves only one purpose; To make it known that such a tool exists, so that in the unlikely event that someone else really wants it, they can request it. |
| 04-28-2006, 10:09 AM | #14 |
Ok then, that's settled. ![]() |
| 05-03-2006, 11:06 PM | #15 |
Sounds useful. Would be great if it watched the file system in the background for a certain map being saved and would then automatically apply the changes. That would make the use of external JASS editors really efficient. Anyway I'd like to try the tool if you don't mind. (I don't need a fancy UI or documentation :) |
