• 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.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
rainefallPortraits

Resource rainefallPortraits 1.3

Also having issues getting portraits to work.

[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.7]

Script error in event 5 (coords 1,2), map 22 (Mom's Home)
Exception: NameError
Message: undefined local variable or method `“birdkeeper”' for #<Interpreter @event_id: 5>

***Full script:
Rf.new_portrait(“birdkeeper”)
Rf.set_speaker("Mom")

Backtrace:
(eval):1:in `execute_script'
Interpreter:138:in `eval'
Interpreter:138:in `execute_script'
Interpreter_Commands:1177:in `command_355'
Interpreter_Commands:116:in `execute_command'
Interpreter:130:in `block in update'
Interpreter:86:in `loop'
Interpreter:86:in `update'
Scene_Map:167:in `block in update'
Scene_Map:166:in `loop'

i've tried everything I could think of, added .png to the end, renamed it, with and without capitals.. it just won't work
 
Also having issues getting portraits to work.

[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.7]

Script error in event 5 (coords 1,2), map 22 (Mom's Home)
Exception: NameError
Message: undefined local variable or method `“birdkeeper”' for #<Interpreter @event_id: 5>

***Full script:
Rf.new_portrait(“birdkeeper”)
Rf.set_speaker("Mom")

Backtrace:
(eval):1:in `execute_script'
Interpreter:138:in `eval'
Interpreter:138:in `execute_script'
Interpreter_Commands:1177:in `command_355'
Interpreter_Commands:116:in `execute_command'
Interpreter:130:in `block in update'
Interpreter:86:in `loop'
Interpreter:86:in `update'
Scene_Map:167:in `block in update'
Scene_Map:166:in `loop'

i've tried everything I could think of, added .png to the end, renamed it, with and without capitals.. it just won't work
Replace the "" around birdkeeper, you have the decorative directional quotation marks which don't work (notice how they look different to the ones surrounding Mom)

NVM, even when removing this, it seems the constant in the script is the issue. It's not defined? Even though it says it should be.
Should be fixed, redownload the script.
 
Last edited:
Replace the "" around birdkeeper, you have the decorative directional quotation marks which don't work (notice how they look different to the ones surrounding Mom)


Should be fixed, redownload the script.
that worked perfectly thank you! Such a little thing
 
I have an intro event to run the portraits. When I changed the settings to turn off the outlines, it doesn't load the portraits in the intro scene. Any other event past the scene works fine.

Once I put back the outlines, run the game, the portraits come back and any other event past the intro has an outline. I wish to have no outlines at all.
 
I have an intro event to run the portraits. When I changed the settings to turn off the outlines, it doesn't load the portraits in the intro scene. Any other event past the scene works fine.

Once I put back the outlines, run the game, the portraits come back and any other event past the intro has an outline. I wish to have no outlines at all.
Can you show me your intro event?
 
View: https://imgur.com/a/A8CCnDT
here is the intro event and the map event.
I believe the problem is caused by the Show Picture event command. I have update the script to force the portraits to draw over any pictures shown with the Show Picture event command. Thank you for pointing this out as I wouldn't have noticed otherwise (I don't use Show Picture ever)
 
I believe the problem is caused by the Show Picture event command. I have update the script to force the portraits to draw over any pictures shown with the Show Picture event command. Thank you for pointing this out as I wouldn't have noticed otherwise (I don't use Show Picture ever)
Good to know. What about Panoramas? I'm using either show pictures or panos as psuedo bgs for visual novel style cutscenes.
 
Thanks for making this plugin! For my use case, it would be useful if I can have the portrait show up at a chosen location on screen. Do you know if there is a way to do that?
 
Hi, How do I move the portrait above the dialog box? When I type the command, it is at the bottom of the screen.
 
Hi, How do I move the portrait above the dialog box? When I type the command, it is at the bottom of the screen.
How big are your portraits? This script was designed with large "visual novel style" portraits in mind, so if your images aren't roughly the same size as the screen they will be mostly covered by the dialog box.

Regardless, you can move the portrait up by changing line 44 of script_portraits.rb
Ruby:
Expand Collapse Copy
@sprite.y = Graphics.height
to something like
Code:
Expand Collapse Copy
@sprite.y = Graphics.height - 96
I wouldn't recommend it however as the animation to show/hide portraits won't look correct.
 
How big are your portraits? This script was designed with large "visual novel style" portraits in mind, so if your images aren't roughly the same size as the screen they will be mostly covered by the dialog box.

