Introduction
This is a revised version of the Heads-Up-Display that accompanies Mr.Mo's ABS version 4.5, likely to be the final version of his singular ABS system (other than his SBABS and his SBABS lite). This revised version returns the capability to alter the HUD's appearance and layout from a configuration screen, something not possible after many features were hard-wired into the code.
Also, it now introduces a new ITEM Hotkey window and an actor's optional Face display feature.
Script
As the HUD display requires graphic and has been part of the system since the beginning, I just left it in the demo.
Instructions
Built into the script.
Repairs to Original! Yes, the original system may have an error or two that could not be repaired without direct editing of the script. These errors were not brought on by the Add-Ons but were bugs in the original. As such, this demo also includes repairs. These repairs will be noted below.
Player Damage Pop
Almost immediately after it is shown, the damage the player receives disappears from the screen rather than waiting the entire 40 frame delay as defined by the system. Enemy damage is fine, but the player damage just vanishes. This was repaired by doing the following:
I went down to the update method in the Sprite_Character class in Mr.Mo's ABS (roughly line 2480) and found the following.
Code:
#Display damage
damage(a.damage, a.critical) if !a.dead? or a.damage != nil
While this looks like it would only show the damage pop if the character was dead or there was no damage, it performed the damage pop constantly. This is because the character was 'not' dead. One of the conditions was already met. As such, this statement was changed to this:
Code:
#Display damage
damage(a.damage, a.critical) if !a.dead? and a.damage != nil
Dash/Sneak Animation Fix
Apparently unnoticed for some time, the dash and sneak animation system had a bug. Normally, the system allows for the character graphics to change when the dash or sneak keys are pressed and revert back to the normal character when released. However, it did not properly reset the graphics for your character when the dash or sneak bars were emptied. As such, the system attempted to look for an unexpected '_dash_dash' graphic.
This fix repairs that issue.......
From lines 1544 to 1547 in the update_dash method, you will have a block of code like this:
Code:
if @dash_min <= 0
@dashing = false
$game_player.move_speed = 4
end
This code checks the status of the dash bar and disables the 'dash mode' when your bar is empty. However, the dash animation is not reset...
You will want to insert the following small block of code right below the above. This new snippet checks the status of the dash animation and resets it back to normal when dashing is OFF.:
Code:
if !@dashing
$game_player.character_name = $game_player.character_name.sub(/#{DASH_ANIMATION}/){} if DASH_SHO_AN
end
Likewise, you will want to check lines 1575 to 1578 (or 1578 to 1581 after inserting the last fix) in the update_sneak method which should be a block of code that looks like this:
Code:
if @sneak_min <= 0
@sneaking = false
$game_player.move_speed = 4
end
This code checks the status of the sneak bar bar and likewise disables the 'sneak mode' when the sneak bar is empty.
So you will want to add the following snippet right below the above block so the character resets back once the sneak bar is emptied:
Code:
if !@sneaking
$game_player.character_name = "#{$game_player.character_name}#{SNEAK_ANIMATION}" if !@sneaking and SNEAK_SHO_AN
end
That's it.
Restart/Continued Skill/Item Hotkeys
No complaint has been mentioned and may have gone unnoticed, but if a player hot-keyed a skill and then decided to restart their game, that hotkey remained linked to a skill. The hotkeys did not reset when you restarted.
So a very minor fix was needed to remedy this...
From lines 343 to 346 in the initialize method of the MrMo_ABS class itself, you will have a block of code like this:
This code loads the values from the skill and item hotkey constant. However, when you change your hotkey, these values change to hold these keys.
I know what you are thinking. If the arrays are constants, shouldn't they not be uneditable? That was my thought. But because of the way this system accepts values 'pushed' into the @skill_keys and @item_keys array, these somehow become changed. The hotkey values actually get passed back into the configurable SKILL_KEYS and ITEM_KEYS array and will remain there even when you restart.
This was a very simple fix, and all you need to do is add the .dup suffix to the configurable array names like below:
[This will not attach the actual configuration values of SKILL_KEYS and ITEM_KEYS, but will paste an empty duplicate in their place.
So now, each time you restart a game, the hotkeys will be fresh and new.
Hotkey Refresh
This one bug fix has not been inserted into the demo as it is not required when using Francesca's Companions, but is worthy of note if not using the forementioned Add-On.
No complaint has been mentioned and may have gone unnoticed, but if a player hot-keyed a skill and then died on the screen only to be replaced by the next in line, the hotkeys do not reset. The skills from the previous actor (now dead) are still available for the new character. And while the hotkeys will not function for the new character, one may find it annoying that the keys don't vanish.
So a very minor fix was needed to remedy this...
Just paste the following code right below MrMo_ABS script itself.
Code:
#============================================================================
# ** MrMo'S ABS: Fix #4: Hotkey Refresh
#----------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
#============================================================================
#------------------------------------------------------------------------
# * Class Mo ABS - DO NOT EDIT BELOW, if you don't know what you are doing :)
#------------------------------------------------------------------------
class MrMo_ABS
#------------------------------------------------------------------------
# * Move Forward
#------------------------------------------------------------------------
alias erase_hotkeys_move_forward move_forward
def move_forward
erase_hotkeys_move_forward
# Skill Keys
@skill_keys = SKILL_KEYS.dup
# Item Keys
@item_keys = ITEM_KEYS.dup
end
end
This code wipes out the values from the skill and item hotkey array, returning it to the defaulted empty setting after loading the new actor.
Again, this code is not necessary if you are using Francesca's Companions.
Compatibility
Designed for use with MrMo's ABS. Contains rewrites of the original MrMo HUD system.
Terms and Conditions
This Add-On is free for use, guys. Even commercial games.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
There was a bit of lag being caused by the Dash/Sneak bars when they needed refreshing. This was a problem with the original MrMo system, but I didn't know what the problem was at the time. Now, the system is fixed.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)