Could someone explain to me please what this line in the script does?

Hi all,

I found a bug while playtesting my game, namely:

1736019322744.png

This occurs when I am trying to escape a battle and it succeeds.

The line is here:
1736019353891.png

When I # line 479, like this:
1736019392193.png

Then the crash isn't happening, so what exactly is this line? Is it ok if I leave it under a #?
In case the script is needed:
Ruby:
=begin
YanFly Compatible Customisable ATB/Stamina Based Battle System Script
by Fomar0153
Edited by Deathsia
Further Edits by AnarchCassius
Version 1.5
----------------------
Notes
----------------------
Requires Yanfly Engine Ace - Ace Battle Engine
Customises the battle system to be similar to
ATB or Stamina based battle systems.
----------------------
Instructions
----------------------
Edit variables in CBS to suit your needs.
The guard status should be set to 2~2 turns.
----------------------
Change Log
----------------------
1.0 -> 1.1 Added CTB related options
           Added the ability to pass a turn
           Added options for turn functionality to be based on time
           or number of actions
           Added the ability to change the bar colours based on states
1.1 -> 1.2 Fixed a bug when escaping using CTB mode
1.2 -> 1.4 Players should no longer have any trouble escaping, even with one character dead in battle while using ATB mode
           Yanfly's skill restriction script should work properly now when used with this script
           Various other bug fixes
 
If any further incompatibilities are found, please report them to Fomar0153, I(Deathsia) simply pointed out bugs he fixed and with my limited scripting knowledge provided a bug fix to allow compatibility with Yanfly's skill restriction script
----------------------
Known bugs
----------------------
None
=end
 
$imported = {} if $imported.nil?
$imported["Fomar0153-CBS"] = true
 
module CBS
 
  MAX_STAMINA = 1000
  RESET_STAMINA = true
 
  # If ATB is set to false then the bars won't appear and
  # the pauses where the bars would be filling up are removed
  # effectively turning this into a CTB system
  ATB = true
  SAMINA_GAUGE_NAME = "act"
  ENABLE_PASSING = false
  PASSING_COST = 200
 
  # If TURN_LENGTH is set to 0 then a turn length will be
  # decided on number of actions
  # TURN_LENGTH is number of seconds per turn
  TURN_LENGTH = 0
 
  ESCAPE_COST = 30
  # If reset stamina is set to true then all characters
  # will start with a random amount of stamina capped at
  # the percentage you set.
  # If reset stamina is set to false then this just
  # affects enemies.
  STAMINA_START_PERCENT = 0
 
  # Default skill cost
  # If you want to customise skill costs do it like this
  # SKILL_COST[skill_id] = cost
  SKILL_COST = []
  SKILL_COST[0] = 1000
  # Attack
  SKILL_COST[1] = 1000
  # Guard
  SKILL_COST[2] = 600
 
  ITEM_COST = 1000
 
  # If you prefer to have states handle agility buffs then set STATES_HANDLE_AGI to true
  STATES_HANDLE_AGI = true
  # In the following section mult means the amount you multiply stamina gains by
  # if STATES_HANDLE_AGI is set to true then it is only used to determine bar color
  # with debuffs taking precedence over buffs
  STAMINA_STATES = []
  # Default colour
  STAMINA_STATES[0] = [1,31,32]
  # in the form
  # STAMINA_STATES[STATE_ID] = [MULT,FILL_COLOUR,EMPTY_COLOR]
  # e.g. Haste
  STAMINA_STATES[2] = [2,4,32]
  # e.g. Polar Swap
  STAMINA_STATES[35] = [0.85,8,32]
 
  STAMINA_STATES[31] = [0.65,8,32]
 
  #--------------------------------------------------------------------------
  # ● New Method stamina_gain
  #--------------------------------------------------------------------------
  def self.stamina_gain(battler)
