View Full Version : Adding 4-team support
legacy-Uncommon
06-19-2003, 11:48 AM
For those who don't know, I wrote CTF4 (4-team capture the flag) for the original UT. I've been looking into bringing that to UT2003, but the loss of support for 4 teams is a huge pain because there are so many places in so many classes that assume 2 teams: the "if not blue then red" kind of logic. I've found instances in xPawn, SayMessagePlus, and GUI classes like Tab_PlayerSettings, in addition to the expected CTF, DD and BR classes.
My plan was to make a TeamGame4 class, and then build CTF4 on top of it (followed by BR4, etc), but it really bugs me not to be able to inherit my CTF4Game class from CTFGame, especially if the base class is going to change in some future patch. UT was so much easier, what with CTFGame having an array of 4 flags and all that.
Has anyone else tackled this? Have you had any success or found a good strategy?
What I think really needs to happen is 4-team support should be restored in a future official patch. Perhaps we could get a petition going; I think the original CTF4 had enough of a following to at least get Epic's attention. Anyone with me?
legacy-Raniz
06-19-2003, 01:05 PM
I don't know how to tackle your problem.
But I'm totally in for the 4-team support!
Needless to say is that the CTF4 was one hell of a great mod, and one I'd love to se for UT2003!
Keep up the good work!
legacy-shurcool
06-19-2003, 01:56 PM
yeah...
they should also re-add support for transparent static mesh rendering (ie. get STY_Alpha to work)... i'm so sick and tired of seing bullet casing just fall through ground or disappear, same goes for all player remains (say if one was blased by a Redeemer, body parts are jumping around and then BAM, just like that, they disappear) and flak chunks.
seriously, what's with all the down-grading?
legacy-Dark Pulse
06-20-2003, 01:00 AM
I really don't know about the downsizing. I DO know that CTF4 gave me some of the best games I ever played with some of my buds online.
It's especially a blast for a LAN party. Make a map capable of 16 players and a High Cap limit, you'll be fragging WELL into the night.
Plus it's a challenge for even the best players. You don't know who's going to take your flag next. For example, I was playing a game in CTF4 - Face (A Mod of the Original CTF - Face) against someone I usually play, BASTARD. and more often then not, Because He had more places to hide, plus could get MORE flags besides mine, I found myself pulling out the redeemer and blowing myself to kingdom come to stop him from getting too far with my flag.
Extremely, extremely, EXTREMELY challenging.
And a blast to play.
So I vote Yes to CTF4 for 2003! ^_^ :up:
legacy-|VS|Brad
06-20-2003, 01:40 AM
last year a group I worked with contacted epic about multi team support. the answer was good luck rewriting everything(it was considerably nicer than that and included lots of help and ideas on how to go about it) so we never really did it. I would like to see it, but its a lot of code that I dont think epic has time to do.
legacy-Grimfort
06-20-2003, 08:22 AM
Well, tbh, its not too difficult to do (I cant say more then that atm). You just have to extend a bit, and retact a bit, and theres only about 10 classes, (+bot AI) that needs changing.
legacy-Uncommon
06-20-2003, 02:30 PM
last year a group I worked with contacted epic about multi team support. the answer was good luck rewriting everything
To be honest (and having looked at the code) I have a hard time believing that it would be that hard for them. The other day I did a search through all the standard .uc files for "team" looking for cases of if-not-blue-then-red logic. I found some in places I didn't expect (like xPawn); they wouldn't be that hard to fix, but they do look like a big pain to patch, which is why I think they should do it and not me. It's good to know others have tried this before. Hopefully if we keep yelling they'll eventually do something about it.
Would you mind forwarding to me their suggestions?
legacy-JamesWalkoski
06-20-2003, 09:27 PM
Dark Pulse, that sig is horrendous. Please trim it to several lines instead of half a page.
legacy-JamesWalkoski
06-22-2003, 02:38 AM
Btw, the best chance you have of getting this is probably in UT2004. You can suggest it to Cliffy B through his website. They are looking for these sorts of ideas now.
legacy-JaFO(JBE)
06-22-2003, 09:44 PM
Originally posted by Grimfort
Well, tbh, its not too difficult to do (I cant say more then that atm). You just have to extend a bit, and retact a bit, and theres only about 10 classes, (+bot AI) that needs changing.
sure ... only 10 classes, but with that tiny bit of problem trying to find those few lines you might have missed.
You'd essentially have to start at teamdeathmatch-class and 'upgrade' all the gameclasses & AI-logic that's based on that.
Then you'd have to fix the items & triggers as well. Who wouldn't want to restrict items to only a few teams instead of just one ? What about a door that's open to the red & blue teams, but not the yellow & green ? Triggers that set of different events depending on the team the player triggering is on ? Are spectators tied to a specific team or is a generic 'spectator-team' good enough ?
And then there's the multi-team specific AI-tricks & tactics (like forming a temporary 'alliance' with an enemy team so you can pick on another).
legacy-Vir@s
06-23-2003, 08:05 AM
You might want to talk to a guy over at globalwarzone, they've support for 3 teams, so I guess 4 teams are not much more work ;)
http://www.globalwarzone.net
Mfg, Vir@s
legacy-Grimfort
06-23-2003, 08:07 AM
Yes, you can take the 4 player team thing further, but at its core, the code is already there.
Most functions already have a for statment to loop through number of teams (set at 2), you just have to increase it, honestly, its not massivly difficult, and I know this, as I have done it.
legacy-JaFO(JBE)
06-23-2003, 08:20 AM
If it's so easy and you've already done it ... why not share the code ?
You won't be able to keep it a secret once you release anyway ...
legacy-Grimfort
06-23-2003, 08:36 AM
Ill give you basic help if you want, but me releasing the code will give you half of the mod that im working on. Also, every other mod would grab it and then it wouldn't really be an advantage for us now would it. Also, it doesnt fit into UT at all anyway, and im not dragging it out.
I didnt say it was easy, just that it could be done without rewriting the whole of UT.
legacy-JaFO(JBE)
06-23-2003, 09:10 AM
I'd consider a good multi-team gametype that can be extended by someone else something that's so basic it shouldn't be held back because of some kind of imagined advantage your mod might have.
Mod-teams should not have to re-invent the wheel if they can avoid it.(period)
That just wastes time & talent which would have been of more use by writing new / original mods/gametypes/mutators/whatever.
It's bad enough that most mods rarely seem to be anything more then UT'03 with different set of weapons & skins.
If a mod-team that would just 'grab' your code and pretend it was its own would have a life-expectancy of zero (and it definitely wouldn't win a prize if you could prove it was your code and you hadn't allowed them its use ...).
btw :
The Riftwar-mod (made by RegularX) has a 3-team deathmatch at its core.
legacy-Grimfort
06-23-2003, 09:24 AM
Sometimes you have to *re-invent* the wheel. With our mod, we can't just base it all on UT code, as then it would be just that, UT with new guns :). The teamgame type based on deathmatch, just allows 2 teams, there is no way around replacing this (unless you want to increase it by creating 2 structures), so you dont really have a huge choice. Many mutators are based on new game rules, so should work with mods that use the base UT stuff (deathmatch +->). Some addons cannot do this, as they are based on UT content, like giving the user 4 boost jumps or a jet pack etc... would so not fit in with mods that dont use this
Obviously rift-team has based from Deathmatch, and done the same thing that I have done.
legacy-JaFO(JBE)
06-24-2003, 02:19 PM
Re-inventing the wheel is only needed when you're trying to fix bad/weak design decisions at the base-level (such as the 2-team limit).
Anything else is just an 'ego-trip' by the designers as basically every gametype can be reduced to a single thing : objectives / victory-conditions. And that's exactly what the code already allows.
The rest of the ingredients are already there, they just need a little tweaking & a bit of eye-candy.
*eh* I don't get what you're saying after "sometimes you have to re-invent the wheel ..."
legacy-Uncommon
06-24-2003, 05:30 PM
Originally posted by Grimfort
Most functions already have a for statment to loop through number of teams (set at 2), you just have to increase it, honestly, its not massivly difficult, and I know this, as I have done it.
Actually, from what I've seen (and I'm pretty sure I've looked everywhere), all the functions in UT2003 use if-then-else, not for loops. Still, that in itself isn't hard to correct; the problem is having to replace functions in classes like xPawn from within a mod. There's also the problem of certain classes having arrays of only two items. That's more difficult, and even more messy, to work around. All that stuff is exactily why I'm saying the correct solution is for Epic to fix it so our mods don't all have to be a mess.
If they don't then, like I said, my plan is to make a TeamGame4 class which anyone else could use to base a 4-team mod on.
legacy-Grimfort
06-25-2003, 04:43 AM
Originally posted by JaFO(JBE)
*eh* I don't get what you're saying after "sometimes you have to re-invent the wheel ..."
Exactly what you said, the limit of 2 teams.
@Uncommon, your completly correct, you have to take off the top layer above deathmatch, and rewrite from there, X* has to go. Or make a hash by creating a second strucutre set (not nice).
legacy-NickR
06-26-2003, 05:06 PM
After I read this thread last night I thought it might be interesting if I tried to program a 4 Team DeathMatch gamemode since you guys seemed to really want it. Well I have and it works you'll be pleased to know.
I have some small things like TeamSymbols and bot support to finish but the base code does work. After that I will release a build for you. :)
I would like to continue what I started and do a 4 Team CTF mode aswell with all the little options uncommon implemented in his UT version. If that's alright with him?
legacy-Uncommon
06-26-2003, 06:17 PM
Well I was planning on doing CTF4 2003 (or whatever I end up calling it) myself... soon as I spend my tax refund on a new PC, since it seems there's still no UScript compiler for the Mac :sour:
legacy-JaFO(JBE)
06-27-2003, 09:23 AM
What would be really cool (from a technical point of view) is if you could make it an 'unlimited' set of teams. With the 'open array' & list-type structures in Uscript that shouldn't be impossible ...
That way you could allow mappers or any subclassed gametype to set how many teams they really want to use in their map/gametype ...
legacy-NickR
06-27-2003, 04:47 PM
I had thought about giving the Admin the choice of number of teams to have in the game maybe between 2 and 8, but too successfully created such an idea I would need to implement code to create new colours and have skins for every mesh in multiple colors not just red, blue, green and yellow.
Update: I just have to do a 4 team Scoreboard implemented and I'm done.
legacy-Mr Evil
06-28-2003, 05:13 PM
Originally posted by NickR
...I would need to implement code to create new colours and have skins for every mesh in multiple colors not just red, blue, green and yellow...
What might be niceis to store a colour variable alongside the team index so that you can apply a ColorModifier to any team-coloured textures, rather than simple conditional statements with a number of pre-existing coloured textures. That way you could have any number of teams with any colour, and even be able to configure the colours.
legacy-NickR
06-28-2003, 05:58 PM
Can that be done?
Can we make a skin that has a particular colour on it that can be modified with code?
How did they do it for UT?
legacy-Mr Evil
06-28-2003, 06:10 PM
Originally posted by NickR
Can that be done?
Can we make a skin that has a particular colour on it that can be modified with code?
How did they do it for UT?
I am fairly confident that it is both possible and practical, but we won't know for sure until someone does it :)
Either split of team-coloured parts of a skin to a separate skin so it can be modified independantly (you would have to modify all the player models then, so probably only a good idea for a TC), or perhaps use a mask with a shader or combiner or something. There are probably other possible ways of doing it too. It should then be possible to apply a ColorModifier through code and set its colour, or have the modifier already part of the texture and just set its colour in code.
I think UT had four versions of each skin (not including non-team version), which of course takes four times as long to make and uses four times as much texture memory.
legacy-NickR
06-28-2003, 06:32 PM
I've gone through the latest source and there isn't any class that use the ColorModifier, however there is a FinalBlend class that is a subclass of Modifier just like ColorModifier. Could we use ColorModifier the same way?
E.G. Skins(0)=ColorModifier'<Package>.<ColorModifier>'
legacy-NickR
06-28-2003, 06:37 PM
Looking more at the FinalBlend class and the Shark class you can see how you can modifier a texture with code:
Begin Object Class=FinalBlend Name=SharkFB
FrameBufferBlending=FB_AlphaBlend
AlphaRef=80
End Object
Skins(0)=FinalBlend'SharkFB'
legacy-NickR
06-28-2003, 06:53 PM
I tested the ColorModifier in UED and you can use it to alter a textures color, but only the whole thing. I'm guessing that maybe with some sort of mask and a combiner we might be able to do it so that only parts a skin can be changed color. However, I'm not well experienced with the types of materials that can be used.
If anyone as any ideas how to do this it would be very welcome. :)
legacy-Grimfort
06-28-2003, 07:52 PM
Originally posted by JaFO(JBE)
What would be really cool (from a technical point of view) is if you could make it an 'unlimited' set of teams. With the 'open array' & list-type structures in Uscript that shouldn't be impossible ...
Unfortunaly, you cannot replicate 'open array' data across the network, you have to have a boundary.
legacy-JaFO(JBE)
07-02-2003, 06:47 AM
If a real 'unlimited' array isn't an option then you can set it to whatever the maximum amount of players per game is, because a team will have at least 1 member ...
So if the playerlimit in UT'03 is 32 then all that's needed is support for 32 teams.
Just make sure you use constants instead of magic numbers like this though ...
legacy-Grimfort
07-02-2003, 07:41 AM
Yup, you can do that. But watch out for the overhead of replicating 28 teams of Nones :)
legacy-Mr Evil
07-02-2003, 07:49 AM
Perhaps a linked list would be more efficient.
legacy-Angelus
07-02-2003, 10:33 AM
A linked list that would grow each time you need a new team, that sounds like a good idea.
legacy-NickR
07-02-2003, 01:12 PM
We don't have the ability to have 32 different coloured skins yet, so I'll be sticking to the 4 Team format.
4 Team DeathMatch Update:
Apart from the Green and Yellow player skins I just have to finish the Scoreboard and fix bot support and I'm done.
Here's a list of current features:
> GAME: 4 Teams - Red, Blue, Green, Yellow
> GAME: G and Y Team Shoulder Lights
> GAME: G and Y Team Teleport Effects
> GAME: G and Y Team TransLauncher Beacons
> GAME: G and Y Team (Zoom)Super ShockRifle Beams
> GAME: G and Y Team LinkGun LinkUp Beams
> HUD: G and Y Team Colour
> HUD: 4 Team Score Display
> HUD: 4 Team Symbols
> GUI: Player Settings 4 Team Select
> GUI: Instant Action Custom Bot 4 Team Select
> GUI: Multiplayer Host Custom Bot 4 Team Select
I've also created a custom executable to launch the game.
legacy-Uncommon
07-02-2003, 01:16 PM
Why do you need to make a custom executable?
legacy-NickR
07-02-2003, 05:38 PM
A shortcut would be just as good, but an executable is more user friendly.
legacy-Uncommon
07-02-2003, 05:56 PM
More user friendly than what? Maybe it's because I'm not a PC guy, but I'm definitely missing something.
legacy-JaFO(JBE)
07-02-2003, 06:17 PM
// Uncommon
It does make sense as a shortcut with parameters that's deleted makes it impossible to start the game *unless* you know what those commands are.
As a result you'd see a lot of needless questions about how to get the game working and/or how it crashes ... just because they start the game with the 'regular' options.
IMHO a batch-file is good enough in that situation ... no need for a separate executable.
Besides I'd say that the average technical skills of a pc-gamer ought to be high enough to understand how to create a shortcut with a few parameters ?
It's not like we're dealing with office-clerks and similar *beeps* that wouldn't know what a shortcut is, is it ?
Then again ... there's the fact that most people won't read the manual.
I still think that it's overkill for a mere 4-team DM gametype.
For a total conversion it might make sense to do this stuff, but a 4-team DM variant should work just like the regular gametypes from the users' point of view.
legacy-Grimfort
07-03-2003, 08:35 AM
Y not just load it the normal way ? Its not a TC mod, so runs with the same theme. Controls are the same, so no need for diff ini files.
legacy-NickR
07-03-2003, 10:40 AM
The 4 team game mode will still work without having the new GUIs. But I have added a 4 team custom bot config tab which gives admins the option to add bots to all 4 teams and not just the red and blue team. I've also given players the ability to set they preferred team in the player setting tab.
Unless someone know of way to replace exisiting gui tabs without having to create a main menu and a shortcut then I'm all ears.
And don't worry I'm not using any new ini files.
legacy-Grimfort
07-03-2003, 11:43 AM
I believe you can change the tab through the int file, as one of the paramaters. At work atm, so cant remember exactly what.
legacy-NickR
07-03-2003, 05:39 PM
Only the gamerules tab not any of the others I'm afraid. :(
legacy-JaFO(JBE)
07-04-2003, 03:12 PM
I found something interesting :
There are 'teamleader' commands and whenever a bot says 'red leader' they use the sound that's assigned to the 'LeaderSign'-property of the class.
I noticed that the baseclass has entries for 'Green leader' and 'Gold leader'.
It does require that those are filled by the appropiate sounds, but at least it doesn't seem to require a new voicepack-class just for enough sounds for 4 teams ...
legacy-NickR
07-04-2003, 03:50 PM
I'm having problems locating the team and link beacons in the source code. I need to add 4 team support because atm they only appear for the red and blue team.
I have to fix and bug thats causing problems with the Arena mutator and tweak the new scoreboard. I'm also getting ClearControls Accessed None errors.
legacy-Mr Evil
07-04-2003, 04:02 PM
Originally posted by NickR
I'm having problems locating the team and link beacons in the source code...
Oh dear, I think that may prove very difficult because as far as I can tell they are done natively.
legacy-NickR
07-06-2003, 07:10 PM
Well I found a way around both the beacon and skin problems.
The Skin problem has been fixed and it has taken me a fair few hours to produce green and yellow versions of all the official skins.
I'm about to test the beacon fix using an Interation.
legacy-NickR
07-07-2003, 05:48 PM
I'm 90% done now.
The scoreboard still needs to be tweaked. The Arena and Instagib mutators also need to work with the new translauncher and LinkGun I've had to create. There's a few errors to fix aswell.
I've also found out that the ClearControls Accessed None errors are not a result of my code but an code problem not fixed yet by EPIC.
legacy-NickR
07-14-2003, 02:54 PM
Version 1.0.0.0 of my 4tdm gametype "Quad Team DeathMatch" is finished. The ut2mod is about 30 megs and I'm on a 56k modem so it'll take a while before I can post a link to it.
WATCH THIS SPACE...
legacy-Grimfort
07-14-2003, 03:44 PM
*cough* www.planetunreal.com/domain
legacy-Uncommon
07-14-2003, 04:00 PM
What does "Domain" have to do with anything? I can't even tell what it is; the about pages are all blank.
30MB, huh? Must be a lot of green and gold skins. Anyway, thanks for doing that work, you saved me a lot of trouble :)
legacy-Grimfort
07-14-2003, 04:19 PM
I do apoligise, its the 4 team mod that Im working on, we have just released our alpha version.
legacy-NickR
07-15-2003, 08:26 AM
Uncommon: No problem. Give me some time to work on the ctf version and then once that's done I'll release the source code.
legacy-Ulysse31
09-09-2003, 10:18 AM
Sure, I think that CTF-4 is a huge improvement over the traditional "both side" capture the flag. With UT, these are the bests moments I've expérience, playing game with my team against the 3 others teams ( 32 players in the same time "Nvidia TI 4200 make it possible" ) wow..... That mod must be intégrated by UT2k3, it's a must!!!
Regards folks
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.