• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Pokémon Memories

v20.1 Pokémon Memories 2022-05-20

This resource pertains to version 20.1 of Pokémon Essentials.
Pokémon Essentials Version
v20.1 ➖
pokemon memories.gif


This code lets the player write a little blurb about their Pokémon in the Trainer Memo section of the summary screen!

You can download this as a plugin for v20 here, but honestly, it overwrites too much of the summary script to be worth it IMO, especially if you're doing something custom. It's pretty simply to add directly to the base scripts.

In the script section Pokémon (PokeBattle_Pokemon prior to v19), find the section at the top that lists the characteristics of individual Pokémon.

In v20, the end of it looks like this:
Ruby:
Expand Collapse Copy
  # Whether this Pokémon can be deposited in storage/Day Care
  attr_accessor :cannot_store
  # Whether this Pokémon can be released
  attr_accessor :cannot_release
  # Whether this Pokémon can be traded
  attr_accessor :cannot_trade

In v19, the end of it looks like this:
Ruby:
Expand Collapse Copy
  # Another Pokémon which has been fused with this Pokémon (or nil if there is none).
  # Currently only used by Kyurem, to record a fused Reshiram or Zekrom.
  # @return [Pokemon, nil] the Pokémon fused into this one (nil if there is none)
  attr_accessor :fused
  # @return [Integer] this Pokémon's personal ID
  attr_accessor :personalID

In earlier versions, it looks like this:
Ruby:
Expand Collapse Copy
  attr_writer   :obtainLevel # Level obtained
  attr_accessor :hatchedMap  # Map where an egg was hatched
  attr_writer   :language    # Language
  attr_accessor :ot          # Original Trainer's name
  attr_writer   :otgender    # Original Trainer's gender:
                             #    0 - male, 1 - female, 2 - mixed, 3 - unknown
                             #    For information only, not used to verify
                             #    ownership of the Pokémon
  attr_writer   :cool,:beauty,:cute,:smart,:tough,:sheen   # Contest stats

Below that (or really, anywhere in the section), add
Ruby:
Expand Collapse Copy
  attr_accessor :memory        # Memory

At the bottom of Pokémon/PokeBattle_Pokemon, find the section that begins with "def initialize".

You're going to add in this line:
Ruby:
Expand Collapse Copy
    @memory       = _INTL("Press [ALT] to write more.")


Just for the sake of making sure you don't cross any ends, I recommend you put it in one of the cleaner parts of the section, somewhere like
Ruby:
Expand Collapse Copy
    @item         = nil
    @memory       = _INTL("Press [ALT] to write more.")


In UI_Summary (PScreen_Summary in earlier versions), find
Ruby:
Expand Collapse Copy
      memo += sprintf("<c3=404040,B0B0B0>%s\n", characteristics[best_stat][best_iv % 5])
    end
In earlier versions, this code instead looks like this:
Ruby:
Expand Collapse Copy
memo += sprintf("<c3=404040,B0B0B0>%s\n",characteristic)
    end

Below that "end", add
Ruby:
Expand Collapse Copy
      memo += @pokemon.memory    if @pokemon.memory



Finally, go to the bottom of PScreen_Summary and the section beginning with def pbScene.

Right above this line:
Ruby:
Expand Collapse Copy
      elsif Input.trigger?(Input::USE)
Put in this:
Ruby:
Expand Collapse Copy
      elsif Input.trigger?(Input::ALT) && !@pokemon.egg? && @page==2
        @pokemon.memory=Kernel.pbMessageFreeText("#{@pokemon.name}'s memory?",_INTL(""),false,80)   
          dorefresh = true
(It can technically go anywhere in this big branch of elseifs for commands, I just like putting it here because it's above all the ends and it's with similar functions)


And that's it!

Using this resource
This can be added into an already-released game! The only issue is that "Press [ALT] to write more" won't display on Pokémon on an existing save, it'll just be blank.

You can customize the button used to change it pretty easily, just change "ALT" in the Input::ALT to whatever else you want! (Assuming it's been defined, of course- see Marin's tutorial for adding input keys if you want to do more!)

Since .memory is an attribute of all Pokémon now, you can manipulate it the same way you would edit something like nicknames, IVs, etc! You could generate Pokémon to give to the player that have a memory already written on them, or, if you have a story-driven game, generate a party with memories of the hero's past adventures!

Future Goals
  • Potentially see if I could make this plug-and-play. Not a high priority, though, since it's adding like six lines of text to two script sections.​
  • Figure out how to make a filter for memories. I'm not bothered by players writing the fuck word in, but it would suck to get Wonder Traded a Pokémon and have the description include some slur.​
Credits
Credits to TechSkylander1518, please!
Author
TechSkylander1518
Downloads
941
Views
4,271
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from TechSkylander1518

Latest updates

  1. v20 Update

    Everything's still compatible in v20, but I included a plugin if you'd prefer to add it that way...
Back
Top