Mr.Mo's ABS
DVV Addon #17:
Brynn's Friendly Fire
Version 1.0
Introduction
This system is a safety enhancement for 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 script introduces the concept of accidentally (or intentionally) firing upon non-aggressive ABS targets which will then attack the player.
In a nutshell... using this script assumes you want all enemies to be able to attack you unless you actively flag them.
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:
[code] #Skill Keys
@skill_keys = SKILL_KEYS.dup
#Item Keys
@item_keys = ITEM_KEYS.dup[/code[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.
Compatibility
The bulk of this script aliases methods within Mr.Mo's ABS.
Designed only for use with Mr.Mo's ABS.
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...)