Emotion Seeker (Standalone Release) - jondevarthur/feraltrainer GitHub Wiki
The Emotion Seeker, based on a request from a reddit user, is a simple workflow:
- The player 'pings' nearby NPCs
- Those NPCs play animations showing their 'emotions'.
- A record that emotion has been seen is added to the player's internal stats.
This can be used for more than just emotions, this is just the intended use. Full documentation is available here.
Alternative Use Suggestions:
- Showing potential Triple Triad opponents
- An alternative, slimline Versus Seeker
- Showing Interaction Markers in the style of FFVII/IX
- Puzzle solutions / hints
Click through for a brief Demo Video
Installation
- Copy the contents to
\Plugins\ - All necessary settings are in the only script file included, 00_script.rb
Functions
jdaEmotionSeeker- This is pings the nearby NPCs. Ideally, you the player should not need to call this directly but through either an item or a hotkey (see below).jdaEmotionChecker("npcname","key")- This returns true or false if you have seen the emotion.jdaGetEmotionUses- This is a simple count of how many times you've used the power.jdaGetEmotionNPCs- This is a count of how many times you've ping'd any NPC - e.g. if you use it and three NPCs respond, it increases by 3. If you keep using it, it keeps increasing, this is not unique NPCs.
Setup
DEFAULT_EMOTION- this is the default RPG Maker XP animation ID that plays for any NPC withNPC:in their name but no entry in the actual script.NPC_NPCNAME- to set up NPCs, add new lines to the code in the formatNPC_NAME(all uppercase). In-game, this translates to including in the event name of your NPC the following:NPC:NAME:NPC(see below for an example event).- Each NPC definition is a nested array (
[ [],[],[],etc ]) of definitions. Each entry in the array is the 'stage' of their emotions. When you - The first entry is the NPC's default. This will always play when the NPC is pinged and no other conditions are met.
- Each entry is in the format
[animation ID, "identifier", type, value, data, map type, [map data] ]- Animation ID is a default RPG Maker XP animation - e.g. the Grass Rustle effect is ID 1. These must be valid or the animation won't play and Essentials may get upset with you.
- "identifier" is just a unique string for that NPC to identify it, so you can check if it's been seen. These only need to be unique with an NPC - so T_GARY and SAILOR can both have "angry", but T_GARY should only have "angry" once. This is what you check to see if an emotion has been seen.
- Identifier is what's used in combination with the NPC name to check if it's been seen - so for example, jdaEmotionChecker("T_GARY","frustration")
- type is one of seven integers, adjusting what value you are checking:
- 0 - no conditions. Value and data are not checked.
- 1 - game switch - value is the RPG Maker XP game switch ID, and data is true or false (on or off)
- 2 - game variable less than - value is a RPG Maker XP game variable ID, data is the value the variable must be less than.
- 3 - game variable equals - value is a game variable, data is the value the variable must be equal to.
- 4 - game variable greater than - value is a game variable, data is the value the variable must be greater than.
- map type is one of three integers, adjusting whether the player's current map will be checked (allowing things like one NPC definition across multiple instances, default essentials follower support etc).
- 0 - no map will be checked, map data is not used
- 1 - inclusive, your current map id must be in the array of
[map data] - 2 - exclusive, your current map id must not be in the array of
[map data]
- Each NPC definition is a nested array (
SCAN_DISTANCE- Tiles around the player to check. Checks a perfect square this many tiles in each direction.SOUND_EFFECT- SE to play when usedCOMMON_EVENT- format is [true/false,id]. If true, the common event ID will run at the end of the Emotion Seeker script. You can use this to have your player say "Oh, it looks like Gary's really upset" etc when the conditions are met, or maybe to turn on a new switch now that the emotion has been seen (maybe a psychic NPC gets mad at the invasion of privacy!). Set to false if you don't want to use this.
Activation
Hotkey
This is not natively supported, because button presses on the overworld are handled in one long script in the default Essentials Scene_Map. If you want to add it so it triggers on the AUX1 button (Q) (as an example), insert (don't replace) the following lines at around line 199, just above the line elsif Input.Trigger?(Input::SPECIAL).
elsif Input.trigger?(Input::AUX1)jdaEmotionSeeker
Item Handler
This is natively supported, but the item is not defined - you must do this yourself in items.txt in \PBS. This would be an item version that you can key into your registered button like a bike. These are defined in 00_Script.rb also, with the default item symbol :EMOTIONSEEKER. The following is the recommended items.txt definition, though you can also just clone e.g. the Itemfinder:
[EMOTIONSEEKER]Name = Emotion SeekerNamePlural = Emotion SeekerPocket = 8Price = 0FieldUse = DirectFlags = KeyItemDescription = Sense auras.