Mr. Mo v 5.5 + Immense Events
#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 }


Messages In This Thread
Mr. Mo v 5.5 + Immense Events - by Tepe - 10-28-2024, 10:29 AM
RE: Mr. Mo v 5.5 + Immense Events - by Tepe - 10-28-2024, 09:12 PM
RE: Mr. Mo v 5.5 + Immense Events - by Tepe - 10-30-2024, 08:36 PM
RE: Mr. Mo v 5.5 + Immense Events - by kyonides - 10-30-2024, 09:28 PM
RE: Mr. Mo v 5.5 + Immense Events - by Tepe - 10-30-2024, 10:03 PM
RE: Mr. Mo v 5.5 + Immense Events - by Tepe - 10-31-2024, 02:13 AM
RE: Mr. Mo v 5.5 + Immense Events - by Tepe - 10-31-2024, 02:36 AM
RE: Mr. Mo v 5.5 + Immense Events - by Tepe - 10-31-2024, 03:10 AM
RE: Mr. Mo v 5.5 + Immense Events - by Tepe - 10-31-2024, 10:51 AM
RE: Mr. Mo v 5.5 + Immense Events - by Tepe - 10-31-2024, 03:37 PM
RE: Mr. Mo v 5.5 + Immense Events - by DerVVulfman - 11-01-2024, 07:11 PM
RE: Mr. Mo v 5.5 + Immense Events - by Tepe - 11-03-2024, 01:00 AM
RE: Mr. Mo v 5.5 + Immense Events - by Tepe - 11-03-2024, 05:57 PM

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,890 01-03-2015, 09:11 PM
Last Post: Djigit
   in FPLE touching events after battle causes rpg maker to crash ThePrinceofMars 1 5,499 11-27-2014, 09:11 PM
Last Post: MechanicalPen



Users browsing this thread: 4 Guest(s)