Regardless, you can move the portrait up by changing line 44 of script_portraits.rb
Ruby:
Expand Collapse Copy
@sprite.y = Graphics.height
to something like
Code:
Expand Collapse Copy
@sprite.y = Graphics.height - 96
I wouldn't recommend it however as the animation to show/hide portraits won't look correct.
The image is 150x150 pixels. What would be the "visual novel style" ratio? Another question, would it be possible to change the color of the speakers?
 
The image is 150x150 pixels. What would be the "visual novel style" ratio? Another question, would it be possible to change the color of the speakers?
Roughly the same size as your screen. As said in the resource description I'd recommend drawing your portraits on a 192x384 canvas (or more accurately 96x192 then scale the image 200% with nearest neighbour filtering to make sure there's no mismatch in pixel density).

I'm not sure what you mean by the colour of the speakers, if you mean the colour of the outline then this can be achieved either by changing the RGB values of DEFAULT_OUTLINE_COLOR in config.rb from
Ruby:
Expand Collapse Copy
DEFAULT_OUTLINE_COLOR = Color.new(255,255,255)
to something like
Ruby:
Expand Collapse Copy
DEFAULT_OUTLINE_COLOR = Color.new(255,0,128)
or by calling
Ruby:
Expand Collapse Copy
Rf.portrait_outline_color = Color.new(255,0,128)
Obviously with whatever RGB values you want.

If you want to change the colour of the text in the speaker name window, there is currently no way to do this but I can look into adding it.
 
Roughly the same size as your screen. As said in the resource description I'd recommend drawing your portraits on a 192x384 canvas (or more accurately 96x192 then scale the image 200% with nearest neighbour filtering to make sure there's no mismatch in pixel density).

I'm not sure what you mean by the colour of the speakers, if you mean the colour of the outline then this can be achieved either by changing the RGB values of DEFAULT_OUTLINE_COLOR in config.rb from
Ruby:
Expand Collapse Copy
DEFAULT_OUTLINE_COLOR = Color.new(255,255,255)
to something like
Ruby:
Expand Collapse Copy
DEFAULT_OUTLINE_COLOR = Color.new(255,0,128)
or by calling
Ruby:
Expand Collapse Copy
Rf.portrait_outline_color = Color.new(255,0,128)
Obviously with whatever RGB values you want.

If you want to change the colour of the text in the speaker name window, there is currently no way to do this but I can look into adding it.
Thank you, I solved my problem, about the color change, it would be about the text in the window. It would be interesting to put different colors for different characters, thanks for the help friend.
 
Hello! Sorry to bother, but is there any way to call portraits according to a variable or something similar?
For example, if I have multiple trainer options available (like, more than just a boy and girl option) and want to have a range of emotions for each of them, is there any way I could specify which trainer I want to call the portraits of? I'd like to avoid an extremely long conditional branch for every instance of my trainer portraits if at all possible ^^;;
 
Hello! Sorry to bother, but is there any way to call portraits according to a variable or something similar?
For example, if I have multiple trainer options available (like, more than just a boy and girl option) and want to have a range of emotions for each of them, is there any way I could specify which trainer I want to call the portraits of? I'd like to avoid an extremely long conditional branch for every instance of my trainer portraits if at all possible ^^;;

Yes, you can access game variables from script calls which would look something like this
Ruby:
Expand Collapse Copy
Rf.new_portrait($game_variables[100] + "_emotion")
assuming you have the name of the chosen player trainer stored in that game variable, and that the name matches the name on all the portraits for that trainer
That's a little bit verbose so I would write a helper function like this
Ruby:
Expand Collapse Copy
def get_player_portrait(emotion)
    return "#{$game_variables[100]}_#{emotion}"
end

# which you can call from an event script call like
Rf.new_portrait(get_player_portrait("neutral"))
(if you want to use this you can just put it at the bottom of one of the .rb files of the plugin)
 
Yes, you can access game variables from script calls which would look something like this
Ruby:
Expand Collapse Copy
Rf.new_portrait($game_variables[100] + "_emotion")
assuming you have the name of the chosen player trainer stored in that game variable, and that the name matches the name on all the portraits for that trainer
That's a little bit verbose so I would write a helper function like this
Ruby:
Expand Collapse Copy
def get_player_portrait(emotion)
    return "#{$game_variables[100]}_#{emotion}"
end

# which you can call from an event script call like
Rf.new_portrait(get_player_portrait("neutral"))
(if you want to use this you can just put it at the bottom of one of the .rb files of the plugin)
Thanks so much! This is going to make things much easier, I appreciate it ^^
 
Back
Top