Programming three team CTF


I highly recommend to start doing it!
You will run into problems you currently didn’t even think of. But don’t be afraid, the problems would be solvable.

Just some general thoughts about making mods:

  1. what do you want to have, how should the final result look/feel/play like.
  2. what changes have to be made to which module (game, cgame, ui).
  3. search the whole codebase (game, cgame, ui) for already existing code you can reuse.
  4. search the Internet for tutorials (I already pointed you to some awesome tutorials)*.
  5. bigger projects (like 3 team ctf) will profit from version control software (put your mod on github).
  6. start with the game logic, than do the cgame stuff (effects, HUD, ui, whatnot).
  7. don’t expect others to do the work for you,
  8. but always feel free to ask for help if you can’t fix a problem you tried to solve for hours by your self.
  9. always do testing your code with some friends, sometimes others don’t like the things you deem as good.
  10. release, advertise, praise your code, and have fun!

*If you don’t like E-tutorials, I highly recommend this one: Focus on mod programming for Quake 3 Arena
There is a chapter explaining how to reuse existing flags for other colors, iirc…

Of course, you can make white skins, you need a paint program to do this…, this isn’t really related to programming.


I could just use the neutral flag skin off Team Arena… But thank you @KuehnhammerTobias! I won’t disappoint with this mod! It’s also my very first mod as well, & most likely the very first mod ever made for Spearmint. As such, I could use your help. Anyways, I’ve got qagame & the ui coded up, next up is cgame, then I’ll update my fork of mint-arena (I have one from when zturtleman fixed up the grappling hook) to the latest version & include the changes at the same time. Then we’ll see if it compiles & works correctly. If I find bugs that I can’t solve, then I hope you guys will help with this, OK?


cgame’s now finished, textures for the new team are underway (one of them has a story to it as well). Man, this is gonna be awesome…


Textures are all finished, a bunch of them turned out to be like the one I talked about in the last post - some of them actually went the other way around for some reason… Shaders are finished too. Here’s what I got for resources at this point:
Green team textures/flag models (includes fully independent models/CTF skins for some of the players, even the green ones):!wslUFRyL!8e9X_B-uViiUtOl0wHAZfdAvpDg8plegnwWpNj7XEQ0
Green team skins for everybody else:
Enjoy looking at my progress so far! Resource wise, at least. Reaper21x made the CTF skins for most of the characters, I’m just finishing up his work now. (Cadavre, Harpy, Yuriko, Grrl, literally everybody will be available for play in the up-&-coming mod). It will also allow you to play on the original 2 teams with them as well.


I ran into a brick wall when I got the code together and I tried to compile it. What I got for a compilation result is attached in this post if you’re wondering.
Here’s what I get:

Mind figuring out what’s wrong here guys? If only I knew what was wrong, @KuehnhammerTobias


Same as last time. You didn’t declare TEAM_GREEN. You also didn’t declare PW_GREENFLAG, and posssibly a few other things aren’t declared. Additionally you missed a ‘(’ somewhere,…

Why are you so resistant against suggestions? Put your code on Github, start become more professional!
Most people aren’t willingly to help if you resist to do at least a few minimum steps. It was already told to you [somewhere here] (Next tier won’t unlock for me in Spearmint) that it is more convenient for myself and others to see the changes you have made to the code!
As far as I am concerned, I’ll loose patience at some point,…


TEAM_GREEN doesn’t automagically exist. It has to be declared so it exists and has a value. Look at code/game/bg_public.h.


That should be fixed now. I think I forgot cg_newdraw.c when I coded the functions originally… I’ll go ahead & do that.


I’m stumped on what to do to fix this, this involves ai_cmd.c. I’m adding functions to the bot AI so that way it knows what to do while on the new green team.
I get this in Cygwin because of it:

Here’s what Notepad++ gives me:

Mind helping me out here @KuehnhammerTobias/@zturtleman? I don’t mean to be driving your patience through the roof, @KuehnhammerTobias, but I really do need your help at this point as this is the only thing keeping the first beta of my new mod from compiling.


The output says you missed a } before the else if. at line 1744. This doesn’t mean you really missed the bracket at 1744! Could be somewhere above that line…
Nobody can say you, where you’ve missed the bracket, …
Well, this is why I said it 100 times, it st hard to help you this way, or by posting screenshots of your code. Sorry, I can’t help you with screenshots!
Good luck!


I figured out where it was, & fixed it. Thanks for the help however @KuehnhammerTobias!


How do you suppose you give a function a new member? In this case “cgMedia_t”. The compilation currently errors because it doesn’t have “greenQuadShader”. EDIT: I need to use grep -ri more often… found it.


This one’s a bit more puzzling… I have the } character in there already but it doesn’t wanna for some reason…
Here’s what Cygwin says:

Notepad++ gives me this however:

Any ideas? Could someone help please? Any ideas, @KuehnhammerTobias?


GitHub source for 3wctf is @: if you’re interested.


Line 1717: has an opening brace, but no closing brace. Hmm, I think this won’t work, though, didn’t test the rest of your code in detail yet.


You’re invited to help fix it for me. GitHub’s surely the way to go, isn’t it? Just needs remote tracking & that’s it. I had forgot to modify bg_misc.c to account for the new team (and to try to put back in the original CTF sounds from pak0.pk3). I’ll send it to the page shortly.


No Sir!, I have enough work (and problems) with my own mint-arena fork(s)! Anyways, I hope you’ll succeed!
Nice to see you finally started to work on your 3 Team CTF mod! :thumbsup:


I’ve been working on it for a while now… if any of you have some spare time, I’ll most likely see if I can get it working for all of you, & working good so that way I can help bugtest…


In my sparse sparetime I do some coding, or I play mint-arena. In my sparetime from ‘sparetime coding’, I go fishing or riding my bicyle…
It’s your work, we will see if we can help you. It doesn’t really make sense to bugtest your work for us!


We’ll see when that happens… Oh well, that means we could all bugtest together then.