PDA

View Full Version : problems with new gametype


navboy
30th Sep 2001, 04:11 PM
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.

ca
2nd Oct 2001, 01:52 PM
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.

navboy
2nd Oct 2001, 06:06 PM
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.

Raeled
2nd Oct 2001, 06:09 PM
don't know how off hand, but there is a way to choose the botclass you want witout making a new gamemode

navboy
3rd Oct 2001, 12:13 PM
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.

Captain Kewl
6th Oct 2001, 10:41 PM
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.

navboy
8th Oct 2001, 01:01 AM
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.