Table of Contents

Ordinarily, every card an actor collects goes into battle with them. This plugin adds an extra menu the player can use to take cards they've collected in their Library and create Decks with them, equip a deck, and use that deck going into battle.

Whenever an actor learns a skill, instead of a card being added to their deck, it's added to their Library, and can be manually added to their deck using the Deck Editor interface.

If “Actors share Library” is turned on, all actors' cards will be pooled into one Library, and all decks created will be shared among the party.

Deck Editor Plugin is available on itch.io.

Parameters

Deck Rules

Actors share library? If set to ON, all party members will share a Card Library as well as sharing a list of Decks.
Starting Library Cards Contains the list of starting Library Cards if the previous parameter is ON. Uses the same syntax as Actor/Class Decklist Notetags.

Min Deck Size The minimum amount of cards a deck must have before it can be equipped.
Max Deck Size The max amount of cards allowed in a deck.
Max Card Copies The max amount of copies of an individual card allowed in a deck.
Max Name Length The amount of characters allowed in a deck's name.
Equip Cards Setting Determines what happens when gaining cards through MYTH_CGC_EquipCards.
Setting it to Add to Library will cause cards gained this way to be added to the Library so that they can be added to decklists.
Setting it to Add to Current Deck at Start of Battle will cause any cards gained through equipment to be added to the actor's deck at the start of battle, on top of their current decklist, bypassing deck restrictions.

Deck Points

Deck Points You can set this to false and disable Deck Points entirely.
Visible? If set to false, Deck Points will still be a feature of the Deck Editor but won't display to the player underneath the preview card in the deck editor.
Deck Points Name How Deck Points will be called in your game.
Deck Points Abbrv The abbreviation of your Deck Points.
Default Starting DP How many max Deck Points an actor will initialize with at level 1 by default. This can be overridden with notetags.
Deck Points on Level Up How many Deck Points an actor will gain on a level up. Can be overridden with notetags.

Deck Editor Scene

Card Window Width The width of the windows where the player selects cards. Leave room for the preview card.
Preview Card Y The Y coordinate of the preview card in the Deck Editor scene. It's always centered horizontally.
Preview Card Scale The scale of the preview card in the Deck Editor scene.
Max Visible Rows A number used to calculate what row the player currently has selected before scrolling down. If the game scrolls down too early, try raising this value; and it if scrolls too late, try lowering it.
Card Placement Settings A struct containing several parameters to determine how cards will fit inside their windows.
Card Placement Settings
Max Columns The number of cards a row before cards move to the next row in the window.
Card Scale The scale of the cards in the windows in the Deck Editor scene.
Selected Card Scale The scale of the card in the windows in the Deck Editor scene that is currently being inspected.
Starting Padding The padding between the left/top of the Window and the top-left-most card.
Card Spacing The spacing between cards.
Amount Text Offset The coordinate offset values for the Amount text. They default to underneath the center of the cards.
Amount Text Justify Whether the amount text of a card will be centered, aligned left, or right.

Scrollbar Settings

Front Sprite The sprite used for the scrollbar. The middle third of its height scales to change the bar's size.
Back Sprite The sprite used for the bit behind the scrollbar.
X Offset The amount of pixels to the right of a scrolling window the scroll bar will appear.
Y Pinch The amount of pixels the top is lowered by and the bottom is raised by to keep within the window.

Arrow Sprites

Right Arrow Image The image for the arrow when adding cards to the deck.
Left Arrow Image The image for the arrow when removing cards from the deck.
Anchor Y The Y coordinate of the arrow sprite. It's horizontally centered.

Deck Selection

Help Window Width The width of the Help Window at the bottom of the screen.
Help Window Font Size The font size for help text for this scene. Default for RPG Maker is 28.
Deck Status Width The width of the Deck Status Window at the bottom right of the screen.

Equipped Image The image used on the Deck Selection window to show a deck is equipped.
Anchor X The X coordiante of the equipped image in the Deck Selection window.
Anchor Y The Y coordinate of the equipped image in the row on the window that contains the equipped deck.

Deck Status Contents The List of things the Deck Status Window will display.

This parameter is an array, where each index in the array adds a new line to the Deck Status Window. These are the things that can be listed in the Deck Status Contents:

Name The name of the deck
Count The amount of cards in the deck / the max amount of cards
Cost The total DP cost of the deck's cards / the actor's max DP
Type The number of cards in each Type in the deck. Will only display as many types as the window has room for.

You can make multiple items share a line on the window by separating them with commas, like so:

Name, Count, Cost

Doing so may not give them enough room to display comfortably, depending on the width of the window specified in the Deck Status Width plugin parameter. In addition, Type always takes up a full line.

Illegal Deck Messages

Too many cards The message that displays in the Deck Selection window if that deck has more than the legal number of cards
Not enough cards The message that displays if a deck has less than the legal number of cards
Too many cards of a type The message that displays if the deck has more cards of a given type than the legal amount. Use “%t” in the message in place of the type name.
Not enough cards of a type The message that displays if the deck has fewer cards of a given type than the legal amount. Use “%t” in the message in place of the type name.
Too many copies of a card The message that displays if too many copies of one card are in the deck.
Cards missing from Library The message that displays if the deck contains cards that are not in the player's library.
Not Enough Deck Points The message that displays if the total DP cost of a deck exceeds the actor's max DP
Sealed Type in Deck The message that displays if the deck contains cards that are currently sealed by type %t.
Restricted card The message that displays if the deck contains a card whose requirements are not met.
Illegal Deck Equipped Popup The message that pops up if the player tries to leave the menu with an illegal deck equipped.
Font Size The font size for the above messages when they appear in the Deck Selection window.

Backgrounds

Deck Selector Background Image A background image can be added to the Deck Selector scene.
Deck Editor Background Image A background image can be added to the Deck Editor scene.

Plugin Commands

Command Syntax Event Usage Description
IncreaseDP [ActorID] [Amount]
Map Only Will add the specified amount to the actor's max DP, like raising a stat.
OpenDeckEditor
Map Only Will open the Deck Editor Scene during an Event
EquipDeck [ActorID] [DeckName]
Map Only Equips Actor with matching ID with a Decklist you specify. Actor needs to be in the party. Decklist needs to match the name given. Example: “EquipDeck 1 HeroStarter” will equip the Actor at ID 1 with the Decklist called “HeroStarter” if it is available.
AddCardToDeck [ActorID]
    [DeckName] [SkillID] [addToLibraryToo]
Map Only Adds the supplied Card to the supplied actor's deck, if such a deck exits.
In place of a deck name you can use “%current” for the deck the actor currently has equipped.
AddToLibraryToo - (true/false) determines if the Card is also added to the actor's (or party's) library. It is recommended to keep this as true to prevent making a deck illegal.
RemoveCardFromDeck [ActorID] [DeckName]
    [SkillID] [RemoveFromLibraryToo]
Map Only Removes the specified Card from the actor's deck, if the card is present. In place of a deck name you can use “%current” for the deck the actor currently has equipped.
RemoveFromLibraryToo - (true/false) determines if the Card is also removed from the actor's (or party's) library. It is recommended to keep this as false to prevent making other decks illegal.

Notetags

Notetag Syntax Database Usage Description
<deck restriction>
Min Size: X
Max Size: Y
Min Type typeName: X
Max Type typeName: X
Seal Type typeName
Seal Type typeName if [expression]
Require [expression]
Requirement Message: [string]
</deck restriction>
Actors, Classes Sets a Deck Restriction on the Actor or Class.

Min Size: X sets the minimum number of Cards required in the deck for it to be valid.

Max Size: Y sets the maximum number of Cards to be in the deck for it to be valid.

Min/Max Type typeName: X sets the minimum number of Cards of the given Type to be in the deck for it to be valid.

