[SOLVED] Gender of player.

Game development with Board Game Arena Studio
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

[SOLVED] Gender of player.

Post by Rudolf »

Hello,
could someone explain how I can get the sex of a player from table (and value? male/female/undefined).
thanks.
Last edited by Rudolf on 27 August 2015, 14:32, edited 3 times in total.
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: Sexe of player.

Post 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
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: Sexe of player.

Post 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?
User avatar
Coin-coin le Canapin
Posts: 163
Joined: 31 January 2013, 19:00

Re: Sexe of player.

Post 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.
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: Sexe of player.

Post 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?
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: Sexe of player.

Post 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.
User avatar
qwertasdfg
Posts: 297
Joined: 17 June 2013, 18:26

Re: Sexe of player.

Post 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
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: Sexe of player.

Post 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...
User avatar
Coin-coin le Canapin
Posts: 163
Joined: 31 January 2013, 19:00

Re: Sexe of player.

Post by Coin-coin le Canapin »

I agree that would be a neat feature to know each player gender.
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: Sexe of player.

Post 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" :)
Post Reply

Return to “Developers”