RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Encounter Restrictions

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    Encounter Restrictions
    Author: modern algebra
    Date: August 25, 2007

    Version History


    • February 5, 2008: Split the two functions of the script into independent scripts. It made sense since they did not rely on one another and the separation not only allows people to use one or the other functions, but makes it easier to configure. Naturally, they are mutually compatible. For the actual scripts:
      • Encounters Based on Troop Level - Version 2.1: Made setting troop levels more intuitive and less error prone. Slightly changed code. Otherwise same as 2.0
      • Encounter Areas - Version 1.1: More intuitive database, as well as added the option to deactivate areas
    • Version 2.5b: Minor modifications to the code. The most important thing was saving the areas in a less wasteful way with broader applications. (I.e. Initialize when necessary, rather then using a partially filled array)
    • Version 2.5: Added in an option to set encounter areas, restoring some of the lost functionality of RM 2K3. As well, you can now turn on and off the level differentiating algorithm at will.
    • Version 2.0: Rewrote the script for better compatibility, optimization, as well making it easier to implement
    • Version 1.1: Minor bug fixes
    • Version 1.0: Original Script

    Description


    The Encounter Level Range Script allows the game maker to give monster troops levels, and then based on those levels, it determines what enemy troops can be attacked by the player at his current level. That is kind of confusing, so I will try to explain a little better by example. The maker can set up a map with possible enemies being Angels, Cherubims, and Seraphims. You can enter this map at any time, and so you want the encounters to reflect what level the hero party is. You don't want the party attacking Seraphims when they are level 1, because they will be crushed, and you don't want them to fight Angels when they are level 99, because it's too easy. Thus, you just set up in the script what levels the enemy troops are, and with this script you will only be able to fight monster troops that are within level range of your heroes.

    The Encounter Areas script allows you to set encounter areas. What this means is you can easily set it so that different areas of the map have different enemies. This is especially useful for world maps and the like.

    Features

    Encounter Level Range
    • Allows you to set the levels for each monster troop in the database
    • Only allows the player to fight monster troops within his level range
    • Allows you to set what the range is for every map

    Encounter Areas
    • Allows you to set encounter areas, and only in those areas can specified monsters attack you.
    • Allows you to control whether level effects encounters for each map

    Instructions

    See Scripts for instructions. They are located in the header and in the Editable Region (where you set up troop levels)

    Scripts


    Encounter Level Range

    [/list]
    Code: [Select]
    #=============================================================
    # Encounter Levels Script
    # Version: 1.0
    # Author: Modern Algebra  (rmrk.net)
    # Date: February 5, 2008
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  Instructions:
    #  Set up the regular map encounter lists (areas included) with all the monsters that
    #  you ever want to appear in that area or map.
    #
    #  The system basically works by giving monster troops levels and by setting a
    #  level range within which all encounters must reside. By default, this level range
    #  is between (Actor's Average Level - 5) and (Actor's Average Level + 5). The
    #  range can be changed at any time to make certain maps harder or easier by
    #  using the following code in a call script:
    #
    #     $game_system.min_level = x
    #     $game_system.max_level = x
    #
    #  Where x is the value you are changing it to.
    #  Keep in mind that min level, like max level, is added to the party's average level.
    #  So, if you set $game_system.min_level = 5, then the minimum level of encounters
    #  would be party's average level + 5, not party's average level - 5.
    #
    #  You can also turn the levelling feature on and off completely at will, using this code:
    #
    #  $game_system.level_boolean = true (to turn it on)
    #  $game_system.level_boolean = false (to turn it off)
    #
    #  For instructions on setting the troop levels, see the Editable Region at Line 58.
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  Compatibility:
    #   It ought to be compatible with any script that does not modify the
    #   make_encounter_troop_id method of Game_Player (and I can't think of any script
    #   that would want to besides one like this).
    #=============================================================
    # ** Game_System
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  Summary of Changes:
    #       aliased method - initialize
    #       new instance variables - level_boolean, min_level, max_level
    #       new method - troop_levels
    #=============================================================

    class Game_System
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Public Instance Variables
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      attr_accessor :level_boolean   # Turns on and off the level range function
      attr_accessor :min_level           # The lower limit of the encounter range
      attr_accessor :max_level         # The upper limit of the encounter range
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Retrieve Troop Level
      #     Adds an Encounter_Area object to the areas array.
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      def troop_levels (id)
        # By default, level = id
        level = id
        case id
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        # * Editable Region
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        #  Here is where you can set up the levels of each respective troop. As
        #  you can see below, all you need to do is use this code:
        #
        #      when id; level = X
        #
        #  where id is the ID of the troop and X is the level you want that troop to
        #  have. I also recommend placing the name of the troop next to them for
        #  easy editing, so:
        #
        #      when id; level = X     # name
        #
        #  If you do not set a level, the troop's level will be assumed to be equal to it's ID
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        when 1; level = 2     # Slime * 2
        when 2; level = 5     # Bat * 2
        when 3; level = 8    # Bee * 2
        when 4; level = 11     # Spider * 3
        when 5; level = 13
        when 6; level = 14
        when 7;
        when 8;
        when 9;
        when 10;
        when 11;
        when 12;
        when 13;
        when 14;
        when 15;
        when 16;
        when 17;
        when 18;
        when 19;
        when 20;
        when 21;
        when 22;
        when 23;
        when 24;
        when 25;
        when 26;
        when 27;
        when 28;
        when 29;
        when 30;
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        # * End Editable Region
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        end
        return level
      end
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Object Initialization
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      alias ma_encounter_levels_init initialize
      def initialize
        ma_encounter_levels_init
        @min_level = -5
        @max_level = 5
        @level_boolean = true
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        # * End Editable Region
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      end
    end

    #==============================================================
    # ** Game_Player
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  Summary of Changes:
    #      overwritten methods - make_encounter_troop_id
    #==============================================================

    class Game_Map
      #-------------------------------------------------------------------------
      # * Encounter List
      #     returns the encounter list based on party level
      #-------------------------------------------------------------------------
      alias ma_encounter_level_restrictions_encounter_list encounter_list
      def encounter_list
        # If level feature active
        if $game_system.level_boolean
          encounters = []
          # Calculate Party Level Average
          average_level = 0
          $game_party.actors.each {|i|  average_level += i.level}
          average_level /= $game_party.actors.size
          # Set Range
          min = [average_level + $game_system.min_level,1].max
          max = [average_level + $game_system.max_level,99].min
          unless min > max
            # Test average agains all troops in the list
            ma_encounter_level_restrictions_encounter_list.each {|i|
              troop_level = $game_system.troop_levels (i)
              # Add to the returning array  If troop level within range
              encounters.push (i) if troop_level.between? (min, max)
              }
          end
        else
          # Return the full encounter list
          encounters = ma_encounter_level_restrictions_encounter_list
        end
        return encounters
      end
    end

    Encounter Areas Script
    Code: [Select]
    #==============================================================================
    # Encounter Area Restriction
    # Version: 1.1
    # Author: Modern Algebra  (rmrk.net)
    # Date: February 5, 2008
    #------------------------------------------------------------------------------
    #  Instructions:
    #    See inside the editable region at line 48 for instructions on setting up
    #    the database.
    #    You can also add a new region at any time in the game by using this code
    #    in a call script:
    #
    #     $game_system.set_area(x, y, width, height, monster troop array, map_id, name)
    #
    #    In order to make it fit, it may be easier to first assign each value to a
    #    variable, like so:
    #
    #      x = starting x coordinate for area
    #      y = starting y coordinate for area
    #      w = width of area
    #      h = height of area
    #      t = [1st troop ID, 2nd Troop ID, ...] for all troops in the area
    #      m = map id to set the new area in
    #      n = 'name' of area
    #      $game_system.set_area (x,y,w,h,t,m,n)
    #
    #    If you ever want to disable or enable an area (for instance, if the player
    #    comes back to the map after a major event and you no longer want him to
    #    fight the troops held in an old array), then you can use these codes:
    #   
    #    $game_system.area(name, map ID).active = true
    #    $game_system.area(name, map ID).active = true
    #
    #     If you do not specify map ID, then it will be assumed to be the map you
    #     are currently located on.
    #==============================================================================
    # *** Encounter_Regions
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  Stores all pertinent data regarding encounters
    #==============================================================================

    module Encounter_Regions
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Regions
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      def self.areas
        @areas = []
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        # * Editable Region
        #----------------------------------------------------------------------
        # Set initial areas here. Set them up like this:
        #
        #    self.set_area (x, y, width, height, monster troop array, map_id, name)
        #
        # In the 1st example area below, we have defined an area at x = 10, y = 6,
        # width = 4, height = 5, in the 1st map with monsters 2, 3, and 8 appearing
        # in the area. Essentially, this means that on the first map, you can
        # encounter monster troops 2, 3 and 8 if the player coordinates are within
        # (10-13, 6-10). The name is 'Lies'. If you do not want to give the area
        # a name, then merely type in nil.
        #
        # You can set as many areas as you like for as many maps as you like.
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        self.set_area (7, 1, 8, 3, [1,2,3], 1, 'Fence')
        self.set_area (0, 12, 11, 7, [4,5], 1, 'Forest')
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        # * End Editable Region                                                                                   
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        return @areas
      end
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Set Area
      #     Adds an Encounter_Area object to the areas array.
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      def self.set_area (x, y, width, height, array, map_id, name = '')
        # Initialize array if this is the first map for which there is an area
        @areas[map_id] = [] if @areas[map_id].nil?
        id = @areas[map_id].size
        area = Encounter_Area.new (x, y, width, height, array, map_id, name)
        @areas[map_id].push (area)
      end
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # ** Encounter Area 
      #--------------------------------------------------------------------------
      #  The object which represents an area
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      class Encounter_Area
        #----------------------------------------------------------------------
        # * Public Instance Variables                                                             
        #----------------------------------------------------------------------
        attr_reader   :map_id
        attr_reader   :rect
        attr_reader   :monster_troops # The monsters within the troop
        attr_reader   :name
        attr_accessor :active
        #----------------------------------------------------------------------
        # * Initialize                                         
        #     Adds a Game_Area object to the array.       
        #----------------------------------------------------------------------
        def initialize (x, y, width, height, array, map_id, name)
          @rect = Rect.new (x, y, width, height)
          @monster_troops = array
          @name = name
          @map_id = map_id
          @active = true
        end
        #----------------------------------------------------------------------
        # * Within?                                                       
        #     Checks if the position specified is within the area                 
        #----------------------------------------------------------------------
        def within? (x, y)
          return x.between? (@rect.x, @rect.x + @rect.width - 1) &&
                    y.between? (@rect.y, @rect.y + @rect.height - 1)
        end
        #----------------------------------------------------------------------
        # * Equals?                                           
        #     Determine if two Encounter_Area objects are equal     
        #----------------------------------------------------------------------
        def == (other)
          return other.map_id == @map_id && other.rect == @rect
        end
      end
    end

    #==============================================================================
    # ** Game_System
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  Summary of Changes:
    #       aliased methods - initialize
    #       new methods - set_area, update_regions
    #       new instance variables - regions
    #==============================================================================

    class Game_System
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
      # * Public Instance Variables
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      attr_reader :regions              # Contains area data
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Object Initialization
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      alias ma_encounter_areas_init initialize
      def initialize
        ma_encounter_areas_init
        @regions = []
      end
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
      # * Set Area
      #     Adds an Encounter_Area object to the areas array.
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      def set_area (x, y, width, height, array, name = '', map_id = $game_map.map_id)
        area = Encounter_Regions::Encounter_Area.new  (x, y, width, height, array, map_id, name)
        # If first area in the map, initialize array
        @regions[map_id] = [] if @regions[map_id].nil?
        @regions[map_id].push (area) unless @regions[map_id].include? (area)
      end
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
      # * Update Areas
      #     Adds an Encounter_Area object to the areas array.
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      def update_regions
        # For all areas in the database
        Encounter_Regions.areas.each {|regions|
          next if regions.nil?
          regions.each {|area|
            # Initialize the array if this is the first area to be set to that map
            @regions[area.map_id] = [] if @regions[area.map_id].nil?
            # Add the area to the regions if it does not already exist
            @regions[area.map_id].push (area) unless @regions.include? (area)
          }
        }
      end
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Retrieve Area by name and map_id
      #       map_id : the ID of the map
      #       name    : the name of the area you want
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      def area (name = '', map_id = $game_map.map_id)
        @regions[map_id].each {|i| return i if i.name == name}
        return false
      end
    end

    #==============================================================================
    # ** Game_Map
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  Summary of Changes:
    #      aliased methods - encounter_list
    #==============================================================================

    class Game_Map
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Encounter List
      #       Returns the encounter list, with modifications based on level
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      alias ma_encounter_areas_encounter_list encounter_list
      def encounter_list
        # Run original method
        encounters = ma_encounter_areas_encounter_list
        return encounters if $game_system.regions[@map_id].nil?
        # Add monsters from each area the player is within
        $game_system.regions[@map_id].each { |area|
          next unless area.active
          # Add all unique elements from the area to the encounter_list
          encounters |= area.monster_troops if area.within? ($game_player.x, $game_player.y)
        }
        return encounters
      end
    end

    #======================================================================
    # ** Scene_Title
    #------------------------------------------------------------------------------
    #  Summary of Changes:
    #       aliased method - main
    #======================================================================

    class Scene_Title
      alias ma_encounter_regions_main_update main
      def main
        # Run original method
        ma_encounter_regions_main_update
        # Merge new database entries with the game areas
        $game_system.update_regions
      end
    end

    Credit


    • modern algebra

    Support


    I will fix all bugs that arise with the script, as well as make it compatible with other scripts if any compatibility issues arise. I will provide support on RMRK, and anywhere else I post this, but I will most swiftly respond if you post your question on RMRK.

    Known Compatibility Issues

    N/A so far

    Demo


    Demo Attached

    Author's Notes

    This script is posted at RMRK and RMRevolution. If you see it anywhere else, please notify me. If you want to post it somewhere else, just ask :)

    « Last Edit: February 06, 2008, 12:10:23 AM by modern algebra »

    *
    Shooting for the "MEMBER MODERATOR OF THE YEAR 2007" Award
    Rep:
    Level 89
    Hi, there.
    Very nice man. Im sure people will need this for many arena/battle type games.
    Sig by MacGravel

    ******
    Revolution is not a bed of roses.
    Rep:
    Level 91
    Project of the Month winner for July 2009
    Simple and very effective for non-linear games, open ended games should defiantly use this :)

    Keep up the good work :)

    *
    A Random Custom Title
    Rep:
    Level 96
    wah
    Nice! Didn't know you could script (sorry if you take this as an insult). This seems really cool!!! Great for training at higher levels!

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    haha, I don't think I'm offended. It is my first non-request script, after all.

    Thanks for all the comments guys.
    « Last Edit: May 15, 2007, 12:47:54 AM by modern algebra »

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    Sorry for double post, but Updated to v. 1.1

    What's new?

    • Some code is less bulky
    • You now set a minimum difference and a maximum difference between the party level and the enemy troop level, instead of setting a single variable which extends both ways
    • You can change these values at any time with a call script in order to increase or decrease the difficulty of any area
    « Last Edit: May 16, 2007, 03:14:46 PM by modern algebra »

    *
    A Random Custom Title
    Rep:
    Level 96
    wah
    Niiiice!~~~ I was just remembering this yesterday and this is definitely a sign to continue with my game. XD

    EDIT: If you were to make an encounter with eventing, would that ignore the script and force the battle anyways?
    « Last Edit: May 17, 2007, 07:55:49 PM by mastermoo420 »

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    @moo: Yes, it would ignore the script

    I am thinking of modifying this and making it so that all you set is difficulty, how important each stat is, and then at what levels monsters learn skills, and then I could make it so that monsters "level". In other words, their toughness would depend on what level your hero is. I don't know if I will though

    *
    A Random Custom Title
    Rep:
    Level 96
    wah
    :o That would be pretty cool... So, instead of having like 5 monsters of the same type but of different stats (to increase difficulty), it would do it on its own?

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    Something like that, but it'd be progressive leveling. So for every level of the hero, the monsters will be the same difficulty. I.E. Their stats grow with the hero's stats.

    ***
    Rep:
    Level 88
    Menu & Battle System Guru
    Awesome script. Good work man!

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    Thanks. I'm glad you like it  ;D

    Yeah, I think I might make a monster level system to complement this eventually. It's in the works after I finish a few of my other projects.

    **
    Rep: +0/-0Level 88
    All work will stop and the ground will releive...
    This script is amazing, and would have been godly for my single dungeon RPG if I decided to keep it that way. Unfortunately, I no longer have a need for it.
    Secret of the Summit: [Working Title]
    Scripts: nearly complete (need skill shop)
    Storyline: complete
    Database: 50%
    Game Progress: 10%


    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    UPDATE


    I updated this script. It was my first script, and I decided to make it better. Now, it has way better compatibility; is easier to implement; it's shorter; it's more optimized. In short, it's much better. Hope you all like the new and improved Encounter Range :)

    *
    Rep:
    Level 87
    Very nice little script - even I can follow it ;)  Glad I saw it AFTER you made it shorter and more optimized.

    LOVE the idea of monsters levelling too - that's exactly what I want to do in a future game.
    Always remember you're unique.
    Just like everybody else.

    *
    ? ? ? ? ? ? ? ? ? The nice kind of alien~
    Rep:
    Level 92
    Martian - Occasionally kind
    Very nice ^_^

    It is now pretty much like how it should be.
    Great job modern.

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    Very nice little script - even I can follow it ;)  Glad I saw it AFTER you made it shorter and more optimized.

    LOVE the idea of monsters levelling too - that's exactly what I want to do in a future game.

    I'm glad you liked it and understood it. It makes me happy  ;D The original was awful. It overwrote the main method of Scene_Map (sort of) and it had tons of additional, unneccesary code in the calculations and stuff. It was pretty basic though, if you could look past the useless stuf, I'm sure you would've understood it as well.

    Very nice ^_^

    It is now pretty much like how it should be.
    Great job modern.

    That means a lot. Thanks Zeriab

    *
    ? ? ? ? ? ? ? ? ? The nice kind of alien~
    Rep:
    Level 92
    Martian - Occasionally kind
    Np  ;)

    This makes me realize that I must increase difficulty level of what I teach you in scripting ^_^

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    err... umm...  :'(  ... No it doesn't.

    * reposts the old version

    See, I'm terrible!!!

    *
    ? ? ? ? ? ? ? ? ? The nice kind of alien~
    Rep:
    Level 92
    Martian - Occasionally kind
    To late, the damage is done ^_^
    Though don't repost the old script.

    If you do I'll take you directly to Dynamic Programming and building your own scripting language >8U

    Anyway I like your new topic structure. It is a nice idea to include future plans.

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    To late, the damage is done ^_^
    Though don't repost the old script.

    If you do I'll take you directly to Dynamic Programming and building your own scripting language >8U

    Anyway I like your new topic structure. It is a nice idea to include future plans.

    mere alien, or Demon? I like the topic structure too, but it does not adapt well to invisionfree forums, that's for sure  :o.

    Hmm... in regards to those future plans...

    I have a question for you all  ;D

    When I make v. 2.5, what do you guys think is better?

    1) A database. This would be something in the script editor where you define the areas for each map individually.

    Benefits:

    • Central Location, rather than looking through the maps for the event where you initialize the areas
    • One-time editing. A long time, but you can cover everything

    2) Individually, in each map. This would probably mean a parallel process or AutoStart event in every map with enemies, and you would define the areas for that map in that event.

    Benefits:

    • MUCH easier to see where you want to put areas, as the map they are going on is right in front of you.
    • Less Memory Usage. This is of minor importance as it shouldn't effect CPU usage
    • When editing, you can go to the map and find the event and avoid searching through a large database.

    My preference is for 2, but then I have become too accustomed to scripting. It might be a pain for everyone else to do what I am suggesting. Bear in mind, that you would not have to set areas for every map, just for the ones you want that feature to come into effect. If you don't set areas, only the level range will have bearing on the encounters, and I will include an option to turn that off as well (on a map-map basis) in the next version.

    *
    ? ? ? ? ? ? ? ? ? The nice kind of alien~
    Rep:
    Level 92
    Martian - Occasionally kind
    I bet you know what my answer will be

    Support for both :P

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    Bah, I hate you. If it makes you feel good about your villainous self, I did it, but I feel like there is a better way to do it. I made it so that you can set a new area at any point and it saves it into an array, and it will take, upon loading the game, everything from $data_areas and adds any areas that have not already been added. The setup isn't great, I will admit. I may have to rework it in the future, but for now, hopefully I can convince you to move slowly with your teaching :P

    *
    ? ? ? ? ? ? ? ? ? The nice kind of alien~
    Rep:
    Level 92
    Martian - Occasionally kind
    I'm too lazy to look into it right now.
    There is one thing though. I think you should still keep version 2.0 posted because it is short and sweet.

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    There, version 2.0 is back up if anyone wants it. I didn't save a copy but I deleted everything to do with areas and I believe that is the correct code.