Results 1 to 6 of 6

Thread: Number of a card in a deck

  1. #1

    Number of a card in a deck

    Let's say I have a card object in a variable.

    Is it possible to get its face image (associated with the deck) and coords on this image? E.g. 7th row and 9th column, or just number 69 (if the size of the deck is 10x7).

    I'd like to make my mod compatible with cards from other mods. Some players may want to import those decks, so my script must know what each card is (without id).

  2. #2
    not that i know of.. but that would be a cool feature and maybe one for the suggestion forum.

  3. #3
    Objects, including cards, have a description and tag property. You can use these to provide information about the card. If you use description the information will be visible on the tooltip. If you use tag then it will not be visible on the tooltip. As such you could provide information about the card in the tag property and then you can read the tag property for any specific card to get the card info. You can store any string in the tag property so you could use a simple comma separated string if you need to store multiple pieces of information (e.g. Deck1,Suit2,Card5). Similarly this method can be used for storing such things as Magic Cards Cost, Power and Toughness (e.g. 5G,3,2). Obviously the format for such a tag would need to be identified so that other making decks conform to the same tag information format.

  4. #4
    You can get that info from card.getJSON(). It will contain both face/back links and a row/column number concatenated as "CardID" IIRC. Log the thing and you'll figure it out.

  5. #5
    Quote Originally Posted by dzikakulka View Post
    does not seem to be in the API?

  6. #6
    actually it does.. not sure why it didn't show up in the search before.

Similar Threads

  1. Card deck subset of regular deck
    By Wolfman in forum General Discussion
    Replies: 2
    Last Post: 07-09-2017, 09:42 AM
  2. Dice / Deck + Number
    By LordAshes in forum General Discussion
    Replies: 4
    Last Post: 07-24-2016, 11:48 AM
  3. Replies: 2
    Last Post: 07-07-2016, 05:15 PM
  4. [ADDED] [v5.0]Select the number of "Card Hands" based on players
    By BrashFink in forum Suggestions
    Replies: 2
    Last Post: 06-28-2015, 05:53 PM
  5. Replies: 1
    Last Post: 04-27-2015, 04:36 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts