Heya Everyone! I was curious if anyone knows of or would know how to make a little script to show your exp gain outside of battle. I've been using the Yanfly core script and many of the system scripts but just like the base rpgmaker game it will only give you a message if you level up. My game will have plenty of ways to get exp outside of combat so I was hoping to find something that shows exp on the player sprite or lower left corner for a moment then vanishes.
Show Exp Gained Outside Battle
RGSS3 Script RequestsSo you want a small pop-up that just shows how much EXP is being earned from overworld activities? One silly way I thought of doing it off of the top of my head (but wouldn't recommend for a commercial game, if you're making one) is
1) Get Sleek Item Popup by V.M of D.T.
2) Create an item called "EXP".
3) Whenever EXP is earned in the over world, add the EXP item at a quantity equal to the EXP earned, then immediately remove it so it doesn't stay visible in the inventory.
It's probably not the ideal way to do it, but it is a possibility.
1) Get Sleek Item Popup by V.M of D.T.
2) Create an item called "EXP".
3) Whenever EXP is earned in the over world, add the EXP item at a quantity equal to the EXP earned, then immediately remove it so it doesn't stay visible in the inventory.
It's probably not the ideal way to do it, but it is a possibility.
Certainly one solution, but you don't need to remove items.
You can make popups with a script command, this does not add items to inventory.
If you are only needing this on the map then that will work, but if you want it for battles as well then that won't solve it completely.
You will need a small addon.
This will show every time any actor gets exp.
Ruby:
module R2_Vlue_Pop_Exp
EXP_ITEM = 10
end
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Change Experience
# show : Level up display flag
#--------------------------------------------------------------------------
alias r2_change_exp_popup_vlue change_exp
def change_exp(exp, show)
r2_change_exp_popup_vlue(exp, show)
item = $data_items[R2_Vlue_Pop_Exp::EXP_ITEM]
Popup_Manager.add(item,exp,90,false,0,0)
end
end
So you need to define more clearly how/when you want the exp to show.
Oh yeah, good point. I forgot about that since my current project has it auto pop for items.
Ah, I am using Yanfly Event Window which display items in the lower left hand corner already, sort of silly to have 2 items displayed at the same time.
I gave it a shot, I am using Yanfly Event window which also displays items picked up. When I added this with the sleek item popup script it didn't display exp just said I gained mana for some reason.
Did you create an item and call it EXP and change the number for the item in the addon I did?
Yes, I made an item called exp, I had the item number wrong originally. Corrected it. For some reason it's not showing the right Exp gain.
In this example I set a npc to give me 150 EXP and it's saying way bigger numbers. Not sure if it's potentially conflicting with the Yanfly Core Engine. Because the Font for the Core Engine overrides whatever I put in the Sleek Item Script.
It also displays multiple times if I have party members not hidden. It also displays wrongly if I take away Exp still saying a + amount.
After combat when it shows the exp and items gained and you return to control of the player the prompt pops up again showing an exp amount.
Also is there a way to disable any other items being shown with this script? Because other items still pop up when I picked them up.
It would be better to make the yanfly event window show the exp.
I'll try to do that.
Try this for yanfly event window
Works for changing the exp with events.
If you change exp another way you need to tell me.
Ruby:
class Game_Interpreter
#--------------------------------------------------------------------------
# * Change EXP
#--------------------------------------------------------------------------
alias r2_change_exp_yanfly_event_window_command_315 command_315
def command_315
r2_change_exp_yanfly_event_window_command_315
return unless SceneManager.scene_is?(Scene_Map)
return if Switch.hide_event_window
value = operate_value(@params[2], @params[3], @params[4])
iterate_actor_var(@params[0], @params[1]) do |actor|
text = YEA::EVENT_WINDOW::HEADER_TEXT + actor.name + " gained "
text += value.to_s + " exp"
text += YEA::EVENT_WINDOW::CLOSER_TEXT
SceneManager.scene.event_window_add_text(text)
end
end
end
Very nice, that works great. Displays the exp in the lower left hand corner for everyone in the party. Doesn't show anything after combat which is awesome. Should suit the game I am developing well. Thank you so much.
Original thread: https://forums.rpgmakerweb.com/threads/show-exp-gained-outside-battle.168899/