AGI Reusable Variable Organiser

Mokalus_of_Borg Since I stopped work on the slighly-anticipated new compiler, I hacked together a quick-and-dirty variable and flag number assigner. Basically, this tool generates "defines.txt" (in a rather raw and unreadable format, though) from a script file. It allows you to declare a scopes for variables to arbitrary depth, much like the global/chapter/room structure I had planned for the compiler. It also allows you to define any sections of the file as "copy only", in which case that section will just be copied verbatim. It's not quite ready for release yet, but it handles 80% of the work that I would have had the compiler do, and it's compatible with any current game. I still need to include some functions, but it should be ready pretty soon. Mokalus of Borg PS - I renamed it from "HAL" to "ARVO". PPS - That's basically because it took about one afternoon to hack together.
Mokalus_of_Borg The first public beta of ARVO has just been uploaded to my website. Version 0.9.0b is a bit of a hack, and so far it's essentially undocumented, but it's functional and includes an example. Feature list: - Automatically assigns machine-level variables and flags to user-defined names. - Arbitrary scope depth - Can define numerical constants - Can mark sections to copy directly to output file Get it here. Mokalus of Borg PS - Hopefully, this is useful to someone. PPS - I'll work on docs, an upgrade and any bugs in the meantime.
Rich How about for flags too? It sure is a pain in the ass to keep track of variables and flags can be re-used in any scene and which are global. I have to keep a piece of paper next to my desk to write them all down! Man, it's rough!
Mokalus_of_Borg Yes, ARVO can automatically assign flags, too. The sample file should show how.

Mokalus of Borg

PS - Documentation is coming along nicely.
PPS - Expect a fully documented version in about a week.
sonneveld This link worked better for me:

btw Mokalus, did you consider changing your agi studio link to nailhead's site?

too many things to try.. I'll fiddle with it tomorrow hopefully.

- Nick
Mokalus_of_Borg Ah, yes, I recently renamed a directory on my site, so my original link would now be broken. I'll fix the messages above.
And, yes, I keep meaning to change my AGI Studio links to nailhead's site, but I keep forgetting. I'll take care of that, too.

Mokalus of Borg

PS - I've also released a version of ARVO that works on XML source.
PPS - It's more fully-featured, but it's incompatible with regular ARVO source.
AGI1122 I tried out your xml version and spotted a bug:

#define current_chapter v0
#define night_time f0
#define seen_owl f1
#define tripped f1
#define mushrooms_found v1
#define caught_moth f0
#define glow_worms v2

As you can see there is 2 flags set to f0 and 2 flags set to f1.

I am not sure if the bug is in the sample.xml file or in the actual arvo xml program though.
Mokalus_of_Borg "That's not a bug, it's a feature." The output you've got there is 100% correct and according to specifications.
I'll explain the purpose of ARVO a bit more thoroughly here. ARVO is intended to relieve you of the burden of assigning machine-level variables and flags to your LOGIC-level variables and flags. As a feature, I added the ability to declare different scopes, to represent how the variables will be used in the game. This just means that, if you have some variables that will never be used at the same time, you can declare them in separate scopes, and ARVO, to save space, will name them as the same variable or flag. If you wanted the sample.xml file to produce no overlapping declarations, just edit out all of the <scope> and </scope> tags.

Mokalus of Borg

PS - It'll probably be easiest and most intuitive to use ARVO without scopes.
PPS - It usually won't be necessary, anyway.
AGI1122 Oh ok I understand that.
Andrew_Baker As usual, I am so incredibly happy that people out there are really working on new utilities for AGI. Seriously, Mokalus, you and others like you are the true backbones of the home brew app dev scene.

But Rich, why don't you just open defines.txt in a different window. This'll work on Linux and Window$. I'm constantly having to update my defines.txt (especially during the early portion of working on a game). So, I just always leave that file open, even leaving a shortcut to my current project's defines.txt on my desktop. Are you working in DOS or something (more power to you if you are, but I somehow doubt that you are.).

P.S. You rock, Mokalus.
P.P.S. I'm really, really drunk right now.
Mokalus_of_Borg It's been a while since I released any updates to ARVO, but here's a new one:
ARVO-XML version 1.0.1b
The only things added to this release are a Document Type Definition and an XSLT stylesheet, which allows previewing of the generated defines.txt file before running ARVOXML.

Future plans:
I will probably be able to make the preview a bit more sophisticated in a future release, and I might even be able to get all the ARVO functionality into the stylesheet. So you could use any XSLT-enabled XML processor you want, instead of being forced to use Python.

Mokalus of Borg

PS - But don't hold your breath about that one.
PPS - The new version is available at
Mokalus_of_Borg I've just updated ARVO-XML at the prompting of Mr Sonneveld. Version 1.1.0b now includes support for both Windows newlines (CR/LF) and Unix newlines (LF).

Mokalus of Borg

PS - The interface has also been updated to suit my current whims and tastes. ;)
PPS - Get it here.