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.

problems with new gametype

Discussion in 'Programming' started by navboy, Sep 30, 2001.

  1. navboy

    navboy New Member

    Joined:
    Jan 5, 2001
    Messages:
    340
    Likes Received:
    0
    After reading a few tutorials there, i tried to subclass DeathMatchPlus (called it MyGameDebugInfo) and change a few simple things (added a log comment and a subclassed Bot), but i can't quite get it to work. My .int file is:

    [Public]
    Object=(Name=MyGameDebug.MyGameDebugInfo,Class=Class,MetaClass=Botpack.TournamentGameInfo)
    Preferences=(Caption="Debug DeathMatch",Parent="Game Types",Class=MyGameDebug.MyGameDebugInfo,Immediate=True)

    Well i get a new entry in the gametypes menu at the bottom of the list, called "DeathMatchPlus", and when i run my map with it, it doesn't call my customized version. Shouldn't it show up as "Debug Deathmatch"?

    Then, in Spawnbot i changed the var declaration from type bot to:

    local DebugBot NewBot;

    and the two lines that spawn the bots to:

    NewBot = Spawn(class'MyGameDebug.DebugBot',,,StartSpot.Location,StartSpot.Rotation);

    The only thing different in DebugBot is i added a line to FellOutOfTheWorld() to log the bot's location ...

    *******************************

    Two main problems are i can't normally get it to run my custom subclass of DeathMatchPlus, and then once i got it to run launching out of UED2 (first game only; once i went to Practice Session and started another game it used the normal code), the log showed many errors involving not finding meshes for the bots during Animation calls, plus they were invisible in the game and didn't move around, just stayed in place.

    I didn't mess around with PRI's like in the tutorials because i have no changes to make to the standard PRI ... I'm missing something about how all this works i guess. I think it's real close but something is not quite right.
     
  2. ca

    ca CHiMERiC Grandmaster

    Joined:
    Oct 11, 1999
    Messages:
    84
    Likes Received:
    0
    The menu listing of the game types looks up the string GameName in the GameInfo class instead of referring to the .int file.

    defaultproperties
    {
    GameName="Debug DeathMatch"
    }

    Log the Login() function or something to make sure you're actually running your gametype. I usually test via the commandline (as loading uwindows is slow):

    unrealtournament dm-agony?game=mypkg.mygameinfo

    You can always double-check the log file too, as it should show the gametype loaded when it parses the url.
     
  3. navboy

    navboy New Member

    Joined:
    Jan 5, 2001
    Messages:
    340
    Likes Received:
    0
    ahh i see ... cool.

    as far as logging it, i put a log entry in PreBeginPlay() so i could tell when it was or wasn't logging ... It did once from UED2 upon first launch, but never did after that or from UT. That's what i can't figure out, is why is wasn't running ... Well, and also why the bots weren't finding the right meshes to play animations.
     
  4. Raeled

    Raeled Feuer Frei!

    Joined:
    Jul 1, 2001
    Messages:
    161
    Likes Received:
    0
    don't know how off hand, but there is a way to choose the botclass you want witout making a new gamemode
     
  5. navboy

    navboy New Member

    Joined:
    Jan 5, 2001
    Messages:
    340
    Likes Received:
    0
    yeah, when the gameinfo approach didn't work, i used my Bot subclass by itself in a package, with this .int file:

    [Public]
    Object=(Name=DebugBot.DebugBot,Class=Class,MetaClass=Botpack.Bot,Description="DebugBot")

    Still, it won't show up in the Bot Configuration menu.
     
  6. Captain Kewl

    Captain Kewl I know kewl.

    Joined:
    Feb 13, 2001
    Messages:
    794
    Likes Received:
    0
    What package is DebugBot in? If it's compiled in with MyGameDebug, as it seems to be as referred to in your gameInfo:

    NewBot = Spawn(class'MyGameDebug.DebugBot',,,StartSpot.Location,StartSpot.Rotation);

    You'd probably want the int file to say

    Object=(Name=MyGameDebug.DebugBot,Class=Class,MetaClass=Botpack.Bot,Description="DebugBot")

    Also, make sure Description matches the MenuName defaultproperty of the bot.
     
  7. navboy

    navboy New Member

    Joined:
    Jan 5, 2001
    Messages:
    340
    Likes Received:
    0
    Well, when i couldn't get the gametype to work, i made a package called DebugBot with just the Bot subclass in it (also called DebugBot), hence my .int file:

    Object=(Name=DebugBot.DebugBot,Class=Class,MetaClass=Botpack.Bot,Description="DebugBot")


    However, i was unaware of the MenuName default property and made no changes to it ... Don't know if a mismatch between that and my Description in .int could cause it not to work, but i'll give it a try tomorrow.
     

Share This Page