//z. wrote:Hey,
My name is //z. and i am a really big teeworlds fan, view weeks ago I had some awesome ideas about a new mod and so I started to learn c++. Now I know the basics from c++ but I don't know the Teeworlds-source.
My question now is if someone can show me how the tw-source is working, maybe he can create a simple tw-mod with me that i know how to do it .
And maybe someone else can show me how to programm with lua.
Pls help me
yours //z.
(sry for my bad english)
1. There's no LUA atm in the proper Teeworlds code, just for compiling.
2. I'm not sure if what you call "the basics of c++" will be enough, but I won't try to discourage you. Try modifying little stuff in the code in some files where the result can be immediatly seen - that's what I did to learn.
Try with these first two files:
variables.hpp
client/component/hud.cpp
The first file will allow you to easily create more variables in the client console (f1), you can use in nearly all the other files you'll be coding on (at the condition you included the proper header on top). To access the variable you'll have to use g_Config.m_NameOfTheVariable.
The second file is about the HUD on the client screen ingame, it's really easy to change one or two lines and to immediatly see the result :)
Hope this will help, I'm not giving any pre-made code, nothing like "change value at line 566 and that will change the grenade shots by seconds lolololol". It's important you get to know the code by yourself imo. Also, you'll very likely see you lack some programming knowledge, and that will motivate you to look for it to go further in programming.
Good luck!
Not Luck, Just Magic.