The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.


Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old January 4th, 2014, 11:48 AM
bartyboy6's Avatar
bartyboy6
 
Join Date: Sep 2010
Gender: Male
I like to implement Triple Triad in my game, but I'd rather have the player buy Booster Packs each containing a random card instead of buying each card individually. How do I do that and if possible, can I implement a level system so that, for example, a level 3 booster pack contains cards from level three or lower.
Reply With Quote
  #2    
Old January 4th, 2014, 04:13 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Yep, that's possible.

Create a new item called TT Booster Pack (or something). It'll be an item you can use out of battle (like Repel), and its effect will be to give the player a random card. The item will be consumed in the process, like Repel. You can have multiple such items, each one containing a different set of cards.

A Triple Triad card is nothing more than a Pokémon species. Card number 25 is a Pikachu, for instance. To generate a list of possible cards that a booster pack can provide, use something like this:

Code:
array=[]
for i in 1..PBSpecies.maxValue
  cname=getConstantName(PBSpecies,i) rescue nil
  next if !cname   # Skip if the species doesn't exist
  triad=TriadCard.new(i)
  level=[triad.north,triad.south,triad.east,triad.west].max
  next if level>3   # Skip if the card doesn't match the criteria
  array.push(i)   # Add card to array
end
The above code makes a list of all cards of level 3 or lower. Of course, your criteria can be different depending on the booster pack, such as different level limits, elemental types, habitats, or be a predefined list of contents (e.g. legendaries pack). You could get quite interesting with this.

Just pick a random entry in the array and give it to the player. Simple.
__________________
Reply With Quote
  #3    
Old January 5th, 2014, 02:13 AM
bartyboy6's Avatar
bartyboy6
 
Join Date: Sep 2010
Gender: Male
Thanks, but there's one problem: I have like zero knowledge about scripting. how do I use that code, how do I give the player those random cards?
Reply With Quote
  #4    
Old January 5th, 2014, 05:16 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
You're welcome to learn how to script if you want to script. I've already told you (twice) exactly what you can copy, and given you the majority of the code you'll need.
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 05:51 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.