• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

Overriding function GetPlayerClass stops game working online

LordGleedo

FNG / Fresh Meat
Jul 18, 2010
800
74
0
Bucks, England
www.theoldgitsarmy.com
Still utterly stuck on this.

The following was suggested:

"Have you tried overriding the existing pawn class arrays and leaving out GetPlayerClass?"

But that is essentially was GetPlayerClass is doing for me to get my custom pawn classes loaded into those arrays.

I need to know why this is not working online. If I can't load my custom pawn classes, I am totally screwed.
 

[TW]Strago

Tripwire Interactive Staff
Jun 23, 2010
166
204
0
But that is essentially was GetPlayerClass is doing for me to get my custom pawn classes loaded into those arrays.
You'll need to give it a try without using GetPlayerClass. We don't have a documented method for this, so some experimenting is necessary and the more information the better.
 

LordGleedo

FNG / Fresh Meat
Jul 18, 2010
800
74
0
Bucks, England
www.theoldgitsarmy.com
OK, so after a lot of debugging I seem to have found the issue:

I believe the whole issue I was facing was just down to trying to run my game online with uncooked packages, specifically my support package TOGAFreezeTagContents.upk.

I tracked down the problem to a call in my pawn include class that tried to 'PlaySound' using a cue from that package, but I think it fails to load that due to being uncooked. That sound cue was in my pawns 'default properties' so when the class was getting loaded via the GetPlayerClass function, that sound cue would fail to load and then stop everything else from working. At least that is what seems to be happening.

So now I am trying work out what command line options I need to run to create cooked packages for the game 'TOGAFreezeTag.u' and it's support file 'TOGAFreezeTagContents.upk' for both server and client, but I am having trouble working out what commandlet options I need to use.

I have tried a couple of things, and the game actually does now load up online which is great, but the log shows that the sound files and materials are still not getting loaded.

[0093.03] Warning: Warning, Failed to load Outer for resource 'TouchCarcass_Cue': Package TOGAFreezeTagContent.AUD
[0093.03] Warning: Warning, Failed to load Outer for resource 'freeze_Cue': Package TOGAFreezeTagContent.AUD
[0093.03] Warning: Warning, Failed to load Outer for resource 'icecrack_Cue': Package TOGAFreezeTagContent.AUD

So I presume I am cooking them incorrectly.

So I am looking at the UDN documentation on cooking packages via the commandlet.

Do I need to cook for PC and PC server? The following is what I am trying

PC
Code:
rogame.exe CookPackages TOGAFreezeTag.u -platform=pc
Produces the following files:
Code:
CookedPC\Script\TOGAFreezeTag.u
CookedPC\Script\TOGAFreezeTag_SF.u
CookedPC\Custom\TOGAFreezeTagContent.upk

PC Server
Code:
rogame.exe CookPackages TOGAFreezeTag.u -platform=pcserver
Produces the following files:
Code:
CookedPCServer\TOGAFreezeTag_SF.u
CookedPCServer\TOGAFreezeTagContent.upk

I presume the files output from cooking for PC are what would go on a redirect? Though I have never seen a file ending _SF.u before, is that correct?

And I think the cookedpcserver TOGAFreezeTag_SF.u file would probably have to be renamed to TOGAFreezeTag.u when going on the server?

Finding this all a bit confusing tbh :eek:

Any guidance in what / how I should be cooking packages would be appreciated:eek:
 

[TW]Strago

Tripwire Interactive Staff
Jun 23, 2010
166
204
0
Any guidance in what / how I should be cooking packages would be appreciated:eek:
It looks like you are cooking correctly. No renaming needed and yes only client content ends up on a redirect.

Where have you added TOGAFreezeTag to the configs? Is that the same warning log you get running uncooked? Does the message happen if you don't reference those script classes or when trying to spawn that actor?
 

LordGleedo