Seal Type typeName (if [expression] Disables the specified type from being added to the deck if the condition is met or absent.

Require [expression]/Requirement Message: [string] Makes the deck illegal if the code expression evaluates to false and defines a message that will appear in the Deck Selector Window when a deck is made illegal this way.

If an Actor has restrictions from both their Actor notetags and their Class notetags, the Actor notetags will always take precedence.
<Deck Restriction>
Max Copies: 4
Require [expression]
</Deck Restriction>
Skills Sets a Deck Restriction on a specific card.
Max Copies Specifies the number of copies of this Card that can be allowed in a Deck for it to be valid. Number must be higher than 0.

Require [expression] Requires that the expression evaluate to true for the card to be able to be added to a deck.
<decklist DeckName>
5x Skill Y
3x Skill Z
</decklist>
<decklist DeckName>
5x skillName
3x skillName
1x skillName
</decklist>
Actors, Classes This defines a starter Deck for an Actor or Class.

deckName is the name given to the starter Deck and can't have any spaces.

You can specify the Cards in the Starter Deck as Skill IDs (e.g. 34, 45, 52) or as Names (Punch).

By default, all Skills that an actors learns at level 1 are put into a Deck which is equipped on initialization.

You can also put Immutable inside this tag to make this starter Deck unable to be edited.
<Deck Cost: X>
Skills Specifies the DP cost of the skill's card. If this notetag isn't present, a card's DP cost defaults to 1
<Starting Deck Points: X>
Actors, Classes This overrides the value specified in the plugin parameter Default Starting DP for this specific actor/class.
<Deck Points On Level: X>
Actors, Classes This overrides the value specified in the plugin parameter Deck Points on Level Up for this specific actor/class.
<Bonus Deck Points: X>
Weapons, Armor This equipment will add the specified bonus amount to an actor's max DP.

Script Calls

Script Call Syntax Description
$gameParty.addCardToLibrary(skillId)
Adds Card of given Skill ID to the Shared Library. Card will need to be added to a Decklist via Deck Edit Scene in order to be used by an Actor.
$gameParty.removeCardFromLibrary(skillId)
Removes Card of given Skill ID from the Shared Library. If Card with the given ID can't be found, it will not remove anything.
actor.addDeckPoints(value)
Adds extra max Deck Points to the specified actor, similar to raising a stat.

Version History

**v1.2.0**
 - Added the following Deck Restriction options:
     - Max Type typeName: X
     - Min Type typeName: X
     - Seal Type typeName
     - Seal Type typeName if [condition]
     - Require [expression]
     - Requirement Message: [string]
- Added the following Card restriction options:
     - Require [expression]
 - You can now "lock" presets so they can't be edited.
 - Added utility function Actor.isCurrentDeckLegal().
 - Fixed bug where starting decks would contain cards that weren't the same cards that would be in the actor's library. Ghost cards.
 - Added ability to use Deck Editor scene and Card Library scene simultaneously.
 - Added two new Plugin Commands: AddCardToDeck and RemoveCardFromDeck.
 - Added parameter to change how cards gained by equipment factor into the deck.
 - Added parameters for whether DP should be enabled and/or visible.
 - Changed the Deck scenes in line with the Library revamp.
 - Changed parameters to match.
 - Replaced safety skill with a custom still that provides better feedback to the user.

**v1.1.0** - Added Deck Points feature
         You can now customize what info is in the Deck Status window. Doing
         so will change its height based on the amount of lines added.
         Deck Status text now turns red if that component of the deck is 
         illegal (eg, if you have too many cards the card count text turns 
         red)
         Card Amount Text will now be red if the number of copies exceeds
         max.
         Fixed touch input for MV. MZ's is still a little wonky.

         Fixed bug where editing a deck that's currently equipped doesn't
         affect deck in battle unless you manually equip it again.
         Removing the last card from the deck will now activate the library
         list so the player can still make inputs other than cancel.
         Fixed MV bug where the final plugin param's name and description
         would use MZ's plugin command name and description.
**v1.0.0** - Released plugin