Help Needed With Counters.

Discuss game box design and sharing.

Moderators: Ichibrothers, Cambronne

RawMessiah
Posts: 19
Joined: 26 Oct 2009, 07:45

Help Needed With Counters.

Post by RawMessiah »

Hello everyone,


I have trouble when I want to have more than one map with counters/figures. I have managed to create one map with counters (they're figures in the game):

Code: Select all

<counter-sheet name="Marines"

front-image-file="Marines.png" front-resolution="300 dpi"
front-mask-file="MarinesMask.png" back-resolution="300 dpi">
<counter-section rows="4" columns="4"
front-left="0" front-top="1" front-right="1103" front-bottom="1020"/>

</counter-sheet>
[/b]


Problem is I want another map with different, round counters, but I don't seem to get it to work. Here is what I try that doesn't work:

Code: Select all

<counter-sheet name="Marines"

front-image-file="Marines.png" front-resolution="300 dpi"
front-mask-file="MarinesMask.png" back-resolution="300 dpi">
<counter-section rows="4" columns="4"
front-left="0" front-top="1" front-right="1103" front-bottom="1020"/>

</counter-sheet>


<counter-sheet name="Blips"

front-image-file="BlipsFront.png" front-resolution="300 dpi"
front-mask-file="BlipsFrontMask.png" back-resolution="300 dpi">
<counter-section rows="3" columns="9"
front-left="0" front-top="1" front-right="1700" front-bottom="680"/>

</counter-sheet>
[/b]


The thing is, it works if I copy the first counter-sheet so I have two "Marines" counters, but when I try to replace the second counter-sheet with different pics (different counters) it won't work.


Anyone have a suggestion?



Thanks in advance,

Andrew
User avatar
Bill Barrett
231
Posts: 351
Joined: 25 May 2008, 13:25

Post by Bill Barrett »

When you say it doesn't work, what exactly do you mean - what error messages are you getting?

Regards, Bill.
RawMessiah
Posts: 19
Joined: 26 Oct 2009, 07:45

Post by RawMessiah »

It won't start the game... I get a pop-up window that says 'error' and it won't run the game.
User avatar
Bill Barrett
231
Posts: 351
Joined: 25 May 2008, 13:25

Post by Bill Barrett »

Yes - but what's the error?
RawMessiah
Posts: 19
Joined: 26 Oct 2009, 07:45

Post by RawMessiah »

OK, I don't dare to say this, but it must be that I'm tired (it's evening here) but I hadn't added the pics in my game-box...

*goes and hides in a corner, red-faced*
bggames01
120
Posts: 38
Joined: 09 Nov 2009, 23:58
Contact:

Post by bggames01 »

When you get the exception click on the blue link in the window and it will give you more information about the error.

Why do you have a back-resolution in there?
RawMessiah
Posts: 19
Joined: 26 Oct 2009, 07:45

Post by RawMessiah »

The counters aren't square, that's why I've added the back-resolution.
bggames01
120
Posts: 38
Joined: 09 Nov 2009, 23:58
Contact:

Post by bggames01 »

back-resolution has nothing to do with the mask. The back of the counters is when you flip them over to their backside.
RawMessiah
Posts: 19
Joined: 26 Oct 2009, 07:45

Post by RawMessiah »

Speaking of that, I have a problem with flipping the counters. Now I'm not a guru when it comes to codes... I have managed to make it so when I flip one counter all the counters flip. I took the example from ZunTzu website but it won't help, any suggestions?
bggames01
120
Posts: 38
Joined: 09 Nov 2009, 23:58
Contact:

Post by bggames01 »

Example:

Code: Select all

<counter-sheet name="Counters1"
 front-image-file="counters1-front.png" front-resolution="150 dpi"
 back-image-file="counters1-back.png" back-resolution="150 dpi">
 <counter-section rows="2" columns="10"
  front-left="30" front-top="45" front-right="782" front-bottom="201" 
  back-left="808" back-top="47" back-right="1560" back-bottom="202"
 />
 <counter-section rows="2" columns="10"
  front-left="30" front-top="216" front-right="781" front-bottom="370" 
  back-left="808" back-top="219" back-right="1560" back-bottom="371"
 />
 <counter-section rows="2" columns="10"
  front-left="28" front-top="386" front-right="781" front-bottom="537" 
  back-left="809" back-top="391" back-right="1561" back-bottom="538"
 />
 <counter-section rows="2" columns="10"
  front-left="29" front-top="555" front-right="781" front-bottom="705" 
  back-left="810" back-top="556" back-right="1563" back-bottom="706"
 />
 <counter-section rows="2" columns="10"
  front-left="28" front-top="722" front-right="781" front-bottom="877" 
  back-left="810" back-top="725" back-right="1562" back-bottom="880"
 />
 <counter-section rows="2" columns="10"
  front-left="29" front-top="892" front-right="783" front-bottom="1046" 
  back-left="808" back-top="897" back-right="1561" back-bottom="1049"
 />
 <counter-section rows="1" columns="10"
  front-left="28" front-top="1063" front-right="783" front-bottom="1140" 
  back-left="808" back-top="1067" back-right="1560" back-bottom="1145"
 />
           
 <counter-section rows="2" columns="10"
  front-left="817" front-top="47" front-right="1567" front-bottom="202" 
  back-left="19" back-top="48" back-right="775" back-bottom="204"
 />
 <counter-section rows="2" columns="10"
  front-left="815" front-top="220" front-right="1566" front-bottom="370" 
  back-left="21" back-top="224" back-right="776" back-bottom="373"
 />
 <counter-section rows="2" columns="10"
  front-left="815" front-top="388" front-right="1567" front-bottom="539" 
  back-left="21" back-top="391" back-right="777" back-bottom="543"
 />
 <counter-section rows="2" columns="10"
  front-left="814" front-top="561" front-right="1565" front-bottom="708" 
  back-left="22" back-top="562" back-right="778" back-bottom="711"
 />
 <counter-section rows="2" columns="10"
  front-left="815" front-top="730" front-right="1567" front-bottom="877" 
  back-left="21" back-top="730" back-right="777" back-bottom="877"
 />
 <counter-section rows="2" columns="10"
  front-left="817" front-top="898" front-right="1567" front-bottom="1046" 
  back-left="20" back-top="898" back-right="775" back-bottom="1046"
 />
 <counter-section rows="1" columns="10"
  front-left="821" front-top="1066" front-right="1572" front-bottom="1140" 
  back-left="14" back-top="1068" back-right="771" back-bottom="1145"
 />
</counter-sheet>
RawMessiah
Posts: 19
Joined: 26 Oct 2009, 07:45

Post by RawMessiah »

One thing I don't get is where the rows and columns come from. In TunTzu's example they had several 'row-10' & 'column - 6', and then some with other numbers. What do they represent? I mean, their example has 6 counters by 3.

Sorry that I'm not a smart-a**... :)
bggames01
120
Posts: 38
Joined: 09 Nov 2009, 23:58
Contact:

Post by bggames01 »

With the 4 coordinates you determine the rectangle of the area where you counters are in that graphic. By using the rows and columns attributes you can have ZunTzu automatically split up that area in equal division by the number of rows (vertically) and columns (horizontally).

So, another example:
Your counter.png has 6 counters on it, from 0,0 to 300,200 (no border around it, just counter).
You could do each counter individually, like:

Code: Select all

<counter-section rows="1" columns="1" 
  front-left="0" front-top="0" front-right="100" front-bottom="100" />
<counter-section rows="1" columns="1" 
  front-left="100" front-top="0" front-right="200" front-bottom="100" />
<counter-section rows="1" columns="1" 
  front-left="200" front-top="0" front-right="300" front-bottom="100" />
<counter-section rows="1" columns="1" 
  front-left="0" front-top="100" front-right="100" front-bottom="200" />
<counter-section rows="1" columns="1" 
  front-left="100" front-top="100" front-right="200" front-bottom="200" />
<counter-section rows="1" columns="1" 
  front-left="200" front-top="100" front-right="300" front-bottom="200" />
But that is just a lot of work. If you say:

Code: Select all

<counter-section rows="2" columns="3" 
  front-left="0" front-top="0" front-right="300" front-bottom="200" />
Now you have replaced those 6 items with just 1, and ZunTzu will do the cutting for you. It will create:
2*3 = 6 counters of equal size
width: 300 / columns = 100 wide
height: 200 / rows = 100 tall

You only say rows and columns once since you always create 1 background for each 1 foreground (never an unequal number). So if you create 6 front counters, you create 6 back counters as well.

ZunTzu will do the same cutting for you on your background counters image, and match up the images.

Foreground image:
A B C
D E F
Background image:
c b a
f e d

Code: Select all

<counter-section rows="2" columns="3" 
  front-left="0" front-top="0" front-right="300" front-bottom="200"
  back-left="0" back-top="0" back-right="300" back-bottom="200" 
/>
And done.
RawMessiah
Posts: 19
Joined: 26 Oct 2009, 07:45

Post by RawMessiah »

THis is how I did, like you explained (the more simple way of doing it):

Code: Select all

<counter-sheet name="Blips" 

front-image-file="BlipsFront.png" front-resolution="300 dpi" 
front-mask-file="BlipsFrontMask.png" back-resolution="300 dpi"> 
<counter-section rows="3" columns="9" 
front-left="0" front-top="1" front-right="1700" front-bottom="680"/> 

</counter-sheet> 

It works for me, but it flips all the counters at the same time. Now, is it a big deal if you have the counters like this:

OOOOOOOOO
OOOO
OOOOOOOOO

Those represent the counters.

I can drag the counters, no problems, but they all flip at the same time.
bggames01
120
Posts: 38
Joined: 09 Nov 2009, 23:58
Contact:

Post by bggames01 »

You have not set the back-image-file, nor back-mask-file, and you have not set any of the counter-section back-left, back-top, back-right, back-bottom.
RawMessiah
Posts: 19
Joined: 26 Oct 2009, 07:45

Post by RawMessiah »

Sorry, this was the real code:

Code: Select all

<counter-sheet name="Blips"
		front-image-file="BlipsFront.png" front-resolution="300 dpi"
		front-mask-file="BlipsFrontMask.png"
		back-image-file="BlipsBack.png" back-resolution="300 dpi"
		back-mask-file="BlipsBackMask.png">
		<counter-section rows="3" columns="9"
		front-left="0" front-top="1" front-right="1350" front-bottom="450"/>
	</counter-sheet>

I'll do what you asked me to do. Let's see if I get it to work.
Post Reply