Generic Card Game Framework -Version 1b

MapTool campaign files that encapsulate properties, tokens, and macros for a particular ruleset or game world. "Framework" is often abbreviated "FW".

Moderators: Azhrei, dorpond, trevor, giliath, Gamerdude, jay, Mr.Ice

Forum rules
This forum is LOCKED. If a thread belongs here, use the "Report" feature of the post to let a moderator know to move it. General discussion should occur in the User Creations or MapTool forums.
Post Reply
User avatar
LordAshes
Giant
Posts: 182
Joined: Mon Nov 22, 2010 12:51 pm

Generic Card Game Framework -Version 1b

Post by LordAshes »

This Framework has been replaced by N-State Framework available in post viewtopic.php?f=8&t=24006. Support for this old framework has been discontinued.

Here is Version 1a of my Card Game Framework.

The framework can be used for all kinds involving multi state tokens (such as rolling dice, flipping coins, cards, etc) but its defaults are set up for Card Games tokens.

Framework Features:

The framework supports the following default states (you can easily add more states if other states are needed)...

- Moving a card (token) between states: Draw, Hand, On Table, On Table Tapped.
- While s card (token) is in the Draw state, the card's face down (back) image is shown to all.
- While a card (token) is in the Hand state, the card's face up image is visisble to the owner and the card becomes invisible to all other players.
A marked in the player's color is added to the card so that the owner can tell cards that are in the Hand state from other cards on the virtual table.
- While a card (token) is in the Table state, the card's face up image is visible to all players.
- While a card (token) is in the Tapped state, the card's face up image is visisble to all players and the card is rotated 45 degrees.

The framework supports the following operations (all implemented as Campaign macros):

[[ - Moves the selected cards (tokens) to the first state (this is the Draw state where the cards are face down).
Prev - Moves the selected cards (tokens) to the previous state (see order of states above)
Next - Moves the selected cards (tokens) to the next state. This is the most commonly used macro since it usually switches the cards (tokens) to the next logical state.
Untap - Moves the selcted cards (tokens) to the second last state (Table state). Commonly used to changed all Tapped cards to Untapped (for games like Magic The Gathering).
]] - Moves the selected cards (tokens) to the last state (Tapped state). Commonly used to change all Untapped catds to Tapped (for games like Magic The Gathering).
Sick - Adds a Sick overlay image to the card. Commonly used in games like Magic The Gathering to indicated summoning sickness.
Roll - Animates the rolling of the selected card/die (token). Basically moves the token in an somewhat upward direction as it randomly chooses states. Commonly used with die tokens to roll dice.

Group - Remembers the currently selected cards. Either used to re-select the group later (Use Group) or to stack cards into a pile (Pile)
Pile - Moves all cards that we marked with the Group macro (see above) to the location of the currently selected card (token). Select the desired cards, select Group, select the destination card, select Pile.
Use Group - Reselects all the cards (tokens) that were marked with the Group macro. Commonly used to reselect specific cards (in games like Magic The Gathering) so that a state operation, like Untap, can be performed on them.

HP+ and HP-: Usable player tokens only. Increases or decreases the hitpoints (life) of a player. Used for games like Magic The Gathering and Vampire. Starts at 20 but can easily be changed. Visible on Portrait view.
C+ and C-: Usable on player and card tokens. Increases or decreases a generic counter. Visible on Portrait view.
P+ and P-: Usable on player and card tokens. Increases or decreases a second generic counter (using used for Poison in games like Magic The gathering). Visible on Portrait view.

Light Shuffle, Regular Shuffle, Heavy Shuffle: Shuffles the selected cards (tokens). The three different versions indicate the intensity of the shuffle.

Init: Used to initialize tokens when they are first added. Used only once after all desired tokens are added. Then this macro is no longer needed.
Claim: Allows a player to choose on of the player tokens. This player token will retain infromation about the player such as HP, Counter, Poison, number of cards in hand and color. Using the macro a second time releases the player token.
CheatCheck: Players must connect to MapTools as players and NOT GM. Otherwise they will see other player's cards when they are in their hand. This macro lists all the connected players and their type (Player or Spectator).
Spectators (people watching but not playing) can connect as GM so that they can seel all hands. This macro generates little icon to make it slightly harder for a player fake the result.

In addition, to prevent the players from associating token names with specific cards, the token names are automatically randomly changed making such associations almost impossible.

How To Use The Framework:

1. Open the provided Campaign File in MapTools.
2. Drag and drop card tokens to the map (you can use the default ones provided in MapTools or your own)
3. Change the name of each token to a unique number (no text).
4. Change the shape to Top Down.

By default the card tokens will use the Handout image of Lib:Support (provided in the Campaign file) for the Back image, use the token's own image for the front image, and use the token's own portrait for the portrait image. This can be adjusted by editing the token's properties. If you want to change this, do it before using the Init macro.

5. Select all the added tokens and press the Init macro. Only one player needs to do this and it can be done in advance of the game. This macro converts all the token image references (such as IMAGE:SELF, PORTRAIT:SELF, etc) to actual MapTool assets.
6. When each player connects AS A PLAYER (NOT GM), have them click on one of the player tokens and press the Claim button. This associates the player with a token and all infromation for that player will be displayed on that token. This includes the number of cards that the player has in his/her hand (since these cards will not be visisble to others). This information also includes the player HP for games that use hitpoints/life.

Now you are ready to play. Usually the initial startup would be something like...

7. Select all the card tokens.
8. Select Group (the first part to stacking cards)
9. Select one of the cards
10. Select the Pile macro. All cards will be stacked on the same spot.
11. Select them all (if neede) and use the Shuffle macro to shuffle the deck.

To move cards, just click and drag them like any other token in MapTools.

To switch a card between the draw pile, your hand, the table and tapping use the Next macro. The sequence of states is set up in a logical order (Draw, Hand, Table, Tap) so that in most cases all you will have to do is use the Next macro. However, in some odd cases or odd games you may have to use the Prev macro to switch to previous states. Trying to switch to a previous state before the first (Draw) state will result in the card staying at that state. Using the Next macro when at the last state (Tapped) will cause it to go to the 3rd state (Table). Thus allowing the Next command to switch between tapped and untapped cards.

As I said, the default settings in the Campaign will allow new tokens to work as listed above. However, the framework is actually very flexible and can easily be modified to add new states, create dice like tokens from tables, change effects like what state the tokens go to when moving past the last state or before the first state and so on. I will explain these options in a later post but they are all visible on the token properties. These properties allows you to indicate the image, portrait, owner, facing and overlay-states for each of the tokens states. The properties use String Lists so the token can actually have any number of states (as can be seen with the sample D20 token). It is important to note that changes (at least for image and portrait references) should be done before using the Init macro because the Init macro takes the image references and translates them into actual asset references (making them hard to follow after using the Init macro).

If you find problems using the framework, please let me know so I can attempt to fix it.


Edit: Made some small fixed to fix bugs.
Attachments
GenericCardGameFramework_Version1b.cmpgn
(1.78 MiB) Downloaded 459 times
Last edited by LordAshes on Thu Oct 10, 2013 4:18 am, edited 1 time in total.
"We often compare ourselves to the U.S.,
and often they come out the best...
But they only have the right to bare arms,
while we have the right to bare breasts"
Busting The Breast by Bowser & Blue

yukonhorror
Kobold
Posts: 4
Joined: Fri Jan 07, 2011 12:59 pm

Re: Generic Card Game Framework -Version 1b

Post by yukonhorror »

what version of maptools was this created in. I get errors when opening it up.

User avatar
LordAshes
Giant
Posts: 182
Joined: Mon Nov 22, 2010 12:51 pm

Re: Generic Card Game Framework -Version 1b

Post by LordAshes »

yukonhorror wrote:what version of maptools was this created in. I get errors when opening it up.


The project was started back with Version 78 or something like that. However, the latest version (posted) was corrected with version 81 of MapTools. As such it probably needs version 81. Are you sure you have the latest version?
"We often compare ourselves to the U.S.,
and often they come out the best...
But they only have the right to bare arms,
while we have the right to bare breasts"
Busting The Breast by Bowser & Blue

yukonhorror
Kobold
Posts: 4
Joined: Fri Jan 07, 2011 12:59 pm

Re: Generic Card Game Framework -Version 1b

Post by yukonhorror »

I figured it was a version issue, that's why I asked. Didn't want to download a new one, but ahh well.

Seems to work pretty good. I think going in and understanding the code would be more of a headache than it's worth, but I think I can figure out how to tweak it for my purposes (I have one deck multiple players like a deck of cards).

One question. You mention something about changing the back image, but how EXACTLY do I do that?? It is more for aesthetics than anything, but was wondering how it is done. I went to properties, and I couldn't figure out what to change to call an image I made for myself.

Jonsay
Kobold
Posts: 5
Joined: Sun Jan 02, 2011 2:10 pm

Re: Generic Card Game Framework -Version 1b

Post by Jonsay »

There's a lot to like about this framework and kudos on the work that's been done. My one note regarding ease of use:1-I think that although it may seem more clunky, it's likely a good idea to have macros for each card state (draw, play, tap) rather than a single linear button.

That's all my feedback at this moment.

Thanks again.

User avatar
Hawke
Great Wyrm
Posts: 2261
Joined: Sat Apr 21, 2007 12:12 am
Location: Albuquerque, NM
Contact:

Re: Generic Card Game Framework -Version 1b

Post by Hawke »

Digging this! It's perfect for anything you have a set of card images for... a few things:

I did not see a Pile Macro anywhere.

Any way to automatically set the cards to top-down instead of square? With a large 60+ deck it seemed kind of tedious, I don't know if there's a macro function to do so.

When you play, for discards or exile do you just set them aside in the tapped position or is there a better method?

Feature Request: Is it possible to add a macro that would automatically rename a group of cards to just numbers? Some sets of cards I might use have names, it'd be easier to drag them to the map, run a macro to set them to all non-dup numbers, and go from there. It's also awkward if you have a token you drag named "1.jpg" it shows up as "1" and if you copy and paste it you get "1 1","1 2","1 3" etc...
Last edited by Hawke on Tue Feb 01, 2011 9:24 pm, edited 2 times in total.

User avatar
ryvencedrylle
Cave Troll
Posts: 28
Joined: Tue May 27, 2008 8:51 pm

Re: Generic Card Game Framework -Version 1b

Post by ryvencedrylle »

As an example of what can be done with this framework, basic though it may be, here's a rudimentary setup for playing the FreeMarket RPG (Luke Crane/Jared Sorenson).
Attachments
FreeMarketII.cmpgn
(2.03 MiB) Downloaded 255 times
Contributor to the At-Will Blog.

Zaran
Kobold
Posts: 7
Joined: Fri Feb 04, 2011 2:33 pm

Re: Generic Card Game Framework -Version 1b

Post by Zaran »

Ok, I got my cards in. Turned them top down and put them in a pile. But when I start a server as a Player I can no longer see the Cards. What am I doing wrong?

Zaran
Kobold
Posts: 7
Joined: Fri Feb 04, 2011 2:33 pm

Re: Generic Card Game Framework -Version 1b

Post by Zaran »

It appears the reason is when it runs the Init it switches the cards to owner view only. and there is no way to give a player owner rights. Why would it do this?

User avatar
Darklord
Cave Troll
Posts: 83
Joined: Wed Mar 25, 2009 3:37 pm
Location: UK

Re: Generic Card Game Framework -Version 1b

Post by Darklord »

I can't open the campaign file I get an error.

Could not load campaign java.util.zip.ZipException: error in opening zip file


I've tried using it in both B81 and B84 and get the same error message.

Daniel.
I vote High!

RPGA: 1206508765; Skype: Danny.darklord

Optimise = Fan of Roleplay!

User avatar
jfrazierjr
Deity
Posts: 5175
Joined: Tue Sep 11, 2007 7:31 pm

Re: Generic Card Game Framework -Version 1b

Post by jfrazierjr »

Zaran wrote:It appears the reason is when it runs the Init it switches the cards to owner view only. and there is no way to give a player owner rights. Why would it do this?


So only the owner can see the card contents, image, and statsheet(ie, your opponent cant see your cards!!!!). I know there is a way to assign ownership based upon the author's comments while building it, but I don't know the details.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

Benz72
Giant
Posts: 229
Joined: Thu Jul 31, 2008 6:13 pm

Re: Generic Card Game Framework -Version 1b

Post by Benz72 »

Any updates on this in the past 18 months?

User avatar
Lord.Ashes
Dragon
Posts: 350
Joined: Wed Jul 03, 2013 5:58 am

Re: Generic Card Game Framework -Version 1b

Post by Lord.Ashes »

This Framework has been replaced by N-State Framework available in post http://forums.rptools.net/viewtopic.php?f=8&t=24006. Support for this old framework has been discontinued.
"We often compare ourselves to the U.S. and often they come out the best,
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue

Post Reply

Return to “Campaign Frameworks”