Weirdness with .xml file

Discuss game box design and sharing.

Moderators: Ichibrothers, Cambronne

Post Reply
User avatar
spearjr
Posts: 13
Joined: 02 Aug 2007, 16:35
Contact:

Weirdness with .xml file

Post by spearjr »

This file doesn't work:

Code: Select all

<?xml version="1.0" encoding="windows-1252" ?>
<game-box 
	name="Hacienda"
	description="Hacienda by Wolfgang Kramer"
	copyright="Rio Grande Games and Hans im Gluck 2005"
	startup-scenario="setup.zts"
	icon="icon.bmp">
	<map name="02-twisted-dogbone" image-file="map_02_asymmetrical.jpg" resolution="150 dpi" />

	<counter-sheet name="Animals_Land"
		front-image-file="counters_round_full.png" front-resolution="150 dpi"
		front-mask-file="counters_round_full_mask.png">
	  <card-section rows="1" columns="5" face-left="0" face-top="0" face-right="216" face-bottom="50" supply="100" shadow="10"/>
	  <card-section rows="1" columns="5" face-left="0" face-top="51" face-right="216" face-bottom="100" supply="100" shadow="10"/>
	  <card-section rows="1" columns="5" face-left="0" face-top="101" face-right="216" face-bottom="150" supply="100" shadow="10"/>
	  <card-section rows="1" columns="5" face-left="0" face-top="151" face-right="216" face-bottom="200" supply="100" shadow="10"/>
	  <card-section rows="1" columns="5" face-left="0" face-top="201" face-right="216" face-bottom="250" supply="100" shadow="10"/>
	</counter-sheet>

	<counter-sheet name="Water"
		front-image-file="water.png" front-resolution="150 dpi" front-mask-file="water_mask.png">
	  <card-section rows="1" columns="1" face-left="0" face-top="0" face-right="39" face-bottom="39" supply="6" shadow="10"/>
	  <card-section rows="1" columns="1" face-left="39" face-top="0" face-right="117" face-bottom="39" supply="5" shadow="10"/>
	  <card-section rows="1" columns="1" face-left="117" face-top="0" face-right="190" face-bottom="72" supply="2" shadow="10"/>
	  <card-section rows="1" columns="1" face-left="190" face-top="0" face-right="288" face-bottom="72" supply="3" shadow="10"/>
	  <card-section rows="1" columns="1" face-left="8" face-top="38" face-right="44" face-bottom="74" supply="8" shadow="10"/>
	  <card-section rows="1" columns="1" face-left="70" face-top="43" face-right="103" face-bottom="67" supply="8" shadow="10"/>

	</counter-sheet>


	<counter-sheet name="Cards" front-image-file="card_sheet.png" front-mask-file="card_sheet_mask.png">
		<card-section rows="1" columns="5"
			face-left="0" face-top="0" face-right="350" face-bottom="110"
			back-left="351" back-top="0" back-right="420" back-bottom="110" supply="14"/>
		<card-section rows="1" columns="1"
			face-left="0" face-top="111" face-right="70" face-bottom="220"
			back-left="350" back-top="0" back-right="420" back-bottom="110" supply="10"/>
		<card-section rows="1" columns="4"
			face-left="71" face-top="111" face-right="350" face-bottom="220"
			back-left="351" back-top="111" back-right="420" back-bottom="220" supply="18"/>
	</counter-sheet>


</game-box>
I'm getting this error: version 1.1.0.5
System.NullReferenceException: Object reference not set to an instance of an object.
at ZunTzu.Visualization.w.a(Int64 A_0)
at ZunTzu.Visualization.w.b(Int64 A_0)
at ZunTzu.a.b(String[] A_0)


This one does work:

Code: Select all

<?xml version="1.0" encoding="windows-1252" ?>
<game-box 
	name="Hacienda"
	description="Hacienda by Wolfgang Kramer"
	copyright="Rio Grande Games and Hans im Gluck 2005"
	startup-scenario="setup.zts"
	icon="icon.bmp">
	<map name="02-twisted-dogbone" image-file="map_02_asymmetrical.jpg" resolution="150 dpi" />

	<counter-sheet name="Animals_Land"
		front-image-file="counters_round_full.png" front-resolution="150 dpi"
		front-mask-file="counters_round_full_mask.png">
	  <card-section rows="1" columns="5" face-left="0" face-top="0" face-right="216" face-bottom="50" supply="100" shadow="10"/>
	  <card-section rows="1" columns="5" face-left="0" face-top="51" face-right="216" face-bottom="100" supply="100" shadow="10"/>
	  <card-section rows="1" columns="5" face-left="0" face-top="101" face-right="216" face-bottom="150" supply="100" shadow="10"/>
	  <card-section rows="1" columns="5" face-left="0" face-top="151" face-right="216" face-bottom="200" supply="100" shadow="10"/>
	  <card-section rows="1" columns="5" face-left="0" face-top="201" face-right="216" face-bottom="250" supply="100" shadow="10"/>
	</counter-sheet>

	<counter-sheet name="Water"
		front-image-file="water.png" front-resolution="150 dpi" front-mask-file="water_mask.png">
	  <card-section rows="1" columns="1" face-left="0" face-top="0" face-right="39" face-bottom="39" supply="6" shadow="10"/>
	  <card-section rows="1" columns="1" face-left="39" face-top="0" face-right="117" face-bottom="39" supply="5" shadow="10"/>
	  <card-section rows="1" columns="1" face-left="117" face-top="0" face-right="190" face-bottom="72" supply="2" shadow="10"/>
	  <card-section rows="1" columns="1" face-left="190" face-top="0" face-right="288" face-bottom="72" supply="3" shadow="10"/>
	</counter-sheet>


	<counter-sheet name="Cards" front-image-file="card_sheet.png" front-mask-file="card_sheet_mask.png">
		<card-section rows="1" columns="5"
			face-left="0" face-top="0" face-right="350" face-bottom="110"
			back-left="351" back-top="0" back-right="420" back-bottom="110" supply="14"/>
		<card-section rows="1" columns="1"
			face-left="0" face-top="111" face-right="70" face-bottom="220"
			back-left="350" back-top="0" back-right="420" back-bottom="110" supply="10"/>
		<card-section rows="1" columns="4"
			face-left="71" face-top="111" face-right="350" face-bottom="220"
			back-left="351" back-top="111" back-right="420" back-bottom="220" supply="18"/>
	</counter-sheet>

</game-box>
User avatar
spearjr
Posts: 13
Joined: 02 Aug 2007, 16:35
Contact:

Re: Weirdness with .xml file

Post by spearjr »

I think I got the files closer to being correct, but I'm still getting an error when I try to add a second row of counters to the water sheet. All my counters are irregular shapes, so I'm using masks with all of them.

version 1.1.0.5
System.NullReferenceException: Object reference not set to an instance of an object.
at ZunTzu.Visualization.w.a(Int64 A_0)
at ZunTzu.Visualization.w.b(Int64 A_0)
at ZunTzu.a.b(String[] A_0)


This file gets this error:

Code: Select all

<?xml version="1.0" encoding="windows-1252" ?>
<game-box 
	name="Hacienda"
	description="Hacienda by Wolfgang Kramer"
	copyright="Rio Grande Games and Hans im Gluck 2005"
	startup-scenario="setup.zts"
	icon="icon.bmp">
	<map name="02-twisted-dogbone" image-file="map_02_asymmetrical.jpg" resolution="150 dpi" />

	<counter-sheet name="Animals_Land"
			front-image-file="counters_round_full.png" front-resolution="150 dpi"
			front-mask-file="counters_round_full_mask.png">
	  	<counter-section rows="1" columns="5"
			face-left="0" face-top="0" face-right="216" face-bottom="50" supply="100" shadow="10"/>
	  	<counter-section rows="1" columns="5"
			face-left="0" face-top="51" face-right="216" face-bottom="100" supply="100" shadow="10"/>
		<counter-section rows="1" columns="5"
			face-left="0" face-top="101" face-right="216" face-bottom="150" supply="100" shadow="10"/>
		<counter-section rows="1" columns="5"
			face-left="0" face-top="151" face-right="216" face-bottom="200" supply="100" shadow="10"/>
		<counter-section rows="1" columns="5"
			face-left="0" face-top="201" face-right="216" face-bottom="250" supply="100" shadow="10"/>
	</counter-sheet>

	<counter-sheet name="Water"
			front-image-file="water2.png" front-resolution="150 dpi" front-mask-file="water2_mask.png">
	 	<counter-section rows="1" columns="1"
			face-left="0" face-top="0" face-right="39" face-bottom="39" supply="6" shadow="10"/>
		<counter-section rows="1" columns="1"
			face-left="39" face-top="0" face-right="117" face-bottom="39" supply="5" shadow="10"/>
	  	<counter-section rows="1" columns="1"
			face-left="117" face-top="0" face-right="190" face-bottom="72" supply="2" shadow="10"/>
	  	<counter-section rows="1" columns="1"
			face-left="190" face-top="0" face-right="288" face-bottom="72" supply="3" shadow="10"/>
		<counter-section rows="1" columns="1"
			face-left="13" face-top="76" face-right="49" face-bottom="112" supply="8" shadow="10"/>
	  	<counter-section rows="1" columns="1"
			face-left="75" face-top="76" face-right="108" face-bottom="100" supply="8" shadow="10"/>
	</counter-sheet>


	<counter-sheet name="Cards"
			front-image-file="card_sheet.png" front-mask-file="card_sheet_mask.png">
		<card-section rows="1" columns="5"
			face-left="0" face-top="0" face-right="350" face-bottom="110"
			back-left="351" back-top="0" back-right="420" back-bottom="110" supply="14"/>
		<card-section rows="1" columns="1"
			face-left="0" face-top="111" face-right="70" face-bottom="220"
			back-left="350" back-top="0" back-right="420" back-bottom="110" supply="10"/>
		<card-section rows="1" columns="4"
			face-left="71" face-top="111" face-right="350" face-bottom="220"
			back-left="351" back-top="111" back-right="420" back-bottom="220" supply="18"/>
	</counter-sheet>


</game-box>
This file does work:

Code: Select all

<?xml version="1.0" encoding="windows-1252" ?>
<game-box 
	name="Hacienda"
	description="Hacienda by Wolfgang Kramer"
	copyright="Rio Grande Games and Hans im Gluck 2005"
	startup-scenario="setup.zts"
	icon="icon.bmp">
	<map name="02-twisted-dogbone" image-file="map_02_asymmetrical.jpg" resolution="150 dpi" />

	<counter-sheet name="Animals_Land"
			front-image-file="counters_round_full.png" front-resolution="150 dpi"
			front-mask-file="counters_round_full_mask.png">
	  	<counter-section rows="1" columns="5"
			face-left="0" face-top="0" face-right="216" face-bottom="50" supply="100" shadow="10"/>
	  	<counter-section rows="1" columns="5"
			face-left="0" face-top="51" face-right="216" face-bottom="100" supply="100" shadow="10"/>
		<counter-section rows="1" columns="5"
			face-left="0" face-top="101" face-right="216" face-bottom="150" supply="100" shadow="10"/>
		<counter-section rows="1" columns="5"
			face-left="0" face-top="151" face-right="216" face-bottom="200" supply="100" shadow="10"/>
		<counter-section rows="1" columns="5"
			face-left="0" face-top="201" face-right="216" face-bottom="250" supply="100" shadow="10"/>
	</counter-sheet>

	<counter-sheet name="Water"
			front-image-file="water2.png" front-resolution="150 dpi" front-mask-file="water2_mask.png">
	 	<counter-section rows="1" columns="1"
			face-left="0" face-top="0" face-right="39" face-bottom="39" supply="6" shadow="10"/>
		<counter-section rows="1" columns="1"
			face-left="39" face-top="0" face-right="117" face-bottom="39" supply="5" shadow="10"/>
	  	<counter-section rows="1" columns="1"
			face-left="117" face-top="0" face-right="190" face-bottom="72" supply="2" shadow="10"/>
	  	<counter-section rows="1" columns="1"
			face-left="190" face-top="0" face-right="288" face-bottom="72" supply="3" shadow="10"/>
	</counter-sheet>


	<counter-sheet name="Cards"
			front-image-file="card_sheet.png" front-mask-file="card_sheet_mask.png">
		<card-section rows="1" columns="5"
			face-left="0" face-top="0" face-right="350" face-bottom="110"
			back-left="351" back-top="0" back-right="420" back-bottom="110" supply="14"/>
		<card-section rows="1" columns="1"
			face-left="0" face-top="111" face-right="70" face-bottom="220"
			back-left="350" back-top="0" back-right="420" back-bottom="110" supply="10"/>
		<card-section rows="1" columns="4"
			face-left="71" face-top="111" face-right="350" face-bottom="220"
			back-left="351" back-top="111" back-right="420" back-bottom="220" supply="18"/>
	</counter-sheet>


</game-box>
What am I doing wrong??
User avatar
Jerome
Site Admin
Posts: 974
Joined: 22 Jun 2006, 21:31
Location: France
Contact:

Post by Jerome »

You're expected to provide "front-" attributes for counter sections, not "face-" attributes. "face-" attributes are only for card sections.
See this page for more info.

I don't think it's the cause of the error though.
Can I see your setup.zts file?
Jerome, ZunTzu developer.
User avatar
Jerome
Site Admin
Posts: 974
Joined: 22 Jun 2006, 21:31
Location: France
Contact:

Post by Jerome »

I've received your mail. Do you still need my help?
Jerome, ZunTzu developer.
User avatar
spearjr
Posts: 13
Joined: 02 Aug 2007, 16:35
Contact:

Post by spearjr »

Jerome wrote:I've received your mail. Do you still need my help?
All, Jerome replied to an email I sent him, where I'd sent my whole gamebox. He replied with the following:
I see that all your counters are already set out on the table.
Watch out! You're not supposed to mix a modified game-box.xml file with a scenario file made with a previous version of the game box. Maybe that's where your problems come from.
This was indeed the problem. Went back to a more basic .zts file and everything was peachy.
Post Reply