FNG / Fresh Meat
Jul 18, 2010
800
74
0
Bucks, England
www.theoldgitsarmy.com
Where have you added TOGAFreezeTag to the configs?
Well I have an ROTOGAFreezeTag.ini which I uploaded to the servers config folder.

I then also added the following to ROGame.ini to get the game to show up in webadmin:
Code:
[FTGameInfoFreezeTag UIGameInfoSummary]
ClassName=TOGAFreezeTag.FTGameInfoFreezeTag
GameAcronym=FT
MapPrefix=FF
bIsTeamGame=True
GameName=RO2 FreezeTag
Description=FreezeTag is better than TDM
Other than that, I have not added any other config entries for my game on the server (as I have no idea if I need to ;) )


Is that the same warning log you get running uncooked?
I do not get any warnings or errors running unpublished in offline mode

Does the message happen if you don't reference those script classes or when trying to spawn that actor?
No. If I don't override GetPlayerClass, the game spawns the usual ROPawn player classes and no warnings get written to the server logs.
[/QUOTE]
 

[TW]Strago

Tripwire Interactive Staff
Jun 23, 2010
166
204
0
Hmm... I can see about getting an answer from one of the mod teams, but here are a couple things you might try until then.

1) How the class is loading. What happens if you try spawn instead of DynamicLoadObject?
2) Can you reference those sounds from other classes in your game?
3) Can you reference RO sounds from that class?
4) Can you load the audio manually? (see ROWeapon.LoadOwnedContent())
 

LordGleedo

FNG / Fresh Meat
Jul 18, 2010
800
74
0
Bucks, England
www.theoldgitsarmy.com
Right now I am just trying to get this online with the latest patch version of the game/sdk.

Before, the game would physically load and webadmin would report it is running regardless of if the game actually worked or not.

But at the moment, the server will not load the game. The log reports:
Code:
[0026.19] Log: LoadMap: FF-Apartments?minplayers=4?maxplayers=12?game=TOGAFreezeTag.FTGameInfoFreezeTag?Name=Player?Team=255
[0026.24] Exit: TcpNetDriver_0 shut down
[0026.42] Warning: Warning, Failed to load 'Class TOGAFreezeTag.FTGameInfoFreezeTag': Failed to find object 'Class TOGAFreezeTag.FTGameInfoFreezeTag'
[0026.43] Warning: Warning, Failed to find object 'Class TOGAFreezeTag.FTGameInfoFreezeTag'
I am still not sure I am cooking correctly. Before when the server loaded, I just uploaded a non-cooked version of the game.

When I cook, it creates TOGAFreezeTag_SF.upk but that aint getting loaded.

EDIT: In fact I just uploaded the uncooked version of the game class TOGAFreezeTag.u to the server and the server loads it ok, but the sounds and materials are still not getting loaded from TOGAFreezeTagContent.u.

The server log reports:
Code:
[0202.26] Warning: Warning, Failed to load Outer for resource 'freeze_Cue': Package TOGAFreezeTagContent.AUD
[0202.26] Warning: Warning, Failed to load Outer for resource 'icecrack_Cue': Package TOGAFreezeTagContent.AUD
[0202.36] Warning: Warning, Failed to load Outer for resource 'freeze_Cue': Package TOGAFreezeTagContent.AUD
[0202.36] Warning: Warning, Failed to load Outer for resource 'icecrack_Cue': Package TOGAFreezeTagContent.AUD
[0202.40] Warning: Warning, Failed to load Outer for resource 'freeze_Cue': Package TOGAFreezeTagContent.AUD
[0202.40] Warning: Warning, Failed to load Outer for resource 'icecrack_Cue': Package TOGAFreezeTagContent.AUD
The client log reports:
Code:
[0035.30] Warning: Warning, Failed to compile Material TOGAFreezeTagContent.Materials.HUD_Indicator_mat for platform PC-D3D-SM3, Default Material will be used in game.
[0035.36] Warning: Warning, Failed to compile Material TOGAFreezeTagContent.Icebergs.Iceberg_blue_mat for platform PC-D3D-SM3, Default Material will be used in game.
[0035.36] Warning: Warning, Failed to compile Material TOGAFreezeTagContent.Icebergs.Iceberg_red_mat for platform PC-D3D-SM3, Default Material will be used in game.
[0039.90] Warning: Warning, Failed to load 'Class None.': Failed to find object 'Class None.'
The 'Failed to compile' errors should have been fixed by the shadercache fix shouldn't they?

