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. porkmanii

    porkmanii New Member

    Joined:
    Sep 9, 2004
    Messages:
    129
    Likes Received:
    0
    Are you sure MutantCRI exists? Where is it? I could not find any reference to it (or MutantClientReplicationInfo) in the BonusPack package, which is the package containing xMutantGame and related classes.

    The best way to find the difference between two classes is to open and compare them yourself, as well as find all references to them in other classes to compare their usage.
     
  2. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    ahh, it's mutantPRI... where are you finding the reference to MutantGRI?

    the package being the bonuspack.u file?
     
    Last edited: Nov 20, 2004
  3. porkmanii

    porkmanii New Member

    Joined:
    Sep 9, 2004
    Messages:
    129
    Likes Received:
    0
    MutantGRI and MutantPRI are not types (ie. structs, enums or classes), they are variables.

    MutantGRI is a property of xMutantPawn, and refers to Level.Game.GameReplicationInfo (type-casted to MutantGameReplicationInfo), whereas MutantPRI is a property of MutantGameReplicationInfo, referring to the PlayerReplicationInfo of the player who is the mutant. MutantGRI is a MutantGameReplicationInfo (which extends GameReplicationInfo), while MutantPRI is a PlayerReplicationInfo.

    Yes.

    Are you using UnrealEd to do your UnrealScripting? If you are, I'd recommend getting an IDE such as WOTgreal, which is very feature-rich, and is much better (or at least much more suitable for UnrealScripting) than UnrealEd. I used one of WOTgreal's features to search through all BonusPack classes (after exporting them) for "MutantGRI".
     
  4. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    I have WOTgreal as well, and I have context too... I'm liking WOTgreal

    Ok, I'm getting through all this...

    for me to spawn this one guy(the unarmed one, who the red team has to protect), should I be worrying about GRI and PRI type stuff right now?

    What should I be worrying about?
     
  5. porkmanii

    porkmanii New Member

    Joined:
    Sep 9, 2004
    Messages:
    129
    Likes Received:
    0
    If in doubt, you can try and copy the way the Mutant game-type does it (but don't copy the class exactly). xMutantGame sets the GRI's MutantPRI variable every time the Mutant changes. The HUD uses this variable to tell if a player is the Mutant, and the scoreboard uses it to tell whose name to draw the Mutant icon next to. xMutantPawn uses the MutantPRI variable to determine whether or not to use the Mutant effect (ie. if xMutantPawn belongs to the Mutant, the Mutant effect will be used).

    If you have some other way of telling who the "one guy" is, then you don't need to use a custom GRI.
     
  6. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    how do I open this package within wotgreal?

    the package being bonuspack --
     
  7. porkmanii

    porkmanii New Member

    Joined:
    Sep 9, 2004
    Messages:
    129
    Likes Received:
    0
    Have you exported it? If so, skip this part. If not, here's how:
    1. Go to Tools -> Advanced Exporter. You can use the UCC Package Exporter, but that's generally less reliable.
    2. If it isn't already in the system folder, click the little folder icon (or File -> Browse for Folder) and find your UT2004 System directory. The list on the left should have a whole lot of .u files (it shows all files with a .u* extension).
    3. Select "Bonuspack.u". If the exporter isn't already viewing classes, click the "Class" icon on toolbar (or View -> Classes).
    4. Click the Box with the "x" in it on the toolbar (or File -> Select All) to Select All classes.
    5. Click the ".uc" export button (or Export -> Export to .uc).
    6. Close the Advanced Exporter.

    The classes may or may not show up in the class tree automatically. If they don't, right click on the class tree, and click "Refresh Class/Package Tree".

    If you've already exported it, (which you may have done if you exported all via UnrealEd), the Package Tree should have an item named "BonusPack". There should also be a "BonusPack" folder in your UT2004 directory.
     
  8. Co11

    Co11 New Member

    Joined:
    Feb 5, 2004
    Messages:
    49
    Likes Received:
    0
    ok, so what file is telling me what GRI does?
     
  9. porkmanii

    porkmanii New Member

    Joined:
    Sep 9, 2004
    Messages:
    129
    Likes Received:
    0
    Which GRI? If you want to know what the MutantGameReplicationInfo class does, I suggest looking in xMutantGame and MutantGameReplicationInfo.uc.
     
  10. RegularX

    RegularX Master of Dagoth Lies

    Joined:
    Feb 2, 2000
    Messages:
    1,215
    Likes Received:
    0
    It might be helpful to take a step back and try to really examine how Mutant is doing this trick, and then see how it equates to a two team approach. This suggestion on using similar logic and not three teams is definately the way to go, so don't think in terms of three teams, but just two teams with one special person on the team (and btw, excellent catch).

    In a normal deathmatch, the Gametype tracks PRI's to replicate vital information about players and the GRI to replicate vital information about the game. In DM, this is basically stuff like score, spread, etc. Mutant is simply DM but adds in some information about two specific Controllers (players) - the mutant and the bottom feeder. So it adds those to the normal GRI so that other players can "view" it online. This is mostly so that the DMSquadAI can be updated to know who it should be worrying about. Then the gametype handles the scoring, the swapping of who is Mutant and who isn't etc.

    So your game would work like this, but in more or less a TDM or possibly CTF framework. I say CTF because CTF starts to add in objectives to TDM play. So instead of tracking "Mutant" you will be tracking "VIP". And instead of tracking "Bottomfeeder", you won't be tracking anything at all.

    Here is an HTML overview of all the UT2004 uscript:

    http://unreal.student.utwente.nl/uncodex-ut2004/

    I would peruse the BonusPack stuff a few times before proceeding too far. There's a couple ways to do this. You could extend Mutant itslef and try to add in team logic, but that is probably wildly inefficient. What you might do is extend xTeamGame, more or less duplicating the Mutant classes into your own logic and then set the VIP vars appropiately.

    Regardless, I would look up GameReplicationInfo and PlayerReplicationInfo at the wiki and know them well, because my short answer is yeah - that's what you'll be worrying about.
     
  11. porkmanii

    porkmanii New Member

    Joined:
    Sep 9, 2004
    Messages:
    129
    Likes Received:
    0
    I think you are thinking of UnrealGame.DMSquad, although xMutantGame uses BonusPack.MutSquadAI as the DMSquadClass. the Squad AI may use the information in MutantGameReplicationInfo, but that is not exactly what GRI's are for. The Unreal Wiki's description of ReplicationInfo:
    Abstraction of classes which handle data to be sent from the server to the client. ReplicationInfos are always relevant for network replication.

    I would have thought the Bottom Feeder wasn't tracked (by AI).. Only the Mutant can kill the Bottom Feeder, right?

    The best way to go, in my opinion.
     
  12. RegularX

    RegularX Master of Dagoth Lies

    Joined:
    Feb 2, 2000
    Messages:
    1,215
    Likes Received:
    0
    Misread/spoke. GRI's are the game level replication object, PRI's for player data. In DM, the GRI doesn't really need to do much because there is no team info, but in Mutant it tracks the special controllers. Only place to place them and insure a crowd.

    I would also recommend browsing through the CTF GRI's and PRI's and AI's about how the FlagHolder is maintained - because the VIP is probably going to share similar properties to that as well.
     

Share This Page