Looking for Guidance

All right. Got it working…maybe haha, but it’s a start. I finally had some time to do more iterative testing. I basically started from scratch and slowly built as I tested. I ended up with the exact same structure as the Primary components. Currently:

Main “Reveal” action button runs additional hotkey (called it runCS)
Hotkey triggers module level gkc with properties {cardselect==“Secondary”}
Module gkc triggers a trigger action (maybe unnecessary?), which triggers a prototype level gkc
Prototype level GKC has matching properties {CardSide==$CardSide$} and triggers Send to Location
Send to location is set to map region {$PrimaryLocation$+20}

At this point, the Secondary card is sent to the first location. I will have to test it with multiple sides to see how that plays out. When I select multiple Secondary cards, all of them are sent to location 1, because it sends all Secondary cards with matching side. I will have to test more. It’s so close! Thank you again for all your help. I will let you know how it turns out.

I tested the game with multiple sides and it did not work. For some reason, the Primary portion would work fine if I only selected Primary cards. When I selected a Primary and Secondary from each side, every card in the game (all sides) was sent to the first Secondary location.

I then changed a few things around and got rid of the gkc I questioned above. I think I might have it working. I was trying to use your idea of “Another counter selected by properties” in the Send to Location action. As it stands, the Secondary card always appears on top of the Primary card. After a few tries, I went back into the Send to Location trait and realized there was no offset (even though I set one). I continuously closed and reopened the trait. Every time I checked the box, put in an offset, and hit ok, it reset back to no offset (advanced options unchecked). When I check the box, my offset settings are still retained (values are filled in correctly).

Any thoughts on this? All I need is to get this offset working and I think I’ve got it.

Sorry for the delay, yeah, it unchecks for me too, but the info inside still works. Make sure you still have a region for the card to go to (or it may snap up to the closest one available) and your Y difference is correct (probably like 500 or more, depending on card size).

Additional Y: 500 times 1

Looks like you were right. I made sure the “snap to grid” was checked and added a few more pixels to the offset and it works. Now, the secondary cards both (I am testing with two sides) go to location 21 (the correct location for the first secondary card). However, I get this message in the chat window:

Bad Data in Module: Expression evaluation error Expression={(CurrentBoard==“Gameboard”) && (LocationName==1||2||3||4) && (CardSide==$CardSide$)}, Error= inline evaluation of: ``_xyzzy=_plugh();’’ internal Error: Unimplemented binary String operator

This expression is the counter properties expression in the Send to Location trait. I was not sure what the binary string operator was referring to, so I deleted the quotation marks around gameboard. Without quotations, none of the secondary cards are sent anywhere. Does it have something to do with the location being an OR function and not a specific place?

I’m not sure how that’s properly written out with the newer expressions, sorry. Here’s the old expression if you don’t mind using it:

CurrentBoard=Gameboard&&LocationName=~1|2|3|4&&CardSide=$CardSide$

Hope that helps.

I tried the old expression and the secondary card does not move (I only tried with one side). I think the problem could be that the secondary is part of the loop. It might be better to either have a whole separate set of actions for sending the secondary cards, or add a trigger action for when a card is in location 1, 2, 3, or 4. If a trigger action had a matching property of one of those location names, the primary card could “pull” it’s secondary into place. Either way I would end up using the same send to location syntax, but maybe one of these ways will work.

Yes, I thought I’d mentioned that but maybe I didn’t or didn’t do so clearly. Sorry about that. But yeah the secondary actions should not be part of the loop; they should be triggered solely by the primary cards hitting the main board. CTRL 3 (board ‘end movement’ gkc) tells the primary card to send for its secondary card… the “Reveal” loop button is used solely for the primary cards.

And make sure the Send to Location in the secondary cards is below any markers in trait order. So below CardSide and the “secondary” designation (forget the name of that dynamic property at the moment).

I added a secondary card to the primary test mod. I only added one player color (blue) as I only had the one player board (P2) already made up. I only quickly tested it, and again only with the one player board, so any problems or questions when expanding it, feel free to let me know. Sorry again about not being clear re its trigger.

Thanks for throwing that together. Yours looks like it works no problem. I went through and copied everything. I changed the board names from P1, P2, etc. It still does not work. I honestly do not know what is wrong. I went through and made sure all of the trait orders matched. I literally copy and pasted your syntax for the send to location and gkc related to the secondary. The primary card works flawlessly. I’ve got all the resets programmed so I can run the Primary over and over again without issue. The secondary will still not even move though. Any suggestions as to how I could figure out where it is failing? This is getting slightly frustrating.

