User Tools

Site Tools


plugin-deck-edit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin-deck-edit [2024/09/10 03:20] – [Parameters] isiahgamesplugin-deck-edit [2025/01/29 21:43] (current) isiahgames
Line 8: Line 8:
  
 Deck Editor Plugin is available on [[https://mythatelier.itch.io/deck-editor-cgc-expansion-plugin|itch.io]]. Deck Editor Plugin is available on [[https://mythatelier.itch.io/deck-editor-cgc-expansion-plugin|itch.io]].
 +
 +**Current Version: 1.2.1**
  
 ====== Parameters ====== ====== Parameters ======
 {{https://cdn.discordapp.com/attachments/235557488794009600/1096082951642558515/image.png}} {{https://cdn.discordapp.com/attachments/235557488794009600/1096082951642558515/image.png}}
 +===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. | | **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. | | **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. |
Line 23: Line 26:
  
 {{:deck_editor_1.1_wiki_a.png|}} {{:deck_editor_1.1_wiki_a.png|}}
 +===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 Name** | How Deck Points will be called in your game. |
 | **Deck Points Abbrv** | The abbreviation of your Deck Points. | | **Deck Points Abbrv** | The abbreviation of your Deck Points. |
Line 29: Line 35:
  
 {{https://cdn.discordapp.com/attachments/235557488794009600/1096083164927103117/image.png}} {{https://cdn.discordapp.com/attachments/235557488794009600/1096083164927103117/image.png}}
 +===Deck Editor Scene===
 +| **Menu Command Name** | The name of the Menu command that opens the Deck Editor. |
 +| **Command Names** | The names of the commands inside the Deck Selector scene. The commands are: \\ Equip - the command that lets users equip Decks. \\ Edit - the command that lets users edit Decks, and move to the Deck Editor scene. \\ New - the command that lets users create new Decks. \\ Rename - The command that lets users rename Decks. \\ Copy - The command that lets users create duplicate Decks. \\ Delete - The command that lets users delete Decks. \\ \\ If any Command Name is left blank, the command won't appear. |
 | **Card Window Width** | The width of the windows where the player selects cards. Leave room for the preview card. | | **Card Window Width** | The width of the windows where the player selects cards. Leave room for the preview card. |
-| **Hide Offscreen Cards** | If set to ON, cards will disappear when they're scrolled away. This looks good in some resolutions and bad in others. | 
 | **Preview Card Y** | The Y coordinate of the preview card in the Deck Editor scene. It's always centered horizontally. | | **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. | | **Preview Card Scale** | The scale of the preview card in the Deck Editor scene. |
-| **Window Card Scale** | The scale of the cards in the windows 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. | | **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. |
  
 {{https://cdn.discordapp.com/attachments/235557488794009600/1096083239808024576/image.png}} {{https://cdn.discordapp.com/attachments/235557488794009600/1096083239808024576/image.png}}
 +===Scrollbar Settings===
 | **Front Sprite** | The sprite used for the scrollbar. The middle third of its height scales to change the bar's size. | | **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. | | **Back Sprite** | The sprite used for the bit behind the scrollbar. |
Line 42: Line 60:
 | **Y Pinch** | The amount of pixels the top is lowered by and the bottom is raised by to keep within the window. | | **Y Pinch** | The amount of pixels the top is lowered by and the bottom is raised by to keep within the window. |
  
 +===Arrow Sprites===
 {{https://cdn.discordapp.com/attachments/235557488794009600/1096083310071001108/image.png}} {{https://cdn.discordapp.com/attachments/235557488794009600/1096083310071001108/image.png}}
 | **Right Arrow Image** | The image for the arrow when adding cards to the deck. | | **Right Arrow Image** | The image for the arrow when adding cards to the deck. |
Line 47: Line 66:
 | **Anchor Y** | The Y coordinate of the arrow sprite. It's horizontally centered. | | **Anchor Y** | The Y coordinate of the arrow sprite. It's horizontally centered. |
  
 +===Deck Selection===
 {{https://cdn.discordapp.com/attachments/235557488794009600/1096083439465275453/image.png}} {{https://cdn.discordapp.com/attachments/235557488794009600/1096083439465275453/image.png}}
 | **Help Window Width** | The width of the Help Window at the bottom of the screen. | | **Help Window Width** | The width of the Help Window at the bottom of the screen. |
Line 69: Line 89:
 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. 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===
 {{https://cdn.discordapp.com/attachments/235557488794009600/1096083561657925682/image.png}} {{https://cdn.discordapp.com/attachments/235557488794009600/1096083561657925682/image.png}}
 | **Too many cards** | The message that displays in the Deck Selection window if that deck has more than the legal number of cards | | **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 | | **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. | | **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. | | **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 | | **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. | | **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. | | **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 ====== ====== Plugin Commands ======
  
Line 83: Line 112:
 | <code>OpenDeckEditor</code> |  Map Only  | Will open the Deck Editor Scene during an Event | | <code>OpenDeckEditor</code> |  Map Only  | Will open the Deck Editor Scene during an Event |
 | <code>EquipDeck [ActorID] [DeckName]</code> |  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. | | <code>EquipDeck [ActorID] [DeckName]</code> |  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. |
 +| <code>AddCardToDeck [ActorID]
 +    [DeckName] [SkillID] [addToLibraryToo]</code> |  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. |
 +| <code>RemoveCardFromDeck [ActorID] [DeckName]
 +    [SkillID] [RemoveFromLibraryToo]</code> |  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. |
  
  
Line 89: Line 122:
 ^  Notetag Syntax  ^  Database Usage  ^  Description  ^ ^  Notetag Syntax  ^  Database Usage  ^  Description  ^
 | <code><deck restriction> | <code><deck restriction>
-minsize: X +Min Size: X 
-maxsize: Y +Max Size: Y 
-</deck restriction></code>    Actors, Classes  |  Sets a Deck Restriction on the Actor or Class.\\ \\ **minsize: X** sets the minimum number of Cards required in the deck for it to be valid.\\ \\ **maxsize: Y** sets the maximum number of Cards to be in the deck for it to be valid.\\ \\ If an Actor has restrictions from both their Actor notetags and their Class notetags, the Actor notetags will always take precedence. +Min Type typeName: X 
-|  <code><max copiesX></code>  |  Skills  |  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.  |+Max Type typeName: X 
 +Seal Type typeName 
 +Seal Type typeName if [expression] 
 +Require [expression] 
 +Requirement Message: [string] 
 +</deck restriction></code>    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. 
 +|  <code><Deck Restriction> 
 +Max Copies
 +Require [expression] 
 +</Deck Restriction> 
 +</code>  |  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. |
 |  <code><decklist DeckName> |  <code><decklist DeckName>
 5x Skill Y 5x Skill Y
Line 101: Line 144:
 1x skillName 1x skillName
 </decklist> </decklist>
-</code>  |  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. +</code>  |  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.  | 
-|<code><Deck Cost: X></code> |  Skills  | Specifies the DP cost of the skill's card. If this notetag isn't present, a card's DP cost defaults to 1 |+| <code><Deck Cost: X></code> |  Skills  | Specifies the DP cost of the skill's card. If this notetag isn't present, a card's DP cost defaults to 1 |
 | <code><Starting Deck Points: X></code> |  Actors, Classes  | This overrides the value specified in the plugin parameter Default Starting DP for this specific actor/class. | | <code><Starting Deck Points: X></code> |  Actors, Classes  | This overrides the value specified in the plugin parameter Default Starting DP for this specific actor/class. |
 | <code><Deck Points On Level: X></code> |  Actors, Classes  | This overrides the value specified in the plugin parameter Deck Points on Level Up for this specific actor/class. | | <code><Deck Points On Level: X></code> |  Actors, Classes  | This overrides the value specified in the plugin parameter Deck Points on Level Up for this specific actor/class. |
Line 115: Line 158:
 ====== Version History ====== ====== Version History ======
 <code> <code>
 +**v1.2.1**
 +- Fixed Param Descriptions in DeckEditor referring to Simple Library.
 +- Fixed bug where removing a card from the deck would cause a card sprite to appear in the CardList even while the CardList was filtering by card types said card didn't have.
 +- Added utility function Game_Actor.prototype.removeExcessCards(deck)
 +- Added support for negative DP costs for cards.
 +- Added plugin parameters to change Command names.
 +- Fixed MZ bug where the AddCardToDeck and RemoveCardFromDeck Plugin Command would not work.
 +- Changed the "Deck Preset Error" Card sprite/text to "Under Deck Size Error" for better conveyance on how to fix the error.
 +         
 +**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 **v1.1.0** - Added Deck Points feature
          You can now customize what info is in the Deck Status window. Doing          You can now customize what info is in the Deck Status window. Doing
plugin-deck-edit.1725931239.txt.gz · Last modified: 2024/09/10 03:20 by isiahgames