1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

How do I write a mod with 3 teams?

Discussion in 'Programming' started by Co11, Sep 18, 2004.

  1. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    I'm doing this mod, and I was wondering what's the best way to write 3 teams into the game...

    What files do I need to edit? What lines do I need to change?
     
  2. Geminosity

    Geminosity Mischief Maker

    Joined:
    Sep 10, 2004
    Messages:
    35
    Likes Received:
    0
    Just a quick question but what's your knowledge of unrealscripting like?
    It sounds like you might be in need of doing a few tuts but that's only just a guess off what little info you've given us (ie: you don't seem to have mentioned anything you've tried or looked at which sorta gives the impression you don't know what to look for or you just haven't) =/

    Should you know roughly what you're doing I suggest looking in the source for unrealgame.teamgame as it shows team creation rather nicely. It's not all that difficult to do barring extras like fiddling with making new scoreboards and stuff so that people can make sense of it all XD
     
    Last edited: Sep 18, 2004
  3. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    my knowledge of unrealscript is minimal when it comes to actually creating new content.. I can modify stuff and follow tutorials.. but I haven't seen anything close to what I need...
     
  4. Geminosity

    Geminosity Mischief Maker

    Joined:
    Sep 10, 2004
    Messages:
    35
    Likes Received:
    0
    heh, well I'm a bit busy on something else to hammer together a quick tut for you but you should definitely take a look at the TeamGame.uc file in the UnrealGame folder of the source.

    If you look at that you'll see where the teams get allocated bots, resources and where they get initialised. Essentially you can do the 3 team thing pretty well by just adding an extra team doing the same as what's already there.
    The only thing you'll really have to use your noggin for is parts where things are set to oppose like setting team enemies or checking team balance but I'm sure you can work it out; the more you learn from the code itself the less you'll need tuts =3
     
  5. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    excellent.... Is there a good tutorial for creating the screen to select the 3rd team? what type of topic is that even?
     
  6. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0

    When I change this file, do I create a whole new file copying it? or should I just do an extend?
     
  7. MrBond

    MrBond ZHP Founder

    Joined:
    Sep 23, 2003
    Messages:
    452
    Likes Received:
    0
    It would also help to say what game you're doing it for. There are differences between UT and 2k3/2k4 in terms of handling teams.

    And of course, what exactly are you trying to do? "3 teams into the game"? What are you making?
     
  8. 1338

    1338 Beyond 1337

    Joined:
    Oct 28, 2004
    Messages:
    128
    Likes Received:
    0
    It is apparent that your coding knowledge is indeed minimal as you said, so much so that I would recommend laying your project aside and spending some time learning the prerequisites. Basic Coding by Rachel is likely to be of use:

    http://angelmapper.com/tutorials/coding1.htm
     
  9. Grobut

    Grobut Комиссар Гробут

    Joined:
    Oct 27, 2004
    Messages:
    1,822
    Likes Received:
    0
    Aye, sounds like a big undertaking, im struggeling with my first UT2k4 mutie right now, and its much much simpler than what youre trying to do there.. and i'd guess our Uscript prowess is about similar (most of my coding was learned with the origional Unreal, and a very little bit for UT99, UT2k4 has prooven to be all new grounds for me, its handling things in a very different way! i cant find any of the stuff i used to know where i think it should be, gah!), i'd really suggest you start off simpler, to make a 3-team mod, you need a whole new gametype, new scoreing interface, the whole shebang! i wouldent dare think about it :eek:
     
  10. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    ok, basically I'm creating two teams... they are just like any other two teams except one team will protect a team of one and another team attack the team of one... this is for utk24 -
     
  11. Grobut

    Grobut Комиссар Гробут

    Joined:
    Oct 27, 2004
    Messages:
    1,822
    Likes Received:
    0
    Ahh.. the "Mutant" game-mode may actually have some code you could use for that, worth a look eh?
     
  12. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    How would the mutant code be better, i wonder?

    is there like a chain of events that I'm supposed to be worried about?

    I figure all I need to do is:

    Create a 3rd team
    get it to spawn
    ensure it can only hold one person
    get other teams to recognize it as Friend or Foe
    Create the gui to match...

    am I waaaaay off base?

    Oh yeah, this is completely an educational project. I wanted to do something advanced like this to learn UScript... So that means, some stuff will click and some won't...
     
    Last edited: Oct 28, 2004
  13. Grobut

    Grobut Комиссар Гробут

    Joined:
    Oct 27, 2004
    Messages:
    1,822
    Likes Received:
    0
    Mutant does have 3 teams basically, the Mutant, everyone else, and the bottomfeeder, you should be able to modify this gametype, or learn from it, to make what you need.

    You do need a new game-type to pull this off i'd say, so you might aswell go for it.
     
  14. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0

    ok, cool.. I'm starting to get this all.. I looked at the angel mapper tutorial on coding, and all that stuff is stuff I've learned.. expect that I'm up to where 3dbuzz's vtms left off......

    thanks guys for all the help coming along here...
     
  15. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    Ok, I'm still figuring this language out... so bear with me

    Code:
    class xMutantGame extends xDeathMatch;
    I know what this does - it takes all the features from xDeathMatch and includes them in this new class xMutantGame.

    Ok, Next Line

    Code:
    var()	Material				MutantMaterial;
    This is a bit more confusing to me, yes I know this is declaring a variable -- I'm guessing that Material is a type like a boolean or integer variable. and MutantMaterial is the name of this new Material... if that's true, then what type of variable is a Material?

    NEXT!

    there's a bunch more variable declarations... Some are int, some are config bool, Controller, and localized string -- what are all these doing?

    then they created a bunch of functions
    and then they do some event handling..
     
  16. Grobut

    Grobut Комиссар Гробут

    Joined:
    Oct 27, 2004
    Messages:
    1,822
    Likes Received:
    0
    Im pretty sure MutantMaterial; referrs to the reskin of the pawn currently beeing the Mutant, if you look in the defaultproperties it will no doubt be assigned to the shader used for the mutant.
     
  17. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    the reskin? so like when he get's spawned or what?

    event PostBeginPlay() -- this starts the actual level and stuff, right?
     
  18. Grobut

    Grobut Комиссар Гробут

    Joined:
    Oct 27, 2004
    Messages:
    1,822
    Likes Received:
    0
    No no, when a player becomes the Mutant, he's reskinned, you know that animated opague purple'ish effect that happens, thats most likely what the Material is about.
     
  19. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0

    oh sweet, I didn't even know about that... I'm having trouble finding the area that even referes to the team creation... it looks like it's just spawning a mutant on top of the regular teams... I don't see where the teams are created though, this extends xDeathmatch...
     
  20. porkmanii

    porkmanii New Member

    Joined:
    Sep 9, 2004
    Messages:
    129
    Likes Received:
    0
    The Mutant game type doesn't use teams, but it does have extra code to tell the AI when to attack and when not to attack a specific player (ie. everyone is a valid enemy for the mutant, the mutant is a valid enemy for everyone, etc.). Your "third team" only has one player on it, right? If so, why bother with a third team? Why not just have the player who is to be protected on the team that is to protect them? Then you'd have extra code to ignore the protected player when balancing teams, code to seperate the protected player from the others on the scoreboard, code to tell the defending team members (with the exception of the protected player) to protect him, and code to tell the other team to seek the "protected player" (they'd already attack him, but wouldn't look for him in particular).

    It's quite possible that you need to do it with three teams, but I think it would be easier to just "simulate" the "third team".
     

Share This Page