randomly placing tokens on a board

Hello,

I’m new to the vassal engine, so any help would be much appreciated.

I’m looking for a script whereby the engine places random type of resources (wood, stone, gold, etc.) from a common pool on random spaces of a predefined part of the board. The number of resources of each type is limited within the pool. Say, there are 7 wood, 5 stone and 3 gold altogether in there. Is there any way to achieve this result with VASSAL?

Thank you for your time.

Yes, see
https://forum.vassalengine.org/t/a-deck-question/1476/1

This is what you want to do in principle. Although this is talking about
dealing a deck of cards it is exactly the same idea of how to do it

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of mustangblaster
Sent: Saturday, August 27, 2011 4:59 PM
To: messages@vassalengine.org
Subject: [messages] Edit: [Module Design] randomly placing tokens on a board

[This message has been edited.]

Hello,

I’m new to the vassal engine, so any help would be much appreciated.

I’m looking for a script whereby the engine places random type of
resources (wood, stone, gold, etc.) from a common pool on random spaces
of a predefined part of the board. The number of resources of each type
is limited within the pool. Say, there are 7 wood, 5 stone and 3 gold
altogether in there. Is there any way to achieve this result with
VASSAL?

Thank you for your time.


Read this topic online here:
https://forum.vassalengine.org/t/randomly-placing-tokens-on-a-board/4216/1

Thanks for the quick reply. I followed the procedure in your post in that thread, but got stuck at selecting a map in the Send To Location trait, as I cannot select any (despite having maps). Also, I don’t know how to establish region points on a map. Maybe the two have got to do something with each other?

When selecting the map, you must select the [Map Window]

Each [Map Window] will have a [Map Boards] and a [Board]. Right-click the [Board] and select Add Irregular Grid. This will allow you to place Region Points on the map.

For example: If you have a primary map called BattleField [Map Window] and you have region points on the map called BF1, BF2, etc., your Send to Location trait would be set to

Destination - Region on Selected Map
Map - BattleField
Region Name - BF1

If you are randomly distributing pieces, then the BF region points would probably be a variable. For example, you could use a variable called DropSpot and have it increase each time a unit is placed. If that’s the case, then the region name above would look like this.

Region Name - BF$DropSpot$

The first piece placed would be placed in BF1. Then DropSpot would be increased by one and the next piece would be dropped in BF2, etc.

Thanks for trying to help me out. I’m still stuck at defining region points. When I add an irregular grid, the window tells me to “drag and drop selected regions to move”, but all I can do is select a territory which then disappears after releasing the mouse button and nothing happens.

Think you need to right click on the map

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of mustangblaster
Sent: Sunday, August 28, 2011 1:41 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: randomly placing tokens on a board

Thanks for trying to help me out. I’m still stuck at defining region
points. When I add an irregular grid, the window tells me to “drag and
drop selected regions to move”, but all I can do is select a territory
which then disappears after releasing the mouse button and nothing
happens.


Read this topic online here:
https://forum.vassalengine.org/t/randomly-placing-tokens-on-a-board/4216/5

Okay, I defined the regions. Now I’m at the part where I should create an “At Stack”, but dunno where to do that.