Masks

Do you need help installing or using ZunTzu? Would you like to report a bug?

Moderators: Ichibrothers, Cambronne

Post Reply
User avatar
Uhlan
Posts: 11
Joined: 08 Oct 2017, 20:57
Location: Maryland USA
Contact:

Masks

Post by Uhlan »

I haven't used masks in my ZunTzu boxes until I did 1776. It worked great and really enhanced to look of the counters against the map I worked very hard on.

Now I'm working on a new entry for my Last Full Measure series and the masks will not function. I get no errors, have checked and rechecked the syntax, the masks are the exact same size width x height as the counter images, and function perfectly in 1776, but here, with the masks installed, you can't access the counters - they display, but don't function. Load a scenario and no counters appear on the map. Take out the mask references and everything works fine.

I can't figure this out at all, except it's a memory issue; my LFM game is larger in every respect than 1776. That's the only thing I can figure the problem is.
Image
User avatar
Edgar
020
Posts: 16
Joined: 21 May 2007, 07:59
Location: Pamplona, Navarra

Re: Masks

Post by Edgar »

Have you tried to use another mask file (no need to have all the mask well defined, only one part of it)?
User avatar
Uhlan
Posts: 11
Joined: 08 Oct 2017, 20:57
Location: Maryland USA
Contact:

Re: Masks

Post by Uhlan »

Yup. I get no errors, the counters show up, but you can't grab any, the whole screen moves like the maps/charts. I have marker counters and unit counters and tried only masking the markers - no go. Only the units, same deal.

I used masks in my 1776 ZT box that work. Here's the gamebox code:

Code: Select all

	
	<counter-sheet name="Counters"
		front-image-file="1776counters.jpg" front-resolution="300 dpi" front-mask-file="counter_mask.png"
           back-image-file="1776countersb.jpg" back-resolution="300 dpi" back-mask-file="counter_mask.png">
          <!-- Row 1 -->
		<counter-section columns="2" rows="1" front-left="0" front-top="0" front-right="300" front-bottom="150"
                                                 back-left="1200" back-top="0" back-right="1500" back-bottom="150" supply="15" shadow="20" />
		<counter-section columns="5" rows="1" front-left="300" front-top="0" front-right="1050" front-bottom="150"
                                                 back-left="450" back-top="0" back-right="1200" back-bottom="150" supply="5" shadow="20" />
		<counter-section columns="3" rows="1" front-left="1050" front-top="0" front-right="1500" front-bottom="150"
                                                 back-left="0" back-top="0" back-right="450" back-bottom="150" supply="1" shadow="20" />
          <!-- Row 2 -->
		<counter-section columns="1" rows="1" front-left="0" front-top="150" front-right="150" front-bottom="300"
                                                 back-left="1350" back-top="150" back-right="1500" back-bottom="300" supply="1" shadow="20" />
		<counter-section columns="2" rows="1" front-left="150" front-top="150" front-right="450" front-bottom="300" supply="4" shadow="20" />
		<counter-section columns="4" rows="1" front-left="450" front-top="150" front-right="1050" front-bottom="300"
                                                 back-left="450" back-top="0" back-right="1050" back-bottom="150" supply="8" shadow="20" />
		<counter-section columns="1" rows="1" front-left="1050" front-top="150" front-right="1200" front-bottom="300"
                                                 back-left="300" back-top="0" back-right="450" back-bottom="150" supply="12" shadow="20" />
		<counter-section columns="2" rows="1" front-left="1200" front-top="150" front-right="1500" front-bottom="300"
                                                 back-left="0" back-top="0" back-right="300" back-bottom="150" supply="8" shadow="20" />
          <!-- Row 3 -->
		<counter-section columns="2" rows="1" front-left="0" front-top="300" front-right="300" front-bottom="450"
                                                 back-left="1200" back-top="0" back-right="1500" back-bottom="150" supply="15" shadow="20" />
		<counter-section columns="3" rows="1" front-left="300" front-top="300" front-right="750" front-bottom="450"
                                                 back-left="750" back-top="0" back-right="1200" back-bottom="150" supply="10" shadow="20" />
		<counter-section columns="2" rows="1" front-left="750" front-top="300" front-right="1050" front-bottom="450"
                                                 back-left="600" back-top="0" back-right="900" back-bottom="150" supply="5" shadow="20" />
		<counter-section columns="2" rows="1" front-left="1050" front-top="300" front-right="1350" front-bottom="450"
                                                 back-left="150" back-top="0" back-right="450" back-bottom="150" supply="4" shadow="20" />
		<counter-section columns="1" rows="1" front-left="1350" front-top="300" front-right="1500" front-bottom="450"
                                                 back-left="0" back-top="300" back-right="150" back-bottom="450" supply="2" shadow="20" />
          <!-- Row 4 -->
		<counter-section columns="4" rows="1" front-left="0" front-top="450" front-right="600" front-bottom="600"
                                                 back-left="900" back-top="450" back-right="1500" back-bottom="600" supply="5" shadow="20" />
		<counter-section columns="2" rows="1" front-left="600" front-top="450" front-right="900" front-bottom="600"
                                                 back-left="600" back-top="450" back-right="900" back-bottom="600" supply="2" shadow="20" />
		<counter-section columns="2" rows="1" front-left="900" front-top="450" front-right="1200" front-bottom="600"
                                                 back-left="450" back-top="450" back-right="750" back-bottom="600" supply="5" shadow="20" />
		<counter-section columns="1" rows="1" front-left="1200" front-top="450" front-right="1350" front-bottom="600"
                                                 back-left="150" back-top="450" back-right="300" back-bottom="600" supply="2" shadow="20" />
		<counter-section columns="1" rows="1" front-left="1350" front-top="450" front-right="1500" front-bottom="600" supply="4" shadow="20" />
          <!-- Row 5 -->
		<counter-section columns="2" rows="1" front-left="0" front-top="600" front-right="300" front-bottom="750"
                                                 back-left="1200" back-top="600" back-right="1500" back-bottom="750" supply="20" shadow="20" />
		<counter-section columns="3" rows="1" front-left="300" front-top="600" front-right="750" front-bottom="750"
                                                 back-left="750" back-top="600" back-right="1200" back-bottom="750" supply="5" shadow="20" />
		<counter-section columns="1" rows="1" front-left="750" front-top="600" front-right="900" front-bottom="750"
                                                 back-left="600" back-top="600" back-right="750" back-bottom="750" supply="2" shadow="20" />
		<counter-section columns="1" rows="1" front-left="900" front-top="600" front-right="1050" front-bottom="750"
                                                 back-left="450" back-top="600" back-right="600" back-bottom="750" supply="5" shadow="20" />
		<counter-section columns="2" rows="1" front-left="1050" front-top="600" front-right="1350" front-bottom="750"
                                                 back-left="150" back-top="600" back-right="450" back-bottom="750" supply="3" shadow="20" />
		<counter-section columns="1" rows="1" front-left="1350" front-top="600" front-right="1500" front-bottom="750"
                                                 back-left="0" back-top="600" back-right="150" back-bottom="750" supply="1" shadow="20" />
          <!-- Row 6 -->
		<counter-section columns="1" rows="1" front-left="0" front-top="750" front-right="150" front-bottom="900" supply="4" shadow="20" />
		<counter-section columns="1" rows="1" front-left="150" front-top="750" front-right="300" front-bottom="900"
                                                 back-left="1200" back-top="750" back-right="1350" back-bottom="900" supply="6" shadow="20" />
		<counter-section columns="1" rows="1" front-left="300" front-top="750" front-right="450" front-bottom="900" supply="1" shadow="20" />

		<counter-section columns="4" rows="1" front-left="450" front-top="750" front-right="1050" front-bottom="900"
                                                 back-left="450" back-top="750" back-right="1050" back-bottom="900" supply="8" shadow="20" />
		<counter-section columns="1" rows="1" front-left="1050" front-top="750" front-right="1200" front-bottom="900"
                                                 back-left="300" back-top="750" back-right="450" back-bottom="900" supply="12" shadow="20" />
		<counter-section columns="2" rows="1" front-left="1200" front-top="750" front-right="1500" front-bottom="900"
                                                 back-left="0" back-top="750" back-right="300" back-bottom="900" supply="8" shadow="20" />
          <!-- Row 7 -->
		<counter-section columns="2" rows="1" front-left="0" front-top="900" front-right="300" front-bottom="1050"
                                                 back-left="1200" back-top="900" back-right="1500" back-bottom="1050" supply="15" shadow="20" />
		<counter-section columns="3" rows="1" front-left="300" front-top="900" front-right="750" front-bottom="1050"
                                                 back-left="750" back-top="900" back-right="1200" back-bottom="1050" supply="10" shadow="20" />
		<counter-section columns="2" rows="1" front-left="750" front-top="900" front-right="1050" front-bottom="1050"
                                                 back-left="600" back-top="900" back-right="900" back-bottom="1050" supply="5" shadow="20" />
		<counter-section columns="2" rows="1" front-left="1050" front-top="900" front-right="1350" front-bottom="1050"
                                                 back-left="150" back-top="900" back-right="450" back-bottom="1050" supply="4" shadow="20" />
		<counter-section columns="1" rows="1" front-left="1350" front-top="900" front-right="1500" front-bottom="1050"
                                                 back-left="0" back-top="900" back-right="150" back-bottom="1050" supply="2" shadow="20" />
          <!-- Rows 8-12 -->
		<counter-section columns="10" rows="5" front-left="0" front-top="1050" front-right="1500" front-bottom="1800"
                                                 back-left="0" back-top="1050" back-right="1500" back-bottom="1800" shadow="20" />

	</counter-sheet>
     <counter-sheet name="Tac Cards" front-image-file="1776_tact_cards.jpg" front-resolution="150 dpi" front-mask-file="card_mask.png">
  		<card-section rows="2" columns="4" supply="2"
			face-left="0" face-top="0" face-right="1502" face-bottom="901" 
			back-left="1502" back-top="0" back-right="1879" back-bottom="450" /> 
	</counter-sheet>
Here's the code for the game I'm working on to just mask the marker counters. The front a rear masks are different because only two counters have a back, the rest of the markers are one sided:

Code: Select all

	<counter-sheet name="Markers"
		front-image-file="lfm_markers.png" front-resolution="300 dpi"  front-mask-file="counter_maskf.png"
           back-image-file="lfm_markersr.png" back-resolution="300 dpi" front-mask-file="counter_maskr.png">
		<counter-section columns="1" rows="2"
			front-left="0" front-top="0" front-right="151" front-bottom="300" supply="50" shadow="20" />
		<counter-section columns="4" rows="2" front-left="150" front-top="0" front-right="750" front-bottom="300" supply="20" shadow="20" />
		<counter-section columns="1" rows="2"
			front-left="750" front-top="0" front-right="900" front-bottom="300"
                back-left="0" back-top="0" back-right="150" back-bottom="300" supply="30" shadow="20" />
		<counter-section columns="5" rows="2" front-left="900" front-top="0" front-right="1650" front-bottom="300" supply="20" shadow="20" />
		<counter-section columns="1" rows="2" front-left="1650" front-top="0" front-right="1800" front-bottom="300" shadow="20" />
	</counter-sheet>
Image
User avatar
Edgar
020
Posts: 16
Joined: 21 May 2007, 07:59
Location: Pamplona, Navarra

Re: Masks

Post by Edgar »

<counter-sheet name="Markers"
front-image-file="lfm_markers.png" front-resolution="300 dpi" front-mask-file="counter_maskf.png"
back-image-file="lfm_markersr.png" back-resolution="300 dpi" front-mask-file="counter_maskr.png">

That should be a "back-mask-file"
User avatar
Uhlan
Posts: 11
Joined: 08 Oct 2017, 20:57
Location: Maryland USA
Contact:

Re: Masks

Post by Uhlan »

Sorry, that typo's from me cobbling together code to post here, the working gamebox doesn't have the mask code in it currently
Image
User avatar
Edgar
020
Posts: 16
Joined: 21 May 2007, 07:59
Location: Pamplona, Navarra

Re: Masks

Post by Edgar »

Send me your module and I'll try to see what's wrong with it
User avatar
Uhlan
Posts: 11
Joined: 08 Oct 2017, 20:57
Location: Maryland USA
Contact:

Re: Masks

Post by Uhlan »

Pick any Last Full Measure box from the Files section here - I haven't managed to get it to work with any of them
Image
User avatar
Edgar
020
Posts: 16
Joined: 21 May 2007, 07:59
Location: Pamplona, Navarra

Re: Masks

Post by Edgar »

I applied a mask file to one of them and it works, it must be your mask file. If you put here the module you are trying to modify, and the file with the mask, I may try to see what happens.
User avatar
Bill Barrett
231
Posts: 351
Joined: 25 May 2008, 13:25

Re: Masks

Post by Bill Barrett »

Yes, I had a look at your Brandy Station Gamebox and converted your .gif Map into a .png and built some mask files for your counters (took a few seconds in Irfanview). I also cropped two single pixel lines (one off the top and one off the bottom) of your Markers so that all counters were 150x150 in size. The resulting gamebox is actually now smaller (on disk) than your original - take a look:

https://www.mediafire.com/file/rp0wgw57 ... a.ztb/file

Regards, Bill
User avatar
Uhlan
Posts: 11
Joined: 08 Oct 2017, 20:57
Location: Maryland USA
Contact:

Re: Masks

Post by Uhlan »

Yup, it was my mask file. I used the one you put in the ztb in my other boxes and it worked, though I don't get why. The only real difference I saw was yours didn't have transparency when I loaded it in Paint Shop Pro. Anyway, I've been retro fitting all my boxes with masks, and fixing the size items you mentioned, etc.

I'm changing the marker counters in the LFM titles so instead of a sheet with multiple markers, I'm using "supply" in game_box.zts as I did in Mr Lincoln's War and 1776.

Thank you very much Bill for your help and advice.

The updated Last Full Measure ZT boxes are posted at: http://mainecav.org/todd/lfm/zuntzu.htm is anyone wants to see the changes from what's posted here as of this date.
Image
Post Reply