[messages] [Module General Discussion] Looking for Guidance

quiksilver3865 c.king812 at yahoo.com
Fri Apr 21 17:04:32 CEST 2017


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!

_______________________________________________
Read this topic online here:
http://www.vassalengine.org/forum/viewtopic.php?p=53463#p53463


More information about the messages mailing list