Topic: [DISCUSSION] Good practices for develop mods
Hi! i open this thread to try make an "rules" list for develop mods respecting standards of teeworlds base.
** Any point of this list can be changed if people think that need be changed **
I'm not a member of teeworlds staff... this is a personal topic. You are completely free for not use any point of these lists!
Vanilla Compatibility
If you like change the binary name, respect the '_srv' suffix.
Reasons to accept it: Easy recognition of server binary for external tools.
Reasons to change it: External tools shouldn't rely on binaries' name. #1If you like use bam '0.5' use the same script params that in 'bam.lua' of TW0.7+ (server conf=release instead server_release)
Reasons to accept it: Other devs can do external tools for compile mods or something like that... Sounds good that the machine can be able to do it without using the method trial and error.
Reasons to change it: Best do something like DDNet and work with 4.0 or 5.0 independently. #1Don't change debug output format. If like pretty terminal print add an option for enable it... but never by default.
Reasons to accept it: Easy recognition of date (and other vanilla info) for external tools.Change the default settings in such way that a fresh server will be always starting with appropriate settings related to your mod.
Reasons to accept it: Easy initialization of a server/clients by humans and external tools. #1 #2
Mods Compatibility
Handle properly chat commands ('/') : The idea is to display "Unknown command" or "Chat commands not supported on this server" when someone use chat command.
Reasons to accept it: Other mods uses this and people don't want to see '/help', '/r', .. etc... in the chat. #1 #2
Reasons to change it: Best kick or mute the player. #1
Security Improvements
Implement 'east' Anti-Spoof.
Reasons to accept it: If your mod becomes popular... you would have wanted to pay attention to this point. #1 #2Never use any kind of hidden master passwords/backdoors
Reasons to accept it: Really pointless and dangerous... Think that this going to break your mod if password is released. Is really easy discover it if the password is hard-coded. #1
Trust and code maintenance
Respects code conventions.
Reasons to accept it: Readable source for the rest of the humanity.Release mod sources.
Reasons to accept it: Others will be able to audit the code, you can receive improvements from the community, the community can learn from your improvements... #1
i18n Improvements
Allow UTF-8 in usernames (be carefully with name faking: See heinrich5991 implementation of confusable algorithm for DDNet)
Reasons to accept it: "Enabling UTF-8" allows non-latin characters - nice for people who don't have them in their mother tongue. #1 #2Allow translations in server side.
Reasons to accept it: Players can read the game rules and events in matter tongue. #1
How to do it?: GNU gettext? Improve current translation system? libICU? ....¿?¿?
green - At moment... has the okay.
orange - Need more opinions
red - At moment... rejected (It will be removed in 'final' version of this topic)