• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[OLD] Game attributes and variants

Level 12
Joined
Apr 15, 2008
Messages
1,063
Game attributes and variants

One of the new features of starcraft is are game attributes and variants, which provide a new, powerful tool to customize lobby settings of your game.

Both attributes and variants are set in lobby, and can affect many other lobby-specific options of the game, like team setting, number of players, player races etc...

1. Theory

What is the difference? Game variants are visible in the custom games list, thus they should be used to determine the main aspects of the game (they replace game mods we used in warcraft). Attributes can be used to set up smaller, less important settings, and affect gameplay only. They don't have any influence on the rest of the settings in lobby. Also game variants can't be detected in game with scripts, but that can be bypassed by using invisible game attribute (more on that later).
attachment.php

1.1 Game variants

Game variants consist of two options, game category and game mode. Game category is in theory a container for different game modes (which modes are visible in the list depends on the game variant). However game variant is a specific combination of these two, and you will need to manually input all settings in each one, so you may want to keep number of variants low.

1.2 Game attributes

Game attributes are options that can be chosen in lobby. Each attribute can have any number of possible values, and is set to exactly one value in lobby. Also attributes can be player-specific (like handicap, that's an option every player can set for himself) , but unfortunatelly lobby UI can handle only one player-specific attribute correctly, others are displayed over player name, which looks pretty bad.

2. Lobby UI

2.1 Game category

No matter what you do, the "custom" category is always displayed and if selected, it messes up all other settings. Be aware of that and take some precautions for that possibility (using game attributes, described later, it is possible to detect this setting and use triggers to set up teams or whatever you need in-game, so that the entire game won't be ruined). Hopefully players will learn not to use this, or blizzard will remove it.
attachment.php

(I use my own map, Cruiser wars, on all screenshots. If you have a problem with this hidden advertisement, I am sorry. Also note that because I don't multiple game categories, I used the game category to describe what type of game my map is, so that new players will see that immidiatelly from custom games list)

2.2 Game mode

You see that I have a full list of modes here. If I had selected "custom" category, there won't be any of my mods here.
attachment.php

2.3 Attributes

This is a game-specific, also mode-specific attribute (it appears only in one mode)
attachment.php


3.Setting up

Use Player Properities to set number of players (simply set all players you want to participate to "user", don't change anything else, you'll do that with game variants)

3.1 Game variants

Setting up game variants is pretty time-consuming, so be prepared for that. Also, you can't test game variants unless you upload the map to battle.net, and host it. The window looks like this:
attachment.php

On the left you can see the list of all variants. You see that I marked one of them as default (right-click on the game variant, there is the option). I strongly recommend setting one of your variants as default, otherwise the "custom" game category will be selected as default.
3.1.1 General tab
On the "general" tab, you could set the name, description and icon of the game variant. However it seems that neither description or icon can be seen anywhere and name is visible only in the list on the left, so basicaly everything on this tab is visible only for you.
3.1.2 Game Type tab
This, second tab is used to set up category + mode combination that is connected to this variant. There are three options, "melee", "Coop vs. AI" and "custom". You will most likely want to use the custom option, that lets you input the category and mode name. The game categories are purely name-based (meaning that two modes will belong to same game category, if their repective game categories have same name).
Also you can, and should, input some basic description in here (you can see that I haven't done that yet in the screenshots above)
There is also an option "Max team size", it has a little confusing name, it actually sets the maximum number of teams, and it also doesn't work.
3.1.3 Game attributes tab
Now here you see a list of game attributes used by this variant. If you add any custom attributes, they will also appear in this list. (You can see "handicap", "isDuel" and "HandleTeams", which are my custom attributes)
attachment.php

You can already see that some of the attributes have only one option that affects all players, while others, like teams, are set up for each player individually. Important: Attributes can be "locked", meaning that players won't be able to change them. However, some attributes, are locked by default and setting locked will cause an error while publishing the map.
Game modePublic/Private/automated match making - not sure what this does,if it does anything
Game speedThis one is pretty obvious
Lobby delayThe delay between clicking "start" and launching the game. Please set to something smaller that 30 second, it is SO annoying to wait that long!
Locked alliancesPlayers can't change teams in-game if you select Yes. You propably want to use it. Note: locked by default, setting to locked status will cause error
Premade gameNo idea, propably is set automatically when the game was created through automated match making
RulesAgain, no idea what this does, but it only has one option, so propably nothing
TeamsVery important, you will want to set this. Use a fixed number of teams though, "custom teams" will allow players to modify team setting. You may lock this setting.
Teams[premade]No idea about the premade stuff here
ColorLets you change player color. You may lock this setting
ControllerCan be used to close some player slots to limit the maximum numer of players for a certain mode. Beware though, if you do that, remember to set controller to "open" for other variants, otherwise the slots will be closed as soon as host selects this mode and WON'T OPEN when he changes it (they even disappear, so there will be no way of opening them besides rehosting)
Locking this option to Open will cause strange bug, locking to closed will cause the game to kick players occupying that slot (if unlocked, they will stay)
It seems now that only if you set ALL of controllers to something, it will work, otherwise it will fail on publishing
Observer type??
Participant role??
Team [x] These attributes depend on the "Teams" attribute. You will need to set up the according attribute (e.g. if you selected 2 teams, you will want to set up the Team[2 teams] attribute)
You set each player to a specific team and even lock it. If you lock this option, players won't be able to change the team in lobby and the team will depend on the order they join the lobby. If you use custom teams and won't lock it, host will be able to completely rearrange teams.

3.2 Attributes

Attribute window looks simillary to the variant window, you can see a list of attributes to the left and four tabs on the right.
attachment.php

3.2.1 General tab
Same as for variants. This time, however, name will be displayed in lobby. Description and icon won't.
The only new option is game/player setting. Game attributes are usually set by host to affect all players, while player attributes can allow players to customize some setting concerning them only.
3.2.2 Usage tab
This tabs hold many interesting settings for the attribute. I will start from the last:
Hidden - the attribute won't be displayed anywhere. The only way to modify such attribute is through game variants - each variant can use different value. That is important, as it let's you detect which variant players played - you can set an hidden attribute with one value for each variant and then read the attribute by trigger to find out, which variant host chose.
Locked when public - pretty obvious, this attribute will become locked after the game is opened to public.
Access - determines who can change this attribute. "Self only" applies for player atributes and make each player able to set the attribute for himself only.
Visibility - determines who can see what was set in this attribute.
Availability - only for game attributes. "First come, first serve" makes the attribute unique (e.g. each value can only be chosen one and will disappear once anyone chooses it - exactly like colors)
Requirements - can make this attribute's appearence depend on other attribute setting. In the screenshot above you can see that I created a hidden attribute IsDuel, which is set to true only for one specific game variant. The handicap attribute requires IsDuel to be true, hence making this attribute available only in one game variant.
3.2.3 Values tab
You can set all possible values for the attribute here. You can guess whether description and icon work.... and you guessed correctly, they don't.
3.2.4 Defaults tab
Here you have to set defaults for this attribute for each player (if it's player attribute) or in general (if it's game attribute)
 

Attachments

  • varAttrTut1.gif
    varAttrTut1.gif
    34.5 KB · Views: 1,420
  • varAttrTut2.gif
    varAttrTut2.gif
    44.9 KB · Views: 1,522
  • varAttrTut3.gif
    varAttrTut3.gif
    46.9 KB · Views: 1,948
  • varAttrTut4.gif
    varAttrTut4.gif
    47.7 KB · Views: 1,510
  • varAttrTut5.gif
    varAttrTut5.gif
    14.4 KB · Views: 1,513
  • varAttrTut6.gif
    varAttrTut6.gif
    23.5 KB · Views: 1,467
  • varAttrTut7.gif
    varAttrTut7.gif
    13.3 KB · Views: 1,731
Last edited:
Level 1
Joined
Sep 3, 2010
Messages
1
Nice article, thanks. A few things I've learned that might be helpful:

1) The "Generate Defaults" button on the Game Variants screen is necessary for non-custom maps to allow for the general Melee XvX/FFA and Co-op Vs AI modes. It can also be handy for custom maps where you also want to allow those default modes for alternate play. It will create 1v1, 2v2, etc for Melee up to the amount of possible players you have.

2) If you look at what one of those defaults are doing, it'll give you a clue as to what those unknown Attributes that you mentioned are for.

(Game) Teams [Premade] -- Simple, just pick 1v1, 2v2, etc or FFA.
(Player) Team [Premade: X v X] -- Allows you to indicate which players are on which team (exactly the same as Team [2 Teams])
(Player) Participant Role -- Lets you pick whether the player is participating in the game (Participant) or a spectator (Watcher).
(Player) Observer Type -- I believe this is if you pick Watcher for a player in the above attribute, it lets you pick whether they are just a Spectator or a Referee (not sure what this is though).


Question

The reason I stumbled upon this forum / article is because I was looking for more info as to the Game Variants / Attributes to enable me to create a 3 v 5 mode (Humans v Comps). This seems like one of the hardest things that should be incredibly simple. I've tried changing (Player) Teams [2 Teams] and making the first 3 players team 1, and the rest team 2, but it ends up keeping the teams 4 v 4 and just removes a computer from the first team which ends up as 3 v 4.

I also tried creating my own Game Attribute (Type - Game) called Teams [Custom] that has the possible different uneven team values and setting it to 3 v 5 in my Game Variant. I'm not sure, however, what the game would even do with this custom attribute, if anything. Seems impossible to me that it would know I'm trying to set the team sizes, because the "Value" is just a simple text field.

The very strange thing was before I discovered the Game Variants and all options were just showing up as "Custom", it started the teams out as 5 v 3. The host (I) was on the 5 player team, and could not change teams, but I could move other players to the other team. Hilariously enough, I almost had exactly what I wanted before this Variant mess even started!

If the OP or anyone else has any suggestions, I'd greatly appreciate it.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
Thanks
1) Didn't know that, maybe I should add it, but it seems like it belongs to a melee map tutorial, as this tutorial is propably mostly for custom map makers.
2) Well I had an idea what that means, what I didn't get was, if it would be possible to somehow use the automated matchmaking mode for custom maps. That would be awesome, but it's propably impossible, so all the options with "premade" are propably only for melee games.
Participant and Observer type - I haven't tested these, so I don't know whether you can actually set them, or if they are there just to be read by triggers. I'll investigate this.

As for your problem, I would go with 2 teams, setting player teams accordingly, locking them. Then set controller to Open for players and Computer for computers (lock the controller setting for computer players)
Also, I have not mentioned that in the tutorial, but don't set anything in the player setup screen, set every player to user there and leave it.
 
Top