Jump to content
Kirin

Rokan's Symbol Encounter Simplifier 1.01

Recommended Posts

This script was not written by me! I simply translated it from Japanese and posted it here to share! Do NOT ask me for support, I'm not a scripter (I'll try, but most likely fail)!

 

Alright, now that that's out of the way... This here script is:

 

Symbol Encounter Simplifier

Version 1.01

by Rokan of

att4iv.jpg

 

回想領域 - Kaisou-Ryouiki

Reflection Domain

 

Updated: 2012/03/04

 

Terms and Conditions found on his site (Translated by me)

 

 

  • RGSS2: You must be a registered user of RPG Maker VX.
  • RGSS3: You must be a registered user of RPG Maker VX Ace.
  • Photos: Feel free to use as you please.
  • Modifications are allowed freely.
  • Redistribution of original materials is forbidden; allowed after modification.
  • I am not responsible for any damage or ill events that arise from using my materials.
  • Please backup your work before use.
  • Please read through all the instructions.
  • Free for commercial use.
  • Credits and reporting usages are not necessary.
  • No requests accepted.
  • All support and/or bug reports are to be done in public on my site.
  • Please use common sense.

 

 

I have not officially asked permission from him as I did for his Active Time Line Battle System for VX, but I assume that translating it counts as a modification and I am thus allowed. If this bothers anyone, I have no problem with asking him formally, only reason I didn't is because it's 1:30am and I can't be bothered having to think in Japanese.

 

So. The script. Those of you who dislike random encounters would most likely love this. Here is a breakdown on what this script offers:

 

Features

 

  • Determine battle (dis)advantage by either running into the back of your enemy or getting jumped from the back by an enemy.
  • If your followers touch a symbol, it counts as an ambush by the enemy.
  • Built in range detection for symbols, able to detect the player from a user-defined value of tiles away.
  • Has a separate detection range for when player is dashing, hence not exactly being stealthy.
  • Allows creation of items and skills that enable 'stealth mode' where the player is undetectable for a certain number of steps.
  • Lets you have balloon pop-ups above the symbols when the player has been detected so the player actually KNOWS they've been detected.
  • You can have symbols be stationary when the player isn't detected, or you can have them be moving around randomly.
  • Able to set certain regions (more than one) to be impassable to symbols on an individual pattern basis.
  • Preconfigure different patterns of symbols all within the script, then call the symbol pattern with a simple script call.
  • Has a built in transparency editor; the further away from the player, the more transculent the symbol, until at a certain range it's invisible. (Can be disabled)
  • Able to have symbols flee the player when a certain level is reached.

 

Sounds juicy, don't it? I was planning on having random encounters in my game due to the hassle of touch encounters; not anymore. So now that I've got you all excited, here's the actual translated script (Note, I only translated the important bits; everything after the configuration area is still Japanese, but it's nothing important for the non-coder). All the instructions are in the header of the script, so please read carefully.

 

 