How do you guys cook your packages?
 
Last edited:

boristsr

FNG / Fresh Meat
Jul 30, 2007
21
12
0
Forgive me if some of the points this are a bit short or cryptic, it's 2am here, so I'll answer any questions/clarify points here tomorrow.

Cooked content seems to work a lot more reliably at the moment, so for now lets focus on getting the cook correct, so don't try putting uncooked content on the server. Delete any/all TOGA related packages from your server directory.

START FRESH

Delete/Rename your Published folder in your client user directory for now, lets start with a fresh plate. I've had a few classes fail to load, and a fresh cook resolved the issue for me.

COMPILING

Silly question, but when you compile do you get any warnings?

COOKING

In regards to the audio package not loading we have found certain audio packages need to be added to the cook command line to properly cook. So try these as your cook commands:
rogame.exe CookPackages -platform=pcserver TOGAFreezeTag.u TOGAFreezeTagContent
rogame.exe CookPackages -platform=pc TOGAFreezeTag.u TOGAFreezeTagContent

Also with cooking don't be alarmed if the server cook produces some strange files. Code packages will become quite large, and some packages might appear to not get cooked at all. Since the server doesn't need a lot of content, just some data about the content, the relevant information gets copied into the code seekfree package. Things like animations and sounds do this. This is one of the reasons for the code package appearing to bloat.

After a server cook file names are changed to .upk, this is normal. Don't rename these packages back to .u or remove _SF.

Whenever you do a cook, ensure that both the PC and PCServer cooks are done or you will get all sorts of mismatch errors.

SHADERCACHE

Since the latest patch, the shader cache only created for about half of the RS team. The rest had to get an initial copy off another member, at which point it started working again. Verify you have LocalShaderCache-PC-D3D-SM3.upk and/or LocalShaderCache-PC-D3D-SM4.upk in <My Docs>\My Games\RedOrchestra2\ROGame\Unpublished\CookedPC.

Have you opened that package in the editor since the update? Does it appear to open correctly there? Can you preview the assets in the editor? Try resaving the package too. ~7 of our packages needed to be resaved to fix up some errors on the new SDK.

LOGGING

Also in your client ROEngine.ini, if you haven't done so, please delete the line that says "Suppress=ScriptLog". Do not delete the line that says "Suppress=Log" as that will cause crashes.

Let me know how you go with this.
 

LordGleedo

FNG / Fresh Meat
Jul 18, 2010
800
74
0
Bucks, England
www.theoldgitsarmy.com
Hello boristsr - firstly thank you very much for spending time trying to help me solve this issue :)

My uncooked packages/file sizes are:
TOGAFreezeTag.u (10 MB)
TOGAFreezeTagContent.upk (5.4 MB)


Delete any/all TOGA related packages from your server directory.
Done.

START FRESH

Delete/Rename your Published folder in your client user directory for now, lets start with a fresh plate. I've had a few classes fail to load, and a fresh cook resolved the issue for me.
Done.

COMPILING

Silly question, but when you compile do you get any warnings?
No - game code compiles with Success - 0 error(s), 0 warning(s)

COOKING

In regards to the audio package not loading we have found certain audio packages need to be added to the cook command line to properly cook. So try these as your cook commands:
rogame.exe CookPackages -platform=pcserver TOGAFreezeTag.u TOGAFreezeTagContent
rogame.exe CookPackages -platform=pc TOGAFreezeTag.u TOGAFreezeTagContent

Also with cooking don't be alarmed if the server cook produces some strange files. Code packages will become quite large, and some packages might appear to not get cooked at all. Since the server doesn't need a lot of content, just some data about the content, the relevant information gets copied into the code seekfree package. Things like animations and sounds do this. This is one of the reasons for the code package appearing to bloat.

After a server cook file names are changed to .upk, this is normal. Don't rename these packages back to .u or remove _SF.

Whenever you do a cook, ensure that both the PC and PCServer cooks are done or you will get all sorts of mismatch errors.
Both server and client files have cooked ok without any warnings (except for the usual 'Failed to load 'Texture2D EngineMaterials.RandomMirrorDisc' one which happens even when cooking maps, so I guess that is nothing to worry about.

Server Files Created
TOGAFreezeTag_SF.upk (15 MB)
TOGAFreezeTagContent.upk (3 KB)
TOGAFreezeTagContent_SF.upk (5.4 MB)


Client Files
TOGAFreezeTag.u (9.7 MB)
TOGAFreezeTag_SF.u (55 MB!)
TOGAFreezeTagContent.upk (1.5 MB)
TOGAFreezeTagContent_SF.upk (557KB)


SHADERCACHE

Since the latest patch, the shader cache only created for about half of the RS team. The rest had to get an initial copy off another member, at which point it started working again. Verify you have LocalShaderCache-PC-D3D-SM3.upk and/or LocalShaderCache-PC-D3D-SM4.upk in <My Docs>\My Games\RedOrchestra2\ROGame\Unpublished\CookedPC.
Those two files do exist in the specified location.

Have you opened that package in the editor since the update? Does it appear to open correctly there? Can you preview the assets in the editor? Try resaving the package too. ~7 of our packages needed to be resaved to fix up some errors on the new SDK.
I have just opened it and it appears ok so forced a save on it just incase so also re-cooked as above.


LOGGING

Also in your client ROEngine.ini, if you haven't done so, please delete the line that says "Suppress=ScriptLog". Do not delete the line that says "Suppress=Log" as that will cause crashes.

Let me know how you go with this.
Suppress=ScriptLog was there so it has now been deleted. Suppres=Log is still there and left alone.



OK, so I have just uploaded the server files to ROGame\CookedPCServer and started my server. I logged into webadmin and change map/gametype. The game class fails to load and reverts back to Fire Fight.

Code:
[0020.39] Log: LoadMap: FF-Apartments?minplayers=4?maxplayers=12?game=TOGAFreezeTag.FTGameInfoFreezeTag?Name=Player?Team=255
[0020.44] Exit: TcpNetDriver_0 shut down
[0020.63] Warning: Warning, Failed to load 'Class TOGAFreezeTag.FTGameInfoFreezeTag': Failed to find object 'Class TOGAFreezeTag.FTGameInfoFreezeTag'
[0020.63] Warning: Warning, Failed to find object 'Class TOGAFreezeTag.FTGameInfoFreezeTag'
[0020.63] Log: Game class is 'ROGameInfoFirefight'
But as mentioned above somewhere, "if" I upload my uncooked TOGAFreezeTag.u, the game class will get loaded.

Puzzled? lol :eek:
 

boristsr

FNG / Fresh Meat
Jul 30, 2007
21
12
0
It's strange that it's not able to load your gameinfo class. Can you post the source of your GameInfo class, or PM me?

**Edit

It might also be worth downloading the example maps from here:
http://forums.tripwireinteractive.com/showthread.php?t=74889

Grab the TE-NeutralSetup map and change the game modes in WorldInfo to your game mode, build and save the map. Then cook with the commands:
rogame.exe CookPackages -platform=pcserver TE-NeutralSetup TOGAFreezeTag.u TOGAFreezeTagContent
rogame.exe CookPackages -platform=pc TE-NeutralSetup TOGAFreezeTag.u TOGAFreezeTagContent

Because I can verify the dedicated server is loading cooked content and RS gametypes, but we always cook with maps too. I'm wondering if it's possible when it's not referenced it gets skipped in the cook.
 
Last edited:

LordGleedo

FNG / Fresh Meat
Jul 18, 2010
800
74
0
Bucks, England
www.theoldgitsarmy.com
It's strange that it's not able to load your gameinfo class. Can you post the source of your GameInfo class, or PM me?

**Edit

It might also be worth downloading the example maps from here:
http://forums.tripwireinteractive.com/showthread.php?t=74889

Grab the TE-NeutralSetup map and change the game modes in WorldInfo to your game mode, build and save the map. Then cook with the commands:
rogame.exe CookPackages -platform=pcserver TE-NeutralSetup TOGAFreezeTag.u TOGAFreezeTagContent
rogame.exe CookPackages -platform=pc TE-NeutralSetup TOGAFreezeTag.u TOGAFreezeTagContent

Because I can verify the dedicated server is loading cooked content and RS gametypes, but we always cook with maps too. I'm wondering if it's possible when it's not referenced it gets skipped in the cook.
Just added my game to the FF sample map and built it. I then tried to run the two command lines to cook for client and pc, but both failed as for some reason it could not find the map even though it is in the correct location:
Code:
C:\Users\Gleedo\Documents\My Games\RedOrchestra2\ROGame\Unpublished\CookedPC\Maps
So I opened the editor back up and just hit the cook button on the toolbar.

It cooked the client:
Code:
Published\CookedPC\Maps\FF-FirefightMap.roe
Published\CookedPC\Script\TOGAFreezeTag.u
Published\CookedPC\Custom\TOGAFreezeTagContent.upk
Output from console was:
Code:
[0007.30] Warning, Failed to load 'Texture2D EngineMaterials.RandomMirrorDisc': Failed to find object 'Texture2D EngineMaterials.RandomMirrorDisc'
[0007.34] Cooking with SEPARATE Lighting TextureFileCache...
[0007.35] Cooking with SEPARATE Character TextureFileCache...
[0007.35]
[0008.65] GeneratePersistentMapList> Clearing existing lists
[0008.65]       There are 1 levels to process
[0008.65] Loading base level ..\..\ROGame\CookedPC\Maps\FF-FirefightMap.roe
[0008.65] Failed to find supported game type(s) for FF-FirefightMap
[0008.91] Materials will be cleaned up...
[0008.91] StaticMesh materials will be cleaned up...
[0009.22] Cooking TOGAFreezeTagContent
[0009.95] Cooking TOGAFreezeTag
[0013.56] Cooking [Seekfree] FF-FirefightMap
[0013.56] Failed to find supported game type(s) for FF-FirefightMap
[0014.40] Copying shader cache RefShaderCache-PC-D3D-SM3.upk
[0017.76] Copying shader cache RefShaderCache-PC-D3D-SM4.upk
[0022.77]
[0022.77] Warning/Error Summary
[0022.77] ---------------------
[0022.77] Warning, Failed to load 'Texture2D EngineMaterials.RandomMirrorDisc': Failed to find object 'Texture2D EngineMaterials.RandomMirrorDisc'
[0022.77]
[0022.77] Success - 0 error(s), 1 warning(s)
[0022.77]
Execution of commandlet took:  15.42 seconds

It then continued to cook the server files:
Code:
Published\CookedPCServer\FF-FirefightMap.upk
Published\CookedPCServer\TOGAFreezeTagContent.upk
but did not cook a server file for TOGAFreezeTag.u despite saying 'cooking TOGAFreezeTag' - at least I could not find that file in my cookedpcserver folder!

Output from that console was:
Code:
[0006.71] Log: Executing Class UnrealEd.CookPackagesCommandlet
[0006.71] Warning, Failed to load 'Texture2D EngineMaterials.RandomMirrorDisc': Failed to find object 'Texture2D EngineMaterials.RandomMirrorDisc'
[0006.75] Cooking with SEPARATE Lighting TextureFileCache...
[0006.75] Cooking with SEPARATE Character TextureFileCache...
[0006.83]
[0008.02] GeneratePersistentMapList> Clearing existing lists
[0008.02]       There are 1 levels to process
[0008.02] Loading base level ..\..\ROGame\CookedPC\Maps\FF-FirefightMap.roe
[0008.02] Failed to find supported game type(s) for FF-FirefightMap
[0008.28] Materials will be cleaned up...
[0008.28] StaticMesh materials will be cleaned up...
[0008.54] Cooking TOGAFreezeTagContent
[0008.91] Cooking TOGAFreezeTag
[0011.65] Cooking [Seekfree] FF-FirefightMap
[0011.65] Failed to find supported game type(s) for FF-FirefightMap
[0012.38]
[0012.38] Warning/Error Summary
[0012.38] ---------------------
[0012.38] Warning, Failed to load 'Texture2D EngineMaterials.RandomMirrorDisc': Failed to find object 'Texture2D EngineMaterials.RandomMirrorDisc'
[0012.38]
[0012.38] Success - 0 error(s), 1 warning(s)
[0012.38]
Execution of commandlet took:  5.63 seconds
I will pm you the game class code.

Thanks again :)
 
Last edited:

LordGleedo

FNG / Fresh Meat
Jul 18, 2010
800
74
0
Bucks, England
www.theoldgitsarmy.com
Would someone at TWI be able to take my source code and compile/cook this for me to see if it makes any difference? Do I need something changing in a config file perhaps??

The shader cache issue previously reported is fixed if you are play testing offline/unpublished, but is still an issue on the server for me :(
 
Last edited:

LordGleedo

FNG / Fresh Meat
Jul 18, 2010
800
74
0
Bucks, England
www.theoldgitsarmy.com
Although I am still unable to get around the fact that materials and sounds from my TOGAFreezeTagContent package fail to get loaded by the game in a server environment, It seems that in order to play my game type with existing FF maps, they would need to include my game type in their list of supported games prior to those maps being cooked.

Therefore I conclude this appears to have been a massive waste of time :)
 

boristsr

FNG / Fresh Meat
Jul 30, 2007
21
12
0
Although I am still unable to get around the fact that materials and sounds from my TOGAFreezeTagContent package fail to get loaded by the game in a server environment, It seems that in order to play my game type with existing FF maps, they would need to include my game type in their list of supported games prior to those maps being cooked.

Therefore I conclude this appears to have been a massive waste of time :)
I don't test on RO2 maps often, but I recall having reasonable success on their cooked maps last time I tried. As long as you have SetGameType in your game info class you should be alright.

