Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Turn End with points

A topic by DDreamsGames created Oct 24, 2022 Views: 296 Replies: 3
Viewing posts 1 to 4

Hello

so I understand that you can use all of your cards in the same turn unless some card has the appropriate notetag.

But is it possible to set a specified number of cards to be used each turn? (examplke: 3 cards max per turn) Preferably controllable with a variable in game (example: level up, now you can use 4 cards)

Or is it possible to add a "cost" like most card games to (like hearthstone) to each card so that you have, say, 10 total points to spend, and after that your turn is over?

Thanks

(1 edit)

That would be a useful feature!

Personally, I use Yanfly's Enhanced TP to limit the player's maximum TP to 3, disable any TP gain or regen, then give each card a 1 or 2 TP cost. I also use Yanfly's Base Troop Event to make sure the player gains his max TP back each turn. When the player levels up, I use Yanfly's Enhanced TP's notetags to change the TP mode to another one with higher max TP.

Oh, I also changed the name from TP to AP. Gotta make it look as though I know what I'm doing :)

It's a massive (and almost ridiculous) workaround, but I couldn't think of a better one hahahahha

Developer (2 edits)

We can definitely look into adding this as a future feature, but I believe we can currently achieve this with Yanfly Buffs & States Core and Yanfly Auto Passive States. plugins. Here's one potential implementation assuming this is a solo member party game:

1. Create a state called CardsPlayedTracker. This state will be set to 0 at the start of an Actor's turn increment its State Counter each time a Card is played. For the purposes of this example, I'm going to say that this is State 15.

<Custom Battle Effect>
target.setStateCounter(15, 0);
</Custom Battle Effect>
<Custom Turn Start Effect>
target.setStateCounter(15, 0);
</Custom Turn Start Effect>
<Custom Action End Effect>
target.addStateCounter(15,1);
</Custom Action End Effect>

2. Create a Variable called MaxCardsPlayed and set it to the base number of Cards you want played in a Turn (e.g. 4). For the purposes of this example, I'm going to say that this is Variable 23.

3. You can add this Card Passives notetag for all of your cards so that if CardsPlayedTracker Counter exceeds the MaxCardsPlayed variable, then cards can no longer be played until start of next turn.

<Card Passives>
Require $gameParty.leader().getStateCounter(15) < $gameVariables.value(23)
</Card Passives>

3. Add CardsPlayerTracker state as a Passive State to your playable Actors in their Notetag section:

<Passive State: 15>

The result should be pretty close to the intended system you want and you can refine it from there. The MaxCardPlayed variable can be incremented with each level up. This is possible with multiple party members, but you will need to get more clever with the code so that you are tracking each Actor's CardsPlayedTracker and MaxCardsPlayed separately and the Passive requirement should be for the current Actor and not just the game party leader.

You can also do the reverse of this where you have an Energy budget for playing cards. As Flow9881 suggested, you can use TP or MP values for it. Yanfly's Skill Core should also let you specify custom skill costs and skill requirements.

Let us know if this helps or if we need to troubleshoot further :)

(+1)

Thanks for the thorough explanation.

I'm actually on Rpg Maker MZ, so instead of Yanfly's plugins I have the Visustella set, I think they're very similar so it's probably doable. I'll look into it!

Thanks