Mr.Mo's ABS
DVV Addon #13:
Tinuke's Smart Missiles
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 a preventative halt to any missile attacks made by the player if he/she is facing a solid wall or an impassable tile which would result in the player taking all the damage. With this, the player only hears a buzzer sound if facing a wall and the missile, whether a ranged weapon or explosive spell, was attempted.
Of course, they can still blow themselves up if they are within the range of an explosion. But the inconvenience of impassable tiles causing damage has all but been removed.
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
This script should be easily compatible with any other script designed for Mr.Mo's ABS as it aliases only three existing methods within the MrMo_ABS class itself. These three methods perform checks to see if the player is immediately blocked before proceeding with the attack. Given that, it is suggested that is be placed below any script handling MrMo's attack systems.
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...)