reasonable. I had no idea struct references and function references were even possible. I use the GUI only because I have a LOT of trouble learning new languages and the GUI just makes it so much easier. I know the purists will hate it but with shortcut keys I think I can program even quicker with the GUI than writing it out.
Writing pure Galaxy is not about productivity, it is about performance and functionality. For example my Imperial Bank system used in the new versions of Undead Assault 3 was written with probably a thousand or so lines of pure Galaxy script because it involved implementing both an AES style encryption and SHA-1 hashes which require a lot of bitwise operations.
It really sucks that NONE of this kind of stuff is documented or made easy. Without hearing other people talk about it I would probably have no idea that half the things in the editor even existed or were possible. For example is there somewhere I can learn about the syntax of function references?
Well I was planning on slowly updating the Wiki about it. However I was told that they were in the process of migrating so doing so might result in changes being lost.
Galaxy seems to have use Java style meanings regarding "char" and "byte".
The "char" type represents a single character of a string. It does not evaluate numerically and appears to be a type that was intended for string manipulation purposes but never fully implemented (it appears to have no purpose). It might be used internally by various string natives.
The "byte" type is a non standard C/C++ type representing a 8 bit signed numeric value. It appears to operate similar to the byte type from Java except slightly more restrictive.
There appears to be no 16bit signed type unfortunately meaning you need to waste 2 bytes using an "int". If space is a concern for 16bit types you could always use bit operators to pack 2 different 16bit values into a single int in bitfield style.
Galaxy has very poor implicit type casting. Mixing byte and int with an operator results in a syntax error as only int on int or byte on byte operators are defined. There is also no explicit type casting to get around this. The only way to typecast mid-function appears to be an implicit typecast as a result of variable assignment (int a; a = byte;, byte b; b = int;). This is crucial for array indices as they are only defined for "int" so raise a syntax error when supplied with a byte. Next to these type casting annoyances bytes both function and are packed in memory as expected.
Unless you plan to store a lot of player values so space is an issue, you really should not concern yourself about packing them in a byte rather than an int. SC2 capable systems have so much memory that the maximum heap size of the Galaxy virtual machine is insignificant so memory optimizations are only a concern if the heap limit is a concern.
You can use the native list (extract from the MPQs (CASC in version 3.0 onwards)) for all the native functions to call. Do note that AI natives are declared in separate files from the general trigger natives although they exist in the same pool of available functions for you to call.
I meant that the reason they are filled with junk is because it was the wrong patch file. Somewhere should be ones which allow you to extract a non-garbage native list. I think I told you the wrong path to look but I am sure you tried looking for other patch files in other paths right?