Version 2, last updated by poody at Jul 26 14:22 2009 UTC

Savage Worlds Card Dealer

Get the plugin

Created by: poody

Purpose:

This OpenRPG Plug-in was developed to allow Savage Worlds players the ability to draw cards for initiative and allow for the same probability of drawing a Joker. This is something that dice rolls can not adequately simulate. A lot of inspiration for this plug-in came from the CardDealer that Cogollo put together a while ago (under the ORPG v. 1.6.1 days). This plug-in file was created to be compliant with OpenRPG 1.7.6. More than likely, this plug-in will not run properly on earlier versions of OpenRPG.

All files should be unzipped into the plugins directory. This should create a folder in the plugins directory called "cards" with card images in that directory, a deck.xml file and the xxswcards176.py file. This card dealer may work for others games (such as Deadlands Classic or Torg), but it was designed specifically for Savage Worlds, so there may need to be some “adaptation” on the users part for other games.

Features:

  • Customizable decks of cards
    • Because the deck is created from an XML file any type of card deck can be created
      
  • Support for up to 3 different Decks of cards to be used simultaneously
  • Support for Edges that allow multiple cards on Initiative Draws
  • Support for Edges that allow a redraw for certain card values
  • Automatic reshuffle of deck after a Joker is Drawn
  • Support for a "community deck" of cards to allow for use of the Adventure Deck
    • This is a secret deal so only the person being dealt to knows the cards dealt
      
    • Allows trading of cards with other players
      
    • Does not allow the Draw Pile and/or Discard Pile to be viewed and cards removed directly
      
  • Supports multiple "personal" decks - so can be used with Deadlands (for Action Deck and Spell Deck)
  • A Round Counter so if you need to keep track of what round of combat is being drawn for

Setup:

  1. Unzip the contents of card_dealer_plugin.zip to the plugins directory for OpenRPG.
  2. Confirm that the following files are located in the plugins directory:
    • xxswcards.py
    • deck.xml
    • cardcontrolpanel.xml
  3. Confirm that there is a 'cards' directory in the plugins directory of OpenRPG
  4. Confirm that the 'cards' directory contains the card images that came with the zip file.
  5. Start OpenRPG in Debug mode (so the command prompt is visible)
  6. As OpenRPG is initializing, the command prompt window will display various things – one of them indicates where OpenRPG is rooting (what directory is being used as the start point for future commands). Ensure that it is rooting to the same directory that contains the plugins directory where you extracted the files above to. If it is not rooting to the same directory you may need to modify the deck.xml file and the command paths that use that file.
  7. Once OpenRPG has started, you will want to confirm that images are visible in the chat window. Click the OpenRPG menu, then click Settings (or you can just click CTRL+S).
  8. Select that Chat Tab in the OpenRPG Preferences window
  9. Find the Show_Images_In_Chat setting and set the value to 1 and click OK
  10. Select the Plugins menu and then select the Control Panel option. This will launch the Plugin Control Panel window.
  11. Select Savage Worlds Card Dealer and click the Enable button.
    • If you wish to have this plugin enabled every time you run OpenRPG, highlight Savage Worlds Card Dealer in the Plugin Control Panel and select and click the Autostart button.
  12. Select the Game Tree (located on the left panel of the OpenRPG window.
  13. Right-click on the Game Tree and select the option Insert File
  14. Browse to the plugins directory for OpenRPG and select the cardcontrolpanel.xml file and click open. The Game Tree should be updated with a new node called “Card Control Panel”.

The Files:

  • The Deck file(s)

    This plug-in requires at least one XML file be created in order to create a deck of cards. There is a sample deck file available to show what the deck file needs to look like and include. This deck file can be stored locally or on a website. I have found it easier to use a local deck file as opposed to a webdeck, and the response time is generally quicker for a local file.

    If you are using a local file, you will need to specify where the file is located. What has worked in the past, is to place the deck file in the plugins directory of OpenRPG. Then the Initiative Deck could be shuffled by simply typing: /ind localdeck plugins/deck.xml. If you choose to place the deck file in a different directory you will need to provide the path to the file relative to the root directory of OpenRPG (for example, if the deck.xml file was in the cards directory, the command would be: /ind localdeck plugins/cards/deck.xml).

    The XML file also has an attribute for the cards to provide a card image. I have found it easiest to have a directory called 'cards' located in the plugins directory of !OpenRPG. When creating the deck file, the image attribute would then provide the path to the images - again, this is relative to the !OpenRPG Root directory. If I had a card image
    

    located in a cards directory in the OpenRPG plugins directory, the attribute would read: "plugins/cards/image.gif" The image can be any image supported by OpenRPG. For the other players in your ORPG room to be able to see the card images from a local deck, they will need to have the card images on their machine as well as in the same location, with the same names. An alternative to this would be to have the images for the local deck stored on the Internet and have the image attribute reference the images on the Internet. OpenRPG 1.7.1 does have some web server functionality built-in, which may allow you to still store your images locally but served as if they came from the Internet, but I have not experimented with the OpenRPG 1.7.1 web server functionality.

    If for some reason, the deck.xml file is separated from the plug-in, I wanted to capture the format of the Deck File so that it could easily be re-created if necessary. Below is what the contents of the Deck File should look like:
    
    <pre>
    `###Begin deck file extract###`
    `<deck version="1.0" name="Standard Deck of Cards">`
    `<card title="2 of Clubs" description=" " image="plugins/cards/2c.gif" rank="1" num="2"></card>`
    `<card title="3 of Clubs" description=" " image="plugins/cards/3c.gif" rank="5" num="3"></card>`
    `</deck>`
    `###End deck file extract###`</pre>
    
    Some things you may need to know about the card file itself...
    

    The rank is only necessary if you will need to sort the cards in a particular way. The way the plug-in sorts is highest rank to the lowest rank.

    The num attribute is used to help identify what "number" type a card is. For example, the 5 of Clubs, 5 of Diamonds, 5 of Spades and 5 of Hearts would all be num="5". I suppose I could have put a suit attribute on their as well, but figured, it wasn't necessary - at least for me. I cared for the suit problem using the Rank attribute. If you do not need to use the num attribute (for example - the deck is the Adventure Deck), you should just populate it with "none". All of the attributes should be included, though - even if it is just a single blank space (see description attribute above).
    
  • The Plug-in file

    The plug-in file itself (xxswcards176.py) should be placed in the plugins directory with all the other plugins. This directory should be located in the root directory of OpenRPG. In the Plugins Control Panel it should be listed as Savage Worlds Card Dealer. To access the Plugins Control Panel, from the OpenRPG main window click on the Tools menu, then Plugins. You will need to make sure that Savage Worlds Card Dealer is enabled in order to use the plugin. It is only necessary for the others in the OpenRPG group to have this plug-in if you plan on using the "community deck" features, or if each member of the group will need to draw from personal decks (such as for Deadlands). Otherwise, if you will only be using this plug-in for a GM to issue cards for the standard Savage Worlds initiative system, the members of the group would only need the card images available to them (again either on their own computers or via a website). The GM (or the person dealing the cards) will, of course need to have this plug-in on their machine.

  • The cardcontrolpanel.xml file

    Savage Worlds was created with the mantra, "Fast!Furious!Fun!". The usage of this plug-in needed to be able to accommodate that mantra as well. However, to get the plug-in to do all the fancy work of initiative there were many different, and sometimes complex, commands that needed to be issued. These commands were not Fast, nor Fun, but could make you Furious. To make these commands easier for the GM to use, the Card Control Panel was created.

    The Card Control Panel needs to be loaded to the tree in order to be used. Once loaded, the Card Control Panel contains various tabs with all the various commands that can be issued via the Plug-in. I have attempted to group the commands in the most logical manner, and some commands may be located on multiple tabs. Because there are various options that need to be provided, the commands are formatted to show the minimum amount of information required. The Control Panel was created using Text fields for the commands so that they can be modified easily and quickly. Many times, a change will only need to be made once per game session (if that), so that future uses of the Control Panel will be simply pressing the 'Send' button.