From what I can gather from looking at stuff in zdoom.pk3 (let's use DECORATE as an example)...
Code: Select all
// A DECORATE actor.
ACTOR ActorName
{
PropertyName 123
Another.Property 456
StringProperty "A string."
+FLAGNAME
States
{
Spawn:
ROFL A 1
Loop
}
}
- Separate words in properties are always letter-cased.
If a property expects a string, it should be enclosed in quotation marks, eventhough the parser doesn't complain without them.
Flag names are always in uppercase.
Sprite names are always in uppercase.
Flow instructions are properly punctuated (GoTo instead of goto, Loop instead of loop, etc).
Use tab for identation, with a tab size of 4 characters.
Everytime a curly bracket is found, the next line is idented.
For DECORATE, properties on top; flags at the bottom.
I don't sort properties or flags by any rule... I used to want to sort them alphabetically, but I think that's just too much.
And I'm not talking about ZDoom's source, because that is a gargantuan mess and attempting to enforce programming style on that is just wasting time. :P
Any thoughts?