1

Topic: MOD Enhancement Proposal

Hello.

I want to create massive mods (like ddrace) not touching any teeworlds files. Right now afaics there is no way to do it. I actually did not go deep into the sources, but I have a proposal. `mod.py` in `gamemodes` directory is executed and let's is has this code:

register_mod("DDrace", 
CPlayer=("DDRacePlayer", "ddrace/player.h"),
CGameContext=("DDRaceContext", "ddrace/context.h"),
code=["ddrace/player.cpp", "ddrace/context.cpp"]
)

Then everywhere in the server sources CPlayer is replced by "DDRacePlayer" and so on (I mean #define CPlayerClass DDRacePlayer). I'm sure it will make mod development a lot easier, but I'm not sure if it is possible at all and if teeworlds developers care that much about mod developers.

Thank you.

2

Re: MOD Enhancement Proposal

Your idea is confuse, and there is no purpose to make any easy and noobfriendly way to write little modifications of Teeworlds. With such a limited tool, you could not draw any good modification. It's way better to split people that have coding knowledge and people who want to make their own mod 'because it's cool'.

Trying to make coding overeasy would only need to more little pointless modifications (not necessarily because of bad ideas, but because it would be way too much limited), and there is no reason for Teeworlds to become a one-mod-per-player game.

Not Luck, Just Magic.

3

Re: MOD Enhancement Proposal

I don't like the idea at the first topic but probably a little bit more virtual stuff would be nice (yes, yes it's easy to add yourself but you have to change the common vanilla-files for that... and if you are there already you maybe turn around other stuff as well big_smile. Currently if you start modding you would find a "mod.h" and "mod.cpp" and at first you might think you could put your stuff in there... (and you can put already a lot into that 2 files). But in my opinion it does not make sense to put everything there. For example init the tiles twice (collision.cpp: CCollision::Init) or if you would create some "/info" or "/help" it's way easier to hack the TW files (gamecontex.cpp: CGameContext::OnMessage).