[DECORATE] Disable "random" class selection.

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: Developers

[DECORATE] Disable "random" class selection.

Postby Xaser » Sun Oct 25, 2009 12:29 am

In my mod, classes are used not to pick a character/starting loadout, but rather a "control scheme" of sorts: one class gives all weapons "automatic" fire, while the other class gives semi-automatic weapons with a slightly higher top speed. At any rate, I have two classes that are mutually exclusive, but "Random" still always shows up as a choice, even though it makes no sense in this case.

[This quickly becomes a problem because it seems that playing another wad then coming back to mine will sometimes set the class selection to Random by default, making me change it every time I start. But perhaps that's a seperate issue...]

At any rate, there's no way that I know of to disable the "Random" class selection option, and IMO there should be one.

Adding playerclasses is technically done in KEYCONF, but putting the option there wouldn't make sense considering it's a console script and this would not make much sense as a console command. The best place I can think of is in DECORATE, perhaps in the form of an +EXCLUDEFROMRANDOM flag for PlayerPawn types, where if all defined classes have this set, the "Random" option is taken away since there'd be nothing to choose from. This would add some extra flexibility to it, though any other syntax/placement is fine, really.
User avatar
Xaser
secretly a supercomputer being a government
 
Joined: 20 Jul 2003
Location: .plɹoʍɹǝʌǝu.

Re: [DECORATE] Disable "random" class selection.

Postby Graf Zahl » Sun Oct 25, 2009 1:22 am

There is none - and DECORATE is certainly not the place to add it. If, then MAPINFO.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: [DECORATE] Disable "random" class selection.

Postby Gez » Sun Oct 25, 2009 2:06 am

The GameInfo block seems a good place to put available classes, so as to get that out of KEYCONF as well. E.g.:
Code: Select allExpand view
gameinfo
{
   ...
   availableclasses = "fighterplayer", "clericplayer", "mageplayer", "hereticplayer", "doomplayer", "strifeplayer"
   randomclasses = "fighterplayer", "clericplayer", "mageplayer"
}

The Heretic/Doom/Strife player classes would not be available from the "random" choice here.
Gez
 
Joined: 06 Jul 2007

Re: [DECORATE] Disable "random" class selection.

Postby Graf Zahl » Sun Oct 25, 2009 2:41 am

Good idea. I've never been to thrilled about using KEYCONF for setting up players.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: [DECORATE] Disable "random" class selection.

Postby phi108 » Sun Oct 25, 2009 9:00 am

This is sometimes a problem for me too. Each class, Doomguy, Chexman and Corvus is meant to be chosen when playing a specific game, and each has a different set of weapons replacing weapon pickups.

When random class selection is used, it messes up. Players have pointed out this problem when playing the mod while randomly selecting classes.
User avatar
phi108
Magical Error?
 
Joined: 01 Dec 2007

Re: [DECORATE] Disable "random" class selection.

Postby Xaser » Sun Oct 25, 2009 10:15 am

@Gez: Yes, that's much better. I keep forgetting about the gameinfo block for some reason.
User avatar
Xaser
secretly a supercomputer being a government
 
Joined: 20 Jul 2003
Location: .plɹoʍɹǝʌǝu.

Re: [DECORATE] Disable "random" class selection.

Postby NeuralStunner » Sun Oct 25, 2009 1:30 pm

Gez wrote:The GameInfo block seems a good place to put available classes, so as to get that out of KEYCONF as well. E.g.:
Code: Select allExpand view
gameinfo
{
   ...
   availableclasses = "fighterplayer", "clericplayer", "mageplayer", "hereticplayer", "doomplayer", "strifeplayer"
   randomclasses = "fighterplayer", "clericplayer", "mageplayer"
}

The Heretic/Doom/Strife player classes would not be available from the "random" choice here.

I love this idea. Just don't forget an entry for classes selectable from Player Setup, but not the New Game class menu. :wink:

If Random were excluded completely then, could the menu actually hold 8 individual classes? (On a related note, the ability to have a scrolling menu that can hold more than 7 classes would be ideal - up to 16, the amount definable in Player.SpawnClass, would be quite nice. :) )
User avatar
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

Re: [DECORATE] Disable "random" class selection.

Postby Xaser » Sun Oct 25, 2009 8:40 pm

NeuralStunner wrote:Just don't forget an entry for classes selectable from Player Setup, but not the New Game class menu. :wink:

That can already be done with the +NOMENU DECORATE flag... unless you mean the other way around, that is.
User avatar
Xaser
secretly a supercomputer being a government
 
Joined: 20 Jul 2003
Location: .plɹoʍɹǝʌǝu.

Re: [DECORATE] Disable "random" class selection.

Postby Xaser » Sat Dec 25, 2010 11:10 pm

Pardon the bump, but I had the idea in the back of my mind that part of this would be remedied with MENUDEF's addition. Since the class list seems to be populated automatically, though, an option is still "needed" elsewhere.

Elsewhere (IRC), Kate brought up another scenario: her mod (with separate player classes) features a lives system (using 'allowrespawn' and whatnot), and when "Random" is selected, a random character is picked upon respawn every time one loses a life. That's trouble when the campaign is intended to have different, branching paths for different player classes, and right now the only solution would be to utilize LANGUAGE to rename "Random" to "DO NOT CHOOSE THIS OPTION" :P

At any rate, a simple Gameinfo Block option to disable the "Random" playerclass choice would be perfect for such cases. I just wish I had been so clear in the original post... though I'm tempted to edit it now... ;)
User avatar
Xaser
secretly a supercomputer being a government
 
Joined: 20 Jul 2003
Location: .plɹoʍɹǝʌǝu.

Re: [DECORATE] Disable "random" class selection.

Postby Kate » Sat Dec 25, 2010 11:22 pm

Xaser wrote:Elsewhere (IRC), Kate brought up another scenario: her mod (with separate player classes) features a lives system (using 'allowrespawn' and whatnot), and when "Random" is selected, a random character is picked upon respawn every time one loses a life.

This also causes a second problem because I have scripts that do initialization at the start of the map, relying on the player never changing their class mid-map, so when the player respawns as a different class due to having selected “Random”, the scripts explode and refuse to function properly anymore.
User avatar
Kate
Will love and tolerate THE SHIT out of you
 
Joined: 15 Jul 2003
Location: New Jersey, US


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest