Thread: Custom Playing Cards
-
October 20th, 2013, 07:05 #1
Custom Playing Cards
Right, started on part of creating an extension, but unsure what to do as code. Extension is for Savage Worlds, creating custom playing cards for different settings. As far as images go, I started with Deadlands Reloaded all that is left is to export images and name them, but will eventually make one for each.
I am guessing that all would initially need done is to create a bit of code that redirects which folder it draws the card images from. After that I am unsure on whether it would be better to simply make each set a different extension or to add to the preferences (or somewhere else) a selector of which card set you would prefer.
I have some experience programming, but am rather unfamiliar with LUA and FG structure.
MODERATOR: Moved to new thread.Last edited by Trenloe; October 20th, 2013 at 10:39.
Location: Central Pa (East -5)
Ultimate License Holder
Current Campaign: Necessary Evil
Current Project: Dawn of Daikaiju: Converting, Deadlands: Reloaded The last Sons - Quality Assurance Checking
Discord: Mgrancey#4994
"Mad Science" means never stopping to ask "what's the worst thing that could happen?" -- Maxim 14 of The Seventy Maxims of Maximally Effective Mercenaries
Adventure: Keep Living Life Like There's No Tomorrow and You'll Eventually Be Right,
-
October 20th, 2013, 10:52 #2
Are you looking to change the normal playing card deck images?
If so, which images are used are specified in the \graphics\graphics_cards.xml file in the base SavageWorlds ruleset.
For example:
Code:<root> <icon name="AceClubs" file="tokens/cards/Ace of Clubs.png" /> <icon name="AceDiamonds" file="tokens/cards/Ace of Diamonds.png" /> <icon name="AceHearts" file="tokens/cards/Ace of Hearts.png" /> <icon name="AceSpades" file="tokens/cards/Ace of Spades.png" /> <icon name="BlackJoker" file="tokens/cards/Black Joker.png" /> <icon name="CardBack" file="tokens/cards/ct_card_place.png" /> ...
Here is the current location of the standard playing card tokens in the Savage Worlds ruleset:
So, your extension would really just need a directory holding all of your new card tokens and the modified \graphics\graphics_cards.xml file that is modified to point to the relevant new tokens.
This is the most straightforward way of doing theme changes and would require that each different card "theme" would be in a separate extension, only one of which would need to be activated before loading the campaign.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
October 20th, 2013, 13:16 #3
I had found the folder holding the cards and their images, but was unsure about if there was anything extra that was needed for the code inside the extension. So I just need to make a copy of the original "graphics\graphics_cards.xml" file and edit it the links so they simply point towards the new images?
If so this will be fairly easy, real easy if Notepad++ would quit being so fussy.
Would it possible for you to edit this thread and add a poll for other settings that people would like see done first after Deadlands Reloaded?Last edited by Mgrancey; October 20th, 2013 at 13:21.
Location: Central Pa (East -5)
Ultimate License Holder
Current Campaign: Necessary Evil
Current Project: Dawn of Daikaiju: Converting, Deadlands: Reloaded The last Sons - Quality Assurance Checking
Discord: Mgrancey#4994
"Mad Science" means never stopping to ask "what's the worst thing that could happen?" -- Maxim 14 of The Seventy Maxims of Maximally Effective Mercenaries
Adventure: Keep Living Life Like There's No Tomorrow and You'll Eventually Be Right,
-
October 20th, 2013, 13:48 #4
It's probably best for you to start a new thread with a poll - I'm not sure all of the options you want in the poll so it would be better for you to create a poll with the options you want, plus this is a bit of a technical thread about how to use custom cards so best to keep a poll and discussion about that separate.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
October 20th, 2013, 15:56 #5Then include a new directory in the \tokens directory within the extension that contains the modified token files.Location: Central Pa (East -5)
Ultimate License Holder
Current Campaign: Necessary Evil
Current Project: Dawn of Daikaiju: Converting, Deadlands: Reloaded The last Sons - Quality Assurance Checking
Discord: Mgrancey#4994
"Mad Science" means never stopping to ask "what's the worst thing that could happen?" -- Maxim 14 of The Seventy Maxims of Maximally Effective Mercenaries
Adventure: Keep Living Life Like There's No Tomorrow and You'll Eventually Be Right,
-
October 20th, 2013, 17:18 #6
- Join Date
- Apr 2009
- Posts
- 48
Does your extension.xml file have a pointer to your overridden graphics_cards.xml file?
-
October 20th, 2013, 20:03 #7
Anything contained in a module has to be referenced as <item name in module>@<module name>
For this extension I really wouldn't recommend using card tokens from a separate module. This would mean that the extension won't work at all without the module being installed as well. If you plan on distributing the extension then this will avoid a lot of "my extension doesn't work" posts be users who haven't installed the 2 required files to 2 different directories.
Also, as Debinani says, files in an extension that are being used need to be activated in the extension.xml <base> section.
I've written a quick example extension for you that replaces the Ace of Clubs card with a Test Card image - all contained within the same extension. See the attached file:
Attachment 5319Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
October 20th, 2013, 22:24 #8
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
You can actually just put the contents of the graphics_cards.xml file right into the extension.xml file.
-
October 20th, 2013, 22:38 #9
You could, but then that doesn't really help people who may look at your extension to understand what it is overriding from the standard ruleset. Also, if the extension is broken by a future FG ruleset upgrade (or someone else's extension) then having the changes/files used matching the normal ruleset will help people see where changes were made and so know where to look for fixes. Just having a long list of specific XML changes/additions/overrides in the extension.xml file will work, but won't help others coming after in understanding how it all hangs together and making it easy to keep the extension up-to-date and enjoyable by the community long after the original owner has moved on.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
October 20th, 2013, 23:18 #10
so I can put the new card images just in a tokens/<folder> as part of the extension. That was what I wasn't sure about. Thanks. I already had the graphicx_card.xml working since the old cards weren't showing up.
Thanks for the LUA code to announce its use as well.Location: Central Pa (East -5)
Ultimate License Holder
Current Campaign: Necessary Evil
Current Project: Dawn of Daikaiju: Converting, Deadlands: Reloaded The last Sons - Quality Assurance Checking
Discord: Mgrancey#4994
"Mad Science" means never stopping to ask "what's the worst thing that could happen?" -- Maxim 14 of The Seventy Maxims of Maximally Effective Mercenaries
Adventure: Keep Living Life Like There's No Tomorrow and You'll Eventually Be Right,
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks