This game core is Tmw-Hercules. You should refer to the Docs repository for information about how to code and such.
As code grows it becomes harder to maintain, so we have decided a few conventions for this project.
- menu vs switch(select()): All switch(select) must take less than 60 lines. If your switch is bigger than that, then you must use menu, or rewrite code in a way it’s easy to maintain.
- Idents are four spaces. No tabulations except on item and mob databases, please.
- Inline conditional: Only when you have various conditionals to be togheter. Otherwise, break a line and give it some ident.
- Do not unnecessarily use braces where a single statement will do. This does not apply if at least one branch of a conditional statement is not a single statement;
- The opening brace should be in-line, and the closing brace should have a whole line only for itself.
- Do not try to explain HOW your code works in a comment. Use comments for WHAT the code does.
As a placeholder I will just link Linux Kernel Coding Conventions here, and when I find a link from TMW project I’ll have this link updated. If you find conventions at Docs repo, give us a shout to update this.