TheRiotInside

Extra Ordinaire
Veteran
Joined
Sep 3, 2012
Messages
270
Reaction score
124
First Language
English
Primarily Uses
Hello, everyone! I have a couple of very small edits to RMXP's default battle system that I'd like to do, but am nowhere near able to do them myself. I have nothing to offer but the satisfaction of helping others, as well as a mention in a game that may never be released! Very tempting, I know. So, here's what I was looking for. I'm going to try to be as specific as possible in order to make this as easy as possible.

1) I'll start off with a handy-dandy image:

dbseditrequest.png


So what we're looking at is for when you are selecting an enemy. Instead of showing just the name, I'd really love the following:

- Name left justified, in line with the 1st party member text preferably. The status effects (states) displaying beside it would still be nice, in case that code would have to be adjusted as well.

- HP numbers (no graphics needed) right justified, preferably in line with the end of the 4th party member text. This would have to support up to five HP digits, and it would be in this general format: "HP xxxxx/xxxxx"

Note: Nothing fancy has to be done here, just the name and state moved and the HP displayed on the right. If you're feeling super nice, the "HP" part could be the same colour as the party member "HP" and "AP", but it's not necessary. Also, I'm using a basic text outline script, so normal text added will probably draw with the outline all by itself.

2) I don't know if this is a simple or messy edit, but one little thing that bothered me about the DBS (besides being the DBS of course!) is that if a state on a party member runs out on a turn, it doesn't actually clear back to [Normal] until you have made your action selections and the turn starts, which is quite misleading. For example, if you have an attack buff, you may think you have another turn of it when you are selecting your moves, but as soon as the action starts, it disappears.

Can this be modified to remove itself at the start of the turn (where you have your Fight and Escape choices) instead of after you choose your actions?

Thanks in advance for any and all help guys, I really appreciate it. If you have any questions, please ask! :)
 
Last edited by a moderator:

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
398
Reaction score
99
First Language
English
Primarily Uses
I actually made this change for my own project except I limit the extra information from displaying for an enemy unless they've been scanned. But here's a version that'll show it all the time. Just copy/paste below main as usual.

Code:
class Window_Help < Window_Base  #--------------------------------------------------------------------------  # * Set Enemy  #     enemy : name and status displaying enemy  #     Mobius XVI version - adds HP/SP information  #--------------------------------------------------------------------------  def set_enemy(enemy)      # treat enemy as actor      self.contents.clear      draw_actor_name(enemy, 4, 0)      draw_actor_state(enemy, 140, 0)      draw_actor_hp(enemy, 284, 0)      draw_actor_sp(enemy, 460, 0)      @actor = nil      self.visible = true  endend 
 

TheRiotInside

Extra Ordinaire
Veteran
Joined
Sep 3, 2012
Messages
270
Reaction score
124
First Language
English
Primarily Uses
Wow! Such a simple script  that does exactly what I wanted. The HP/SP Bar script I'm using even automatically adds the bars to them, awesome.

Thanks a lot for the help!

...Also if you happen to know anything about 2) then I'd be more than happy to hear it, haha.
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
398
Reaction score
99
First Language
English
Primarily Uses
Hmmm... Well you know what, I've never noticed #2 before. That is annoying. I'm gonna see if I can't fix that cause I don't want that in my game either.

EDIT: So, the DBS actually decrements the state turn counter just before the actor attacks, which is fine, but it also then checks to see if it needs to remove states and that's the only time it checks. Needless to say, that's stupid. So what I did was I moved where it checks to remove states to the start of the turn (Fight/Escape like you said). So some examples of how it should work now.

Example 1

Enemy 1 applies a one turn poison state to Actor 1

Actor 1 state changes to Poison

Actor 1 attacks Enemy 1

Actor 1 takes poison damage

Actor 1 Poison state turn counter reduces by 1

Start of turn

Actor 1 Poison state removed

Actor 1 state changes to normal

Example 2

Actor 1 attacks Enemy 1

Actor 2 applies ATK Up buff to Actor 1

Actor 1 state changes to ATK Up

Start of turn

Actor 1 attacks Enemy 1 and does extra damage

Actor 1 ATK Up state turn counter reduces by 1

Actor 2 does whatever

Start of turn

Actor 1 ATK Up state removed

Actor 1 state changes to normal

So anyways, it should be what you're looking for. 

Code:
# Code by Mobius XVI# DBS fixes as requested by TheRiotInside# Changes methods for removing states# Explanation:# DBS reduces turn count and removes states at end of turn# This fixes causes turn count to decrement at end of turn while # state removal happens at beginning of turnclass Game_Battler  #--------------------------------------------------------------------------  # * Natural Removal of States (called up each end turn)  #--------------------------------------------------------------------------  def remove_states_auto    for i in @states_turn.keys.clone      if @states_turn[i] > 0        @states_turn[i] -= 1      end    end  end  #--------------------------------------------------------------------------  # * Natural Removal of States (called up each start turn)  #--------------------------------------------------------------------------  def remove_states_auto_start    for i in @states_turn.keys.clone      if @states_turn[i] <= 0 and rand(100) < $data_states[i].auto_release_prob        remove_state(i)      end    end  end  end # Class end# Change where methods are calledclass Scene_Battle    alias mobius_state_start_phase2 start_phase2    #--------------------------------------------------------------------------  # * Start Party Command Phase  #   New version adds state removal  #--------------------------------------------------------------------------  def start_phase2    # Remove enemy states    for enemy in $game_troop.enemies      enemy.remove_states_auto_start    end    # Remove actor states    for actor in $game_party.actors      actor.remove_states_auto_start    end    # Refresh Battle Status window    @status_window.refresh    # Call original method    mobius_state_start_phase2  end  end # Class end
 
Last edited by a moderator:

TheRiotInside

Extra Ordinaire
Veteran
Joined
Sep 3, 2012
Messages
270
Reaction score
124
First Language
English
Primarily Uses
Oh! I just happened to check back in this topic to "Like" your post as a small token of my thanks, and saw your edit. Again, this works great, and is exactly what I was looking for!

Man, is there anything little things you need help with or something? I feel like I owe you one for all your help haha.
 

Latest Threads

Latest Posts

Latest Profile Posts

RivalRamen_Games wrote on jacobv1014's profile.
I really like your profile picture! Who is that in it? is she an OC?
Making his first game
This scene was suppose to be a test... but now, it's going in the game as official side/optional content. :kaosalute:


functionality(This is function demo not game demo)
1 The door of ABS map can open upon clearing all the monsters
2 Secret room/road arrow/lighting/whatever others can be shown upon clearing too
3 Boss HP bar and loot effect, loot jump and item name color as well as the pick-up animation effect
4 Back to town and "victory aftermath" screen for ABS maps/rooms

Forum statistics

Threads
115,330
Messages
1,089,039
Members
149,994
Latest member
Huzzahhh
Top