=begin
     RGSS3

     * Symbol Encounter Simplifying Script 1.01*

  Updated: 	2012/03/04

     Simplifies the creation of symbol (touch) encounters. 

  Symbol = Encounter event graphic.

     â— Important â—==========================================================
     Once this script is activated, all other move routes within the event
     will be ignored.
     --------------------------------------------------------------------
     If you want to disable SESS temporarily or for the one event, just
  create a new event page without the command.
     ====================================================================

     â— Function â—========================================================
     When starting a battle on contact with a symbol, your positions 
  determine if it's a regular battle, a preemptive strike or an
  ambush. 
         ・When you touch the back of the event      => Preemptive Strike
         ・When the event touches your back          => Ambushed
         ・When the event touches your followers     => Ambushed
     --------------------------------------------------------------------
     Symbols can chase the player when he/she gets within a certain range.
     --------------------------------------------------------------------
     The transparency of the symbols can change depending on the distance
  between it and the player. 
     --------------------------------------------------------------------
     Symbols can flee from the player once a certain level is reached. 
     --------------------------------------------------------------------
     Symbols can detect the player earlier if the player is dashing.  
     --------------------------------------------------------------------
     Symbols can have a balloon icon show up when the player is detected.
     --------------------------------------------------------------------
     You can have skills or items that make the player undetectable. 
     --------------------------------------------------------------------
     You can set regions where the symbol cannot enter. 
     ====================================================================

     â— Symbol Encounter Event Setup â—========================
     Symbol behaviour is set up in the configuration area below in advance.
     --------------------------------------------------------------------
     Please set the Movement Frequency of the Event to 5: Highest. 
  (Event Page > Autonomous Movement > Freq > 5: Highest)
     --------------------------------------------------------------------
     Place the following script call in the Custom Move Route
  (Event Page > Autonomous Movement > Type > Custom > Move Route... >
   Script...)

       enable_symbol_encount(x)

  where x is the symbol type defined in the configuration block. 
     --------------------------------------------------------------------
     Finally, set the Event Trigger to Event Touch, and we're good to go!
  Touch Encounters!
     ====================================================================

     â— About Stealth Mode â—==============================================
     Place the following tag in the notebox of a skill or an item to go
  into stealth mode, making the player undetectable by the symbols. 

  stealth:n

  where 'n' is the number of steps you want stealth mode to last for. 
     --------------------------------------------------------------------
     Place the following in a script call within an event to forcibly
  cancel stealth mode (Not reset to max 'n').

       reset_stealth
     --------------------------------------------------------------------
     Please use this command when changing the controlled character or 
  after scenarios/cutscenes which take a long time. 
     ====================================================================

     â— Notice â—==========================================================
     Please start a new game to avoid any errors. 
     ====================================================================

     ver1.01

     Last Update : 2012/03/04
     03/04 : Fixed a bug with event tracking. 
     ----------------------2012--------------------------
     12/23 : Ported over from RGSS2
     ----------------------2011--------------------------

     Written by Rokan   http://kaisou-ryouiki.sakura.ne.jp/
     Translated by kirinelf
=end

#===================================
#  â— Configuration Block
#===================================
module SymbolEncount
 # Allows battle start on symbol touching followers. 
 FOLLOWER_CONTACT = true

 # Below lies the core configuration area of this script. 
 # These are symbol patterns which let you preconfigure
 # the behaviour of symbols before you call them. 
 #
 SYMBOL_SETTING_LIST = {
   #-----------------------------------------------------------
   0 => [
         0, # The player level at which the symbol flees from the player.
            # 0 means the symbol never flees. 
	       	 #
         0, # Determines how the above value is calculated. 
            # 0: Average level of all party members. 
            # 1: Highest level of all party members. 
            # 2: Level of the party leader. 
            #
         3, # Distance at which symbol detects player. 
            # 
         5, # Distance at which symbol detects dashing player. 
            #
         0, # Movement pattern of symbol when player isn't detected.
            # 0: Random   1: Still
            #
         5, # The distance from the player at which symbol becomes visible. 
            # Symbol will slowly become more transculent the further 
            # away you are, until you reach the distance specified 
            # where it becomes completely invisible. 
            # Disable by setting it to 0. 
            #
         2, # Movement speed before player detection. 
            # Identical to the settings in the Event page. 
            # 1: x8 Slower, 2: x4 Slower, 3: x2 Slower, 4: Normal, 5: x2 Faster, 6: x4 Faster
            #
         4, # Movement speed after player detection. 
            # Identical to the settings in the Event page. 
            # 1: x8 Slower, 2: x4 Slower, 3: x2 Slower, 4: Normal, 5: x2 Faster, 6: x4 Faster
            #
         5, # Movement frequency before player detection. 
            # Identical to the settings in the Event page. 
            # 1: Lowest, 2: Lower, 3: Normal, 4: Higher, 5: Highest
            #
         5, # Movement frequency after player detection. 
            # Identical to the settings in the Event page. 
            # 1: Lowest, 2: Lower, 3: Normal, 4: Higher, 5: Highest
            #
         1, # Balloon icon ID to use on player detection. 
            # Set to 0 to disable. 
            #
     [1, 3] # Region IDs the symbol cannot enter. 
	         # Please list IDs in an array.
        ],
   #-----------------------------------------------------------
   1 => [
         15,# Player level that symbol flees from. 
         0, # Definition of player level.
         3, # Player detection range. 
         5, # Player dashing detection range. 
         1, # Move route when player isn't detected. 
         0, # Transparency effect on player distance. 
         0, # Movement speed before player detection. 
         4, # Movement speed after player detection. 
         0, # Movement frequency before player detection. 
         5, # Movement frequency after player detection. 
         1, # Balloon icon ID on player detection. 
         [] # Impassable region IDs.
        ],
   #-----------------------------------------------------------
   2 => [
         0, # Player level that symbol flees from. 
         0, # Definition of player level.
         0, # Player detection range. 
         0, # Player dashing detection range. 
         0, # Move route when player isn't detected. 
         0, # Transparency effect on player distance. 
         0, # Movement speed before player detection. 
         0, # Movement speed after player detection. 
         0, # Movement frequency before player detection. 
         0, # Movement frequency after player detection. 
         0, # Balloon icon ID on player detection. 
         [] # Impassable region IDs.
        ],
   #-----------------------------------------------------------
   3 => [
         0, # Player level that symbol flees from. 
         0, # Definition of player level.
         0, # Player detection range. 
         0, # Player dashing detection range. 
         0, # Move route when player isn't detected. 
         0, # Transparency effect on player distance. 
         0, # Movement speed before player detection. 
         0, # Movement speed after player detection. 
         0, # Movement frequency before player detection. 
         0, # Movement frequency after player detection. 
         0, # Balloon icon ID on player detection. 
         [] # Impassable region IDs.
        ],
   #-----------------------------------------------------------
 }