#    return ((20) * self.stamina_mult(battler)).to_i
    return ((2 + [0, battler.agi / 10].max) * self.stamina_mult(battler)).to_i
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_gain
  #--------------------------------------------------------------------------
  def self.stamina_mult(battler)
    return 1 if STATES_HANDLE_AGI
    mult = STAMINA_STATES[0][0]
    for state in battler.states
      unless STAMINA_STATES[state.id].nil?
        mult *= STAMINA_STATES[state.id][0]
      end
    end
    return mult
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_gain
  #--------------------------------------------------------------------------
  def self.stamina_colors(battler)
    colors = STAMINA_STATES[0]
    for state in battler.states
      unless STAMINA_STATES[state.id].nil?
        if STAMINA_STATES[state.id][0] < colors[0] or colors[0] == 1
          colors = STAMINA_STATES[state.id]
        end
      end
    end
    return colors
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_start
  #--------------------------------------------------------------------------
  def self.stamina_start(battler)
    battler.stamina = rand(MAX_STAMINA * STAMINA_START_PERCENT / 100)
  end
end
 
class Game_BattlerBase
  #--------------------------------------------------------------------------
  # ● New attr_accessor
  #--------------------------------------------------------------------------
  attr_accessor :stamina
 
  #--------------------------------------------------------------------------
  # ● Aliases initialize
  #--------------------------------------------------------------------------
  alias yf_fomar_cbs_initialize initialize
  def initialize
    yf_fomar_cbs_initialize
    @stamina = 0
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_rate
  #--------------------------------------------------------------------------
  def stamina_rate
    @stamina.to_f / CBS::MAX_STAMINA
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_rate
  #--------------------------------------------------------------------------
  def stamina_gain
    #Removed the bit about imovable actors not incrementing stamina
    #it was causing a major Paralysis bug (it never went away)
    @stamina = [CBS::MAX_STAMINA, @stamina + CBS.stamina_gain(self)].min
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_color
  #--------------------------------------------------------------------------
  def stamina_color
    for state in @states
      unless CBS::STAMINA_STATES[state].nil?
        return STAMINA_STATES[state]
      end
    end
    return STAMINA_STATES[0]
  end
end
 
class Scene_Battle < Scene_Base
 
  attr_accessor :last_battler
  #--------------------------------------------------------------------------
  # ● Rewrote update
  #--------------------------------------------------------------------------
  def update
    super
    if (CBS::ENABLE_PASSING and @actor_command_window.active) and Input.press?(:A)
      command_pass
    end
    if BattleManager.in_turn? and !inputting?
      while @subject.nil? and !CBS::ATB
        process_stamina
      end
      if CBS::ATB
        process_stamina
      end
      process_event
      process_action
    end
    BattleManager.judge_win_loss
  end
  #--------------------------------------------------------------------------
  # ● Rewrote Method update_info_viewport
  #--------------------------------------------------------------------------
  def update_info_viewport
    move_info_viewport(0)   if @party_command_window.active
    move_info_viewport(128) if @actor_command_window.active
    move_info_viewport(64)  if BattleManager.in_turn? and !inputting?
  end
  #--------------------------------------------------------------------------
  # ● New Method inputting?
  #--------------------------------------------------------------------------
  def inputting?
    return @actor_command_window.active || @skill_window.active ||
      @item_window.active || @actor_window.active || @enemy_window.active
  end
  #--------------------------------------------------------------------------
  # ● New Method process_stamina
  #--------------------------------------------------------------------------
  def process_stamina
    @actor_command_window.close
    return if @subject
    BattleManager.advance_turn
    all_battle_members.each do |battler|
      battler.stamina_gain
    end
    @status_window.refresh_stamina
    if @status_window.close?
      @status_window.open
     end
    if BattleManager.escaping?
      $game_party.alive_members.each do |battler|
        if battler.stamina < CBS::MAX_STAMINA
          $game_troop.members.each do |enemy|
            if enemy.stamina == CBS::MAX_STAMINA
              #Casey: update time during Flee
              #enemy.run_lunatic_states(:begin)
 #             enemy.update_cooldowns #added a line here
              enemy.on_turn_end
              BattleManager.add_action
              enemy.make_actions
              @subject = enemy
            end
          end
          return
        end
      end
      unless BattleManager.process_escape
        $game_party.alive_members.each do |actor|
          actor.stamina -= CBS::ESCAPE_COST
          #Casey: update time during Flee
          #actor.run_lunatic_states(:begin)
#          actor.update_cooldowns #added a line here
          actor.on_turn_end
          BattleManager.add_action
        end
        BattleManager.set_escaping(false)
      end
    end
    all_battle_members.each do |battler|
      if battler.stamina == CBS::MAX_STAMINA
        ### Casey: Lunatic states and paralysis fix
        @subject = battler
        if @last_battler.nil?
          @last_battler = 0
        end
        ### Casey: Moved paralysis handling to here from Stamina gain
        if not battler.movable? #and not battler.hidden?
          battler.stamina = 0
          #battler.run_lunatic_states(:begin)
#          @subject.update_cooldowns #added a line here
          ### Casey: And more lines
          battler.on_turn_end
          BattleManager.add_action
          return
        end
        if not @last_battler == battler
          #battler.run_lunatic_states(:begin)
          @last_battler = battler
#          @subject.update_cooldowns #added a line here
          ### Casey: And more lines
          battler.on_turn_end
          BattleManager.add_action
        end
        battler.make_actions
        if @subject.inputable? and battler.is_a?(Game_Actor) and not battler.hidden?
          @actor_command_window.setup(@subject)
          @status_window.index = @subject.index
          BattleManager.set_actor(battler)
        end
        return
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● Rewrote start_party_command_selection Yanfly version
  #--------------------------------------------------------------------------
  def start_party_command_selection
    unless scene_changing?
      refresh_status
      @status_window.unselect
      @status_window.open
      if BattleManager.input_start
        @actor_command_window.close
        @party_command_window.setup
      else
        @party_command_window.deactivate
        turn_start
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● Rewrote start_actor_command_selection
  #--------------------------------------------------------------------------
  def start_actor_command_selection
    @party_command_window.close
    BattleManager.set_escaping(false)
    turn_start
  end
  #--------------------------------------------------------------------------
  # ● Rewrote prior_command Yanfly version
  #--------------------------------------------------------------------------
  def prior_command
    redraw_current_status
    start_party_command_selection
  end
  #--------------------------------------------------------------------------
  # ● Rewrote process_action
  #--------------------------------------------------------------------------
  def process_action
    return if scene_changing?
    if !@subject || [email protected]_action
      @subject = BattleManager.next_subject
    end
    if Input.trigger?(:B) and (@subject == nil)
      start_party_command_selection
    end
    return unless @subject
    if @subject.current_action
      @subject.current_action.prepare
      if @subject.current_action.valid?
        @status_window.open
        execute_action
      end
      @subject.remove_current_action
      refresh_status
      @log_window.display_auto_affected_status(@subject)
      @log_window.wait_and_clear
    end
    process_action_end unless @subject.current_action
  end
  #--------------------------------------------------------------------------
  # ● Aliases use_item
  #--------------------------------------------------------------------------
  alias cbs_use_item use_item
  def use_item
    cbs_use_item
    @subject.stamina_loss
  end
  #--------------------------------------------------------------------------
  # ● Rewrote turn_end
  #--------------------------------------------------------------------------
  def turn_end
    all_battle_members.each do |battler|
      #battler.on_turn_end
      refresh_status
      @log_window.display_auto_affected_status(battler)
      @log_window.wait_and_clear
    end
    #BattleManager.turn_end
    #process_event
    #start_party_command_selection
  end
  #--------------------------------------------------------------------------
  # ● Rewrote command_fight
  #--------------------------------------------------------------------------
  def command_fight
    BattleManager.next_command
    start_actor_command_selection
  end
  #--------------------------------------------------------------------------
  # ● Rewrote command_escape
  #--------------------------------------------------------------------------
  def command_escape
    @party_command_window.close
    BattleManager.set_escaping(true)
    turn_start
  end
  #--------------------------------------------------------------------------
  # ● New method command_pass
  #--------------------------------------------------------------------------
  def command_pass
    BattleManager.actor.stamina -= CBS::PASSING_COST
    BattleManager.clear_actor
    @subject = nil
    turn_start
    @actor_command_window.active = false
    @actor_command_window.close
  end
  #--------------------------------------------------------------------------
  # ● Destroyed next_command
  #--------------------------------------------------------------------------
  def next_command
    @status_window.show
    @actor_command_window.show
    @status_aid_window.hide
  end
end
 
 
 
 
module BattleManager
  #--------------------------------------------------------------------------
  # ● New attr_accessor
  #--------------------------------------------------------------------------
  attr_accessor :premptive
  attr_accessor :surprise
 
  #--------------------------------------------------------------------------
  # ● Rewrote setup
  #--------------------------------------------------------------------------
  def self.setup(troop_id, can_escape = true, can_lose = false)
    init_members
    $game_troop.setup(troop_id)
    @can_escape = can_escape
    @can_lose = can_lose
     make_escape_ratio
    @escaping = false
    @turn_counter = 0
    @actions_per_turn = $game_party.members.size + $game_troop.members.size
    ($game_party.members + $game_troop.members).each do |battler|
      if battler.is_a?(Game_Enemy) or CBS::RESET_STAMINA
        CBS.stamina_start(battler)
      end
      if !battler.is_a?(Game_Enemy) and @surprise
        battler.stamina += 1000
      end
      if battler.is_a?(Game_Enemy) and @premptive
        battler.stamina += 1000
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● New Method set_escaping
  #--------------------------------------------------------------------------
  def self.set_escaping(escaping)
    @escaping = escaping
  end
  #--------------------------------------------------------------------------
  # ● New Method escaping?
  #--------------------------------------------------------------------------
  def self.escaping?
    return @escaping
  end
  #--------------------------------------------------------------------------
  # ● Rewrote turn_start Yanfly version
  #--------------------------------------------------------------------------
  def self.turn_start
    @phase = :turn
    clear_actor
    $game_troop.increase_turn if $game_troop.turn_count == 0
    @performed_battlers = []
  end
  #--------------------------------------------------------------------------
  # ● New Method set_actor
  #--------------------------------------------------------------------------
  def self.set_actor(actor)
    @actor_index = actor.index
  end
  #--------------------------------------------------------------------------
  # ● New Increase action counter
  #--------------------------------------------------------------------------
  def self.add_action
    return if @actions_per_turn.nil?
    @turn_counter += 1
    if @turn_counter == @actions_per_turn and CBS::TURN_LENGTH == 0
      $game_troop.increase_turn
#      SceneManager.scene.turn_end
      @turn_counter = 0
    end
  end
  #--------------------------------------------------------------------------
  # ● New Method advance_turn
  #--------------------------------------------------------------------------
  def self.advance_turn
    return if CBS::TURN_LENGTH == 0
    @turn_counter += 1
    if @turn_counter == 60 * CBS::TURN_LENGTH
      $game_troop.increase_turn
      SceneManager.scene.turn_end
      @turn_counter = 0
    end
  end
end
 
class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # ● Rewrote on_turn_end
  #--------------------------------------------------------------------------
  def on_turn_end
    @result.clear
    regenerate_all
    update_state_turns
    update_buff_turns
    remove_states_auto(2)
  end
  #--------------------------------------------------------------------------
  # ● New Method on_turn_end
  #--------------------------------------------------------------------------
  def stamina_loss
    return if dead?
    return if hidden?
    if self.actor?
      @stamina -= input.stamina_cost
    else
      @stamina -= @actions[0].stamina_cost
    end
    #BattleManager.add_action
  end
end
 
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● Rewrote input
  #--------------------------------------------------------------------------
  def input
    if @actions[@action_input_index] == nil
      @actions[@action_input_index] = Game_Action.new(self)
    end
    return @actions[@action_input_index]
  end
end
 
class Game_Action
  #--------------------------------------------------------------------------
  # ● New Method stamina_cost
  #--------------------------------------------------------------------------
  def stamina_cost
    if @item.is_skill?
      return CBS::SKILL_COST[item.id] if CBS::SKILL_COST[item.id]
      return CBS::SKILL_COST[0]
    end
    return CBS::ITEM_COST if @item.is_item?
    return CBS::MAX_STAMINA
  end
end
 
