Show states turns

Hi, I'd like to show how many turns my states last.

This script seems good but sadly link is dead → http://mata-tuku.ldblog.jp/archives/19437835.html

If someone knows a simple script that only does that (no yanfly battle engine, it's too much).
You mean on actors, enemies, or both?
You mean on actors, enemies, or both?

Both if possible

To see when refresh a buff/debuff
Spoiler: State Turns
Code:
=begin
#==============================================================================
[名前]    ステートの残りターン数表示+α
[作者]    焼きノリ
[配布元]  まったりツクール雑貨 http://mata-tuku.ldblog.jp/
#------------------------------------------------------------------------------
[更新履歴]
・2012/10/28 公開
・2012/12/01 不具合修正。「表示優先度0のステートアイコン非表示」機能追加
#==============================================================================

#------------------------------------------------------------------------------
[対応]
・RGSS3のみ可能
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
[機能]
・戦闘中のみ、ステート、能力変化の残りターン数をアイコンに表示します。
・表示優先度が0のステートのアイコンは非表示にします。
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
[使用方法]
・特別な操作はありません。このスクリプトを導入するだけで効果が出ます。
#------------------------------------------------------------------------------

[再定義箇所]
・Window_Base の draw_actor_icons
#------------------------------------------------------------------------------
  [○ : 新規定義,  ◎ : エイリアス定義,  ● : 再定義]
#------------------------------------------------------------------------------
=end
$YkNr_Scripts ||= {}
$YkNr_Scripts[:ShowStatesTurns] = true
#※このスクリプトを使用しない場合は、↑を false にすること

if $YkNr_Scripts[:ShowStatesTurns]
#==============================================================================
# ■ Game_BattlerBase
#==============================================================================
class Game_BattlerBase
  #--------------------------------------------------------------------------
  # ◎ 現在のステートをアイコン番号の配列で取得
  #--------------------------------------------------------------------------
  alias yknr_ShowStatesTurnsGame_BattlerBase_state_icons :state_icons
  def state_icons
    states = self.states.select {|state| !state.priority.zero? }
    yknr_ShowStatesTurnsGame_BattlerBase_state_icons
  end
  #--------------------------------------------------------------------------
  # ○ 現在のステートを残りターン数の配列で取得
  #--------------------------------------------------------------------------
  def state_turns
    turns = []
    states.each do |s|
      if !s.icon_index.zero?
        is_turn = !s.auto_removal_timing.zero? && !s.priority.zero?
        turn = is_turn ? @state_turns[s.id].truncate : -1
        turns.push(turn)
      end
    end
    turns
  end
  #--------------------------------------------------------------------------
  # ○ 現在の強化/弱体を残りターン数の配列で取得
  #--------------------------------------------------------------------------
  def buff_turns
    turns = []
    @buffs.each_with_index do |lv, i|
      turns.push(@buff_turns[i].truncate) if !lv.zero?
    end
    turns
  end
end

#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
  #--------------------------------------------------------------------------
  # ● ステートおよび強化/弱体のアイコンを描画
  #--------------------------------------------------------------------------
  def draw_actor_icons(actor, x, y, width = 96)
    last_font = contents.font.clone
    contents.font.size = 19
    contents.font.bold = true
    contents.font.color = crisis_color
    icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
    turns = (actor.state_turns + actor.buff_turns)[0, width / 24]
    icons.each_with_index do |n, i|
      draw_icon(n, x + 24 * i, y)
      if $game_party.in_battle && turns[i] != -1
        draw_text(x + 24 * i, y, 24, line_height, turns[i] + 1, 2)
      end
    end
    contents.font = last_font
  end
end
end # $YkNr_Scripts
Spoiler: State Turns
Code:
=begin
#==============================================================================
[名前]    ステートの残りターン数表示+α
[作者]    焼きノリ
[配布元]  まったりツクール雑貨 http://mata-tuku.ldblog.jp/
#------------------------------------------------------------------------------
[更新履歴]
・2012/10/28 公開
・2012/12/01 不具合修正。「表示優先度0のステートアイコン非表示」機能追加
#==============================================================================

#------------------------------------------------------------------------------
[対応]
・RGSS3のみ可能
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
[機能]
・戦闘中のみ、ステート、能力変化の残りターン数をアイコンに表示します。
・表示優先度が0のステートのアイコンは非表示にします。
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
[使用方法]
・特別な操作はありません。このスクリプトを導入するだけで効果が出ます。
#------------------------------------------------------------------------------

[再定義箇所]
・Window_Base の draw_actor_icons
#------------------------------------------------------------------------------
  [○ : 新規定義,  ◎ : エイリアス定義,  ● : 再定義]
#------------------------------------------------------------------------------
=end
$YkNr_Scripts ||= {}
$YkNr_Scripts[:ShowStatesTurns] = true
#※このスクリプトを使用しない場合は、↑を false にすること

if $YkNr_Scripts[:ShowStatesTurns]
#==============================================================================
# ■ Game_BattlerBase
#==============================================================================
class Game_BattlerBase
  #--------------------------------------------------------------------------
  # ◎ 現在のステートをアイコン番号の配列で取得
  #--------------------------------------------------------------------------
  alias yknr_ShowStatesTurnsGame_BattlerBase_state_icons :state_icons
  def state_icons
    states = self.states.select {|state| !state.priority.zero? }
    yknr_ShowStatesTurnsGame_BattlerBase_state_icons
  end
  #--------------------------------------------------------------------------
  # ○ 現在のステートを残りターン数の配列で取得
  #--------------------------------------------------------------------------
  def state_turns
    turns = []
    states.each do |s|
      if !s.icon_index.zero?
        is_turn = !s.auto_removal_timing.zero? && !s.priority.zero?
        turn = is_turn ? @state_turns[s.id].truncate : -1
        turns.push(turn)
      end
    end
    turns
  end
  #--------------------------------------------------------------------------
  # ○ 現在の強化/弱体を残りターン数の配列で取得
  #--------------------------------------------------------------------------
  def buff_turns
    turns = []
    @buffs.each_with_index do |lv, i|
      turns.push(@buff_turns[i].truncate) if !lv.zero?
    end
    turns
  end
end

#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
  #--------------------------------------------------------------------------
  # ● ステートおよび強化/弱体のアイコンを描画
  #--------------------------------------------------------------------------
  def draw_actor_icons(actor, x, y, width = 96)
    last_font = contents.font.clone
    contents.font.size = 19
    contents.font.bold = true
    contents.font.color = crisis_color
    icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
    turns = (actor.state_turns + actor.buff_turns)[0, width / 24]
    icons.each_with_index do |n, i|
      draw_icon(n, x + 24 * i, y)
      if $game_party.in_battle && turns[i] != -1
        draw_text(x + 24 * i, y, 24, line_height, turns[i] + 1, 2)
      end
    end
    contents.font = last_font
  end
end
end # $YkNr_Scripts

Wow exacly what I was looking for !

But it requires the core script to work, if you have it

This one : http://mata-tuku.ldblog.jp/archives/15336870.html
Nope sorry. The internet wayback machine doesn't have it.

Never mind. I found a test project.
Here's the
Spoiler: Core Script
Code:
=begin
#==============================================================================
[名前]    YakiNoriBaseScripts
[作者]    焼きノリ
[配布元]  まったりツクール雑貨 http://mata-tuku.ldblog.jp/
#------------------------------------------------------------------------------
[更新履歴]
・2012/08/26 公開
・2012/09/09 Window_Selectableにメソッド追加
#==============================================================================

#------------------------------------------------------------------------------
[対応]
・RGSS2、RGSS3両方可能
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
[機能]
・焼きノリが制作したスクリプトを使う際に必要になります。
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
[使用方法]
・必ず、拙作の他のスクリプトの一番上に配置してください。
#------------------------------------------------------------------------------

[再定義箇所]
・なし
#------------------------------------------------------------------------------
  [○ : 新規定義,  ◎ : エイリアス定義,  ● : 再定義]
#------------------------------------------------------------------------------
=end
$YkNr_Scripts ||= {}
$YkNr_Scripts[:YakiNoriBaseScripts] = true
#※このスクリプトを使用しない場合は、↑を false にすること

if $YkNr_Scripts[:YakiNoriBaseScripts]
#==============================================================================
# ■ YakiNori
#------------------------------------------------------------------------------
#     拙作の各自作スクリプトで使用するメソッドの集まりです。
#==============================================================================
module YakiNori
  #--------------------------------------------------------------------------
  # ○ 定数用モジュールに定義されている定数をフリーズ
  #      このメソッドのみ、定数モジュールより先に定義する
  #--------------------------------------------------------------------------
  def self.freeze_all_constants(mod)
    _const_modules = "#{mod.name}::Const"
    eval("#{_const_modules}.constants").each do |const|
      _constant = "#{_const_modules}::#{const}"
      eval("#{_constant}.freeze") if !eval("#{_constant}.frozen?")
    end
  end
#==============================================================================
# ■ 定数用モジュール
#==============================================================================
module Const
end
freeze_all_constants(self)  # 定数をフリーズ
#==============================================================================
# ■ インスタンスメソッド用モジュール
#------------------------------------------------------------------------------
#      このモジュールをインクルードすることで、ここで定義したメソッドが使用可能。
#==============================================================================
module Instance
end
#==============================================================================
# ■ 拡張モジュール用モジュール
#------------------------------------------------------------------------------
#      このモジュールに自作スクリプトで使用するモジュールを集結させます
#==============================================================================
  module BaseExModules
    # オブジェクトクラスにインクルード
    Object.__send__ :include, self
  end
#==============================================================================
# ■ 特異メソッド
#==============================================================================
  #--------------------------------------------------------------------------
  # ○ 拡張モジュール用モジュールに定義されているか取得
  #      引数は、RGSS,RGSS2では文字列に、RGSS3はシンボル値を渡してください
  #--------------------------------------------------------------------------
  def self.include_module?(module_name_sym)
    BaseExModules.constants.include?(module_name_sym)
  end
end


#==============================================================================
# ■ Kernel
#==============================================================================
module Kernel
  #--------------------------------------------------------------------------
  # ○ RPGVXAce かどうか
  #--------------------------------------------------------------------------
  def vxace?
    # Ruby 1.9 以降とそれ以前では、実行結果が違う
    return false if public_methods.all? {|item| item.is_a?(String)}
    return false if !defined?(Graphics.play_movie)
    return defined?(BasicObject)
  end
  #--------------------------------------------------------------------------
  # ○ RGSSのバージョンを取得
  #--------------------------------------------------------------------------
  def rgss_version
    _version = {2 => false, 3 => false}
    _version[vxace? ? 3 : 2] = true
    return _version
  end
  #--------------------------------------------------------------------------
  # ○ 定数
  #--------------------------------------------------------------------------
  RGSS = rgss_version   ; RGSS.freeze
  #--------------------------------------------------------------------------
  # ○ ログテキストファイルの出力
  #     alert  : 出力完了のメッセージボックスを表示するか
  #     *words : 出力するオブジェクト
  #--------------------------------------------------------------------------
  def p_log(alert, *words)
    w_time = Time.now
    message = "■ 以下を出力しました。\n\n"
    
    open("game.log", "a") {|log|
      log.print("# ")
      # 現在年月日
      log.print(w_time.year) ; log.print("/")
      log.print(w_time.mon)  ; log.print("/")
      log.print(w_time.mday) ; log.print(" ")
      # 現在時刻
      log.print(w_time.hour) ; log.print(":")
      log.print(w_time.min)  ; log.print(":")
      log.print(w_time.sec)  ; log.print("\n")
      # 出力
      words.each {|word| log.print(word) ; log.print("\n")}
      log.print("# --------------------\n\n")
    }
    print message + words.to_s if alert
  end
  #--------------------------------------------------------------------------
  if RGSS[3] && !$!
    #--------------------------------------------------------------------------
    # ◎ メソッド p を RGSS2 仕様に戻す
    #--------------------------------------------------------------------------
    alias c_p p
    alias p msgbox_p
    #--------------------------------------------------------------------------
    # ◎ メソッド print を RGSS2 仕様に戻す
    #--------------------------------------------------------------------------
    alias c_print print
    alias print msgbox
  end # RGSS[3] && !$!
end

#==============================================================================
# ■ RPG::BaseItem
#==============================================================================
class RPG::BaseItem
  #--------------------------------------------------------------------------
  # ○ アイテムの種別IDを取得
  #      武器なら1000番台、防具なら2000番台の数値を返します。
  #--------------------------------------------------------------------------
  def kind_id
    _result = 0
    case self.class.name
    when "RPG::Item"  ; _result = id
    when "RPG::Weapon"; _result = id + 1000
    when "RPG::Armor" ; _result = id + 2000
    end
    return _result
  end
end

#==============================================================================
# ■ Game_CharacterBase
#==============================================================================
class Game_CharacterBase
  #--------------------------------------------------------------------------
  # ○ 正面にイベントが存在するか取得
  #--------------------------------------------------------------------------
  def exist_event_front?
    x2 = $game_map.round_x_with_direction(@x, @direction)
    y2 = $game_map.round_y_with_direction(@y, @direction)
    return !$game_map.events_xy(x2, y2).empty?
  end
end

#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # ○ エディター上のマップ名を取得
  #--------------------------------------------------------------------------
  def editor_name
    $data_mapinfos[map_id].name
  end
end

#==============================================================================
# ■ Game_Event
#==============================================================================
class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # ○ イベント名の取得
  #--------------------------------------------------------------------------
  def name
    @event.name
  end
end

#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
  #--------------------------------------------------------------------------
  # ○ ゲージの描画 (外枠付)
  #     rate   : 割合(1.0 で満タン)
  #     color1 : グラデーション 左端
  #     color2 : グラデーション 右端
  #--------------------------------------------------------------------------
  def draw_gauge_ex(x, y, width, rate, color1, color2)
    fill_w = ((width-2) * rate).to_i
    gauge_y = y + line_height - 8
    contents.fill_rect(x, gauge_y, width, 8, gauge_back_color)
    contents.gradient_fill_rect(x+1, gauge_y+1, fill_w, 6, color1, color2)
  end
end

#==============================================================================
# ■ Window_Selectable
#==============================================================================
class Window_Selectable < Window_Base
  #--------------------------------------------------------------------------
  # ○ 現在の列の取得
  #--------------------------------------------------------------------------
  def column
    index % col_max
  end
  #--------------------------------------------------------------------------
  # ○ 行と列から項目の位置を取得
  #--------------------------------------------------------------------------
  def index_pos(row, column)
    row * col_max + (column - 1)
  end
end

#==============================================================================
# □ VX Ace は以下の処理はしない
#==============================================================================
if !RGSS[3]
#--------------------------------------------------------------------------
# ○ $data_mapinfos のロード
#--------------------------------------------------------------------------
$data_mapinfos ||= load_data("Data/MapInfos.rvdata")

#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # ◎ マップ名を取得
  #--------------------------------------------------------------------------
  alias name editor_name
end

#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
  #--------------------------------------------------------------------------
  # ○ テキスト描画色の変更
  #     enabled : 有効フラグ。false のとき半透明で描画
  #--------------------------------------------------------------------------
  def change_color(color, enabled = true)
    contents.font.color.set(color)
    contents.font.color.alpha = translucent_alpha unless enabled
  end
  #--------------------------------------------------------------------------
  # ○ テキストの描画
  #     args : Bitmap#draw_text と同じ
  #--------------------------------------------------------------------------
  def draw_text(*args)
    contents.draw_text(*args)
  end
end

#==============================================================================
# ■ Game_Temp
#==============================================================================
class Game_Temp
  #--------------------------------------------------------------------------
  # ○ 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :previous_scene # 現在のひとつ前の画面(文字列)
  #--------------------------------------------------------------------------
  # ◎ オブジェクト初期化
  #--------------------------------------------------------------------------
  alias yknr_LogDisable_initialize initialize
  def initialize
    yknr_LogDisable_initialize
    @previous_scene = ""
  end
end

#==============================================================================
# ■ Scene_Base
#==============================================================================
class Scene_Base
  #--------------------------------------------------------------------------
  # ○ 終了処理
  #--------------------------------------------------------------------------
  def terminate
    # 現在の画面を保存
    $game_temp.previous_scene = self.class.name
  end
end

end # !RGSS[3]
end # $YkNr_Scripts
Nope sorry. The internet wayback machine doesn't have it.

Never mind. I found a test project.
Here's the
Spoiler: Core Script
Code:
=begin
#==============================================================================
[名前]    YakiNoriBaseScripts
[作者]    焼きノリ
[配布元]  まったりツクール雑貨 http://mata-tuku.ldblog.jp/
#------------------------------------------------------------------------------
[更新履歴]
・2012/08/26 公開
・2012/09/09 Window_Selectableにメソッド追加
#==============================================================================

#------------------------------------------------------------------------------
[対応]
・RGSS2、RGSS3両方可能
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
[機能]
・焼きノリが制作したスクリプトを使う際に必要になります。
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
[使用方法]
・必ず、拙作の他のスクリプトの一番上に配置してください。
#------------------------------------------------------------------------------

[再定義箇所]
・なし
#------------------------------------------------------------------------------
  [○ : 新規定義,  ◎ : エイリアス定義,  ● : 再定義]
#------------------------------------------------------------------------------
=end
$YkNr_Scripts ||= {}
$YkNr_Scripts[:YakiNoriBaseScripts] = true
#※このスクリプトを使用しない場合は、↑を false にすること

if $YkNr_Scripts[:YakiNoriBaseScripts]
#==============================================================================
# ■ YakiNori
#------------------------------------------------------------------------------
#     拙作の各自作スクリプトで使用するメソッドの集まりです。
#==============================================================================
module YakiNori
  #--------------------------------------------------------------------------
  # ○ 定数用モジュールに定義されている定数をフリーズ
  #      このメソッドのみ、定数モジュールより先に定義する
  #--------------------------------------------------------------------------
  def self.freeze_all_constants(mod)
    _const_modules = "#{mod.name}::Const"
    eval("#{_const_modules}.constants").each do |const|
      _constant = "#{_const_modules}::#{const}"
      eval("#{_constant}.freeze") if !eval("#{_constant}.frozen?")
    end
  end
#==============================================================================
# ■ 定数用モジュール
#==============================================================================
module Const
end
freeze_all_constants(self)  # 定数をフリーズ
#==============================================================================
# ■ インスタンスメソッド用モジュール
#------------------------------------------------------------------------------
#      このモジュールをインクルードすることで、ここで定義したメソッドが使用可能。
#==============================================================================
module Instance
end
#==============================================================================
# ■ 拡張モジュール用モジュール
#------------------------------------------------------------------------------
#      このモジュールに自作スクリプトで使用するモジュールを集結させます
#==============================================================================
  module BaseExModules
    # オブジェクトクラスにインクルード
    Object.__send__ :include, self
  end
#==============================================================================
# ■ 特異メソッド
#==============================================================================
  #--------------------------------------------------------------------------
  # ○ 拡張モジュール用モジュールに定義されているか取得
  #      引数は、RGSS,RGSS2では文字列に、RGSS3はシンボル値を渡してください
  #--------------------------------------------------------------------------
  def self.include_module?(module_name_sym)
    BaseExModules.constants.include?(module_name_sym)
  end
end


#==============================================================================
# ■ Kernel
#==============================================================================
module Kernel
  #--------------------------------------------------------------------------
  # ○ RPGVXAce かどうか
  #--------------------------------------------------------------------------
  def vxace?
    # Ruby 1.9 以降とそれ以前では、実行結果が違う
    return false if public_methods.all? {|item| item.is_a?(String)}
    return false if !defined?(Graphics.play_movie)
    return defined?(BasicObject)
  end
  #--------------------------------------------------------------------------
  # ○ RGSSのバージョンを取得
  #--------------------------------------------------------------------------
  def rgss_version
    _version = {2 => false, 3 => false}
    _version[vxace? ? 3 : 2] = true
    return _version
  end
  #--------------------------------------------------------------------------
  # ○ 定数
  #--------------------------------------------------------------------------
  RGSS = rgss_version   ; RGSS.freeze
  #--------------------------------------------------------------------------
  # ○ ログテキストファイルの出力
  #     alert  : 出力完了のメッセージボックスを表示するか
  #     *words : 出力するオブジェクト
  #--------------------------------------------------------------------------
  def p_log(alert, *words)
    w_time = Time.now
    message = "■ 以下を出力しました。\n\n"
   
    open("game.log", "a") {|log|
      log.print("# ")
      # 現在年月日
      log.print(w_time.year) ; log.print("/")
      log.print(w_time.mon)  ; log.print("/")
      log.print(w_time.mday) ; log.print(" ")
      # 現在時刻
      log.print(w_time.hour) ; log.print(":")
      log.print(w_time.min)  ; log.print(":")
      log.print(w_time.sec)  ; log.print("\n")
      # 出力
      words.each {|word| log.print(word) ; log.print("\n")}
      log.print("# --------------------\n\n")
    }
    print message + words.to_s if alert
  end
  #--------------------------------------------------------------------------
  if RGSS[3] && !$!
    #--------------------------------------------------------------------------
    # ◎ メソッド p を RGSS2 仕様に戻す
    #--------------------------------------------------------------------------
    alias c_p p
    alias p msgbox_p
    #--------------------------------------------------------------------------
    # ◎ メソッド print を RGSS2 仕様に戻す
    #--------------------------------------------------------------------------
    alias c_print print
    alias print msgbox
  end # RGSS[3] && !$!
end

#==============================================================================
# ■ RPG::BaseItem
#==============================================================================
class RPG::BaseItem
  #--------------------------------------------------------------------------
  # ○ アイテムの種別IDを取得
  #      武器なら1000番台、防具なら2000番台の数値を返します。
  #--------------------------------------------------------------------------
  def kind_id
    _result = 0
    case self.class.name
    when "RPG::Item"  ; _result = id
    when "RPG::Weapon"; _result = id + 1000
    when "RPG::Armor" ; _result = id + 2000
    end
    return _result
  end
end

#==============================================================================
# ■ Game_CharacterBase
#==============================================================================
class Game_CharacterBase
  #--------------------------------------------------------------------------
  # ○ 正面にイベントが存在するか取得
  #--------------------------------------------------------------------------
  def exist_event_front?
    x2 = $game_map.round_x_with_direction(@x, @direction)
    y2 = $game_map.round_y_with_direction(@y, @direction)
    return !$game_map.events_xy(x2, y2).empty?
  end
end

#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # ○ エディター上のマップ名を取得
  #--------------------------------------------------------------------------
  def editor_name
    $data_mapinfos[map_id].name
  end
end

#==============================================================================
# ■ Game_Event
#==============================================================================
class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # ○ イベント名の取得
  #--------------------------------------------------------------------------
  def name
    @event.name
  end
end

#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
  #--------------------------------------------------------------------------
  # ○ ゲージの描画 (外枠付)
  #     rate   : 割合(1.0 で満タン)
  #     color1 : グラデーション 左端
  #     color2 : グラデーション 右端
  #--------------------------------------------------------------------------
  def draw_gauge_ex(x, y, width, rate, color1, color2)
    fill_w = ((width-2) * rate).to_i
    gauge_y = y + line_height - 8
    contents.fill_rect(x, gauge_y, width, 8, gauge_back_color)
    contents.gradient_fill_rect(x+1, gauge_y+1, fill_w, 6, color1, color2)
  end
end

#==============================================================================
# ■ Window_Selectable
#==============================================================================
class Window_Selectable < Window_Base
  #--------------------------------------------------------------------------
  # ○ 現在の列の取得
  #--------------------------------------------------------------------------
  def column
    index % col_max
  end
  #--------------------------------------------------------------------------
  # ○ 行と列から項目の位置を取得
  #--------------------------------------------------------------------------
  def index_pos(row, column)
    row * col_max + (column - 1)
  end
end

#==============================================================================
# □ VX Ace は以下の処理はしない
#==============================================================================
if !RGSS[3]
#--------------------------------------------------------------------------
# ○ $data_mapinfos のロード
#--------------------------------------------------------------------------
$data_mapinfos ||= load_data("Data/MapInfos.rvdata")

#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # ◎ マップ名を取得
  #--------------------------------------------------------------------------
  alias name editor_name
end

#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
  #--------------------------------------------------------------------------
  # ○ テキスト描画色の変更
  #     enabled : 有効フラグ。false のとき半透明で描画
  #--------------------------------------------------------------------------
  def change_color(color, enabled = true)
    contents.font.color.set(color)
    contents.font.color.alpha = translucent_alpha unless enabled
  end
  #--------------------------------------------------------------------------
  # ○ テキストの描画
  #     args : Bitmap#draw_text と同じ
  #--------------------------------------------------------------------------
  def draw_text(*args)
    contents.draw_text(*args)
  end
end

#==============================================================================
# ■ Game_Temp
#==============================================================================
class Game_Temp
  #--------------------------------------------------------------------------
  # ○ 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :previous_scene # 現在のひとつ前の画面(文字列)
  #--------------------------------------------------------------------------
  # ◎ オブジェクト初期化
  #--------------------------------------------------------------------------
  alias yknr_LogDisable_initialize initialize
  def initialize
    yknr_LogDisable_initialize
    @previous_scene = ""
  end
end

#==============================================================================
# ■ Scene_Base
#==============================================================================
class Scene_Base
  #--------------------------------------------------------------------------
  # ○ 終了処理
  #--------------------------------------------------------------------------
  def terminate
    # 現在の画面を保存
    $game_temp.previous_scene = self.class.name
  end
end

end # !RGSS[3]
end # $YkNr_Scripts

Thank you very much, it works perfectly fine.
I am very interested in using this script, but it seems to conflict with Neon Black's Scrolling States https://forums.rpgmakerweb.com/index.php?threads/scrolling-states-script.3256/

Do you think this can be fixed easily? Or should I contact Neon Black?
@xdan : You should post a new thread for this, as the original issue is finished. Multiple issues on one thread confuse the search engine and make it harder for others to get help.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/show-states-turns.85608/