Out of curiosity couldn’t you clean up the code a little bit and say CurrentBoard!~Gameboard instead of CurrentBoard=~P1|P2|P3|P4 ?

Yeah, I hear you. Sometimes it’s like HAL’s just sitting there saying, “Sorry, Dave, I’m afraid that’s not it either.”

You said you changed your board names to P1 etc… double check it was a board name change and not the map name. Double check that any pieces already added to those boards (cards/decks, etc) belong to those new board names (via at-start stack properties or deck properties, etc).

Another thing I’d check again is instances of CTRL 3 (your map-based GKC)… make sure you’re using ctrl button 3 for the keyboard command (in the primary cards’ gkc trait that sends for the secondary cards) and not typing in CTRL 3. Then make sure it’s ctrl button 3 for the map too.

Then I’d add a test Report Action (reporting “primary cards”) triggered by CTRL 3 and add it to your primary cards, then add a test report action “secondary cards” triggered by sendSecondary and place that one in your secondary cards’ prototype. Run that. If the CTRL 3 trigger report action didn’t fire once for each primary card hitting the main map, then something’s wrong there. If it did, and the “sendSecondary” report action didn’t fire, then something’s wrong with the primary’s gkc trait that sends for them. If both fired, then something’s wrong with the secondary cards getting the message to move but not moving.

Hopefully that will narrow the problem down. You can also eliminate the matching properties on some of these traits and add 'em back in one by one.

And yeah you could use CurrentBoard!~Gameboard instead, or even remove that part altogether if it doesn’t matter.

Good luck!

I have only had a small amount of time to do some testing. I know that the CTRL 3’s are all control plus 3 and not typed, especially since the Primarys are working. Once I have time I am going to sit down and work step by step.

One problem I have had since the beginning is a lot of my Report Actions do not seem to work, and I do not know why. For example, if I put an Action using CTRL 3 like you suggested, nothing happens when I manually change the card or when the Primary transfer clears them. Does the report action need to be below cardselect in the trait list?

Another question along the same lines is: should all of the secondary actions occur below the primary actions in the trait list?

I don’t know why your Report Action is failing to trigger. It shouldn’t matter where it is in trait order, a RA watching for CTRL 3 should report that when it occurs. When you say this doesn’t happen when you manually change the card yourself, I presume you have a “cleared” cardselect status that operates on a key command of CTRL 3… so you manually trigger that yourself, successfully, but still the RA doesn’t note anything? I just don’t understand it, sorry.

I didn’t realize the primary and secondary cards would be the same cards, but don’t see any problems combining their traits, and don’t believe the trait order between the two would matter (apart from making sure the Send to Location to send secondary cards is below any markers, like CardSide).

I might try adding a few things to that test mod I’d used before just to see if we can figure this out.

All right. I think I got it working. I started from scratch and took it one step at a time. I got the card to send to a specific location on the main board, then I switched to “another counter” and used the specific “BasicName” of the Primary card to send it on top of the card (same location as Primary). At this point (fingers crossed), it seems to be working. I will just need to test it with multiple sides over the weekend.

The interesting thing that I discovered by starting extremely basic is that the changes I made to the Send to Location trait were not carried over to the game immediately. I would make a change, open a new game, and it wouldn’t work. I was at a point in the beginning where I was like “Ok, I KNOW this should be working”. I saved the module, closed it, reopened it, and it worked just fine. I have been doing that with every change at this point, just to be sure. I’m wondering if I had everything right at some point but I thought it wasn’t working.

Great! Sounds like a different approach, and I’m not really understanding the ‘another counter’ process you’re describing, or how (the secondary card?) knows the BasicName of the card selected as Primary, but as long as it works for you! I ended making a few changes to that test mod, so will post it anyway since I have it, but hope it doesn’t get in the way of what you have going. So have a look if need be, but it does sound like different approaches at this point, so not sure it’ll help.

Re the added test mod, I added the selection process for the cards and some report actions. Sign-in as Player 3 (red cards). I added the other player windows, with two start-up gkc’s that auto-select all the other relevant cards in order to run the test.

I found I had a slight typo in the PrimaryLocation global… it should be initial value of 0, with 0-4 as its numerical values (I had 0, 1-4).

I changed the ‘ends movement’ gkc for Gameboard to: GameboardGKC, as I didn’t want the CTRL 3 selection of clearing a card’s status to initiate a secondary card draw. So the relevant gkc trait in the pieces prototype (which is now used by all the cards - I combined the two separate prototypes I’d had previously) is now triggered by GameboardGKC. I also changed its matching properties to: CurrentBoard!=Gameboard&&CardSide=$CardSide$&&cardselect=Secondary, which you’d suggested. Oh, that first part (CurrentBoard!=Gameboard) is needed I found (I thought maybe it could dropped altogether in a previous post) or the cards go infinite loop when they hit the main board.

You can switch which of the cards you select as primary/secondary and their placement in the order on the main map changes. It’d need something added later to prevent a player from accidentally selecting more than one primary and secondary card of course, but just wanted this part working. Hope it helps, although as I say it sounds like a different set-up than yours. Any questions regarding it though, just ask.

Good luck!

Thanks for making that! I tested it with two sides and it sort of works. Right now all of the secondary cards are sent to the location of the last primary card. For example, if there are two primary cards, all the secondary cards end up in location 22, three secondary cards all end up in 23, etc. In other words, it is not separating the cards by side. Here are my current syntaxes:

GKC: (cardselect==“Secondary”) && (CurrentBoard!=Gameboard) && (CardSide==$CardSide$)

Send to Location match: {(CurrentBoard==“Gameboard”) && LocationName=~“1|2|3|4” &&(CardSide==$CardSide$)}

When I added the LocationName I got the binary error, so I added quotes. I had read something about the =~ operator only working by separating the values, such as LocationName=~1|LocationName=~2|…etc. It has to be some sort of syntax problem, but I do not understand what it could be. The way you have it set up (GameboardGKC on clear) it looks like it would fire one time for each card. Maybe that is my problem. Right now it only fires once per “turn” after all the primary cards are in place. I will try your method and see if I can get it to work.

I realize now your previous shorthand for “another counter” was for the send to location… that should’ve been obvious to me. For that test, I should’ve put CardSide in their own prototypes (red, blue, yellow, etc)… so you’d have two prototypes in each card: one for their assigned color (which would be different for each player’s cards, if I have the game’s set-up right) and one for all the cards in general (which I called “pieces” for some reason). The prototype holding the CardSide marker (or the marker itself, as I have it in that test) has to be above the generic prototype for the cards in trait order. So if all the players have their own cards, with their own colors, then CardSide should work as the “another counter” selection property.

Re your expressions… as I say I prefer the older style, so don’t quote me on these… but for the gkc: Gameboard needs to be in quotes (like you have in the second one) because that’s its actual name, while CardSide (second one in that line) should be free of any additions, and the whole thing needs {} around it I think. I’d write it as:

{cardselect==“Secondary” && CurrentBoard!=“Gameboard” && CardSide==CardSide}

… which I just tried in my test mod and it seems to work.

I had it written (in old syntax) as: CurrentBoard!=Gameboard&&CardSide=$CardSide$&&cardselect=Secondary

For the Send to Location one however… I think I’ve mentioned that I have no idea how to use =~ in the new syntax. So I’m sorry but I can’t write that out in the new format, except (or so I thought) to remove that portion of it altogether. I thought simply removing that part would work (as long as there would be no other cards of each color type on the Gameboard), but found I couldn’t get it to work. I tried both of these:

{CurrentBoard==“Gameboard” && CardSide==CardSide}

{CurrentBoard==“Gameboard”&&CardSide==GetProperty(CardSide)}

…and neither worked for me. It might be that I’m still on 3.2.16… or it might be that I’m just not very good with the new syntax. Anyway, I tried it with the old syntax (with that part removed), just to see if the idea itself was okay, and it did seem to work:

CurrentBoard=Gameboard&&CardSide=$CardSide$

So anyway I would recommend, for the Send to Location at least, just using the complete old syntax of:

CurrentBoard=Gameboard&&LocationName=~1|2|3|4&&CardSide=$CardSide$

…which I definitely know works. Hope this all made sense.

Hahaha, the whole time it was just a syntax issue, as I suspected. I copy and pasted the syntax for the send to location and it works!!! I would swear I had tried that syntax at some point, but who knows. Maybe it was as I mentioned before and the changes were not carried over in one of my tests. Either way, I just tried it with two sides and it works! I will probably do a lot more testing just to make sure though. I cannot thank you enough for all your help! I don’t know if I would have gotten this far without your input. Thanks again!