Page 1 of 2
[SOLVED] Gender of player.
Posted: 20 August 2015, 22:56
by Rudolf
Hello,
could someone explain how I can get the sex of a player from table (and value? male/female/undefined).
thanks.
Re: Sexe of player.
Posted: 21 August 2015, 02:25
by pikiou
This is not possible.
If you want to write about a player (e.g. in the logs) you should try to avoid words with a gender. It usually is possible: Rudolf plays his last card -> The last card of Rudolf's hand is played
If you really can't, use "he/she", "his/her", 'him/her', 'his/hers'...
Else $gender = rand(0, 1) ? 'male' : 'female'; //:P
Re: Sexe of player.
Posted: 21 August 2015, 07:49
by Rudolf
The fact is that in my game I use board for "mister" or board for "miss" according to gender. That's why I need the gender. But this exists, so there is a way to get it?
Re: Sexe of player.
Posted: 21 August 2015, 16:46
by Coin-coin le Canapin
I should let pikiou or any other experienced BGA studio developper reply to your question, but there is no reference to the player gender in the game database. And I don't think you can get information from other databases.
Re: Sexe of player.
Posted: 21 August 2015, 21:34
by pikiou
Rudolf are you telling me that in the real board game you're adapting, if say it's limited to 5 players, there are 5 boards for men and 5 boards for women?
Re: Sexe of player.
Posted: 22 August 2015, 16:31
by Rudolf
It's one of my original ideas

... and it will be a "marque de fabrique" of some of my games...
Each player board is recto-verso, one face for man, one for woman ... as for the cards

So I detect if a woman plays, all faces of her material are verso.
If not decided, I mix the material.
It's in the spirit of the game.
Re: Sexe of player.
Posted: 23 August 2015, 16:26
by qwertasdfg
Maybe just let each player decide in their first turn if they want the mister or the miss board. Then you immediately know how to refer to them from that point on
Re: Sexe of player.
Posted: 23 August 2015, 19:59
by Rudolf
Yes, that was the thing I planned to do, but because players choosed already a gender in their profile, I thought it would be a lost of time to do it... I remember now we already discussed of this suggestion berfore...
Re: Sexe of player.
Posted: 23 August 2015, 20:13
by Coin-coin le Canapin
I agree that would be a neat feature to know each player gender.
Re: Sexe of player.
Posted: 27 August 2015, 14:25
by Rudolf
!!!!!!!!!!!!!!!!!!!!!!!!!! I'VE FOUND A WAY TO DO IT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
it's not simple, but it works:
You search in "
http://fr.boardgamearena.com/#!table?table=NNNN" where NNNN is table number for div gender_PPPPPPP where PPPPPPP is the player id. (it's in active_player_small_infos_block div)
Then you ask for this div if it has class icon20_gender_0 (it's a girl) .... icon20_gender_1 (it's a boy) .... or if icon20_gender_ (it's undefined!!!)
I accept "Champagne"