end
#============================================================================
#  Do not edit anything past this point unless you know what you're doing!
#============================================================================

$rsi ||= {}
$rsi["シンボルエンカウント補助"] = true

class RPG::UsableItem < RPG::BaseItem
 def stealth_obj_count
   self.note.each_line{|line|
     return $1.to_i if line =~ /stealth:(\d+)/i
   }
   0
 end
end

class << BattleManager
 #--------------------------------------------------------------------------
 # ◠モジュールã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å¤‰æ•°
 #--------------------------------------------------------------------------
 attr_writer   :run_event
 @run_event = nil # 戦闘を呼ã³å‡ºã—ãŸã‚¤ãƒ™ãƒ³ãƒˆ
 #--------------------------------------------------------------------------
 # ◠セットアップ
 #--------------------------------------------------------------------------
 alias _symbol_encount_setup setup
 def setup(troop_id, can_escape = true, can_lose = false)
   _symbol_encount_setup(troop_id, can_escape, can_lose)
   set_battle_condition
 end
 #--------------------------------------------------------------------------
 # ◠シンボルエンカウントイベントã‹ã‚‰æˆ¦é—˜ãŒå‘¼ã³å‡ºã•ã‚Œã¦ã„ã‚‹å ´åˆã®å‡¦ç†
 #--------------------------------------------------------------------------
 def set_battle_condition
   if @run_event && @run_event.symbol_encount
     @run_event.set_contact_condition
     case @run_event.contact_condition
     when 1
       @preemptive = true
     when 2
       @surprise = true
     end
   end
   @run_event = nil
 end
end

class Game_Actor < Game_Battler
 #--------------------------------------------------------------------------
 # ◠スキルï¼ã‚¢ã‚¤ãƒ†ãƒ ã®ä½¿ç”¨
 #--------------------------------------------------------------------------
 def use_item(item)
   stealth_effect(item)
   super
 end
 #--------------------------------------------------------------------------
 # ◠ステルス効果ã®é©ç”¨
 #--------------------------------------------------------------------------
 def stealth_effect(item)
   result = item.stealth_obj_count
   $game_player.stealth_count = result if result > 0
 end
end

class Game_Party < Game_Unit
 #--------------------------------------------------------------------------
 # ◠プレイヤーレベルã®å–å¾—
 #--------------------------------------------------------------------------
 def get_player_level(type)
   case type
   when 0
     members.inject(0){|r, actor| r += actor.level} / members.size
   when 1
     members.max_by{|actor| actor.level}
   when 2
     $game_party.members.first.level
   end
 end
end

