Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

How would I do this? (Q&A Thread) Sticky

A topic by MythAtelier created Jun 07, 2022 Views: 7,610 Replies: 144
Viewing posts 41 to 51 of 51 · Previous page · First page

Hello. I'm sorry for using a translator.
When I go into battle, I want to resize the cards that under the screen. (The cards are too big now.)
How can I resize the cards?

Developer

Hello simple126, you can resize the Cards by providing a Base image with different dimensions. The Card will change size to match whatever the Base image you use.

Hi! This plugin is exactly what I was looking for, and I'm very excited to use it!

I have a question regarding the movement animation of the skill cards played from hand.

I’m trying to create a card combat system inspired by poker, and I’ve implemented common events to display the cards as pictures on the battle screen in the order they are played. (The 'Will End Turn' card passive inflicts damage equal to the sum of the numbers.)

Currently, it seems that the cards played from hand hover in the center of the screen (presumably waiting for their effects to execute) before flying to the discard zone. 

My questions are:

1. Is there a way to prevent the visual of the cards flying to the discard zone? Perhaps making them disappear right after they’re played?

2. If option 1 isn't possible, can the animation of the cards flying to the discard zone play underneath the pictures? I’d like to avoid any overlap with the card images.

I’m very new to RPG Maker, so any suggestions you can provide to achieve the desired effect would be greatly appreciated!

Developer

Hey SapphireSquid10,

Thanks for your questions! Here's a couple workarounds for each:

1. While there isn't a way to prevent the visual of the cards flying to the Discard Zone, you can try Removing cards on play via Card Actions which will ensure they don't move to the Discard Zone and instead are removed in Hand. You can Add the same Card to the Discard Zone as part of that set of Card Actions and players will be none the wiser. Make sure to change the coordinates of the Temp Zone which is where the Card moves to after it is played before it moves to any other Zone.

2. This part is a little bit harder and would require editing the plugin. We can offer an option in a future update that lets you choose the priority of Cards vs Pictures, but right now Cards will always appear above the Pictures layer (has to do with the fact that the Cards are on the Window layer).

Let us know if this workaround does the trick or if it is still insufficient. We can continue to troubleshoot until we find a solution.

Thanks,

MythAtelier Team

(+1)

Adding the 'Remove this' card actions did the trick! The animation now looks much better and aligns with my intention. Thank you so much!

Hello. I recently purchased this plugin and have a question.

How do I make a card a selection when I hover the mouse cursor over it?

Currently, if I move the cursor while clicking on a card, I can get a similar action, but I would like to be able to select a card by hovering the cursor over it without clicking.

Hello and SPECTACULAR plug in(s). Is there any way to modify the width and height of the windows that provide the card info on the battle screen. I am referring to the text box that appears on the top left of the screen and includes the description of the card's abilities when a card is selected. Thank you again in advance!

Developer

Hello IkariMan,

Yes, you can change these using the Help Box Control plugin. Should be in its plugin parameters as Width and Height.

Also we've seen your other post in the Bug Report thread! Just give us some time to give you the steps to solve that issue (it's the holidays, so bit of a skeleton crew right now).

Thanks,

MythAtelier Team

Bought this plugin suite via Steam (it's a very good suite), and seeking a Hard Mode inquiry.
How would one implement a skill cost of zero for one skill type? Like say "Nina" plays any Skill card for 0 MP.
Also, how would one make it so that for said specific actor, any cards that are exiled/removed return to the deck or the hand instead?

Developer(+1)

Hello KBGaming&&Music,

You can dynamically alter Skill Costs via either plugins like YEP Skill Core or our Independent Card Variables plugin.

If you are using YEP Skill Core, you can use the <Custom MP Cost> Notetag in order to have it such that a particular Actor gets to cast this Skill for free.

<Custom MP Cost>
if(user.actorId() == 2)
{
  cost = 0;
}
</Custom MP Cost>

If you would like this to work at the Skill Type level then you might need to use YEP Buff States Core and have a check similar to this on the State itself when the user goes to select the Skill in the menu (which is the CGC equivalent of hovering over the card in Hand).

If you are using Independent Card Variables, you can create a Variable for the card instance and set it to 0, then assign it to the MP Cost.

<Card Passives>
Var(0) init 0
</Card Passives>
<MP cost = var(0)>

The MP Cost will change if you change the value of the Variable via another Card Action, Damage Formula or Script Call.

The second request is a little easier but you'll have to include it in the Card Actions Notetag of each Card. You can check for the user's Actor ID in an if statement and if they match then have the Card move to the Deck/Hand after play and skip to a Label at the End. If not, then it will move to Discard/Exile as the Card normally does.

<Card Actions>
//Do Card Actions Here ...
If (user.actorId() == 2)
Move this to Deck
If (user.actorId() == 2)
Jump to End
Move this to Discard
Label End
</Card Actions>

There is currently no way to bind a Card Action like Discard or Remove to a Zone destination so it will need to be done manually. This will be a feature introduced in a future update.

Hope this helps. Let us know if there is more we can do.

Thanks,

MythAtelier Team

Very well. Thank you for your reply and hopefully this information is helpful.

Addendum:
Apparently, Visustella Core plugins (this is an MZ project(!)) cause a weird arse "cannot read property of undefined" (IsPressed); this occurs whenever attempting to go into any added menus. Only using VS Core and VS Skills States Core.
Could use YEP plugins; pretty sure FOSSIL holds those steady...(?)

Good day Myth, how can I have my card show the formula of my skill? 

Developer

Hey Arcanamoon, if you are using MV then YEP Message Eval Text is your best bet. Use the evalText<<>> Notetag in the Skill Description and you will be able to show formulas. You can have it pull the stats of the user and show the damage formula based on that :)

I just try it and it ain´t working for me, probably because I´m doing something terrible here, could you gime a practical example please? Here is how have the skill description: 
Deal eval<<a.atk>> to one Enemy.

Developer

Because you got the syntax wrong. Try

Deal \evalText<<$gameParty.leader().atk>> to one Enemy.

Once you have that working, we can get into more specific conditions.

Firs Myth, Happy New year! I hope your would be able to achive all your projects has you envision them! 
Second, I bought your Plug In via Steam, I do not if this could be relevant, Here is the link: https://store.steampowered.com/app/3243700/RPG_Maker_MV__Card_Game_Combat_Deckbu...
At last, sorry if the image is a bit to big, but is for quality for quality purpose. I copy/paste your text, and here is what happed. Is not displaying what it need to display

Developer

Hello Arcanamoon, 

It looks like you have either not included YEP Message Core or YEP Message Eval Text in the plugin order. Please post a screencap of your Plugin Manager list so that we can make it work. This solution has become standard practice for everyone using CGC in MV so we should be able to get it working.

Thanks,

MythAtelier Team

(3 edits)

I see, those are Yanfly plug in! In other words, I need to get those to do what I want, My guess those plug ins works with yours if that is what are you suggesting to use. 

Thanks for the help! I'll look into it. Just a suggestion if you do not mind, I think you should incorporate that option in your core engine, the one of using eval to display formulas results in the cards, insted of rellying on other creators plug-ins, that feature is both, important and core from these type of games.
Still, you plug-in amazing and I will make my dream of creating a card game come true, thanks for your support and hard work. If I have any other doubt, I´ll come again asking for help, till next time Myth :) 

Developer

Yes, Arcanamoon, that’s what we meant. YEP Message Core and YEP X Message Eval Text plugins are compatible with CGC for the specific purpose that you are requesting.

We will consider building the feature into CGC natively so you don’t have to use Yanfly Engine plugins if you don’t want (though we highly recommend them, especially Action Sequences and Buff States Core).


Looking forward to seeing your dream card game in action. Let us know if you have any other questions :)

Thanks,

MythAtelier Team

Oh! I might look into it, it has some features I kind like, I know his quite famous in the MV and RPG maker community in general. But, this is a feature It should be implemented in your Plugin in the future, after all, you already some of those features, like colored text in the cards. 

Anyways, happy new year and tille next time :)

Deleted 136 days ago
Developer (1 edit)

Hey Arcanamoon,

Please try placing this in the Skill Notetag and see if it works:

<Card Actions>
Select 1 Type Attack from Discard
Move Selected to Hand
Clear Selected
Wait 30
Select All from Discard
Eval var type = "Attack"; var win = SceneManager._scene._cardSelectionWindow; win._cardsSelected = win._cardsSelected.filter(card => Myth.CGC.getIDsOfType(type).includes(card._skillId));
Move Selected to Deck
Clear Selected
Wait 90
Shuffle Deck
</Card Actions>

The Select All Type X from zoneName Card Action is available in CGC v1.6.3 but that update has not launched yet so we are implementing it using an Eval method. You can replace  "Attack" with the specific Type Name  you want to use for your version of the card. You will need to replace it both in the first line and in the Eval. Finally, make sure there is a wait time between Moving the Cards and Shuffling the Deck. Shuffling while the Cards are in transit will cause a crash (this has also been fixed for CGC v1.6.3) so the Wait time is a safety measure to make sure they get there before the next Card Action.

<card actions="">Let us know if this works on your end. If you run into any issues, we can troubleshoot here until the solution works.</card>

<card actions="">Thanks,</card>

<card actions="">MythAtelier Team
</card>

Hello Myth, I have 2 questions about CGC.

1. How do I implement ‘if this is the first card used, deal an extra 50 damage’?  I "used If user._firstFlag == true   draw 1 "from the demo to try to draw 1 card but for some reason it doesn't work in my game project

2. How to achieve the effect ‘Deal ✖10 damage to the type of attacking card used this turn’ 

Thank you

Developer (1 edit)

Hello Gaji666,

1. You are on the right track. You need to make this check in the Damage Formula. It might look something like this:

var dmg = 10; if(!a._firstFlag){ dmg += 50; a._firstFlag == true;} ; dmg

In the above example, the Card's base DMG is 10, but if it is played first, it deals +50 DMG and then sets the first flag to true so no other cards can benefit from this effect this turn. Remember to set user._firstFlag to false in the End Turn Button Skill so that it can be available next turn.

2. Not sure I understand this effect. You are trying to deal Damage to the card itself (not currently possible in CGC) or are you trying to buff the DMG on the next type of Card played this turn?

Thanks,

MythAtelier Team

1.Thank you for your detailed response! I have understood! Also are there other useful flag words like lasttype, firstflag?

2.Sorry, my english is not very well. I apologize for any misunderstanding. I mean 10 times the number of card types used this turn on an enemy.

Developer

1. These are all local variables that we are declaring to keep track of a state. You can create as many as you want and call them whatever you want. In the Demo Project, we mostly use _firstFlag (for effects that trigger when the first Card is played) and _lethalFlag (for effects that trigger when an enemy dies). Just remember to reset these flags in the Notetags of the End Turn Skill.

2. This is a little tricky because you will need to keep track of the types of every card you play in a turn before this card is played. Luckily we are already tracking the primary Type of a Card with _lastType variable so this would just add onto that. Please add this Card Action directly under the Eval where user._lastType is set for EVERY card in your game.

Eval user._typesPlayed = user._typesPlayed || []; if(!user._typesPlayed.includes(user._lastType)) user._typesPlayed.push(user._lastType);

This creates a new array variable which contains a list of each type that has been played during a turn. It only records every new Type that is played, so if the same Type is played twice it is not added to the array. We can now use this in a damage formula like so:

var dmg = 10; user._typesPlayed = user._typesPlayed || []; dmg *= user._typesPlayed.length; dmg

