Card Game-Like Mechanics

Hello. This is my first time making a game in RPG Maker VX Ace and I needed help on something.


You see, I'm planning to make a JRPG-style RPG with a protagonist who can use cards to fight. However, while I see some scripts/mechanics that can make a card game-like mechanic that allows to draw a card and practically use them to summon or cast spells, I wanted that same mechanic exclusive to the protagonist just like with 7th Dragon III: Code VFD's Duelist class because I want other characters to have the usual RPG-style turn-based mechanics.


So anyone got any ideas how can I do so?
Your question isn't entirely clear - in what way do you want your "card game-like" class to be different than your other classes; what do you want this class to do?  (Also, if your question is a "how to", the VX Ace Help subforum would be a better place to ask.)


I do have an old script that could probably simplify your setup a lot - Playing Cards (free for noncommercial use; requires a license for commercial games).  It's kind of a designer-side utility rather than something the player directly uses, so you can use it to create something tailored to your own needs.
@WavelengthFrom what I gather, it's like Yu-Gi-Oh, but only for one person. 
Your question isn't entirely clear - in what way do you want your "card game-like" class to be different than your other classes; what do you want this class to do?  (Also, if your question is a "how to", the VX Ace Help subforum would be a better place to ask.)


I do have an old script that could probably simplify your setup a lot - Playing Cards (free for noncommercial use; requires a license for commercial games).  It's kind of a designer-side utility rather than something the player directly uses, so you can use it to create something tailored to your own needs.





 






 



Well, from my experience playing 7th Dragon III: Code VFD, this character/class can't use spells directly. He/she has to draw a card at the start of every turn. At the start of every battle, he/she starts out with 2-3 randomized element cards in play. The tricky part is to get as needed cards to use a spell just like in 7th Dragon's Duelist mechanic. There is also a spell to draw more cards, but I'm planning a required level for that.


If you're confused, I can give you a link or picture on how that mechanic is played.

@WavelengthFrom what I gather, it's like Yu-Gi-Oh, but only for one person. 



And you're right about that. It is like Yu-Gi-Oh with the spells, monsters, and traps, but the main difference is that the character is not playing a TCG, but in a middle of a turn-based RPG battle.
Well, from my experience playing 7th Dragon III: Code VFD, this character/class can't use spells directly. He/she has to draw a card at the start of every turn. At the start of every battle, he/she starts out with 2-3 randomized element cards in play. The tricky part is to get as needed cards to use a spell just like in 7th Dragon's Duelist mechanic. There is also a spell to draw more cards, but I'm planning a required level for that.


If you're confused, I can give you a link or picture on how that mechanic is played.



No, I think I understand - the spells have costs of "cards" that you need to have drawn?  I feel like the skill implementation would be fairly easy to do using Yanfly's Skill Costs scripts... you can represent the cards as Items that are reset at the beginning of each battle.  The actual building of a deck, etc. could be harder since you would need to set up a front-end interface for it.
@Wavelength How hard are we talking about? And also, the character needs to spend MP along with the cards since THIS is an RPG.
Not super hard.  You could event a such a system if there are only a small number of unique cards, or you could script it if you want a larger number of unique cards.  If you don't have any Ruby scripting skills but you want a large number of unique cards, you could probably commission the whole thing for under $100 (or you could spend a lot of time eventing it).
@Wav  Well, there are no unique cards in the game as it only has element cards just like in 7th Dragon since I don't want the class's card system to be very complicated.
This is turning into a "How do I...?" rather than a general discussion.


Just checking before moving it - this is for Ace, correct?
@ksjp17 Yes, for VX Ace. And sorry about this. I just want any suggestions about this mechanic I'm planning.
I've moved this thread to RPGMaker VXAce. Please be sure to post your threads in the correct forum next time. Thank you.
OK, now that we're in a Help topic... what part of the system, specifically, are you having a hard time implementing (or do you think would be the hardest to implement, if you haven't tried yet)?  I could give you tips on getting a specific piece working... trying to detail the entire system would be a long, possibly confusing affair.
@Wavelength Namely adding the hand feature in the battle system and drawing a card at the start of every turn as well starting the battle with 2-3 randomized element cards.
Well, it seems easy enough to event, you'll just need a while to make the cards. Your event would look something like this:

Spoiler
Conditional Branch: Variable[x] < (The amount of cards you have take away 1)
  Conditional Branch: (Script) Input.trigger? 🙂RIGHT)
     Control Variables: [x] += 1
   Branch End
Branch End

Conditional Branch: Variable[x] > 0
  Conditional Branch: (Script) Input.trigger?🙂LEFT)
      Control Variables: [x] -= 1
  Branch End
Branch End

Conditional Branch: Variable[x] = 0
Show Picture: #number, name, blah, blah, blah
Branch End

#And so on until you reach the number specified in your first variable.

Conditional Branch: Input.trigger?🙂C)
Conditional Branch: Variable[x] = 0
Play SE(#Something) #Optional
Force Action(Something_Or_Other)
Branch End
Branch End






You'd keep going with the other conditional branches too  until you reach the desired number, making each one force an action. 

This is for the spell cards. The conditional branches at the top are your button inputs to scroll through the cards. It checks to see that you aren't at either of the end cards before allowing you to scroll. The show picture commands are to show the card layout. Make an image with all of the cards on it, and in the same image, Make a cursor that hovers over one of the cards. As the variable increases, make more images each with the cursor one card to the right.


The last set of conditional branches are to get what happens when you select a card.

Spoiler
Control Variables[x] = Rand.[1...3]
Conditional Branch: Variable[x] = 1
Show Picture: #number, name, blah, blah, blah
Add State: (Something)
Branch End

#Keep going.

 These are the element cards. Rand. 1...3 is for selecting a random card. 


For Show Picture, it would be a picture of the card selected. After all of these events you need to put in an erase picture command so that the card doesn't permanently stay on the screen. These events are both for the common event section. The trigger is none, and they get called in the troop section. 
@HexMozart88 It looks easy enough. Except one problem that I hate to confess:


I'm a script noob...
It's not scripting. I just used the Code option to make it easier to write out. It's just events. 
I see. But will it able to start the battle with 2-3 element cards and consume some of them for a spell? Because when there are not enough element cards needed, the spell would grey out and prohibit the player to use it?
Yeah, so, you'd use a switch. If it's on, you can use the spell, else, you can't. Probably a variable to consume the cards, I would think. So, set it to however many cards you have at the beginning of the battle, and then when you want one to be consumed, take away from that variable. You may need multiple common events, like one to show 3 cards, one to show two and one to show one. 
I think I understand. But I'm worried about this since this feature have to be every battle as this is the protagonist's specialty.
It should carry through for each battle. You just need to copy it for every troop you're going to use. 

Original thread: https://forums.rpgmakerweb.com/threads/card-game-like-mechanics.66507/