Looking for Guidance

Yeah, it can be. It should be somewhat fun though too hopefully. Don’t worry about having a lot of this just done manually, btw, especially for a first version. Manually moving masked cards to the board to be revealed from there once all the cards have been placed works well too.

Do you mean the total # playing, or which specific sides/colors aren’t being used? Can I ask where the cards are being placed? As I recall they’re side by side, but is there specific spots for red’s cards, for example? So there might be a gap in the layout if say Green is not being used? Or are they just placed side by side in an area, side/color notwithstanding.

It is definitely fun, slightly frustrating sometimes, but fun. Yeah, that’s a good point, it can be manual at first.

To answer your question, I meant which sides are being used. Card placement is not associated with a side. I currently have a Marker trait called Value for each card. The Primary cards will have their Values compared and be placed in sequential order on the board, regardless of player side. For example, if Red, Blue, and Black are playing, they choose Primary cards of Values 10, 12, and 5 respectively. The lowest card (Black) would be placed in location 1, Red’s 10 would be placed in location 2, and Blue’s 12 in location 3.

Basically, the lowest card will be sent to a specific location with the other cards evenly spaced horizontally after it.

I might be over thinking this. Could I make a function that looks for any card labelled Primary (IF?), then send the lowest Value (Compare?) to a location and then iterates, with position incrementing, until no cards remain? This would eliminate the need to worry about which sides are playing and extra variables of PlayerSide_Primary.

I actually found a good example of this on page 78 of the designer guide. Now I am thinking that I could send all the Primary cards to a hidden Primary deck and then deal them out as I mentioned above using a created Grid. Compared to the example I would need to make sure the hidden deck has Re-shuffle Never, and ensure the cards end up in numerical order.

I have also done a lot more reading of the designers guide. Things are making a little more sense. Correct me if I’m wrong, but it appears that this program operates mostly on keyboard inputs. If I need a button to do multiple things, I need to create separate “actions” for those multiple things (with different keyboard inputs), and the button simply executes those inputs.

How about this… a gkc is sent to any card marked primary that has a value of 0 (or whatever’s lowest). That card is sent to “location 1” + x (x is a numerical global that’s currently 0 – you’d use adv options in Send to Location trait: additional x offset = 100 (or whatever) times $yournumericalXglobal$). Then a gkc is sent to any card marked primary that has a value of 1… same thing: to location 1 + x. Then a gkc is sent to any card marked primary that has a value of 2… same thing: to location 1 +x. Now in the cards’ prototype, if a card is sent via this command then it first incrementally adds 1 to your x global… so the third card sent would go to “location 1” + 100 pixels to the right times 2. The twelve or so gkc’s can be housed (in the appropriate order) in a single multi-action button to be pressed when everyone’s ready. The cards’ set global trait (increments 1) and send to location trait (location 1 + x) can both have the same gkc that is sent to them (I think this might answer your last question). Try it first with the send to location trait below in trait order (your original “location 1” location might need to be -100 pixels to the left, depending on how the extras added).

The sent gkc can be written key command too. Not sure if that’s worded correctly by me, as it’s all still new to me really, but what I mean is instead of “CTRL C” being to sent to the cards, it can be “RunPrimaryCards” instead… and the RunPrimaryCards can trigger both the set global trait to raise the x value by 1, and the send to location trait too. Hope I understood your question okay.

This may have problems I’m not seeing at the moment… it’s just off the top of my head… and might need work if two players can have the same value card. There’s a chance though if 2 cards were the same value it’d add the additional x value to the second of 'em anyway, but depends on how it’s run. I can’t imagine it working perfectly if 3 or 4 players all had the same card value, but maybe. Anyway, try it if you think it might work for you.

There’s newer more advance property expressions now, not detailed in the designer’s guide. Not sure if they’re in the online wiki, but under the Calculated Property trait, click Help then Expression Builder.

Right now I’m wading in from the stairs rather than jumping into the deep end haha. I have successfully adapted the example from the guide to draw a hand from the discard pile. As in the example, I have an irregular grid with a property that is incremented for each card drawn. The cards are drawn into their respective locations every time. I also added a trigger action that resets the property when the discard pile is empty. It works beautifully and I’m rather proud of myself :smiley:

Now that I have gotten that set up, I’m going to attempt to combine those ideas with your suggestions, to get the “reveal” portion set up. I may keep my “ready” button idea, but only use it for the report. Once all players are ready, anyone can click the main toolbar button to reveal the cards on the main board.

It is entirely possible that two (or more) players could have the same value, though somewhat unlikely. That thought had not crossed my mind until now.

Progress!

Cool! I couldn’t find that example (pg 78?), but whatever works, definitely.

I found the deep end quickly haha. I will try to explain my idea in words and then I’ll provide the properties, key commands, etc. and hopefully you can point me in the right direction. I’m still struggling with how this program structures things. I am not sure if certain properties need to be at a module level, board level, or hand level, or if it matters. Watching for keystrokes is also very foreign.

At the bottom of pg 78 there is a section titled “Dealing Random Cards to a Board”. I successfully modified it to get the hand draw squared away. Property related to irregular grid is incremented, combined with Send to Location. I’m now trying to use a similar idea to execute the “reveal”, trying to add on the Value component. Here’s the idea: A button on the main map toolbar triggers all cards with “Primary” values (from all Player Hand windows) to be sent to 1 of 4 locations on the main board, in order. The order is determined by a Marker value property on each card called Value. I have a separate property called ValueCheck that loops from 0 - 99. When Value == ValueCheck, the card is sent to location 1 and the location value increments by 1. This way the next card will go to location 2 once Value == ValueCheck again. When the loop completes, all 4 (or less) cards should be on the main board in order from least to greatest. That’s my idea, but the execution was wrong some how, because literally nothing happens when the button is pressed. There is a couple second pause as if it’s executing the loop or something, but nothing else.

Here is the setup from the bottom up:

Irregular grid on main board with Regions 1 - 4, Global Properties on main board: PrimaryLocation (1-4) and ValueCheck (0-99)

All of these traits are housed in a Prototype called “Reveal” that is applied to all cards (traits in order from bottom to top):
-Trigger Action called Value Loop: Watches for CTRL P, Performs SHIFT I, Repeat keystrokes true, fixed number 99, perform ALT CTRL R when loop completes, create loop index property named ValueCheck start 0 increment 1

-GKC called Value Check: global key command SHIFT I, matching properties {Value == $ValueCheck$}

-Send to Location: keyboard command SHIFT I, region on selected map - main board, region name: $PrimaryLocation$

-Set Global Property: Property Name PrimaryLocation, named map - main board, 0-4, SHIFT I increment numeric value by 1

-Trigger Action called Reset Primary: watch for ALT CTRL R, perform CTRL V

-Set Global Property: CTRL V sets PrimaryLocation to 0

All ties to module level GKC with key command CTRL P, matching properties {$cardselect$ == Primary}

I feel like my idea/plan is solid, but I might have things in the wrong place or maybe missing something. I suppose I need to include something to reset the ValueCheck value, but that is minor. I have tried to include Report Actions to monitor where things go wrong, but nothing is reported, moved, or changed when I press the GKC. Any help is much appreciated!

Ah, found the example on a different page - I might have an old copy.

There’s a couple things that stand out immediately, so I’ll hit those and then take a closer look. One is you’ve got a global property called ValueCheck, as well as a loop (non-global) property of the same name. I’ll have to look at what you’re doing with those, but if you’re using the loop property as a global counter then that will need redoing.

Secondly, clear the “named map” space and then re-set the “Locate property starting in” section of your Set Global Property for PrimaryLocation as: Current Zone/CurrentMap/Module. Your limiting it to the main map might be correct, but I’ve never changed the default and never had a problem with it.

Lastly, you’re mixing the old expressions with the new ones. The $$ are not used in the newer expressions.
{Value==ValueCheck}
{cardselect == “Primary”}

I’ll need to pause there for a moment and then take another look at it. Coding is tough to follow sometimes (actually more than sometimes, at least for me). :smiley:

Just a quick add to the previous… if the trigger action with the (non-global) looping ValueCheck property is in the same prototype or trait window as where it is used (and it’s not used anywhere else), then try deleting the global property of it, make the other changes I listed above, and then try it.

I’ll have a closer look again at all of it as soon as I can anyway…

Here are the changes I made:
I deleted global property ValueCheck.
Changed Send to Location to “Current Zone”.
Moved PrimaryLocation to be a module level global, since it actually got far enough to give me an error message.
Result: Every card in the game (all decks, even sides not playing) except Primary cards were moved to location 4 in one giant stack.

I then went back and removed the dollar signs from the main GKC and the Value Check GKC, and tried again.
Result: Exact same.

I then went back and noticed your quotation marks around Primary. I added the quotes.
Result: Only the Primary cards were sent to the main board, but all in a stack at location 4.

I moved the Send to Location above the Set Global - Primary in the trait list.
Result: Primary cards all went to location 4, but they were in the correct order (highest on top).

They were sent there in the right order. This means that the only problem is the PrimaryLocation incrementing. I think it has something to do with the fact that it increments on SHIFT I (every loop increment) rather than only when a card is sent or Value = ValueCheck. As such, it is already at 4 when it reaches the lowest card (have been using Value 4 by chance).

Thank you again for all your help. I’m so close now!

Hm, I don’t understand the Send to Location change (from $PrimaryLocation$ to “Current Zone”). I’d think the latter would not send any cards anywhere, but you’re reporting they are moving.

I think one problem is that the trigger action and its ValueCheck looping is happening with each Primary card… it should just happen once. My suggestion is to make new copy (new version #) of your module to work on from here (so you have the current one to quickly fall back on if necessary), then try the following…


Add ValueCheck back as a global property (numeric 0-99). Right-click on it when done and add a change button to it (no button text, hotkey: runVC, increment by 1)

Clear the button text of your main toolbar gkc button that sends CTRL P (so like the previous, the button itself should not be visible in the main toolbar window) and then add a hotkey: runCP

Add an action button to main toolbar, button text: (the former text of the above gkc button that you cleared), send hotkeys: runVC and runCP, loop fixed: 99 times

Delete your old trigger action from the cards’ prototype. Add a new trigger action with matching properties: Value=$ValueCheck$&&cardselect=Primary. I prefer the old expressions but new should be: {Value==ValueCheck&&cardselect==“Primary”}. Probably best to stick with the new ones, but… :smiley:. No commands, watches: CTRL P, performs: sendcard1 and sendcard2, in that order.

delete the “Value Check” gkc in the prototype.

In the Set Global Property (PrimaryLocation), change SHIFT I to sendcard1

In Send to Location, change SHIFT I to sendcard2, region on selected map - main board, region name: $PrimaryLocation$

I won’t worry about re-setting those values right now… I probably missed something anyway… but try the above and see what happens. If it doesn’t work, try adding test Report Actions in the prototype to see what is triggering… like a Report Action that reports on CTRL P and prints: ValueCheck=$ValueCheck$, PrimaryLocation=$PrimaryLocation$, etc.

No luck. Made all the changes. The runVC loop works great, runs from 0 to 99 when I put in a report. Primary Location is never incremented and no cards are sent any where. I made a report action and it stays the same value for PrimaryLocation the whole loop.

What is the purpose of having a GKC with matching property set to {cardselect == “Primary”} and runCP hotkey? Shouldn’t the trigger action do all the work if it watches for runCP and has the matching properties as above?

I see the logic behind it all and it makes way more sense that I can name my own operations instead of being tied down to keyboard inputs. I just think the trigger action is the problem at this point.

Sorry it’s not working, but just have to keep at it. You’re right that I’d duplicated the {cardselect==“Primary”}, but shouldn’t matter. Actually, since I agree on the trigger action, I’d remove it from there right now, and then make sure the runCP CTRL P gkc is being sent to the correct four cards.

If so, then add 2 report actions set to trigger with sendcard1 and sendcard2 respectively and make sure those are firing. If those are firing then there’s no reason the Set Global Property isn’t firing. If those aren’t firing, double check the trigger action for any typos. If that checks out, then remove the matching property completely from the trigger action, and make sure it fires then. Once it fires with no matching property, put the matching property back in {Value==ValueCheck}. If it doesn’t fire with that back in, then double check both of those properties or rewrite it… Value=$ValueCheck$… maybe I have the new coding worded wrong.

Good luck!

If I’m not mistaken, I realized that the runCP (CTRL P sent) gkc could just use this as its matching property:

Value=$ValueCheck$&&cardselect=Primary

That drops the trigger action altogether, so switch the sendcard1 and sendcard2 commands (for Set Global Property and Send to Location) to CTRL P for both. There’s so much going on between each loop, it might really help to shorten it as much as possible.

If it still doesn’t work, change the ValueCheck change key to OFFrunVC and then change its initial value to a value of one of the four “cardselected” cards. Try that and see if it at least sends that one card okay w/o the looping process going on in the background.

I initially took off the cardselect=Primary from the gkc and it slowed the process down to a crawl for some reason, but no cards were moved. I had to wait a good minute or two for it to complete. I am not sure how to tell if the gkc is being sent to the correct cards.

I have double checked all of the spelling. I have gone back and changed the trigger to the “old” formatting. I have tried eliminating the cardselect=Primary from the trigger. I put in report actions for sendcard1 and sendcard2 and neither report anything.

I have tried all sorts of things and nothing seems to work. I have not had any cards move at all and the location does not increment. I might try going back to simple settings. Deconstruct everything (probably just remove hotkeys, not delete) until it is just send a Primary card to location 1 button. Then maybe create another global called ValueSet, which is just a constant set by me, and try sending Primary card with Value of 4,12, etc. to location 1. If I can get that to work reliably, it should be a small step to the increments.

I tried putting it together, thinking maybe something was getting lost in all the text… seems to work pretty good! Hope I did it as you initially envisioned it. Card 50 I placed in a hidden player window, as I wasn’t sure if sending commands to those was the problem. Anyway, it was a great idea you had for running it - hopefully this implements it.

Thank you so much for taking the time to make that. The solution (as usual) was quite simple. I changed the key command on the gkc to CTRL P. The hotkey from the button now activates the gkc with CTRL P key command. I tied CTRL P to the trigger action. I copy and pasted your property syntax into the gkc to make sure I didn’t mis-type anything, and took the “matching property” text out of the trigger action. I kept the “sendcard1” and “sendcard2” hotkeys as well.

Essentially all I did was add CTRL P to the gkc and trigger, along with changing some text. It works well now! I also added the “key command to apply to all units ending movement on this map” so that the label clears when the cards are sent. Thanks again for all your help. I am now going to test it over and over with different values, multiple sides, etc. to make sure I can’t break it haha.

I have one last, hopefully simple, question regarding pieces and probably layers. As I mentioned before, some cards will remain “active”, and have counters to mark how many times they have been used or how many turns they are in play. I currently have Markers called Card and Token. They are set in Game Piece Layers with Card above Token. I want the players to be able to drag the tokens and place them anywhere on the card face. Right now the token locks on top of the card in specific location. It is either in that specific location on the card face or off the card. Is there an easy way to remedy this so the Token movement/placement is unrestricted?

I thought I had the Secondary send set up correctly, but it turns out something is wrong. I think I just need to know the proper syntax. I set up the Secondary exactly like the Primary, using another gkc with hotkey “runCS”, which activates a trigger action that triggers a send to location, replacing CTRL P with CTRL S. The send to location is “sendcard3”. I set it up this way to have a different set of matching properties from the gkc.

I have a Marker called CardSide that denotes what side the card belongs to (maybe unnecessary?) for comparison. I was thinking I could send the card with cardselect=“Secondary” and CardSide equal to the previous card moved, but I am not sure how to articulate the second part. The Set Global Property, like the PrimaryLocation increment, changes to CardSide. The global is called SideCard, slightly confusing I know.

The gkc matching properties is {cardselect==“Secondary”&&CardSide==$SideCard$}, tried with and without dollar signs.

If the markers aren’t limited, you can place them in a hidden Game Piece Palette and have them drawn directly to the relevant card via right-click Place Marker trait. Either way, the markers themselves would have a Does Not Stack trait, with the ignore map grid box checked. That and the higher map layer you mentioned will keep them moving freely above the cards.

If both card and marker are moving around though, then having the individual marker instead be a Layer trait on the card generally works better. Players wouldn’t be able to move them then of course, but if the ideal placement above the card depends on the type of card, you could always make different types of Layer traits (with different placements) depending on those card types.

I’ll need to go over the second post again a bit later, sorry. I know you definitely don’t want the $$ with the new code, but w/o (which you tried) looks okay to me. Anyway, it might be easier for me to go through it with test mod, so I’ll report back (and others are welcome to weigh in too, of course, if anything jumps out). Oh, btw, this probably isn’t the problem, but when using commands like CTRL P, be sure not to type them out or copy and paste 'em if that’s even possible (it’d of course be ctrl button P only).

I don’t understand sendcard3. I think I need to know how the secondary cards are played in the game. Are they handled at the same time as the Primary cards, and where are they placed (directly below each same side’s primary card)?

If they’re placed at the same time, then I’d suggest having the primary cards themselves send for the secondary cards when they hit the main board (using your “end movement” gkc that clears the selection layer). They can be sent to primary card’s exact location + whatever additional Y to set them below, for example.