UE3 - UT3 Clamping Max Players Allowed

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

Lagran

New Member
May 25, 2008
12
0
0
Hey, I'm at my wit's end on this. I'm trying to figure out how to clamp the maximum amount of players allowed in my new game type. I've not been able to figure out any fartin way to do so. I've tried setting MaxPlayersAllowed in my gametype and created a gamesettings class for it, set the MaxPlayers, and it didn't change a thing.

So far as I can tell the actual max players allowed is set in the UTUIFrontEnd_LaunchGame class under "const MAXIMUM_PLAYER_COUNT = 24;" which makes me think it may be pretty much hardcoded into the actual front end screen. Seems like a pretty dumbassed way to do things, but I can't see any other way it is done.

I'm not sure if there is a way for me to extend a class off that and create a new specific front end for the host game for my game type in peticular, if there is I can't find it. Does anyone have any ideas on how I can do this? I can't find anything anywhere.

Also, while I'm on about this, does anyone know if there is a way to make it so that bots are not allowed in a game type?

Thank you greatly for your help!
 

elmuerte

Master of Science
Jan 25, 2000
1,936
0
36
43
the Netherlands
elmuerte.com
if you did some research to where MAXIMUM_PLAYER_COUNT is used you'd see that it's used as an identifier for the maximum player count information which is communicated to the master server, but also used internally to set pass game launch information to the to-be started game. The 24 is an id, not a value.

Clamping the max players allowed can easily be done by setting MaxPlayersAllowed in your gametype. However, this information is not used by the Front End when setting up the game. You need to subclass UTGameSettingsCommon and make your adjustments to the default properties.
 

MonsOlympus

Active Member
May 27, 2004
2,225
0
36
43
I tried that myself elmuerte, I used my own GameSettings but I always get this error:

Code:
ScriptLog: Invalid name (UTGameSettingsATN) specified to SetCurrentByName() on UTDataStore_GameSettingsDM_0

I think it had to do with the store being in the defaults of the DataStoreClient or something, if you know anything though itd be a big help :cool:
 

elmuerte

Master of Science
Jan 25, 2000
1,936
0
36
43
the Netherlands
elmuerte.com
oh... you're right MonsOlympus
looks like they hardcoded the list of GameSettings classes for the gametype rather that look them up. which pretty much comes down to not being able to add game type specific settings.
 

Lagran

New Member
May 25, 2008
12
0
0
Damnit, that's kind of what I figured. Definitely throws a wrench in things.

Thanks for the info guys.