I have a map in which players vote for a difficulty using a dialog at the start of the game. The difficulty also changes a lot so it is kinda a game mode selector, too.
One difficulty has become very popular and people search for groups in my map's channel. I want to ease that search by allowing to select between "default" and "this difficulty only" game mode in the battle.net.
How do I do that? Do I need to add a game mode or a variant or what? How can I access which variant/mode has been choosen using triggers?
You can do it with a game attribute, or a game variant. If I remember right if you choose game variant, you end up doing it with a game attribute anyways. That's because you can specify check attributes in conditions but not variants (Using game attribute check condition). However, you can hide the game attributes, then have your variant use specific attributes. The benefit of doing it this way, is a player would be able to tell which type of game it was without entering the lobby first.
The one that players choose that's on the same row as color, race, handicap etc is "Attribute". The one that's on the left hand side with options such as "Locked Alliances" etc is "Variant".
Note that publicly joined games can't access the "variant" dropdown under normal circumstances. It's only accessible by using "create game". This is also the setting which will show in the open games list. It's probably the one you want!
As suggested, I created a custom attribute (which does nothing) and several game modes with different names which all have the same player setup.
I then added the custom-game-attribute with its respective default value and hidden to every game mode. In my init triggers I check which value the custom-game-attribute has and run different inits accordingly.
If someone wants to see this in action, download "Crap Patrol 2" (unlocked @ EU) or ask me.
Solved.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi,
I have a map in which players vote for a difficulty using a dialog at the start of the game. The difficulty also changes a lot so it is kinda a game mode selector, too.
One difficulty has become very popular and people search for groups in my map's channel. I want to ease that search by allowing to select between "default" and "this difficulty only" game mode in the battle.net.
How do I do that? Do I need to add a game mode or a variant or what? How can I access which variant/mode has been choosen using triggers?
Thanks, BlacKcuD
There should be natives which can get the game variant etc. You test this against various constants to determine which mode was chosen.
You can do it with a game attribute, or a game variant. If I remember right if you choose game variant, you end up doing it with a game attribute anyways. That's because you can specify check attributes in conditions but not variants (Using game attribute check condition). However, you can hide the game attributes, then have your variant use specific attributes. The benefit of doing it this way, is a player would be able to tell which type of game it was without entering the lobby first.
What is the thing which allows you to have this dropdown in the battle.net before you join the lobby? Variant or Attribute?
The one that players choose that's on the same row as color, race, handicap etc is "Attribute". The one that's on the left hand side with options such as "Locked Alliances" etc is "Variant".
Note that publicly joined games can't access the "variant" dropdown under normal circumstances. It's only accessible by using "create game". This is also the setting which will show in the open games list. It's probably the one you want!
Thanks for the replies; got it to work.
As suggested, I created a custom attribute (which does nothing) and several game modes with different names which all have the same player setup.
I then added the custom-game-attribute with its respective default value and hidden to every game mode. In my init triggers I check which value the custom-game-attribute has and run different inits accordingly.
If someone wants to see this in action, download "Crap Patrol 2" (unlocked @ EU) or ask me.
Solved.