This makes it such that the Damage a Card deals is equal to 10 x the number of types played before. This does not include the card itself only types played before this card is used. So, if this is the first card played then it will be 10 x 0 because no other Cards with Types have been played before this. If, however, 3 different Types have been played before this card, it will deal 10 x 3 = 30 DMG.

Lastly, we must clear out user._typesPlayed when the Turn ends so that next turn it can start over again. Please add this Eval to the Card Actions Notetag of your End Turn Skill.

Eval user._typesPlayed = undefined;

Note: this works if there is only one type per Card. If there are multiple Types, then the code will have to be a little different to track the total number of types. Let us know if you require that and we can provide that solution for you.

I'm sorry I'm bothering you again. 

The effect I'm trying to achieve is “Draw a card, if it's an attack card add an extra 10 blcok”

 I'd like to ask what's wrong with the way I'm writing this, it didnt work:

Select 1 of 1 from deck Top

If $dataSkills[SceneManager._scene._cardSelectionWindow.selectedCards()[0]._skillId]._cardTypes.includes("Attack")

Add Block +10

Move Selected to hand

Clear Selection

thanks to your demo. I solved this problem by replacing "Agility" with "agility"

Developer

Good to hear you were able to resolve this issue.

Thank you for your reply!! I am so love this system and I have too much question.. Is it possible to allow the person using the card to exchange a card in the deck or hand with the target (teammate)?

Developer

Yes, this is possible with some Evals. Can you give me an example of a card/ability you would like to implement? I can then give you the Card Action Notetags necessary to implement this feature on that basis.

For example, this is a card target to teammate:

<Card Actions>

Select 1 from hand

Add Selected to "Target's" hand

Clear Selection

</Card Actions>

<Card Target Actions>

Select 1 from hand

Add Selected to "User's hand"

Clear Selection

</Card Target Actions>

This is my aim. But I dont know how to express" target". And I aslo tried this:

"<Card Target Actions>

Select 1 from discard

Eval user.actorId(2).addCardToZone([SceneManager._scene._cardSelectionWindow.selectedCards()[0]._skillId],"hand")

Clear Selection

</Card Target Actions>"

But I dont know why 2nd actor did not add card to hand

(5 edits)

Hi, I'm Dagon_tako, Japanese. 

 We use DeepL translation. I purchased it on Steam. I am using version 1.6.2.

RPG Maker MZ. 


 After using a card, pressing the left mouse button without moving the mouse selects the leftmost card.

Players accustomed to quick manipulation are saddened when they use the wrong card.

I think it's because the selected script doesn't work unless I move the mouse, is there a solution?


Right-clicking in the Deck, Discard, Exile Zone selects the leftmost card in the hand.

Left-clicking in this state uses the left-most card.


In any case, can't the worst-case scenario be eliminated from the selection process?


Thank you for taking the time to share.

(1 edit)

I bought the Independant Card Variables add-on for this plug in and I am having some issue.

Bottom line question: How do I put the actor’s attack stat (or more) into the card description?

If I try to init a variable like:

<Card Passives>
Var(0) init 34
</Card Passives>

It works fine. However, I want the value to be equal to the actor’s attack stat. I cannot do Eval with passives, so I was hoping this would:

<Card Passives>
Var(0) init $gameActors.actor(1).atk
</Card Passives>

But it doesn’t.

I tried to do so in actions as so:

<Card Actions>
Eval $gameVariables.setValue(101, $gameActors.actor(1).atk)
Var(0) set $gameVariables.value(101)
</Card Actions>

This successfully sets the game variable 101, but not the card variable. So I also tried this:

<Card Actions>
Var(0) set $gameActors.actor(1).atk
</Card Actions>

This also doesn’t work.

For context, here is the Skill Description:

Basic Attack. Deals \Var[0] damage.

Bonus question: My game will only have 1 party member (unless I add summons), but can I also do this with multiple party members?

Viewing posts 41 to 51 of 51 · Previous page · First page