Create account / Log in

Keep track of placed Tiles

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Re: Keep track of placed Tiles

Postby inSane » November 27th, 2012, 5:10 pm

Hi,

I just found the correct matching property by using the expression builder (insert constant > string puts "" around Black): {PlayerSide=="Black"} never tried the " around Black myself.

So with 3 right-click options per player, it works :-)

(The automation should reduce those 3 right click options to only 1: Place Tile. When triggered the first time vassal puts the highlight-0 on the tile, in case it's triggered a second time, vassal puts the highlight-2 on the second tile & changes highlight-0 to highlight-1 on the first tile. Don't put to much effort in finding a solution for this, I' m completly satisfied with the current solution)

I updated my version for who's interested.

inSane
inSane
 
Posts: 45
Joined: June 1st, 2012, 4:09 pm

Re: Keep track of placed Tiles

Postby DrNostromo » November 28th, 2012, 5:36 am

I think you're overthinking the problem as you may not be familiar with many of the traits that can be used to do this. I've summed it up with about 8 commands in the StandardTile prototype.

Here's a link to an updated version of your file. You'll find the .vmod and a .txt in the zip file.

Carcassone Fix
User avatar
DrNostromo
 
Posts: 1036
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Keep track of placed Tiles

Postby DrNostromo » November 28th, 2012, 2:08 pm

If you downloaded the zip package before reading this, it's been updated.

Download it again.
User avatar
DrNostromo
 
Posts: 1036
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Keep track of placed Tiles

Postby inSane » November 28th, 2012, 7:22 pm

Hi,

Your first try worked best, second doesn't remove the highlights anymore.

I've added my highlight definitions into my final vmod, but now java runs away with all ram and throws an error when I want to save a game (run out of memory). The same vmod without the highlight definitions works just fine. The definitons in my barebone vmod also work. How can I ever find what's conflicting in my final vmod?

I've uploaded my complete final vmod (removed all tile images except the basegame tiles & all other images, decks, boards, maps and so on still included)
http://users.telenet.be/helaba/

inSane
inSane
 
Posts: 45
Joined: June 1st, 2012, 4:09 pm

Re: Keep track of placed Tiles

Postby DrNostromo » December 2nd, 2012, 2:03 pm

I think you're running into a loop. You're using the same command to produce a clone and then you're using the Replace with Other to remove the original piece. The "other" tile is then cloning and replacing the other clone, which is being cloned and then replaced, etc.

You don't have to replace anything. You should be able to use a Layer trait with a Dynamic Property trait, like I have in the sample I sent you, to handle all of that. In fact, you should avoid using the Clone command altogether unless you have a situation in a game where a duplicate on a piece must be generated during game play.

For example: In the game I'm working on now, I have a particular creature card where, if the player doesn't kill the creature in a certain number of combat segments, another one shows up. That's the only place in the entire mod that I'm using the Clone trait.

I'd give you more help but I don't know the rules of the original Carcassonne and I don't own a hard copy. I'm not clear on what a player is supposed to do during their turn. But, from what I can gather, it appears that the mod has become overly complicated for a fairly simple task. If you could detail to me exactly what a player is supposed to do during their turn, I might be able to give you further assistance ...time permitting.

PS - If you send me an E-mail, I can send you an invitation to my DropBox so that we may exchange files easier.

DrNostromo@DrNostromo.com
User avatar
DrNostromo
 
Posts: 1036
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Previous

Return to Module Design

Who is online

Users browsing this forum: No registered users and 3 guests