class Game_Character < Game_CharacterBase
 #--------------------------------------------------------------------------
 # â— éžå…¬é–‹ãƒ¡ãƒ³ãƒå¤‰æ•°ã®åˆæœŸåŒ–
 #--------------------------------------------------------------------------
 alias _symbol_init_private_members init_private_members
 def init_private_members
   _symbol_init_private_members
   @origin_opacity = @opacity
 end
 #--------------------------------------------------------------------------
 # ◠移動コマンドã®å‡¦ç†
 #--------------------------------------------------------------------------
 alias _symbol_process_move_command process_move_command
 def process_move_command(command)
   params = command.parameters
   @origin_opacity = params[0] if command.code == ROUTE_CHANGE_OPACITY
   _symbol_process_move_command(command)
 end
 #--------------------------------------------------------------------------
 # ◠指定キャラクターã¨ã®ä½ç½®é–¢ä¿‚ã‚’å–得(接触ã—ã¦ã„ã‚‹ã“ã¨ã‚’å‰æ)
 #--------------------------------------------------------------------------
 def positional_relationship(character)
   if character.real_x == real_x
     character.real_y > real_y ? 1 : 0
   elsif character.real_y == real_y
     character.real_x > real_x ? 2 : 3
   else
     -1
   end
 end
 #--------------------------------------------------------------------------
 # ◠シンボルエンカウント関連処ç†ã«ã‚ˆã‚‹é€æ˜Žåº¦ã®æ›´æ–°
 #--------------------------------------------------------------------------
 def update_symbol_opacity
 end
 #--------------------------------------------------------------------------
 # ◠フレーム更新
 #--------------------------------------------------------------------------
 alias _symbol_opacity_update update
 def update
   _symbol_opacity_update
   update_symbol_opacity
 end
end

class Game_Player < Game_Character
 #--------------------------------------------------------------------------
 # ◠公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_writer :stealth_count
 #--------------------------------------------------------------------------
 # ◠公開メンãƒå¤‰æ•°ã®åˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def init_public_members
   super
   reset_stealth
 end
 #--------------------------------------------------------------------------
 # ◠ステルス状態ã®åˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def reset_stealth
   @stealth_count = 0
 end
 #--------------------------------------------------------------------------
 # ◠ステルス判定
 #--------------------------------------------------------------------------
 def stealth?
   !@stealth_count.zero?
 end
 #--------------------------------------------------------------------------
 # ◠歩数増加
 #--------------------------------------------------------------------------
 alias _increase_stealth_count increase_steps
 def increase_steps
   _increase_stealth_count
   @stealth_count -= 1 if stealth?
 end
 #--------------------------------------------------------------------------
 # ◠シンボルエンカウント関連処ç†ã«ã‚ˆã‚‹é€æ˜Žåº¦ã®æ›´æ–°
 #--------------------------------------------------------------------------
 def update_symbol_opacity
   if stealth? && !$game_map.interpreter.running?
     @opacity = 128
   else
     @opacity = @origin_opacity
   end
 end
end

class Game_Follower < Game_Character
 #--------------------------------------------------------------------------
 # ◠公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_reader :member_index
end

class Game_Event < Game_Character
 #--------------------------------------------------------------------------
 # ◠インクルード SymbolEncount
 #--------------------------------------------------------------------------
 include SymbolEncount
 #--------------------------------------------------------------------------
 # ◠公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_reader :symbol_encount
 attr_reader :contact_condition
 #--------------------------------------------------------------------------
 # â— éžå…¬é–‹ãƒ¡ãƒ³ãƒå¤‰æ•°ã®åˆæœŸåŒ–
 #--------------------------------------------------------------------------
 alias _symbol_encount_ini init_private_members
 def init_private_members
   _symbol_encount_ini
   init_symbol_encount
 end
 #--------------------------------------------------------------------------
 # ◠イベントページã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—
 #--------------------------------------------------------------------------
 alias _symbol_encount_setup_page setup_page
 def setup_page(new_page)
   init_symbol_encount
   _symbol_encount_setup_page(new_page)
 end
 #--------------------------------------------------------------------------
 # ◠シンボルエンカウントã®åˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def init_symbol_encount
   @forming = false
   @symbol_encount = false
   @symbol_away_level = 0
   @symbol_away_level_type = 0
   @reaction_distance = 0
   @reaction_distance_with_dash = 0
   @nonreaction_move_type = 0
   @visibility_distance = 0
   @reaction_before_speed = 0
   @reaction_after_speed = 0
   @reaction_before_speed = 0
   @reaction_after_frequency = 0
   @reaction_balloon_id = 0
   @unpassable_region = []
   @contact_index = -1
   @contact_condition = 0
 end
 #--------------------------------------------------------------------------
 # ◠シンボルエンカウントを有効化
 #--------------------------------------------------------------------------
 def enable_symbol_encount(id)
   data = SYMBOL_SETTING_LIST[id]
   @symbol_encount = true
   @symbol_away_level = data[0]
   @symbol_away_level_type = data[1]
   @reaction_distance = data[2]
   @reaction_distance_with_dash = data[3]
   @nonreaction_move_type = data[4]
   @visibility_distance = data[5]
   @reaction_before_speed = data[6]
   @reaction_after_speed = data[7]
   @reaction_before_frequency = data[8]
   @reaction_after_frequency = data[9]
   @reaction_balloon_id = data[10]
   @unpassable_region = data[11].dup
 end
 #--------------------------------------------------------------------------
 # ◠通行å¯èƒ½åˆ¤å®š
 #--------------------------------------------------------------------------
 def passable?(x, y, d)
   if @symbol_encount
     x2 = $game_map.round_x_with_direction(x, d)
     y2 = $game_map.round_y_with_direction(y, d)
     return false if @unpassable_region.include?($game_map.region_id(x2, y2))
   end
   super
 end
 #--------------------------------------------------------------------------
 # ◠ロック(実行中ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç«‹ã¡æ­¢ã¾ã‚‹å‡¦ç†ï¼‰ã€€â€»å†å®šç¾©
 #--------------------------------------------------------------------------
 def lock
   unless @locked
     @prelock_direction = @direction
     turn_toward_player unless @symbol_encount
     @locked = true
   end
 end
 #--------------------------------------------------------------------------
 # ◠プレイヤーレベルã®å–å¾—
 #--------------------------------------------------------------------------
 def player_level
   $game_party.get_player_level(@symbol_away_level_type)
 end
 #--------------------------------------------------------------------------
 # ◠プレイヤーã‹ã‚‰ã®è·é›¢ã‚’å–å¾—
 #--------------------------------------------------------------------------
 def distance_from_player
   distance_x_from($game_player.x).abs + distance_y_from($game_player.y).abs
 end
 #--------------------------------------------------------------------------
 # ◠指定キャラクターã‹ã‚‰ã®è·é›¢ã‚’å–å¾—
 #--------------------------------------------------------------------------
 def distance_from_character(character)
   distance_x_from(character.x).abs + distance_y_from(character.y).abs
 end
 #--------------------------------------------------------------------------
 # â— åå¿œã™ã‚‹ãƒ—レイヤーã‹ã‚‰ã®è·é›¢ã‚’å–å¾—
 #--------------------------------------------------------------------------
 def reaction_distance
   if @forming
     @reaction_distance_with_dash.next
   elsif $game_player.dash? && $game_player.moving?
     @reaction_distance_with_dash
   else
     @reaction_distance
   end
 end
 #--------------------------------------------------------------------------
 # ◠シンボルエンカウントを動作ã•ã›ã‚‹ã‹
 #--------------------------------------------------------------------------
 def active_symbol_encount?
   if $game_map.interpreter.running?
     false
   elsif @erased || $game_player.stealth?
     @forming = false
     false
   else
     true
   end
 end
 #--------------------------------------------------------------------------
 # ◠プレイヤーã¨åŒã˜æ–¹å‘ã‚’å‘ã„ã¦ã„ã‚‹ã‹
 #--------------------------------------------------------------------------
 def direction_as_player?
   direction == $game_player.direction
 end
 #--------------------------------------------------------------------------
 # ◠指定キャラクターã¨ã®ç°¡æ˜“接触判定
 #--------------------------------------------------------------------------
 def contact?(character)
   distance_from_character(character) <= 1
 end
 #--------------------------------------------------------------------------
 # ◠プレイヤーã¸ã®å応判定
 #--------------------------------------------------------------------------
 def reaction?
   distance_from_player <= reaction_distance
 end
 #--------------------------------------------------------------------------
 # ◠プレイヤーã‹ã‚‰ã®é€ƒèµ°åˆ¤å®š
 #--------------------------------------------------------------------------
 def away?
   player_level > @symbol_away_level
 end
 #--------------------------------------------------------------------------
 # ◠接触状æ³ã®åˆ¤æ–­
 #--------------------------------------------------------------------------
 def set_contact_condition
   @contact_index = -1
   @contact_condition = 0
   if contact?($game_player)
     @contact_index = 0
   elsif FOLLOWER_CONTACT
     $game_player.followers.visible_folloers.each{|follower|
       @contact_index = follower.member_index if contact?(follower)
     }
   end
   if @contact_index.zero?
     @contact_condition = direction_and_positional
   elsif $game_player.followers.visible_folloers.size == @contact_index
     @contact_condition = 2
   else
     @contact_condition = 0
   end
 end
 #--------------------------------------------------------------------------
 # ◠プレイヤーã¨ã®ä½ç½®ã¨å‘ã関係ã‹ã‚‰æŽ¥è§¦çŠ¶æ³ã‚’å–å¾—
 #--------------------------------------------------------------------------
 def direction_and_positional
   position = positional_relationship($game_player)
   if position == -1
     0
   else
     case direction
     when 2
       direction_as_player? ? (position == 0 ? 1 : 2) : 0
     when 4
       direction_as_player? ? (position == 2 ? 1 : 2) : 0
     when 6
       direction_as_player? ? (position == 3 ? 1 : 2) : 0
     when 8
       direction_as_player? ? (position == 1 ? 1 : 2) : 0
     else
       0
     end
   end
 end
 #--------------------------------------------------------------------------
 # ◠接触イベントã®èµ·å‹•åˆ¤å®š
 #--------------------------------------------------------------------------
 alias _symbol_encount_trigger check_event_trigger_touch
 def check_event_trigger_touch(x, y)
   if @symbol_encount && FOLLOWER_CONTACT
     unless $game_map.interpreter.running?
       if @trigger == 2 && collide_with_player_characters?(x, y)
         start unless jumping?
       end
     end
   else
     _symbol_encount_trigger(x, y)
   end
 end
 #--------------------------------------------------------------------------
 # ◠追跡ã®é–‹å§‹
 #--------------------------------------------------------------------------
 def start_forming
   @move_speed = @reaction_after_speed
   @move_frequency = @reaction_after_frequency
   unless @reaction_balloon_id.zero?
     Audio.se_play('Audio/SE/Decision1', 50, 150)
     @balloon_id = @reaction_balloon_id
   end
 end
 #--------------------------------------------------------------------------
 # ◠追跡ã®çµ‚了(見失ã†ï¼‰
 #--------------------------------------------------------------------------
 def end_forming
   @move_speed = @reaction_before_speed
   @move_frequency = @reaction_before_frequency
 end
 #--------------------------------------------------------------------------
 # â— åå¿œã—ã¦ã„る時ã®ç§»å‹•å‡¦ç†
 #--------------------------------------------------------------------------
 def reaction_movement
   @move_speed = @reaction_after_speed
   @move_frequency = @reaction_after_frequency
   if @symbol_away_level.zero?
     move_type_toward_player
   elsif away?
     move_away_from_player
   else
     move_type_toward_player
   end
 end
 #--------------------------------------------------------------------------
 # â— åå¿œã—ã¦ã„ãªã„時ã®ç§»å‹•å‡¦ç†
 #--------------------------------------------------------------------------
 def nonreaction_movement
   @move_speed = @reaction_before_speed
   @move_frequency = @reaction_before_frequency
   case @nonreaction_move_type
   when 0
     move_type_random
   when 1
   end
 end
 #--------------------------------------------------------------------------
 # ◠フレーム更新
 #--------------------------------------------------------------------------
 alias _update_with_symbol update
 def update
   update_symbol_reaction if @symbol_encount && @wait_count <= 0 && !@move_route_forcing
   _update_with_symbol
 end
 #--------------------------------------------------------------------------
 # ◠プレイヤーã¸ã®å応判定を更新
 #--------------------------------------------------------------------------
 def update_symbol_reaction
   if active_symbol_encount?
     if !@forming && reaction?
       start_forming
     elsif @forming && !reaction?
       end_forming
     end
     @forming = reaction?
   end
 end
 #--------------------------------------------------------------------------
 # ◠シンボルエンカウント関連処ç†ã«ã‚ˆã‚‹é€æ˜Žåº¦ã®æ›´æ–°
 #--------------------------------------------------------------------------
 def update_symbol_opacity
   if @visibility_distance.zero?
     @opacity = @origin_opacity
   else
     @opacity = @origin_opacity - 50 * (distance_from_player - @visibility_distance)
   end
 end
 #--------------------------------------------------------------------------
 # ◠自律移動ã®æ›´æ–°
 #--------------------------------------------------------------------------
 alias _update_self_movement_with_symbol update_self_movement
 def update_self_movement
   if @symbol_encount
     update_symbol_movement if near_the_screen? && @stop_count > stop_count_threshold
   else
     _update_self_movement_with_symbol
   end
 end
 #--------------------------------------------------------------------------
 # ◠シンボルã®å‹•ä½œã‚’æ›´æ–°
 #--------------------------------------------------------------------------
 def update_symbol_movement
   if near_the_screen? && @stop_count > stop_count_threshold
     if active_symbol_encount?
       @forming ? reaction_movement : nonreaction_movement
     else
       nonreaction_movement
     end
   end
 end
end

class Game_Interpreter
 #--------------------------------------------------------------------------
 # â— ãƒãƒˆãƒ«ã®å‡¦ç†
 #--------------------------------------------------------------------------
 alias _command_301_with_symbol_encount command_301
 def command_301
   unless $game_party.in_battle
     BattleManager.run_event = $game_map.events[@event_id]
     _command_301_with_symbol_encount
   end
 end
 #--------------------------------------------------------------------------
 # ◠ステルス状態ã®è§£é™¤
 #--------------------------------------------------------------------------
 def reset_stealth
   $game_player.reset_stealth
 end
end

 

 

Here's a link to a demo, since I managed to get some time to play around with it.

 

Demo (Mediafire)

 

Enjoy!

 

FAQ

Q: Where do I put this script?

A: Above Main, under Materials.

 

Q: How do I use this script?

A: In a nutshell: edit the configuration block with the settings you want your pattern to have, then make a new event, change the movement frequency to Highest, put it on a custom move route and call this script from within the move route:

 

enable_symbol_encount(x)

 

where x is the symbol type defined in the configuration block. Don't forget to set the event to trigger on Event Touch.

 

Q: Where do you put the stealth notetag?

A: In the Notetags of Skills and Items (And only those two). Just a note. There's no space between the colon and the number. Not stealth: 50, but stealth:50.

 

Credit and Thanks

- Rokan, for making this script.

- Kirin (me), for translating this.

- Enterbrain, for once again making an awesome maker.

- Google Translate, for helping me with minor translations.

- The makers of the Rikai-chan addon for Mozilla and the Rikai-kun extension for Chrome, for giving us an awesome Japanese translator.

Edited by kirinelf

Share this post


Link to post
Share on other sites

Wow this is nice. thanks for translating and sharing it.

Im kinda confuse... i look into the event map and saw nothing to configure to the events. where exactly will i change the settings for each monster? and what does number 1 represents in this script line $game_self_switches[[1, 2, "A"]] = false ?

Edited by Gadwin

Share this post


Link to post
Share on other sites

The first question will answer itself if you've actually read through the text. ;)

 

You don't do any configuration in the event. All events share the same settings (I just copied and pasted them all) except for the script they call in the move route. The real configuration is all in the configuration block of the script, near the top.

 

For the second question, it's just a fancy way of avoiding global switches. That script call disables the self switch A of event #2 in map #1.

Share this post


Link to post
Share on other sites

I apologize for my noobness i started reading it from the configuration block. Anyways I kinda grasp it now. Thanks for replying my fail question hahaha

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted