Pokémon Memories

Pokémon Memories

Pokémon Essentials Version
v18.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!

In PokeBattle_Pokemon, find
Ruby:
  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, add
Ruby:
  attr_accessor :memory        # Memory
At the bottom of PokeBattle_Pokemon, find
Ruby:
    if withMoves
      self.resetMoves
    else
      for i in 0...4
        @moves[i] = PBMove.new(0)
      end
    end
Below that second end, add
Ruby:
    @memory       = _INTL("Press [ALT] to write more.")
In PScreen_Summary, find
Ruby:
      memo += sprintf("<c3=404040,B0B0B0>%s\n",characteristic)
    end
Below that, add
Ruby:
    if @pokemon.memory
      memo += @pokemon.memory
    end
Finally, go to the bottom of PScreen_Summary and find:
Ruby:
      elsif Input.trigger?(Input::RIGHT) && !@pokemon.egg?
        oldpage = @page
        @page += 1
        @page = 1 if @page<1
        @page = 5 if @page>5
        if @page!=oldpage   # Move to next page
          pbSEPlay("GUI summary change page")
          @ribbonOffset = 0
          dorefresh = true
        end
Below that, add
Ruby:
      elsif Input.trigger?(Input::ALT) && !@pokemon.egg? && @page==2
        @pokemon.memory=Kernel.pbMessageFreeText("#{@pokemon.name}'s memory?",_INTL(""),false,80)           
          dorefresh = true
      end
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.

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 racial slur.​
Credits
Credits to TechSkylander1518, please!
Author
TechSkylander1518
Views
698
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from TechSkylander1518

Top