Deck Addon for Summon System

By default, every summoner can summon any pet that the party owns at this point in time. This addon makes the player build a deck first that ultimately defines the pets the summoner can choose from in battle.

You, as the game dev, can decide when the player can update their deck, e.g., any time or only in specific locations like their home base. You can also define the deck size and increase (or decrease) it permanently or temporarily through traits, equipment, side mission rewards, etc.

Coming with 2 Layouts!

Layout 1
Layout 2

Notetags

You, as the game developer, can add Notetags to change the deck size of an actor individually.

<Summon Deck Size: +/- x>
- can be applied on Actors, Classes, Equip, & States
- Negative Numbers allowed
- increases or decreases the Deck Size for this Actor

Examples

<Summon Deck Size: +2>
<Summon Deck Size: -1>

Scripting

System

$gameSystem.setSummonDeckCommandVisible(true / false)
- either shows or hides the deck command in the main menu

$gameSystem.isModifySummonDecksAllowed()
- returns true when the player is allowed to modify their deck, false otherwise

$gameSystem.setModifySummonDecksAllowed(true / false)
- either allows or forbids to modify the deck

$gameSystem.summonDeckSize()
- returns the deck size that the party has by default. A summoner may have a different deck size, e.g., when they are equipped with a special item

$gameSystem.setSummonDeckSize(number)
- changes the default deck size

Example: Permanently increase Deck Size by 1

$gameSystem.setSummonDeckSize($gameSystem.summonDeckSize() + 1)

Party

$gameParty.members().some(actor => actor.summonDeck().includes(1))
- returns true when any summoner from the party has pet with ID 1 in their deck

Summoner

actor.summonDeckSize()
- returns the deck size that this summoner has

Example

$gameActors.actor(1).summonDeckSize()
- returns the deck size of the Actor with ID 1
actor.summonDeck()
- returns an array of Actor IDs
actor.includesPet(petId)
- returns true when this actor has the given pet in their deck, false otherwise
actor.modifySummonDeck(index, petId or null)
- modifys a summoner's deck

Example: Add Pet with ID 2 to Deck of Summoner having ID 1 at Slot 1

$gameActors.actor(1).modifySummonDeck(1, 2)

Example: Remove Pet with ID 2 from Deck of Summoner having ID 1

const summoner = $gameActors.actor(1);
for (let index in summoner.summonDeck()) {
  if (summoner.summonDeck()[index] == 2) {
    summoner.modifySummonDeck(index, null);
  }
}

3rd Party Plugin Compatibility

VS Main Menu lets you define the command list in the main menu. If you want to add the Deck menu through VS, follow this procedure:

Switch off „Is Deck visible in Menu“ in „MK_Summon_Deck“

Go to „VS Main Menu Core“ -> Command Window List and create a new entry.

Symboldeck
Icon<as you prefer>
STR: Text<as you prefer>
JS: Text<empty>
JS: Showreturn true;

Alternatively
return $gameSwitches.value(1)
Replace 1 with a Switch ID to bind visibility
JS: Enablereturn true;

Alternatively
return $gameSwitches.value(1)
Replace 1 with a Switch ID to bind accessibility
JS: Run Codeif ($gameParty.members().filter(actor => actor.isSummoner()).length > 1) {
SceneManager._scene.commandPersonal();
} else {
SceneManager.push(Scene_Deck);
}
JS: Personal CodeSceneManager.push(Scene_Deck);

Download

Right-click, save as…

downloads.aerosys.blog/plugins/MK_Summon_Deck.js