Mr. Mo v 5.5 + Immense Events
#11
Yea it's working now but problem is of Event vs Event not Player versus Event. :D
Reply }
#12
Define.  Do you mean enemy ballistics hitting another enemy or enemy melee hitting another enemy?

Because here, it appears that enemy to enemy ballistic volleys work.

.mp4   2024-10-30 21-20-23_x264_Segment_0_x264.mp4 (Size: 848.13 KB / Downloads: 0)

So are you talking melee? I need a 'clearer' reply.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#13
Create 2 events, one with id 1 and the other with id 2, hostile to each other and they would shoot at each other. Set them on the map so that they are separated by a greater distance and give one event larger dimensions via Immense Events. The effect will be that the projectiles will be nullified and will not deal ranged damage to the second event.
Reply }
#14
The issue is not Weapons, but Skills.... Game_Ranged_Skill has its own variation of the 'check_event_trigger_touch' method.

When I made Lycan, I moved this basic catch-all method into Range_Base Tongue sticking out

I guess I'm going to be moviing "Is_Range_Ballistic" into the Game_Range class so it can be used by both, and have a separate check_even_trigger_touch' for Game_Range_skill...

EDIT 1: Oh, for pity sake... the method for SKILL is virtually the same for WEAPON. Only difference is how it skips skill attacks or permits em in code. Same result, different way of writing it.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#15
Lycan Abs is a very good ABS, but too complicated for me. I use your scripts, but in simple structures, such as modules. It would be good if there was a clean version of Lycan ABS and add-ons as plugins. At the moment it is hard for me to get my head around it, so I used another version of Mr. Mo. From the one I sent you, I would like to throw out the SDK in the future and switch to XPAce because, to tell you the truth, the SDK is problematic in my opinion. Especially if you mainly script in the frontend. Sorry for the off-topic.
Reply }
#16
Its time we get missile fire working...

It was an oddity.   The SKILL missile system did not perform regular updates of the 'force_movement' system which moves the projectile mathematically and then tests it for collision.  At least, when I placed a simple 'p' print command within, it did not function.  SO, I added a little more to the class to test the position of the skill missiles... and boom!


.mp4   2024-10-30 22-45-08_x264_Segment_0_x264 (1).mp4 (Size: 698.46 KB / Downloads: 1)

That, and the check_event_trigger_touch combined allows things to seriously go ballistic.

It shouldn't harm the official version 4.5 which was MrMo's last actual version, just performing the 'trigger touch' test a second time.

Code:
#==============================================================================
# ** MrMo's Immense Events Patch
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.2
#    10-30-2024
#    RGSS / RPGMaker XP
#
#==============================================================================
#
#  INSTALLATION:
#
#  The Immense Events script must be below MrMo's ABS.
#  This patch goes below both.
#  Par-tay!
#
#------------------------------------------------------------------------------
#
#  USAGE:
#
#  Apply the 'size' command used by Immense Events to the 'first page' in any
#  enemy event.  The size is only defined once for any event and won't reset.
#  Using the 'size' command multiple times for an event changing its graphics
#  will not function.
#
#------------------------------------------------------------------------------


#==============================================================================
# ** MrMo_ABS
#------------------------------------------------------------------------------
#  This class deals with the Action Battle System and controls all Player,
#  Enemy and Companion Actions on the map.
#==============================================================================

class MrMo_ABS
  #--------------------------------------------------------------------------
  # * In Direction?(source, target) - Near Fantastica
  #    source : source of search (object performing test)
  #    target : target of search (object being searched)
  #--------------------------------------------------------------------------
  def in_direction?(source, target)
    #
    # Obtain size differences
    change          = get_size(target)
    o_ch_x, o_ch_y  = change[0], change[1]
    #
    # Get facing direction of seearch source
    dir = source.direction
    #
    # Cycle through object/target x coordinates
    for x in (target.x - o_ch_x)..(target.x + o_ch_x)
      # Return with success based on diretion and coordinates
      return true if dir == 2 and source.y <= target.y and source.x == x
      return true if dir == 8 and source.y >= target.y and source.x == x
    end
    #
    # Cycle through object/target y coordinates
    for y in (target.y - o_ch_y)..(target.y)
      # Return with success based on diretion and coordinates
      return true if dir == 4 and source.x >= target.x and source.y == y
      return true if dir == 6 and source.x <= target.x and source.y == y
    end
    #
    # Return failed
    return false
    #
  end
  #--------------------------------------------------------------------------
  # * In Range?(Element, Object, Range) - Near Fantastica
  #    source : source of search (object performing test)
  #    target : target of search (object being searched)
  #    range  : range distance in tiles
  #--------------------------------------------------------------------------
  def in_range?(source, target, range)
    #
    # Get differences
    change          = get_size(source)
    s_ch_x, s_ch_y  = change[0], change[1]
    change          = get_size(target)
    t_ch_x, t_ch_y  = change[0], change[1]
    #
    # Loop through source and target coordinates with tile extensions
    for xs in (source.x - s_ch_x)..(source.x + s_ch_x)
      for xt in (target.x - t_ch_x)..(target.x + t_ch_x)
        for ys in (source.y - s_ch_y)..(source.y)
          for yt in (target.y - t_ch_y)..(target.y)
            #
            # Confirm if updated coordinate are within the range test
            return true if in_range_numeric?(xs, ys, xt, yt, range)
            #
          end
        end
      end
    end
    #
    # Exit method with no confirmation
    return false
    #
  end
  #--------------------------------------------------------------------------
  # * In Range based on given values (variant of Near Fantastica's)
  #    s_x  : source object's x-coordinates
  #    s_y  : source object's y-coordinates
  #    t_x  : target object's x-coordinates
  #    t_y  : target object's y-coordinates
  #    range : range distance in tiles
  #--------------------------------------------------------------------------
  def in_range_numeric?(s_x, s_y, t_x, t_y, range)
    #
    x = (s_x - t_x) * (s_x - t_x)
    y = (s_y - t_y) * (s_y - t_y)
    r = x + y
    return true if r <= (range * range)
    return false
    #
  end 
  #--------------------------------------------------------------------------
  # * Obtain extending tile quantity (size) based on facing direction
  #    t : target object character
  #--------------------------------------------------------------------------
  def get_size(t)
    #
    # Get facing direction of target
    d = t.direction
    #   
    # Set the size variables depending on the direction
    t_x = ((d == 2 or d == 8) ? t.vertical_size_x : t.horizontal_size_x).to_i
    t_y = ((d == 2 or d == 8) ? t.vertical_size_y : t.horizontal_size_y).to_i
    #   
    # Work out the number of tiles either side of the event
    t_x /= 2
    t_y -= 1
    #
    # Return array with horizontal and vertical tile extensions
    return [t_x, t_y]
    #
  end
end



#==============================================================================
# ** Range_Base
#------------------------------------------------------------------------------
#  This class handles missiles fired in battle. It's used within the ABS Engine
#  and is a superclass for both Game_Ranged_Weapon and Game_Ranged_Skill.
#==============================================================================

class Range_Base < Game_Character
  #--------------------------------------------------------------------------
  # * In Range?(Element, Object, Range) - Near Fantastica
  #    source : source of search (object performing test)
  #    target : target of search (object being searched)
  #    range  : range distance in tiles
  #--------------------------------------------------------------------------
  def in_range_ballistic?(x, y, target, range)
    #
    # Exit false if ballistic strikes parent/attacker
    return false if @parent == target && @parent == $game_player
    #
    # Get differences
    change          = $ABS.get_size(target)
    t_ch_x, t_ch_y  = change[0], change[1]
    #
    # Loop through source and target coordinates with tile extensions
    for xt in (target.x - t_ch_x)..(target.x + t_ch_x)
      for yt in (target.y - t_ch_y)..(target.y)
        #
        # Confirm if updated coordinate are within the range test
        return true if $ABS.in_range_numeric?(x, y, xt, yt, range)
        #
      end
    end
    #
    # Exit method with no confirmation
    return false
    #
  end 
end



#==============================================================================
# ** Game_Ranged_Skill
#------------------------------------------------------------------------------
#  This class handles ranged missiles that deliver damage based on the skill
#  performed by the user.
#==============================================================================

class Game_Ranged_Skill < Range_Base
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    check_event_trigger_touch(@x, @y)
  end
  #--------------------------------------------------------------------------
  # * Check Event Trigger Touch(x,y)
  #--------------------------------------------------------------------------
  def check_event_trigger_touch(x, y)
    #
    # If using non-official update to 4.5
    faux = (Object.const_defined?(:DEFEND_DAMAGE_PERCENT))
    #
    # Exit if the stop flag is set
    return if @stop
    #
    if faux
      # Exit and set stop flag if neither an enemy nor player
      if $ABS.enemies[@parent.id].nil? and !@parent.is_a?(Game_Player)
        return @stop = true
      end
    end
    #
    # Hit the player if missile in range of the player
    hit_player if in_range_ballistic?(x, y, $game_player, 1)
    #
    # Cycle through all map events
    for event in $game_map.events.values
      #
      # Skip if not an enemy, or missile not in range to strike
      next if $ABS.enemies[event.id].nil?     
      next unless in_range_ballistic?(x, y, event, 1)     
      #
      # Acquire hit condition tests
      if faux
        # Adding unofficial friendly-fire option
        hate    = true
        unless $ABS.enemies[@parent.id].nil?
          e_id  = $ABS.enemies[event.id].enemy_id
          hate  = $ABS.enemies[@parent.id].hate_group.include?(e_id)
        end
      end
      c1      = event.character_name == ""
      c2      = ($ABS.enemies[event.id] != nil and $ABS.enemies[event.id].dead?)
      c3      = event.erased
      c4      = @parent.is_a?(Game_Event) and !hate     
      #
      # Move if hit condition not met, or perform hit
      if (c1 or c2 or c3) && !faux
        force_movement
      elsif (c1 or c2 or c3 or c4) && faux
        force_movement
      else
        hit_event(event.id)
      end
      #
    end
  end
end



#==============================================================================
# ** Game_Ranged_Weapon
#------------------------------------------------------------------------------
#  This class handles ranged missiles that deliver damage based on the weapon
#  currently equipped.
#==============================================================================

class Game_Ranged_Weapon < Range_Base
  #--------------------------------------------------------------------------
  # * Check Event Trigger Touch(x,y)
  #--------------------------------------------------------------------------
  def check_event_trigger_touch(x, y)
    #
    # If using non-official update to 4.5
    faux = (Object.const_defined?(:DEFEND_DAMAGE_PERCENT))
    #
    # Exit if the stop flag is set
    return if @stop
    #
    if faux
      # Exit and set stop flag if neither an enemy nor player
      if $ABS.enemies[@parent.id].nil? and !@parent.is_a?(Game_Player)
        return @stop = true
      end
    end
    #
    # Hit the player if missile in range of the player
    hit_player if in_range_ballistic?(x, y, $game_player, 1)
    #
    # Cycle through all map events
    for event in $game_map.events.values
      #
      # Skip if not an enemy, or missile not in range to strike
      next if $ABS.enemies[event.id].nil?     
      next unless in_range_ballistic?(x, y, event, 1)     
      #
      # Acquire hit condition tests
      if faux
        # Adding unofficial friendly-fire option
        hate    = true
        unless $ABS.enemies[@parent.id].nil?
          e_id  = $ABS.enemies[event.id].enemy_id
          hate  = $ABS.enemies[@parent.id].hate_group.include?(e_id)
        end
      end
      c1      = event.character_name == ""
      c2      = ($ABS.enemies[event.id] != nil and $ABS.enemies[event.id].dead?)
      c3      = event.erased
      c4      = @parent.is_a?(Game_Event) and !hate     
      #
      # Move if hit condition not met, or perform hit
      if (c1 or c2 or c3) && !faux
        force_movement
      elsif (c1 or c2 or c3 or c4) && faux
        force_movement
      else
        hit_event(event.id)
      end
      #
    end
  end
end

Been thinking of creating a second script for Lycan... a user's EDITOR of sorts that would let you configure 'on screen' like if it was a secondary "RMXP Database" screen (ala Actor Database, Weapon Database... etc). That could be handy.



The SDK had a good precept, smaller bite-sized modules for easier coding and a 'standardization' on coding procedures. BUT poor at execution as the guys kept revising it over and over. However, the SDK team created Scene_Base one year before Enterbrain... er... borrowed it... (cough) ... for RPGMaker VX.

XPAce is something if you want faster performance, but one need have license for both products. And when someone who told me he was coding in XP wanted a script, the script did not work, only to find out he was using XPAce. So it is not entirely compatible.

The HiddenChest executable by kyonides actually works fine for those wanting to set their XP games at a faster rate than 40fps... I've tried it. Now if he could get all the DLL files merged into one to make distribution easier...
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#17
Okey I checked this and... we have still problem but in this time I show You this in movie and some pictures.


https://www.mediafire.com/file/djxjqck5a...m.mp4/file


As you can see in the video, the huge event still takes no damage and the arrow passes through it instead of being removed on contact and dealing damage.


Okay I solved this problem like this:

Code:
#==============================================================================
# ** MrMo's Immense Events Patch
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.2
#    10-30-2024
#    RGSS / RPGMaker XP
#
#==============================================================================
#
#  INSTALLATION:
#
#  The Immense Events script must be below MrMo's ABS.
#  This patch goes below both.
#  Par-tay!
#
#------------------------------------------------------------------------------
#
#  USAGE:
#
#  Apply the 'size' command used by Immense Events to the 'first page' in any
#  enemy event.  The size is only defined once for any event and won't reset.
#  Using the 'size' command multiple times for an event changing its graphics
#  will not function.
#
#------------------------------------------------------------------------------


#==============================================================================
# ** MrMo_ABS
#------------------------------------------------------------------------------
#  This class deals with the Action Battle System and controls all Player,
#  Enemy and Companion Actions on the map.
#==============================================================================

class MrMo_ABS
  #--------------------------------------------------------------------------
  # * In Direction?(source, target) - Near Fantastica
  #    source : source of search (object performing test)
  #    target : target of search (object being searched)
  #--------------------------------------------------------------------------
  def in_direction?(source, target)
    #
    # Obtain size differences
    change          = get_size(target)
    o_ch_x, o_ch_y  = change[0], change[1]
    #
    # Get facing direction of search source
    dir = source.direction
    #
    # Cycle through object/target x coordinates
    for x in (target.x - o_ch_x)..(target.x + o_ch_x)
      # Return with success based on direction and coordinates
      return true if dir == 2 and source.y <= target.y and source.x == x
      return true if dir == 8 and source.y >= target.y and source.x == x
    end
    #
    # Cycle through object/target y coordinates
    for y in (target.y - o_ch_y)..(target.y)
      # Return with success based on direction and coordinates
      return true if dir == 4 and source.x >= target.x and source.y == y
      return true if dir == 6 and source.x <= target.x and source.y == y
    end
    #
    # Return failed
    return false
    #
  end
  #--------------------------------------------------------------------------
  # * In Range?(Element, Object, Range) - Near Fantastica
  #    source : source of search (object performing test)
  #    target : target of search (object being searched)
  #    range  : range distance in tiles
  #--------------------------------------------------------------------------
  def in_range?(source, target, range)
    #
    # Get differences
    change          = get_size(source)
    s_ch_x, s_ch_y  = change[0], change[1]
    change          = get_size(target)
    t_ch_x, t_ch_y  = change[0], change[1]
    #
    # Loop through source and target coordinates with tile extensions
    for xs in (source.x - s_ch_x)..(source.x + s_ch_x)
      for xt in (target.x - t_ch_x)..(target.x + t_ch_x)
        for ys in (source.y - s_ch_y)..(source.y)
          for yt in (target.y - t_ch_y)..(target.y)
            #
            # Confirm if updated coordinates are within the range test
            return true if in_range_numeric?(xs, ys, xt, yt, range)
            #
          end
        end
      end
    end
    #
    # Exit method with no confirmation
    return false
    #
  end
  #--------------------------------------------------------------------------
  # * In Range based on given values (variant of Near Fantastica's)
  #    s_x  : source object's x-coordinates
  #    s_y  : source object's y-coordinates
  #    t_x  : target object's x-coordinates
  #    t_y  : target object's y-coordinates
  #    range : range distance in tiles
  #--------------------------------------------------------------------------
  def in_range_numeric?(s_x, s_y, t_x, t_y, range)
    #
    x = (s_x - t_x) * (s_x - t_x)
    y = (s_y - t_y) * (s_y - t_y)
    r = x + y
    return true if r <= (range * range)
    return false
    #
  end
  #--------------------------------------------------------------------------
  # * Obtain extending tile quantity (size) based on facing direction
  #    t : target object character
  #--------------------------------------------------------------------------
  def get_size(t)
    #
    # Get facing direction of target
    d = t.direction
    #   
    # Set the size variables depending on the direction
    t_x = ((d == 2 or d == 8) ? t.vertical_size_x : t.horizontal_size_x).to_i
    t_y = ((d == 2 or d == 8) ? t.vertical_size_y : t.horizontal_size_y).to_i
    #   
    # Work out the number of tiles either side of the event
    t_x /= 2
    t_y -= 1
    #
    # Return array with horizontal and vertical tile extensions
    return [t_x, t_y]
    #
  end
end



#==============================================================================
# ** Range_Base
#------------------------------------------------------------------------------
#  This class handles missiles fired in battle. It's used within the ABS Engine
#  and is a superclass for both Game_Ranged_Weapon and Game_Ranged_Skill.
#==============================================================================

class Range_Base < Game_Character
  #--------------------------------------------------------------------------
  # * In Range?(Element, Object, Range) - Near Fantastica
  #    source : source of search (object performing test)
  #    target : target of search (object being searched)
  #    range  : range distance in tiles
  #--------------------------------------------------------------------------
  def in_range_ballistic?(x, y, target, range)
    #
    # Exit false if ballistic strikes parent/attacker
    return false if @parent == target && @parent == $game_player
    #
    # Get differences
    change          = $ABS.get_size(target)
    t_ch_x, t_ch_y  = change[0], change[1]
    #
    # Loop through source and target coordinates with tile extensions
    for xt in (target.x - t_ch_x)..(target.x + t_ch_x)
      for yt in (target.y - t_ch_y)..(target.y)
        #
        # Confirm if updated coordinates are within the range test
        return true if $ABS.in_range_numeric?(x, y, xt, yt, range)
        #
      end
    end
    #
    # Exit method with no confirmation
    return false
    #
  end
end



#==============================================================================
# ** Game_Ranged_Skill
#------------------------------------------------------------------------------
#  This class handles ranged missiles that deliver damage based on the skill
#  performed by the user.
#==============================================================================

class Game_Ranged_Skill < Range_Base
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    check_event_trigger_touch(@x, @y)
  end

  #--------------------------------------------------------------------------
  # * Check Event Trigger Touch(x, y)
  #--------------------------------------------------------------------------
  def check_event_trigger_touch(x, y)
    # Exit if stop flag is set
    return if @stop

    # Hit player if missile is within range
    hit_player if in_range_ballistic?(x, y, $game_player, 1)

    # Iterate over all events on the map
    for event in $game_map.events.values
      # Skip events that are not enemies or are outside missile range
      next if $ABS.enemies[event.id] == nil || event == @parent
      next unless in_range_ballistic?(x, y, event, 1)

      # Check hit conditions
      if event.character_name == "" || $ABS.enemies[event.id].dead? || event.erased
        force_movement
      else
        # Hit large event
        hit_event(event.id)
      end
    end
  end
end

#==============================================================================
# ** Game_Ranged_Weapon
#------------------------------------------------------------------------------
#  This class handles ranged missiles that deliver damage based on the weapon
#  currently equipped.
#==============================================================================

class Game_Ranged_Weapon < Range_Base
  #--------------------------------------------------------------------------
  # * Check Event Trigger Touch(x, y)
  #--------------------------------------------------------------------------
  def check_event_trigger_touch(x, y)
    # Exit if stop flag is set
    return if @stop

    # Hit player if missile is within range
    hit_player if in_range_ballistic?(x, y, $game_player, 1)

    # Iterate over all events on the map
    for event in $game_map.events.values
      # Skip events that are not enemies, are outside missile range, or are the firing event
      next if $ABS.enemies[event.id] == nil || event == @parent
      next unless in_range_ballistic?(x, y, event, 1)

      # Check hit conditions
      if event.character_name == "" || $ABS.enemies[event.id].dead? || event.erased
        force_movement
      else
        # Hit large event
        hit_event(event.id)
      end
    end
  end
end

Changelog:

The following changes were made to the
Code:
check_event_trigger_touch
method in the
Code:
Game_Ranged_Skill
and
Code:
Game_Ranged_Weapon
classes to enable event-to-event attacks (not limited to player interactions). The key updates are as follows:

  1. Check if the event is an enemy: Added
    Code:
    next if $ABS.enemies[event.id] == nil
    to skip events that are not defined as enemies in the ABS system.
  2. Skip the parent event: Added
    Code:
    next if event == @parent
    so that the projectile does not hit the event that launched it (the parent event).
  3. Check if the event is within attack range: Added
    Code:
    next unless in_range_ballistic?(x, y, event, 1)
    to verify if the event is within attack range.
  4. Event hit conditions: If the event is inactive, dead, or erased, the
    Code:
    force_movement
    method is executed. Otherwise,
    Code:
    hit_event(event.id)
    is called to inflict damage on the target event.


EDIT 1:

Taking advantage of the opportunity Wulfman. Do you know how to disable the "jump" effect for a specific event when it is attacked?

An interesting option would be to add such a function to the comments. While it works for monsters, for heavy objects it looks funny. :D


Attached Files Thumbnail(s)
       
Reply }
#18
Dizzy Coffee Kinda waking up right now...   So your edit fixed the issue in question?  I do find it odd you still had issues where the vid I posted showed large events were actually damaged beforehand.

But if you say your changes work, they work.



Now... you want a feature to prevent defined enemies from being knocked back when struck by a massive attack.  Interesting.  It would be based upon the Database Enemy IDs.

I'm not viewing the ABS. Hopefully, it can be applied to the Jump method itself ... if it can detect the identity of the jumper.  Otherwise, it would be a bit of an issue having to rewrite the more-extensive hit_ebnemy methods themselves.



But I have some things to take care of today. Halloween 'n all
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#19
Yes of course. :) Have fun! In Poland we have a more serious version of this holiday.

Anyway, thanks to you I made a lot of progress! Thank you!
I still have a bit to sort out, but once I put together the more important functions I'll be happy to show you the result. :D
Reply }
#20
Quickie coding...