class Window_BattleStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # Aliases method: draw_item yanfly version
  #--------------------------------------------------------------------------
  alias prefomar_draw_item draw_item
  def draw_item(index)
    unless CBS::ATB
      prefomar_draw_item(index)
      return
    end
    return if index.nil?
    clear_item(index)
    actor = battle_members[index]
    rect = item_rect(index)
    return if actor.nil?
    draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?)
    draw_actor_name(actor, rect.x, rect.y, rect.width-8)
    draw_actor_action(actor, rect.x, rect.y)
    draw_actor_icons(actor, rect.x, line_height*1, rect.width)
    gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
    contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
    draw_actor_hp(actor, rect.x+2, line_height*2, rect.width-4)
    if draw_tp?(actor) && draw_mp?(actor)
      dw = rect.width/2-2
      dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE
      draw_actor_tp(actor, rect.x+2, line_height*2+gx, dw)
      dw = rect.width - rect.width/2 - 2
      draw_actor_mp(actor, rect.x+rect.width/2, line_height*2+gx, dw)
    elsif draw_tp?(actor) && !draw_mp?(actor)
      draw_actor_tp(actor, rect.x+2, line_height*2+gx, rect.width-4)
    else
      draw_actor_mp(actor, rect.x+2, line_height*2+gx, rect.width-4)
    end
    draw_actor_stamina(actor, rect.x+2, line_height*3, rect.width-4)
  end
  #--------------------------------------------------------------------------
  # overwrite method: draw_item yanfly version
  #--------------------------------------------------------------------------
  def draw_item_stamina(index)
    return if index.nil?
    actor = battle_members[index]
    rect = item_rect(index)
    return if actor.nil?
    gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
    contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
    draw_actor_stamina(actor, rect.x+2, line_height*3, rect.width-4)
  end
  #--------------------------------------------------------------------------
  # new method: refresh_stamina
  #--------------------------------------------------------------------------
  def refresh_stamina
    return unless CBS::ATB
    item_max.times {|i| draw_item_stamina(i) }
  end
  #--------------------------------------------------------------------------
  # new method: draw_actor_stamina
  #--------------------------------------------------------------------------
  def draw_actor_stamina(actor, dx, dy, width = 124)
    draw_gauge(dx, dy, width, actor.stamina_rate, text_color(CBS.stamina_colors(actor)[2]),text_color(CBS.stamina_colors(actor)[1]))
    change_color(system_color)
    cy = (Font.default_size - contents.font.size) / 2 + 1
    draw_text(dx+2, dy+cy, 30, line_height, CBS::SAMINA_GAUGE_NAME)
  end
end

Thanks in advance!
Please note that I'm by no means an expert on scripting, but here's my best understanding of the situation:

SceneManager.scene.turn_end
This line of code here is trying to perform the method turn_end, in the current scene you're in. Issue is, it's trying to perform that method after you've already escaped from battle and are transitioning to the map/area outside of battle, so it ends up trying to run that method outside of battle - where it doesn't exist - therefore it can't find the method and execute it, and subsequently crashes.

Then the crash isn't happening, so what exactly is this line? Is it ok if I leave it under a #?
Try playing through a battle in other ways. See if having it commented out breaks anything. If you can safely confirm that having it commented out doesn't break anything else, then I think it'd be safe to assume to do so.
Please note that I'm by no means an expert on scripting, but here's my best understanding of the situation:

SceneManager.scene.turn_end
This line of code here is trying to perform the method turn_end, in the current scene you're in. Issue is, it's trying to perform that method after you've already escaped from battle and are transitioning to the map/area outside of battle, so it ends up trying to run that method outside of battle - where it doesn't exist - therefore it can't find the method and execute it, and subsequently crashes.


Try playing through a battle in other ways. See if having it commented out breaks anything. If you can safely confirm that having it commented out doesn't break anything else, then I think it'd be safe to assume to do so.
Oh wow this makes sense to me, I guess this could be the reason then.
I'll keep it commented out then for now, if I encounter another crash I'll ask again here.

