• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
rainefallPortraits

v21.1 rainefallPortraits 1.3

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Essentials Version
v21.1 ✅
Also compatible with
  1. v21
  2. v20.1
  3. v20
Requires rainefallUtils!

This is a slightly less janky version of the dialogue portraits script(s) used in my games Pokémon Reflections and pre;COGNITION

oRsypTuZ4D.gif


Portrait graphics
In Pokémon Reflections, portraits were 360 pixels tall and had no consistent width. The script has been modified slightly in order to allow for portraits to be any height and any width. I recommend choosing a consistent portrait size such as 192x384, and drawing your portraits centred within. Bear in mind portrait graphics are anchored to the bottom left of the screen.
It is possible to use portraits of different sizes (Reflections does this) though it is not recommended unless you know what you (and more importantly, the script) are doing.

You will need to place your portrait graphics within a new directory, Graphics/Portraits. This directory is hardcoded in order to make referencing portrait names quicker.

Displaying portraits
By design, the only way to set portraits is through script calls. Users of this script should have a foundational knowledge of the Ruby programming language (data types, what a function is, what an argument is) to ensure correct operation.
  • To create a new portrait, call Rf.new_portrait(“name-of-portrait-in-Graphics/Portraits”). Creating a new portrait automatically triggers the sliding in animation on that portrait, and will also automatically trigger the sliding out animation on and dispose the last portrait, if there is one.
  • To change the graphic of the currently displayed portrait (e.g. if you want to convey a change in emotion between lines, something that was very frequently used across Reflections) use Rf.set_portrait(“name-of-portrait-in-Graphics/Portraits”). Do NOT call this function without having called Rf.new_portrait beforehand, this will lead to undocumented behaviour (and potentially difficult to reproduce bugs! I am speaking from experience here)
  • To manually call the sliding out animation on a portrait (e.g. for the end of a dialogue sequence or if there is a break in the text), use Rf.close_portrait.
  • Rf.new_portrait also takes an optional argument representing where to align the portrait on the screen, 0 for left (default) and 1 for right.


Displaying Name Labels
Reflections also used name labels above dialogue boxes if a named character was speaking. There are multiple ways of handling these.
  • In Reflections all name labels were manually set by changing the value of $game_temp.speaker, and setting it to nil when no label was needed. While this worked fine, it may not be particularly readable.
  • Rf.set_speaker("speaker name") will set the name label and Rf.clear_speaker will clear it. This is the method I recommend.
Remember to call Rf.clear_speaker or [imath]game_temp.speaker = nil at the end of any events or you will end up with labels on all dialogue until [/imath]game_temp.speaker is next modified (or the game is restarted).
Credits
Credit "rainefall" if used.
Author
rainefall
Downloads
1,407
Views
8,200
First release
Last update
Rating
5.00 star(s) 3 ratings

More resources from rainefall

Latest updates

  1. Customisations

    Hello all, by request I have added the ability to change the windowskin used by the name window...
  2. True v21 compatibility

    Hello all, two things for you here. Plugin is now framerate agnostic. If you don't know what...
  3. Cave Overlay Fix

    This update is a pretty simple fix for an issue where portraits would appear behind the cave...

Latest reviews

An amazing plugin! It definitely can make your game very epic!
This plugin made my game look better by a mile! Definitely something you won't regret using!
Back
Top