This script request would be for the VXAce. Can anyone make a script which would show the amount of gold the player is possessing on the battle screen? And... dang. Didn't see the "do not request scripts here"- part in time -.- Go ahead and move this to another place then.
Script: Gold in Battle Screen
RGSS3 Script RequestsIf you have a problem with a post that needs moderator help, please report the post so that it receives moderator attention as quickly as possible. I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
The script to add gold window to the battle scene is not hard to make.
But you are lacking details on why you want it, how you want it to be displayed and where on the screen.
Please read the guidelines for a script request if you are new to this:
http://forums.rpgmakerweb.com/index.php?/topic/10737-convince-strangers-to-write-scripts-for-you/
But you are lacking details on why you want it, how you want it to be displayed and where on the screen.
Please read the guidelines for a script request if you are new to this:
http://forums.rpgmakerweb.com/index.php?/topic/10737-convince-strangers-to-write-scripts-for-you/
I'm using the Yanfly's Ace Battle Engine, where the faces of the actors are shown on the screen. I haven't modified it too much.
In the game Labyronia 3, there is a system to get more MP (or EP in that game), by using a non-consumable item called the "Pentacle Stone." When used, the player can choose whether to consume 25, 75 or 150 Pentacles, which is the gold equivalent currency of the game. The Pentacles used will then be converted to a corresponding amount of EP for the entire party. Example: the player uses the stone and chooses to use 50 Pentacles. He loses the amount of currency and gains 50 EP.
The system works well outside and in battles, but it would be nice to see how much pentacles the player has while in battle. I think the amount of Pentacles could be visible on the top of the battle window, perhaps in its own little window. It could be on the left or right corner, or at the center depending on which possibility would look best. Maybe the left corner above the battle window?
Here's a link to the Yanfly's Ace Battle engine page, if needed: https://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/
In the game Labyronia 3, there is a system to get more MP (or EP in that game), by using a non-consumable item called the "Pentacle Stone." When used, the player can choose whether to consume 25, 75 or 150 Pentacles, which is the gold equivalent currency of the game. The Pentacles used will then be converted to a corresponding amount of EP for the entire party. Example: the player uses the stone and chooses to use 50 Pentacles. He loses the amount of currency and gains 50 EP.
The system works well outside and in battles, but it would be nice to see how much pentacles the player has while in battle. I think the amount of Pentacles could be visible on the top of the battle window, perhaps in its own little window. It could be on the left or right corner, or at the center depending on which possibility would look best. Maybe the left corner above the battle window?
Here's a link to the Yanfly's Ace Battle engine page, if needed: https://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/
As you haven't answer my question about how you want it to be shown, i am just going to assume that you want the window to be always visible all along the battle. It's easier if you just take a snapshot of your current battle scene and draw a box on it to indicate where you want the gold window to be.
As far as i can tell, the UI can be anything when you use custom scripts for battle.
So the gold window will end up covering another window on the screen (eg, battle log).
So plan well and post that snapshot here. I can add the window for you when you have decided the position.
As far as i can tell, the UI can be anything when you use custom scripts for battle.
So the gold window will end up covering another window on the screen (eg, battle log).
So plan well and post that snapshot here. I can add the window for you when you have decided the position.
OK, thanks! 🙂 I'll be taking the picture, plan the position and add it here once I get to my own computer with the game and image editor.
OK, I have concluded that the best place for the box would most likely be the yellow rectangle just above the word "Battle," as it is depicted in this image:
Additionally I'm wondering: would it be possible to include a symbol before the amount of pentacles? Here is the Pentacle symbol if it's possible, but if not I suppose it's enough to just use the letter 'p' like: P: (amount)
Additionally I'm wondering: would it be possible to include a symbol before the amount of pentacles? Here is the Pentacle symbol if it's possible, but if not I suppose it's enough to just use the letter 'p' like: P: (amount)
There you go:
As for you symbol request, this uses the same as your shop/default gold window symbol.
edit:
please use the updated version below.
As for you symbol request, this uses the same as your shop/default gold window symbol.
edit:
please use the updated version below.
Thanks! It's nice, but there seems to be a problem. When I use the Pentacles in battle, the amount on that box does not go down. So, if I had 750 Pentacles in the beginning of the battle and I'd use 150, I gain the EP but it still shows 750 Pentacles on that battle screen. Now when the battle ends, the amount is lowered if I open the menu or enter the next battle, but it would be important to see the actual spending as it happens in the battle.
Oh, I forgot to call the refresh method.
there you go:
there you go:
Code:
#==============================================================================# ■ Meow Face Battle Gold Window#------------------------------------------------------------------------------# Add Gold Window to Battle Scene#==============================================================================# How to Use:# [1] Paste this below Material and above Main#==============================================================================class Scene_Battle < Scene_Base alias meow_face_caw_sb create_all_windows def create_all_windows meow_face_caw_sb create_gold_window end def create_gold_window @gold_window = Window_Gold.new @gold_window.x = 0 @gold_window.y = Graphics.height - @party_command_window.height - @gold_window.height end alias meow_gold_status refresh_status def refresh_status meow_gold_status @gold_window.refresh endend
Thanks a ton! It works like a dream now : -)
You're welcome!
Hmm... a certain problem seems to be persisting, which has been existing all the time actually, but I didn't pay that much attention to it before.
When I use the pentacles in battle situation, it seems that both the spent pentacles and EP gained do not refresh instantly. So, if I were to use 25 pentacles now, it would first go through my made message '25 EP gained', but both the pentacle amount and the amount of EP would not change until a bit later- usually when both my actors and the enemies have been able to go through one full turn. This looks very awkward. You got any idea why they won't refresh instantly, and is it possible to fix this somehow?
Here's how I've set the common event for Pentacle Stone:
Show Text: How many Pentacles would you like to use?
Show Choices: 25, 75, 150, None
When [25]
Conditional Branch: Gold is 25 or more
Change Gold: -25
Change MP: Entire Party, + 25
Show Battle Animation: Entire Troop, [Pentacle Stone]
Show Animation: Player, [Pentacle Stone], Wait
Show Text: Gained 25 EP!
Else:
Show Text: Not enough pentacles.
When [75] etc...
When I use the pentacles in battle situation, it seems that both the spent pentacles and EP gained do not refresh instantly. So, if I were to use 25 pentacles now, it would first go through my made message '25 EP gained', but both the pentacle amount and the amount of EP would not change until a bit later- usually when both my actors and the enemies have been able to go through one full turn. This looks very awkward. You got any idea why they won't refresh instantly, and is it possible to fix this somehow?
Here's how I've set the common event for Pentacle Stone:
Show Text: How many Pentacles would you like to use?
Show Choices: 25, 75, 150, None
When [25]
Conditional Branch: Gold is 25 or more
Change Gold: -25
Change MP: Entire Party, + 25
Show Battle Animation: Entire Troop, [Pentacle Stone]
Show Animation: Player, [Pentacle Stone], Wait
Show Text: Gained 25 EP!
Else:
Show Text: Not enough pentacles.
When [75] etc...
That's because refresh is only called at the turn's end along with other status refresh.
If you want the gold window to refresh right after skill selection.
Try this version instead:
There's a chance that common event will run AFTER this method is called, if that's the case, your gold is updated before it's deducted. So it won't show changes after the common event runs.
If you want the gold window to refresh right after skill selection.
Try this version instead:
There's a chance that common event will run AFTER this method is called, if that's the case, your gold is updated before it's deducted. So it won't show changes after the common event runs.
Code:
#==============================================================================# ■ Meow Face Battle Gold Window#------------------------------------------------------------------------------# Add Gold Window to Battle Scene#==============================================================================# How to Use:# [1] Paste this below Material and above Main#==============================================================================class Scene_Battle < Scene_Base alias meow_face_caw_sb create_all_windows def create_all_windows meow_face_caw_sb create_gold_window end def create_gold_window @gold_window = Window_Gold.new @gold_window.x = 0 @gold_window.y = Graphics.height - @party_command_window.height - @gold_window.height end alias meow_gold_status refresh_status def refresh_status meow_gold_status @gold_window.refresh end alias meow_gold_skill_ok on_skill_ok def on_skill_ok meow_gold_skill_ok @gold_window.refresh endend
It didn't seem to change at all 😳 Maybe it's 'cause the pentacle stone is actually an item and not a skill? (I've got no idea though...)
Well, since you have other battle scripts installed, there's a chance that your other battle script has overwritten the needed method for refreshing here.
So I'll just simply change it to real time update. If this still doesn't work, simply move this script below all your custom scripts.
So I'll just simply change it to real time update. If this still doesn't work, simply move this script below all your custom scripts.
Code:
#==============================================================================# ■ Meow Face Battle Gold Window#------------------------------------------------------------------------------# Add Gold Window to Battle Scene#==============================================================================# How to Use:# [1] Paste this below Material and above Main#==============================================================================class Scene_Battle < Scene_Base alias meow_face_caw_sb create_all_windows def create_all_windows meow_face_caw_sb create_gold_window end def create_gold_window @gold_window = Window_Gold.new @gold_window.x = 0 @gold_window.y = Graphics.height - @party_command_window.height - @gold_window.height end alias meow_gold_update update def update @gold_window.refresh meow_gold_update endend
That last script is placed below all my other scripts now, but the results are still the same. At times it seems to refresh the gold count when it should, but usually everyone completes their turns before it happens- the enemies included. The spent EP always trails behind- it never refreshes before everyone on the stage have completed their turn.
That script is updating in per frame basis already, this means it should update 60 times per second. So if it's not updating, there's something that prevents it from updating. Which is weird, since the alias method should let it update itself if you place it below all other custom scripts.
So you either have a custom script that prevent the gold window from updating, or there's a script that overwrite how the default gold window works.
You will need to remove your custom script one by one to check which one is doing it.
edit:
Also check how you implement your item/skill. Make sure your common event runs right away and not at every turn's end.
So you either have a custom script that prevent the gold window from updating, or there's a script that overwrite how the default gold window works.
You will need to remove your custom script one by one to check which one is doing it.
edit:
Also check how you implement your item/skill. Make sure your common event runs right away and not at every turn's end.
OK, I'll be checking out the things you mentioned. Thanks for all your help 🙂
You're welcome!
Original thread: https://forums.rpgmakerweb.com/threads/script-gold-in-battle-screen.52887/