Thanks a lot!
I'll keep it commented out then for now, if I encounter another crash I'll ask again here.
commenting out lines will never solve things, because the line given is usually the line where the computer detects a problem and rarely the line where the problem is caused.
and this counts especially for "undefined" or "of NULL" errors.

I know for a fact that fomar's script can be used without errors and without edits, because I have used it myself a decade ago.
so the error is caused by something you have done wrong and not by a wrong line in the script.

"no method error" in a script that is known to be correct either means that the script is messing a required other script to work correctly, or that the two scripts are in the wrong order (the required script always have to be above the dependent script) or that you tried to continue an i8ncompatible savefile (part of script data needs to be saved, so adding a script very often makes older savefiles incompatible, always test with new playtest game.
commenting out lines will never solve things, because the line given is usually the line where the computer detects a problem and rarely the line where the problem is caused.
Well @Andar, in this case it kind of solves it. :LZSjoy:
That line of code is causing more troubles than it ever should.

I know for a fact that fomar's script can be used without errors and without edits, because I have used it myself a decade ago.
so the error is caused by something you have done wrong and not by a wrong line in the script.
I wonder if you can point the OP to a working version of that script. A debugged one, that is.

"no method error" in a script that is known to be correct either means that the script is messing a required other script to work correctly, or that the two scripts are in the wrong order (the required script always have to be above the dependent script) or that you tried to continue an incompatible savefile (part of script data needs to be saved, so adding a script very often makes older savefiles incompatible, always test with new playtest game.
Neither the script order nor a savefile issue in this case.

This is the root cause: calling a battle method on the map when I haven't found any link to starting a battle on the current map without leaving the map scene. Scene_Map has no turn_end method as it never was supposed to.

I'd have to take a look at the backtrace to find where it mixes the Scene_Map with Scene_Battle. That means that the OP would have to add a backtrace script in order to let me inspect its contents and come up with an idea on how to fix that.
I wonder if you can point the OP to a working version of that script. A debugged one, that is.
sorry, no - as said it was too long ago

I do remember it was a hassle finding that script, especially as there always were two versions - one version to work with yanfly, the other to work without yanfly. I tested both without problems but then decided to not use yanfly's battleengine for other reasons and switched to the non-yanfly version of the script before I had to shelve the project entirely.
Well @Andar, in this case it kind of solves it. :LZSjoy:
That line of code is causing more troubles than it ever should.


I wonder if you can point the OP to a working version of that script. A debugged one, that is.


Neither the script order nor a savefile issue in this case.

This is the root cause: calling a battle method on the map when I haven't found any link to starting a battle on the current map without leaving the map scene. Scene_Map has no turn_end method as it never was supposed to.

I'd have to take a look at the backtrace to find where it mixes the Scene_Map with Scene_Battle. That means that the OP would have to add a backtrace script in order to let me inspect its contents and come up with an idea on how to fix that.
The script I am using is already the newer version because I had an older one where I wasn't able to escape with dead actors.
This issue was first encountered in a new save file as well.

What is a backtrace script if I may ask?
It's a script that should let you get an error name, like the one you've already got, line number, and a list of steps the engine took before crashing. That list usually mentions method names and lines.
where it mixes the Scene_Map with Scene_Battle.
maybe nowhere.
they may be using a tactical system, with yanfly's atb.
neither plugin may be faulty, they're just incompatible.
I wouldn't make such assumptions right now, @gstv87 but the OP is welcome to reveal to us if that's the case. Or if any other battle related script was being used there.
@kyonides that's the only thing I can think of, that would run a battle in the map scene.
It's a script that should let you get an error name, like the one you've already got, line number, and a list of steps the engine took before crashing. That list usually mentions method names and lines.
Hello, sorry for the late reply.

I am trying to find the script to download it, I found this could you tell me if this is the right one?


Also, do I need to make a copy of the game or is this script safe? I am worried this might delete stuff, change scripts etc.

Sorry if that last question was stupid, but this feels like a deeper scripting territory and I am worried a bit...

Thanks in advance!
No backtrace script is supposed to delete files so it should be safe. (On my phone now.)

Original thread: https://forums.rpgmakerweb.com/threads/could-someone-explain-to-me-please-what-this-line-in-the-script-does.174419/