![]() |
![]() |
|
#1
|
||||
|
||||
|
I have started work on a gametype. It is a port of code that I wrote against the UDK.
But first things first, I created a simple class which extends ROGameInfo and it has nothing in it except DefaultProperties and some logging in various events that should fire if the game is loaded. I compiled the script and moved the .u to my published\script folder and added the following to my ro2 launch options in steam: FF-Apartments?game=TOGAModTest.TOGAModTest The game starts up and the correct map loads, but nothing is logged in the log files. I also have no idea how to make a new gametype appear in the webadmin. Has anyone tried to do this yet? |
|
#2
|
||||
|
||||
|
Quote:
Code:
Suppress=Log
__________________
|
|
#3
|
||||
|
||||
|
Well I have tried adding a debug log in PostBegingPlay and it does not show in the logs offline or online.
I think because I am loading a FF map that the gametype is defaulting to FF and the log has this: Code:
[0003.49] Log: LoadMap: ff-Apartments?Name=Player?Team=255?game=TOGATestMod.TOGATestMod?maxplayers=12 [0003.65] Log: Game class is 'ROGameInfoFirefight' |
|
#4
|
||||
|
||||
|
Quote:
__________________
|
|
#5
|
||||
|
||||
|
Quote:
![]() Would be great if a TWI coder could jump in and give us the low down on this and if it's currently possible to create and run a new gametype
|
|
|
|||
|
|||
|
Ducky is correct you will want to override SetGameType in your gameinfo class and unsuppress 'Log' and 'ScriptLog' from your config.
|
|
#7
|
||||
|
||||
|
Bloody hell i really need to read them comments!
It is now working and correctly loaded my custom game class. Strange thing is that my debug logging is still not getting written out. It should get written to the normal server log shouldn't it? Code:
static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
{
`Log(">>> DEBUG : SetGameType");
// Remove the Play In Editor tag from the MapName so we can find the proper gametype when using PIE
ReplaceText(MapName, "UEDPIE", "");
// Determine which GameType this Map is based off its name
if ( Left(MapName, InStr(MapName, "-")) ~= "FF" )
{
return class'TOGAGameInfo';
}
// If all else fails, let the parent handle it
return super.SetGameType(MapName, Options, Portal);
}
Last edited by LordGleedo; 03-22-2012 at 05:24 PM. |
|
#8
|
||||
|
||||
|
Quote:
Code:
`Log(">>> DEBUG : SetGameType", , 'MyClassName');
. They need to be there)Edit: Yes it's written to the normal server logs. If you go to the OP of my open source mutators post somewhere on this Coding board, then you can view my mutators. Especially in BotDetonator are a lot of `Log examples.
__________________
Last edited by Ducky; 03-22-2012 at 07:10 PM. |
|
#9
|
||||
|
||||
|
Thanks Ducky, will check it out tonight
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|