Page 1 of 1

Cards and protocol request

Posted: 02 Sep 2008, 22:19
by blargendarg
Of course first I must say that I really appreciate Zun Tzu... I am currently ready to tear my hair out, but finding that there was an elegant and simple solution to my problem out there was a wonderful surprise.

I am using Zun Tzu to playtest a game I have created with a friend who lives in another state. The game uses some 'counters' but is mostly hex tiles and three decks of cards. I actually first implemented the cards with the counter tags and had no problems. Still, a 50 card deck behaves a little ridiculously as a stack of counters so I did some searching and found out about card tags. I have done my best to search, but I have not found the answer I am looking for. I looked at the poker game box as suggested in one thread, but it only references one image file and I have separate images for front and back... and my problem is with getting the right image to appear on the card back. At first I was using front and back sheets of cards, like with counters, and when I flipped a card, the back would be the entire frontside graphic. Then I read another post that said the card backs are a single graphic so that they are all the same, so I made a single card back for the graphic, but now when I flip the cards, the backs are the frontside of the top left card on the sheet. Very odd. I am hoping someone can clear this up.

Also, I'd like to add that while I appreciate the natural language tutorial, a simple list of the tags that can be used and their functions would be helpful to have. If I had some idea about how the implementation of cards differs from counters in terms of code, I might have been able to sort it out myself.

Below is the game box file for reference.. thanks for any help:

Code: Select all

<?xml version="1.0" encoding="windows-1252" ?>
<game-box
	name="Legion of Cats"
	description="Welcome to fork-biting tension."
	copyright="2006"
	startup-scenario="loc.zts">
	<map name="only" image-file="1inchhexes.jpg" resolution="150 dpi" />	

	<counter-sheet name="actioncards"
		front-image-file="actioncards_front.jpg" front-resolution="150 dpi"
		back-image-file="actioncards_back.jpg" back-resolution="150 dpi">
			<card-section rows="8" columns="8"
			face-left="0" face-top="0" face-right="800" face-bottom="1116"
			back-left="0" back-top="0" back-right="100" back-bottom="139" />
	</counter-sheet>
</game-box>

Posted: 02 Sep 2008, 22:59
by GJK
Download and unzip the "Poker" gamebox. That is what I used as a template when making any games that have card decks in them. It even has a nice "card_mask.png" file that you can use (you might have to down-sample it as I believe it's @ 300 dpi).

Posted: 03 Sep 2008, 04:28
by blargendarg
I've been avoiding using it as a template, but what I got out of the game box file wasn't enough... so I tried it and sure enough, it works like a charm. At least it simplifies things somewhat. The question becomes: Can I specify a separate file for card backs in the way I can for counter backs? Six of one, half dozen the other, I know, but I'm one of those people that wants to know how it works and not just how to work it :)

Posted: 03 Sep 2008, 11:42
by Jerome
blargendarg wrote:Can I specify a separate file for card backs in the way I can for counter backs?
Yes, you can, although I recommend using the same image to store the faces and backs.
To store the backs on another image:
- define a back image for your counter sheet ("back" has a different meaning here)
- define card sections, and for each section indicate this:

Code: Select all

type="CardFacesOnFrontBackOnOtherSide"

Posted: 03 Sep 2008, 14:10
by blargendarg
Thanks very much! I am drawing ever closer to completing my first game box(cross fingers)