Sorry about the long response, been a little short on time recently. If I get time this weekend I'll try and knock up a small game info example with custom pawn and cook scripts.
 

LordGleedo

FNG / Fresh Meat
Jul 18, 2010
800
74
0
Bucks, England
www.theoldgitsarmy.com
I don't test on RO2 maps often, but I recall having reasonable success on their cooked maps last time I tried. As long as you have SetGameType in your game info class you should be alright.
The strange thing is, if I upload the uncooked version of my game to the server, any FF map I try to load against works, but a cooked version does not unless i add my game as a supported gametype.

I do call SetGameType in my game info class:
Code:
static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
{
	// 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'FTGameInfoFreezeTag';
	}

	// If all else fails, let the parent handle it
	return super.SetGameType(MapName, Options, Portal);
}
 

[TW]Strago

Tripwire Interactive Staff
Jun 23, 2010
166
204
0
It then continued to cook the server files:
Code:
Published\CookedPCServer\FF-FirefightMap.upk
Published\CookedPCServer\TOGAFreezeTagContent.upk
but did not cook a server file for TOGAFreezeTag.u despite saying 'cooking TOGAFreezeTag' - at least I could not find that file in my cookedpcserver folder!
This is a problem. The cooked server content is stripped down, but you need a TOGAFreezeTag.upk generated. If you can't add it via the commandline, then try adding an entry to the AlwaysCookPackages section in ROEngine.ini.