Feral Tank ‐ Readme - jondevarthur/feraltrainer GitHub Wiki
Download - Installation - Setup File
Equipment Setup - Readme
Welcome to Feral Tank, a simple equipment system for Pokemon Essentials v21.1! Feral Tank introduces simple new properties to the behind-the-scenes definitions of Pokemon to allow storage of 'equipment' (i.e. a simple list of items the Pokemon is holding, similar to Held Items). To make life simple, it also lets you handle Held Items from the same screen!
- You define equip slots in the settings and then give any item the same definition as an item flag - then as long as your Player has that item, they can equip it to that slot on any Pokemon!
- Individual slots can be locked until a game switch is enabled.
- You can still equip to locked slots with scripts, it's just that the player can't touch them at all - if you want, you can force certain slots to be set by an event until you're ready to let the player have full freedom!
- You can totally hide locked slots if you like! Otherwise, alternate graphics will be shown.
- Individual Pokemon can be banned from using specific slots based on a combo of species and form.
- Optionally, alternate graphics can be shown to denote these are 'special'.
- Item flags can override these - so you can stop your Rotom from holding Weapons but still give him a special Rotom Weapon all of his own!
- Placeholder descriptions can be used for empty, locked and banned slots.
- Individual slots can be locked until a game switch is enabled.
- Wild Event Pokemon can have their Equipment set also - so yes, you can capture a fully equipped Armored Mewtwo!
- Trainers are not current supported as this requires additional alteration to how trainer data is defined; similar effects can be natively achieved with the default EV/IV calculations.
- To give a Wild Event Pokemon equipment, you need to set
pkmn.equipment =when doing the long format Pokemon definition in the format Pokemon.new(:MEWTWO,70) etc. Equipment will be an array equal to the number of slots you have defined (excluding held items), so if you have five slots and the third is the head slot, that would meanpkmn.equipment = [0,0,:KINGSHELMET,0,0]would put a King's Helmet in the head slot. You can put items in invalid slots, so be careful if that Pokemon is able to be caught!- 0 is used behind the scenes to denote an empty slot. Make sure to put a 0 for empty slots if you ever fiddle around behind the scenes!
- Equipment does not visually display on Pokemon, it is just behind-the-scenes.
- Equipment effects are defined in a script, not in Items.txt. This helps keep things as compatible as possible with other plugins.
- Similar, any item (including held items) can be given a second definition via the same script to display as shortened 'help text' on the Equipment menu only. Depending on how much information you need to show, you can choose between a single-line description or a multi-line, message window-style traditional description.
- Held Items can be given the same bonuses as equipment - meaning yes, your players can sacrifice this slot for more armor, and existing items can give bonuses!
- Effects supported as of Version 1.1 are stats, natures (for stat calculations only) and moves.
- Stats are HP, Attack, SpAttack, Defense, SpDefense and Speed.
- Boosts may be given to base stats, IVs, EVs, Level bonuses and 'flat rate' bonuses (i.e. a flat rate bonus of 20 is whatever the stat calculates to, + 20 additional points).
- Bonuses can be negative - but they can't go below 1, for obvious reasons.
- Boosts are temporary based on the equipment only and reset when the equipment is removed.
- Boosts are additive; you can have a boost for every stat and type of bonus possible on a single item.
- Additionally, as long as the line in 01_setup_equipment returns a valid integer, you can do math if you'd like. The default files gives the example of the Twisted Spoon adding 2 SpAtk per other Pokemon are in the party at a flat rate, and the lagging tail providing the opposite effect for Defense (+2 for every empty slot!)
- Note that stat calculations are not automatic, they're a script that is run - so math on things like the party will actually only take effect when the player's stats are calculated.
- Natures are not actually changed, it just adjusts what nature is used for the Pokemon's stat calculations - meaning an Eevee of Rash nature equipping an item that makes it Hasty will still show as Rash, and Rash will be used as normal when that item is unequipped. Item and Move effects requiring specific natures will use the Pokemon's actual nature, not the equipment nature.
- Nature overwrites are on a 'last one wins' basis - if multiple nature-affecting equipment items are checked, the last one checked will be the nature used. I encourage limiting nature changes to a specific slot.
- Moves are per-item.
- Items can teach more than one move.
- Depending on your settings, moves can be taught universally or based on standard tutor move restrictions.
- Depending on your settings, moves can be restricted to each Pokemon only successfully learning them once from a specific item.
- Depending on your settings, moves can be forgotten when the item is unequipped.
- New methods are added to avoid removing organically learned moves (i.e. if your Firebrand sword teaches Flame Wheel and Flareon already knows Flame Wheel, then Flame Wheel will not be removed in these circumstances. If Flareon learns Flame Wheel from Firebrand, however - regardless of whether it can learn it natively - it will be removed on unequip).
- Stats are HP, Attack, SpAttack, Defense, SpDefense and Speed.
- Equipment does not natively read as 'additional' held items - so, for example, if you make the
POISONBARBa weapon, it won't trigger the effect unless in the standard held item slot.- Similarly, moves impacted by the presence of a held item will not be affected unless that item is in the traditional held item slot.
- Implementation of equipment into item and move effects is left to individual fan game developers.
- 'Auto-Equip' is introduced as an option. You can toggle Held Items to be automatically re-equipped after battle as long as one is present in the bag. This occurs after battle, so you can't just keep curing your confusion mid-battle.
- Non-Standard Buttons can be remapped in the setup file - these are Unequip Slot, Unequip All, Auto-Equip Toggle and Show Help.
- Show Help calls a Common Event to simplify showing potentially complicated text. In theory, this button can be repurposed.
- Feral Camera is integrated to adjust various graphics based on the criteria of default, Pokemon's First Type, Pokemon's Species and Pokemon's Species+Form, in priority order lowest to highest.
- Affects the menu pane, background, auto-equip icon, category icons and equipment item boxes.
- This is entirely optional, the defaults may be used in all cases with no downside.
-
ftUnequipAll(pkmn,steal?,held?)- Unequips all equipment from a specified Pokemon. If
steal?is true, the player does not get the items in their bag. If it is false, the equipped items are added to the bag. Ifheld?is true, held items will be affected also.
- Unequips all equipment from a specified Pokemon. If
-
ftForceUnequipParty(steal?,held?)- same as
ftForceUnequipbut processes the entire party.
- same as
-
ftUnequipSlot(pkmn,slot,steal?)- Same as
ftUnequipAllexcept only touches a single slot.- Slot will be the identifier as per the setup file -
"HeldItem"is the name of the held item slot.
- Slot will be the identifier as per the setup file -
- Same as
-
ftForceEquip(item,pkmn,slotid)- Adds the given item to the Pokemon's equipment in the slot id.
-
Slotidis 0-index, so slot 0 is the first, slot 1 is the second etc.
-
- This does not add from the bag - so will be the same as giving the player an item.
- Adds the given item to the Pokemon's equipment in the slot id.
-
ftEquipped?(item,pkmn,held?)- A simple true/false check if an item is equipped to a Pokemon in any slot. Can be used for puzzles, doors, moves etc.
- Item should be in the format e.g.
:POTION. - If held is true, held item will be checked also. If false, it won't be.
-
ftGetStatBoost(pkmn,stat)- A debug command - tells you what the boosts to each level will be for an item. This is the method called by the revised stat calculations. stats possible to select are
:HP, :ATTACK, :DEFENSE, :SPECIAL_ATTACK, :SPECIAL_DEFENSE, :SPEED.
- A debug command - tells you what the boosts to each level will be for an item. This is the method called by the revised stat calculations. stats possible to select are
-
ftGetNatureOverride(pkmn)- A debug command - tells you if the Pokemon's nature is being overriden for stat calculations.
-
ftPartyRecalcStats- Debug command - Quickly forces the party's stats to be recalculated.
-
ftFlagPass(item,pkmn,slot)- Debug command - confirms if an item is valid for a pokemon and slot combo by checking flags beyond the default permissions. Returns true or false as appropriate - in theory, you could check if the pokemon in your first party slot can wield the legendary sword Excalibur by passing
ftFlagPass(:EXCALIBUR,$player.party[0],"eqrighthand_shiny"). -
"helditem"is the slot name for held items.
- Debug command - confirms if an item is valid for a pokemon and slot combo by checking flags beyond the default permissions. Returns true or false as appropriate - in theory, you could check if the pokemon in your first party slot can wield the legendary sword Excalibur by passing
-
Item.includes_flag?(["array","of","flags"])has been added, so you can check if any from a list of flags passed as an array is present on an item, same as the defaultitem.has_flag? -
ftReapplyEquipmentPartyandftReapplyEquipment(pkmn)- reapplies all equipment effects on a Pokemon (or the party) based on their current equipment. This also recalculates stats. This automatically applies after evolution now, but if you e.g. Form Change Rotom by interacting with an event, you may want to run this to be safe. If you addtrueto any of these as a condition (ftReapplyEquipmentParty(true)andftReapplyEquipment(pkmn,true)), items that learn moves will also attempt to relearn them (while respecting your settings around learning moves). I personally wouldn't, that could get messy.
- Adds to
class Pokemonthe following attributes::equipment,:helditemauto,:equipmentmoves,equipmentmovestrail. - Overwrites the following
class Pokemonscripts:calcHP, calcStat, calc_stats-
calcHP,calcStatare broad rewrites.calc_statsonly adjusts two lines and adds fallback minimums to a few others.
-
- The following
MenuHandlershave been adjusted:-
:pause_menu(addition of:ftequipmentmenu) -
:party_menu- addition of
:ftequipmentmenu_party - rewrite to conditions of
:item - rewrite of submenu
:party_menu_item(:giveand:take)
- addition of
-
- A non-overwriting addition has been made to the following
EventHandler::on_end_battle - A change has been added to
class PokemonEvolutionScene > pbEvolutionMethodAfterEvolution. Adds the following call. If you have another script that changes this, delete or comment out this section in 02_main (it is clearly marked) and insert the following call after@pokemon.action...: ftReapplyEquipment(@pokemon)
- You can add the name of any slot to an item as a flag to make it valid for that slot. This is overridden by per-Pokémon slot bans.
-
HeldItemis the name of the Held Item slot, but this is not a valid flag. It is instead used as the slotname for the flag suffixes below (e.g.HeldItem_male). HeldItems are instead governed by the standard held item rules present in default essentials (no HM/TM, no Key Items).
-
- The following suffixes can be added to any slot identifier to make a new, valid flag, that will be checked as per various rules. These overwrite slot ban settings. Note these are format slotname_suffix, e.g.
eqhead_happy.-
_any(intended just to override slot bans with no additional criteria) -
_male,_female,_genderless -
_notmale,_notfemale,_notgenderless -
_shiny,_notshiny -
_SPECIES(for example,eqrighthand_PIKACHU) -
_SPECIES_FORM(for example,eqrighthand_ROTOM_1) -
_fused,_notfused -
_POKEBALL(e.g.eqrighthand_MASTERBALL) -
_obtain_id- The valid ids are
0 (met), 1 (as ), 2 (traded), 4 (fateful encounter); e.g.eqrighthand_obtain_4would be a fateful encounter
- The valid ids are
-
_happy,_veryhappy,_maxhappy(160,220,255 or higher, respectively) -
_neutral,_unhappy(less than 160, 100 respectively) -
_cool,_beauty,_cute,_smart,_tough,_sheen(must be 160 or higher each, same as base modern happiness) -
_type_TYPE(e.g.eqrighthand_type_WATER); can be first or second type -
_type1_TYPE,type2_TYPE(must be that respective type in that type slot; so aFIRE,FIGHTINGwill not betype2_FIRE)
-