Code:
module JumpDefine
 
  #----------------------------------------------------------------------------
  ENEMY_JUMP_CHANGE = {}  # DO NOT TOUCH
  #----------------------------------------------------------------------------
 
 
  # ENEMIES THAT DON'T JUMP
  # -----------------------
  # This is a simple array holding the IDs of enemies that do not react with a
  # jump effect after being hit.  The IDs are the Enemy Database IDs,  and not
  # the IDs of the events on any given map.
  #
    ENEMY_NO_JUMP         = [4]
 
   
  # ENEMIES THAT HAVE CHANGED JUMP VALUES
  # -------------------------------------
  # This is a simple section that lets you increase or decrease the amount of
  # jump any given enemy may enact when struck. This allows you to reduce the
  # jump effect for enemies assumed to be massive,  or increase the amount of
  # the jump effect for enemies assumed frail or lightweight.
  #
    ENEMY_JUMP_CHANGE[4]  = 2     # Enemy 4 is light, and has 2 added to jump!

   
  # PLAYER JUMP ALTERATIONS
  # -----------------------
  # This section allows the game developer to determine of the player performs
  # a jump effect if struck, or any increase or decrease in the amount of jump
  # being performed.
  #
    PLAYER_NO_JUMP      = false   # (Default: false) if true, there is no jump
    PLAYER_JUMP_CHANGE  = 3       # (Default: 0)  The increase/decrease in jump
   

end


#==============================================================================
# ** MrMo_ABS
#------------------------------------------------------------------------------
#  This class deals with the Action Battle System and controls all Player,
#  Enemy and Companion Actions on the map.
#==============================================================================

class MrMo_ABS
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias woobis jump
  #--------------------------------------------------------------------------
  # * Jump
  #--------------------------------------------------------------------------
  def jump(object, attacker, plus)
    #
    # Acquire Enemy ID
    id = get_enemy_id(object)
    #
    # Only for the player
    if object.is_a?(Game_Player)
      #
      # Cancel/block jump if player doesn't jump
      return if JumpDefine::PLAYER_NO_JUMP == true
      plus += JumpDefine::PLAYER_JUMP_CHANGE
      #
    end
    #
    # Only for valid enemy IDs
    unless id == 0
      #
      # Cancel/block jump if defined for the enemy
      unless JumpDefine::ENEMY_NO_JUMP == [] || JumpDefine::ENEMY_NO_JUMP.nil?
        return if JumpDefine::ENEMY_NO_JUMP.include?(id)
      end
      #
      # Increase/decrease jump value if defined for the enemy
      if JumpDefine::ENEMY_JUMP_CHANGE.has_key?(id)
        plus += JumpDefine::ENEMY_JUMP_CHANGE[id]
        plus = 0 if plus < 0
      end
      #
    end
    #
    # Perform the original method
    woobis(object, attacker, plus)
    #
  end
  #--------------------------------------------------------------------------
  # * Get Enemy ID from event
  #     event : Event
  #--------------------------------------------------------------------------
  def get_enemy_id(event)
    #
    # Assume invalid enemy ID
    effective = 0
    #
    # Cycle through enemies on map
    for enemy in @enemies.values
      #
      # If the on-map enemy's event is a match to the event
      if event.id == enemy.event_id
        # set the enemy ID from the on-map enemies
        effective = enemy.enemy_id
      end
      #
    end
    #
    # Return the enemy ID (invalid or not)
    return effective
    #
  end
end

This little script should take care of jumping.

You can disable enemies (by their Database ID) from delivering the jump effect when struck.
You can increase or decrease the amount of jump to specific enemies (by their Database ID)  so weaker enemies COULD get more knockback, or bigger ones get less knockback.

Ditto for the Game_Player

It won't work for the LycanABS because the base mechanics are also used for weapon recoil... but you can see how simple it is.

I set the JUMP CHANGE values positive to 'increase' the jump.  Setting negative values reduce jump.  

These values get combined with the initial jump.   The initial jump will never be below 0.  When it hits 0, there IS no jump. Winking
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
  Icon Display 1.0 scripts makes events impossible to go to events, which are passable Djigit 0 3,876 01-03-2015, 09:11 PM
Last Post: Djigit
   in FPLE touching events after battle causes rpg maker to crash ThePrinceofMars 1 5,475 11-27-2014, 09:11 PM
Last Post: MechanicalPen



Users browsing this thread: 2 Guest(s)