Create account / Log in

Card Count Button

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Re: Card Count Button

Postby Cundiff » January 6th, 2020, 1:31 pm

Doc came up with the right answer to the problem. It was this:

Whenever you are testing a module or creating pre-defined setups, you should do so without a username & password. The way to do this is simple enough ...it's just one of those tricks you never hear about. When you start a new game, it asks you for a username and password. Just click "Cancel". This will take you to the game as an observer. You can then freely change sides and set the mod up anyway you like. If it's a pre-defined setup, switch to observer before saving and everything should work.

In Serge's case, you don't get to pick sides because it probably recognizes you as already having a side through the use of a username and password. In this case, open the mod and got to

File -> Preferences -> Personal tab

and delete your username and password. Then close down and restart the mod. This should force the mod to offer you a player side because it's no longer locked into one.

This was something I had heard about, but had no direct education into "how" to do it. Learn something new every day.
Cundiff
 
Posts: 124
Joined: January 3rd, 2017, 8:51 am

Re: Card Count Button

Postby JoelCFC25 » January 6th, 2020, 1:53 pm

You're close in a couple of respects. For creating pre-defined setups, it's not accurate to say you have to delete your password before starting. Simply resigning from any currently occupied player side and taking the "observer" role *BEFORE* saving the file is sufficient.

Also, the username chosen for a given module has no bearing whatsoever on locking to a player side. Only the password matters.
JoelCFC25
 
Posts: 689
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Card Count Button

Postby rgarciap » April 6th, 2020, 12:19 am

DrNostromo wrote:Is there a reason a button needs to be pushed? ...or would a display on the game board showing a running count of the number of cards in everyone's hand work?

The latter would be easier but the former is certainly doable.


Hi there. First time here. I hope not breaking anything with this first post. :)
I'd love to hear how "to display running counts of the number of cards in everyone's hand on the game board". I've just finished the first version of a card game with four players and two sides (north-soth vs west-east). Every player can only see his/her cards but it is important to know how many cards are left in every other players hands.

Thanks in advance,
R
rgarciap
 
Posts: 4
Joined: April 6th, 2020, 12:06 am

Re: Card Count Button

Postby Cattlesquat » April 7th, 2020, 1:58 pm

Hi rgarciap,

The quickie way to do running card counts is by adding a "Game Piece Inventory Window" to your module (in the editor, right click on the master module entry at the top and it will be an option to add). And then you can use the show-only-pieces-matching-expression to filter the things you want to show. If you check "show only folders" then it won't show what the cards actually are, only the count.

Brian
User avatar
Cattlesquat
 
Posts: 327
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Card Count Button

Postby rgarciap » April 7th, 2020, 9:17 pm

Thanks Brian!. I'll give it a try.
rgarciap
 
Posts: 4
Joined: April 6th, 2020, 12:06 am

Re: Card Count Button

Postby rgarciap » April 7th, 2020, 11:12 pm

Hi Brian,

"Game Piece Inventory Window" seems to be what I need but I'm having troubles setting it up.

Config is:

Show only pieces matching ... : {Count == 1} // Count is a marker trait in every card with value 1
Sort and Group By Properties : CurrentMap
Label for folders: $CurrentMap$ : $sum_Cardcount$ card(s)
Show only folders: Ticked
Everything further down is blank

Effect:
Open module -> All cards (54) are in a deck on the main board -> Inventory shows 1 line -> Main Board : 0 card(s)
Hit a button to deal 15 cards to each of the four players -> Inventory shows 5 lines ->
Main Board : 0 card(s)
Player1 Board : 0 card(s)
Player2 Board : 0 card(s)
Player3 Board : 0 card(s)
Player4 Board : 0 card(s)

I tried with 'Label for folders: $CurrentMap$ : $sum_Count$ card(s) and also 'Label for folders: $CurrentMap$ : $sum_valor$ card(s)' where 'valor' is another piece marker trait which is working fine in a 'Mouse-over Stack Viewer', with the same results.

GPIW seems to be 'finding' the cards as lines for all boards containing cards show up but seems to be failing at counting them. I might be doing something wrong but I'm unable to find it.

I was so desperate, I used the 'Save' button in the GPIW and checking the resulting file I found:
: 0 card(s)
Player1 Board : 0 card(s)
Player2 Board : 0 card(s)
Player3 Board : 0 card(s)
Player4 Board : 0 card(s)
Main Board : 0 card(s)

Why that first line with no label and also 0 cards?

Any help would be much appreciated.

R
rgarciap
 
Posts: 4
Joined: April 6th, 2020, 12:06 am

Re: Card Count Button

Postby Cattlesquat » April 9th, 2020, 2:43 am

For your label-for-folders try $CurrentMap$: $sum_pieces$ cards

Also, if that doesn't work, try making the matching condition completely blank (always true) -- just as a sanity check.
User avatar
Cattlesquat
 
Posts: 327
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Card Count Button

Postby rgarciap » April 9th, 2020, 2:59 am

Hi there,

I found out myself. I unchecked 'Show only folders', left 'Label for pieces' blank and everything from there down blank/unchecked (especially 'Draw piece images').

This produces the desired effect of seeing the number of cards in the folder label (using $sum_CardCount$ for instance) without seeing any other information about the cards despite there is a triangle beside each folder label. You can click it but nothing can be seen.

Apparently checking 'Show only folders' produces the (weird) effect of getting 0 for any $sum_XXXXX$ in the folder label which was driving me crazy.

Thanks for the hint.

R.
rgarciap
 
Posts: 4
Joined: April 6th, 2020, 12:06 am

Previous

Return to Module Design

Who is online

Users browsing this forum: No registered users and 5 guests