Just to make sure it's clear -- when you open up a fan-made game in AGI Studio, you're not seeing what the author sees. You're seeing what AGI Studio has reconstructed from the compiled code. Unless the fan-made game comes with a bunch of files called things like logic0.txt, logic4.txt, etc., then you don't have the author's original source code so when you open the game you'll see a bunch of stuff without defines (because define names aren't actually saved into the compiled game). Although I use defines extensively in my code, if you were to open up Jen's Quest you'd see the same define-less mess.
It is possible to edit defines.txt for your own game in AGI Studio. You just have to use the text editor instead of the logic editor.
There is a purpose to putting messages at the bottom of the logic. It allows you to abbreviate print statements if you use the same message in several different situations. For example, you could say:
if (said("look", "door"))
{
print(m1);
}
if (said("eat", "apple"))
{
print(m1);
}
if (said("kill", "fish"))
{
print(m1);
}
// at the end of the file
#message 1 "You can't do that."
That would cause the message "You can't do that" to be displayed whenever the player typed "look at the door", "eat the apple", or "kill the fish", and you wouldn't have to retype the message. Also, as Nick said, you can include messages inside of other messages, which I think reduces the size of compiled logics. I use this technique in my game. For example:
if (said("talk", "kristen"))
{
print("%m1Hey, Kristen...\"");
print("%m2What?\"");
}
// at the end of the file
#message 1 "Jen: \""
#message 2 "Kristen: \""
If the player typed, "talk to kristen", then the game would print:
Jen: "Hey, Kristen..."
Kristen: "What?"
If I use the dialog prefixes a lot, then instead of having six extra bytes of data for each time Jen talks and 10 extra bytes of data for each time Kristen talks, I only have 3 extra bytes of data any time either of them talks plus a one-time cost of around 20 bytes of data for both dialog prefixes to be defined.