Tiles with "hotspot" and Counters related actions

Hi from a new member… i’m italian, so sorry for my bad english.

I’m trying to achieve some “auto” features for a module about a game i’m trying to design.

This game have a board based on tiles, which can be rotated. Looking at some modules i’ve done it.

Now, these tiles have some squares with different “properties”, different from the normal ones.

  1. Some block movement and LOS
  2. Some needs to be choosen randomly as “spawn points”
  3. Some are “Hotspots”, and have an identifier color.

Now, the counters, related to these type of terrain:

  1. Can’t see, and can’t move through them (BUT they can if they gain “fly”)
  2. Must be placed randomly in these “spawn points” when they…well, “spawns” :slight_smile:
  3. When a counter is on a HotSpot:
    If they are of the same color, they can do certain actions, otherwise some else. When a counter is not on a HotSpot, they can just do the “basic actions” (always available).

I’m a programmer, so i can easy understand how “properties” works. But i’m a newb in Vassal, so i need to “know the environment” and to be addressed a bit.

So, finally, my initial questions are:
q1) How to implement “locations” (or terrain features) on a “Tile System” game?
q2) How to make a Counter “aware” of his location?
q3) What’s the best way to change a counter menu depending on his location WITHOUT PROGRAMMING custom classes? (i may want to pass the module developement to a non programming friend…)

Thanks!

Unfortunately, there is no easy way to do what you want to do without programming custom classes. VASSAL is currently unaware of terrain properties.

Since you’re using tiles, there are some fairly advanced tricks that you can use, however. For example, when a unit moves on the board, the board can trigger a key on all your terrain piece which triggers a key on the unit that moved which then changes a property.

For example, in the main map, you can set the Key command to apply to all units ending movement on the map which then triggers a Global Key Command with range of zero in the piece that moves which then, in turn triggers a Global Key Command in the terrain piece (also with a range of zero) which changes a property in the piece that moved. This property is then used to restrict commands.

Main map (key command) → Game Piece (Global Key Command – range 0) → Terrain (Global Key Command – range 0) → Game Piece (Dynamic Property)

It sounds bad, but VASSAL really wasn’t designed to do what you want. It is doable though.

  • Michael.

2009/1/13 Parduz <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>

Post generated using Mail2Forum (mail2forum.com)

mkiefte:
thanks for your fast answer.

I’ve understood the whole chain of events you’ve described… what i can’t catch is how to tie it to a specific location of the tile (keeping in mind that tiles can rotate… i guess that if they were fixed we can manage some sort of “switch() - case” statement…

Some questions (i’m just thinking loud, now):

  • is it possible to build a “super tile” that holds some “invisible” counters on it, and chech the Counter position against them to show/hide menus?
  • Instead of rotating the tiles, can be useful to make one layer for each “rotation” (with a corresponding bitmap: basically we “fool” the eyes) and arrange an array of “special location” for each layer, to check the Counter position?

q1) You can define your locations in the map editor - there is no terrain par se. For that you would have to define either on your tiles somehow (if they represent the terrain and are randomly placed) or use invisible At start stacks with all the property information you will need to reference (see Downtown module as an example of this).

q2) You can only make your counter “smart” by executing triggers / applied movement keys, gkc’s against properties and check its state. If there is a match it will execute/perform whatever its told to do at that state.

q3) Hide with the Restrict Commands trait. The counter will have every command available to it, you just need to use the Restrict Command trait to hide the commands not allowed when certain properties / conditions exist and the command will be hidden from view/access

From: Parduz messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Tuesday, January 13, 2009 7:55:59 AM
Subject: [Module Design]Tiles with “hotspot” and Counters related actions

Hi from a new member… i’m italian, so sorry for my bad english.

I’m trying to achieve some “auto” features for a module about a game i’m trying to design.

This game have a board based on tiles, which can be rotated. Looking at some modules i’ve done it.

Now, these tiles have some squares with different “properties”, different from the normal ones.

  1. Some block movement and LOS
  2. Some needs to be choosen randomly as “spawn points”
  3. Some are “Hotspots”, and have an identifier color.

Now, the counters, related to these type of terrain:

  1. Can’t see, and can’t move through them (BUT they can if they gain “fly”)
  2. Must be placed randomly in these “spawn points” when they…well, “spawns” :slight_smile:
  3. When a counter is on a HotSpot:
    If they are of the same color, they can do certain actions, otherwise some else. When a counter is not on a HotSpot, they can just do the “basic actions” (always available).

I’m a programmer, so i can easy understand how “properties” works. But i’m a newb in Vassal, so i need to “know the environment” and to be addressed a bit.

So, finally, my initial questions are:
q1) How to implement “locations” (or terrain features) on a “Tile System” game?
q2) How to make a Counter “aware” of his location?
q3) What’s the best way to change a counter menu depending on his location WITHOUT PROGRAMMING custom classes? (i may want to pass the module developement to a non programming friend…)

Thanks!


Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org

Post generated using Mail2Forum (mail2forum.com)

2009/1/13 Parduz <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>

I don’t quite follow. I had thought that the tile itself was the terrain. If there is fixed terrain, then see Tim’s reply.

If the behaviour of the tile changes when you rotate it, then you’re in trouble. You could, instead of rotating the tile itself, use Replace, with manually rotated tiles that define their own behaviour. But that’s starting to sound really painful.

I don’t think that’s really different then the first question. Invisible counters are easy enough to make. I don’t know what their relationship to the super tile would be though. If they are always in the same place relative to the super tile, then it gets very difficult.

That may not be so easy. In some cases, if things get really complicated, you should just use a Replace trait. Changing layers is not going to let you change behaviour except in really easy cases (like the behaviour can be defined in terms of the layer index easily).

  • Michael.

Post generated using Mail2Forum (mail2forum.com)

2009/1/13 Timothy Mccarron <timothy.mccarron@sbcglobal.net (timothy.mccarron@sbcglobal.net)>

That will work with fixed terrain, but if the terrain is defined by tiles, I don’t see how that’s going to work.

If your terrain is quite sparse (like a couple of objective cities), you could just use a restrict access trait on the basis of hex number.

One thing I’ve never tried though: if you have a lot of objective cities that all provide the same command to units that are in the area, can you use a single zone name to restrict commands? Can you have a bunch of zones with the same name in addition to the standard grid? Or would that work at all?

  • M.

Post generated using Mail2Forum (mail2forum.com)

Sorry, my fault for not have been more clear:
thinks at my tiles as a grid of 8x8 squares. Some squares are trees (blocks LOS and movement), some are “holes” in the grass (Spawn points), some are “burrows” (where you -as a rabbit- can heal you if it is YOUR burrow, or steal somewhat if it is not your).
The whole game table is built by some of these tiles, rotated and placed in a pattern.
What it changes, when i rotate a tile, is the locations of these “special squares” related to the Vassal map coordinate system. That’s my problem with rotations and “location check”.

Tim, thanks for your help.
I admit that i don’t understand your answer to q1. Can you please explain it better? sorry for being tedious, i’m trying to learn form samples and modules, but it is not easy.

If the terrain is defined on the tiles themselves, you basically have to do a relay loop to use it.
i.e:
piece moves on to tile - execute GKC range 0 property match = terrain tile
Tile gets activated, executes a GKC back to the piece that just moved to give it the information it needs and if necessary activates a passive listening trigger on the piece to carry on doing whatever the piece needs to do

next part - yes you can use the CurrentZone property if the command on all the objectives are same but no you cant have multiple same name zones without confusing it, most likely get some kind of error if you try to do that if I remember right when saving module

From: Michael Kiefte mkiefte@dal.ca
To: VASSAL Engine Forums Mailing List messages@forums.vassalengine.org
Sent: Tuesday, January 13, 2009 9:04:52 AM
Subject: Re: [Module Design]Tiles with “hotspot” and Counters related actions

2009/1/13 Timothy Mccarron <timothy.mccarron@sbcglobal.net (timothy.mccarron@sbcglobal.net)>

That will work with fixed terrain, but if the terrain is defined by tiles, I don’t see how that’s going to work.

If your terrain is quite sparse (like a couple of objective cities), you could just use a restrict access trait on the basis of hex number.

One thing I’ve never tried though: if you have a lot of objective cities that all provide the same command to units that are in the area, can you use a single zone name to restrict commands? Can you have a bunch of zones with the same name in addition to the standard grid? Or would that work at all?

  • M.

Post generated using Mail2Forum (mail2forum.com)

I see where i was not clear. Sorry to you both.
The pieces are ALWAYS on a tile. My tiles are a grid of squares: what it changes are the “features” of some of that squares.

In that case, create a rectangular grid in the map editor, then create and place universal tiles on eachgrid space using at start stacks. These universal tiles would utilize layers and dynamic properties to control their display, type, function, rotation etc…
You can then reference these fixed universal tiles either by DP’s, grid location etc…

From: Parduz messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Tuesday, January 13, 2009 9:48:32 AM
Subject: [Module Design]Re: Tiles with “hotspot” and Counters related actions

Tim M wrote:

I see where i was not clear. Sorry to you both.
The pieces are ALWAYS on a tile. My tiles are a grid of squares: what it changes are the “features” of some of that squares.


Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org

Post generated using Mail2Forum (mail2forum.com)

This sounds very tricky. At some point, you may want to consider writing a custom class.

  • M.

Post generated using Mail2Forum (mail2forum.com)