State Library Script Request

Joined
Apr 17, 2013
Messages
93
Reaction score
6
First Language
English
Primarily Uses
N/A
Hi. This script is meant to be used in Broken Reality RPG (https://lord-rutsah.itch.io/broken-reality) for its newest upcoming update. Credits will be given properly of course.

In-game, I try to provide the players with as much of the technical details as I can. One of the most problematic parts of this, is explaining exactly what states do, and I can't rely on static explanation sources like an in-game book or something, because I often change the details of what states do. (for example currently poison gives -8% hp regen, -10% counterattack chance and sets def parameter to 80%, next patch I might decrease the counterattack chance even more).

Request: What I need is an in-game library, accessible from the Main Menu, that simply displays all possible states (unnumbered, it's not a completion list). Each entry will simply copy-paste the "Features" from the Database, along with the "Removal conditions" and "Restriction" (just dump that info right below or above the features, I don't mind). There is no need for the player to gradually discorer them, all states are instantly unlocked from the start.
I will also need a note or something similar to place on certain states so that they are not viewable (no need to make it a switch, what's not viewable at the start of the game won't be viewable by the end of it). For example a state I have made to simply make axes equippable when learnt doesn't need to be listed in the library.

I imagine it's "relatively" simple to make, but I haven't found anything similar to it on the net. Any help would be greatly appreciated.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,322
Reaction score
8,517
First Language
English
Primarily Uses
RMMV

I've moved this thread to Script Request. Please be sure to post your threads in the correct forum next time. Thank you.

 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,644
Reaction score
562
First Language
English
Primarily Uses
RMVXA
simple to make
I think it already exists. CSCA encyclopedia.
Requires CSCA core and menu organizer to have the command in the menu.

You can enable all states by doing the command in a script call
$game_party.csca_set_state_true(2)
$game_party.csca_set_state_true(3)
etc..
You can hide states with the notetag <csca enc exclude>

You have to comment out the description, keys and custom otherwise it will not show 100%
 
Joined
Apr 17, 2013
Messages
93
Reaction score
6
First Language
English
Primarily Uses
N/A
I think it already exists. CSCA encyclopedia.
Requires CSCA core and menu organizer to have the command in the menu.

You can enable all states by doing the command in a script call
$game_party.csca_set_state_true(2)
$game_party.csca_set_state_true(3)
etc..
You can hide states with the notetag <csca enc exclude>

You have to comment out the description, keys and custom otherwise it will not show 100%
Just tested it. Unfortunately it doesn't do what I need. It doesn't include the "features" part of the states, which is the most important one. I would have to manually include them in notes , which defeats the entire purpose of it being automatic, since with each update I would have to change descriptions etc as well, + it would appear bad.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,573
Reaction score
6,503
First Language
Indonesian
Primarily Uses
RMVXA
How do you want the menu layout menu is going to be?
What if a state has numerous features that probably the menu is not going to fit?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,644
Reaction score
562
First Language
English
Primarily Uses
RMVXA
something I whipped up
I'm struggling to adjust CSCA to get the features to show. I'm not using the right words cause it gives me this.

I'm using the method from neon black effect box script. But that wasn't designed for states.

Interested in seeing what you used to show the features of the state.

*EDIT
Thanks for the tip. Using Kread's Traits namer I was able to figure out how the data is constructed and what words to use.
Now I got this.
1587349641279.png

But it still does not have any room, unless you take out some info.

1587349774652.png1587349796770.png
 
Last edited:

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
681
Reaction score
446
First Language
English
Primarily Uses
RMVXA
Here's what I've got:
Ruby:
=begin
#==============================================================================#
#   AMN State Info Viewer
#   Version   1.01
#   Author:   AMoonlessNight
#   Date:     20 Apr 2020
#   Latest:   20 Apr 2020
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 20 Apr 2020 - created the script
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - Please credit AMoonlessNight or A-Moonless-Night
# - Free for non-commercial use; contact for commercial use
# - Credit Kread-EX and follow their terms of use
# - If you would like to edit/adjust this script, please make edits as a new
#   script (do not edit this script directly) and provide proper credit
# - I'd love to see your game if you end up using one of my scripts
#==============================================================================#

Requires Traits Namer script by Kread-EX: grimoirecastle.wordpress.com

This script makes a scene to view all of the states in the game. Using Kread-EX's
Traits Namer script, you can see all the state's features. You can also see
the removal conditions.

States will be hidden if their name is blank. If you would like to hide certain
states, use the following notetag:

<no show>

To call the state viewer scene, use the following:
  Scene_StateMenu

  e.g.  SceneManager.scene.call(Scene_StateMenu)

=end

#==============================================================================
# ** EDITABLE REGION BELOW
#------------------------------------------------------------------------------
#  Change the values in the area below to suit your needs.
#==============================================================================

module AMN_StateConfig

  # The width for the state list window
  LIST_WINDOW_WIDTH = 180

end

module AMN_StatesVocab

  RESTRICTION_TYPE = ["None", "Attack enemy", "Attack enemy or ally",  # 0, 1, 2
                      "Attack ally", "Cannot act"] # 3, 4
                     
  REMOVAL_TIMING = ["False", "at end of action", "at end of turn"] # 0, 1, 2

  RESTRICTION = "Restriction:"

  REMOVAL_BATTLE_END = "Remove at battle end: "

  REMOVAL_RESTRICTION = "Remove by restriction: "

  REMOVAL_AUTO = "Remove automatically"

  TURNS = "turns"

  REMOVE_DAMAGE = "%d%% chance to remove by damage"

  REMOVE_WALKING = "Remove after %d steps"

  REMOVAL_TURNS = "%d–%d %s"

#==============================================================================
# ** END OF EDITABLE REGION
#------------------------------------------------------------------------------
#  Please do not edit below this point unless you know what you are doing.
#==============================================================================

  def self.restriction(value)
    sprintf("%s %s", RESTRICTION, RESTRICTION_TYPE[value])
  end

  def self.auto_removal(value, min_turns, max_turns)
    timing = REMOVAL_TIMING[value]
    if value > 0
      sprintf("%s %s after %s", REMOVAL_AUTO, timing,
      sprintf(REMOVAL_TURNS, min_turns, min_turns, TURNS))
    else
      sprintf("%s: %s", REMOVAL_AUTO, timing)
    end
  end

  def self.removal_conditions_text(state)
    cond = []
    cond << restriction(state.restriction) if state.restriction > 0
    cond << REMOVAL_BATTLE_END + "#{state.remove_at_battle_end}".capitalize
    cond << REMOVAL_RESTRICTION + "#{state.remove_by_restriction}".capitalize if state.restriction > 0
    cond << auto_removal(state.auto_removal_timing, state.min_turns, state.max_turns)
    cond << sprintf(REMOVE_DAMAGE, state.chance_by_damage) if state.remove_by_damage
    cond << sprintf(REMOVE_WALKING, state.steps_to_remove) if state.remove_by_walking
    cond
  end

end

class RPG::State
  def viewable?
    return false if self.note =~ /<no[ -_]+show>/i
    return false if name.empty? || name =~ /\A\s*\Z/
    return true
  end
end

class Window_Base < Window

  def draw_state_name(state, x, y, width)
    draw_icon(state.icon_index, x, y)
    draw_text(x + 28, y, width, line_height, state.name)
  end

end

class Window_StateList < Window_Selectable

  def initialize(x, y, width, height)
    super(x, y, width, height)
    @data = []
    refresh
  end

  def item_max; @data ? @data.size : 1; end

  def item
    @data && index >= 0 ? @data[index] : nil
  end

  def include?(item)
    item && item.viewable?
  end

  def make_item_list
    @data = $data_states.select {|item| include?(item) }
  end

  def draw_item(index)
    item = @data[index]
    if item
      rect = item_rect(index)
      rect.width -= 4
      draw_state_name(item, rect.x, rect.y, rect.width)
    end
  end

  def data_window=(data_window)
    @data_window = data_window
    call_update_help
  end

  def call_update_help
    super
    update_data if active && @data_window
  end

  def update_help
    @help_window.set_item(item)
  end

  def update_data
    @data_window.set_item(item)
  end

  def refresh
    make_item_list
    create_contents
    draw_all_items
  end
end

class Window_DataInfo < Window_Base

  def initialize(x, y, width, height)
    super(x, y, width, height)
  end

  def set_item(item)
    if item != @item
      @item = item
      refresh
    end
  end

  def clear
    set_item(nil)
  end

  def refresh
    contents.clear
    draw_data_info
  end

  def draw_data_info
  end

end

class Window_DataStates < Window_DataInfo

  def reset_font_settings
    change_color(normal_color)
    contents.font.bold = Font.default_bold
    contents.font.italic = Font.default_italic
  end

  def draw_data_info
    return unless @item
    change_color(normal_color)
    contents.font.size = Font.default_size
    draw_state_name(@item, 0, 0, contents_width)
    line = 1
    line += draw_restrictions(line)
    draw_features(line)
    contents.font.size = Font.default_size
  end

  def draw_restrictions(line)
    contents.font.size = Font.default_size - 2
    conditions = AMN_StatesVocab.removal_conditions_text(@item)
    conditions.each_with_index do |cond, i|
      next if cond.nil?
      # split the line to change the colour after the first colon
      res = cond.partition(":")
      res = '\c[16]' + res[0] + res[1] + '\c[0]' + res.last
      draw_text_ex(4, line_height * (i + line), res)
    end
    return line + conditions.compact.size
  end

  def draw_features(line)
    contents.font.size = Font.default_size - 2
    change_color(system_color)
    @item.features.each_with_index do |f, i|
      next if f.nil?
      name = KRX::TraitsNamer.feature_name(f.code, f.data_id, f.value)
      # split the line to change the colour after the first colon
      res = name.partition(":")
      res = '\c[16]' + res[0] + res[1] + '\c[0]' + res.last
      draw_text_ex(4, line_height * (i + line), res)
        end
  end

end

class Scene_StateMenu < Scene_MenuBase

  def start
    super
    create_help_window
    create_data_window
    create_list_window
  end

  def create_data_window
    dy = @help_window.height
    dx = AMN_StateConfig::LIST_WINDOW_WIDTH
    @data_window = Window_DataStates.new(dx, dy, Graphics.width - dx, Graphics.height - dy)
  end

  def create_list_window
    dy = @help_window.height
    dw = @data_window.x
    @list_window = Window_StateList.new(0, dy, dw, Graphics.height - dy)
    @list_window.help_window = @help_window
    @list_window.data_window = @data_window
    @list_window.set_handler(:cancel, method(:return_scene))
    @list_window.activate.select(0)
  end

end

Feel free to make your own additions.

EDIT: I enjoyed making this, so I decided to make it a bit more aesthetically pleasing. Here's the new version:
Ruby:
=begin
#==============================================================================#
#   AMN State Info Viewer
#   Version   1.02
#   Author:   AMoonlessNight
#   Date:     20 Apr 2020
#   Latest:   20 Apr 2020
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 20 Apr 2020 - created the script
#      (1.02) - added some aesthetic features
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - Please credit AMoonlessNight or A-Moonless-Night
# - Free for non-commercial use; contact for commercial use
# - Credit Kread-EX and follow their terms of use
# - If you would like to edit/adjust this script, please make edits as a new
#   script (do not edit this script directly) and provide proper credit
# - I'd love to see your game if you end up using one of my scripts
#==============================================================================#

Requires Traits Namer script by Kread-EX: grimoirecastle.wordpress.com

This script makes a scene to view all of the states in the game. Using Kread-EX's
Traits Namer script, you can see all the state's features. You can also see
the removal conditions.

States will be hidden if their name is blank. If you would like to hide certain
states, use the following notetag in the state's notes:

  <no show>
 
--------------------------------------------------------------------------------
To call the state viewer scene, use the following:
  Scene_StateMenu
 
  e.g.  SceneManager.scene.call(Scene_StateMenu)
 
--------------------------------------------------------------------------------

You can adjust aesthetic options below.

If the state has too many features, you can use the PGUP and PGDN keys to scroll.

=end

#==============================================================================
# ** EDITABLE REGION BELOW
#------------------------------------------------------------------------------
#  Change the values in the area below to suit your needs.
#==============================================================================

module AMN_StateConfig
 
  # The width for the state list window
  LIST_WINDOW_WIDTH = 180

  # Whether to draw lines to separate the different sections
  DRAW_HEADER_LINES = true
 
  # Whether to draw the state name in the data window in bold or not
  STATE_NAME_BOLD = true
 
  # The colour for the state name in the data window.
  # Should be an integer that refers to the windowskin palette.
  STATE_NAME_COLOUR = 0
 
  # The colour for the header line and text in the data window.
  # Should be an integer that refers to the windowskin palette.
  HEADER_COLOUR = 12
 
  # The colour for each identifier (e.g. what comes before the colon).
  # Should be an integer that refers to the windowskin palette.
  ID_COLOUR = 4
 
end

module AMN_StatesVocab
 
  RESTRICTION_TYPE = ["None", "Attack enemy", "Attack enemy or ally",  # 0, 1, 2
                      "Attack ally", "Cannot act"] # 3, 4
                      
  REMOVAL_TIMING = ["False", "At end of action", "At end of turn"] # 0, 1, 2
 
  RESTRICTION = "Restriction:"
 
  REMOVAL_BATTLE_END = "Remove at battle end: "
 
  REMOVAL_RESTRICTION = "Remove by restriction: "
 
  REMOVAL_AUTO = "Remove automatically"
 
  TURNS = "turns"
 
  REMOVE_DAMAGE = "%d%% chance to remove by damage"
 
  REMOVE_WALKING = "Remove after: %d steps"
 
  REMOVAL_TURNS = "Remove after: %s %s"
 
#==============================================================================
# ** END OF EDITABLE REGION
#------------------------------------------------------------------------------
#  Please do not edit below this point unless you know what you are doing.
#==============================================================================
 
  def self.restriction(value)
    sprintf("%s %s", RESTRICTION, RESTRICTION_TYPE[value])
  end
 
  def self.auto_removal(value)
    sprintf("%s: %s", REMOVAL_AUTO, REMOVAL_TIMING[value])
  end

  def self.turns_string(state)
    turns = state.max_turns > 1 ? TURNS : TURNS[0..-2]
    text = sprintf(REMOVAL_TURNS, state.turns_string, turns)
  end
 
  def self.removal_conditions_text(state)
    cond = []
#~     cond << restriction(state.restriction) if state.restriction > 0
    cond << REMOVAL_BATTLE_END + "#{state.remove_at_battle_end}".capitalize
    cond << REMOVAL_RESTRICTION + "#{state.remove_by_restriction}".capitalize if state.restriction > 0
    cond << auto_removal(state.auto_removal_timing)
    cond << turns_string(state) if state.auto_removal_timing > 0
    cond << sprintf(REMOVE_DAMAGE, state.chance_by_damage) if state.remove_by_damage
    cond << sprintf(REMOVE_WALKING, state.steps_to_remove) if state.remove_by_walking
    cond
  end

end

class RPG::State
  def viewable?
    return false if self.note =~ /<no[ -_]+show>/i
    return false if name.empty? || name =~ /\A\s*\Z/
    return true
  end
 
  def turns_string
    @min_turns == @max_turns ? "#{@max_turns}" : "#{@min_turns}–#{@max_turns}"
  end
 
  def removal_conditions_text
    AMN_StatesVocab.removal_conditions_text(self)
  end
 
  def expanded_features
    feats = @features
    feats = [(AMN_StatesVocab.restriction(@restriction))] + feats if @restriction > 0
    feats
  end
 
end

class Window_Base < Window
 
  def draw_state_name(state, x, y, width)
    draw_icon(state.icon_index, x, y)
    draw_text(x + 28, y, width, line_height, state.name)
  end

end

class Window_StateList < Window_Selectable

  def initialize(x, y, width, height)
    super(x, y, width, height)
    @data = []
    refresh
  end

  def item_max; @data ? @data.size : 1; end

  def item
    @data && index >= 0 ? @data[index] : nil
  end

  def include?(item)
    item && item.viewable?
  end

  def make_item_list
    @data = $data_states.select {|item| include?(item) }
  end

  def draw_item(index)
    item = @data[index]
    if item
      rect = item_rect(index)
      rect.width -= 4
      draw_state_name(item, rect.x, rect.y, rect.width)
    end
  end
 
  def data_window=(data_window)
    @data_window = data_window
    call_update_help
  end
 
  def call_update_help
    super
    update_data if active && @data_window
  end
 
  def update_help
    @help_window.set_item(item)
  end

  def update_data
    @data_window.set_item(item)
  end
 
  def refresh
    make_item_list
    create_contents
    draw_all_items
  end
 
  def process_pageup
  end

  def process_pagedown
  end
 
  def cursor_pagedown
  end

  def cursor_pageup
  end
 
end

class Window_DataInfo < Window_Base

  def initialize(x, y, width, height)
    super(x, y, width, height)
  end

  def set_item(item)
    if item != @item
      @item = item
      refresh
    end
  end

  def clear
    set_item(nil)
  end

  def refresh
    contents.clear
    draw_data_info
  end
 
  def draw_data_info
  end
 
end

class Window_DataStates < Window_DataInfo
  include AMN_StateConfig
 
  def initialize(*args)
    super(*args)
    refresh
  end
 
  def refresh
    update_all_text_height
    create_contents
    super
    self.oy = 0
    @scroll_pos = 0
  end
 
  def update
    super
    update_scroll_down if Input.press?(:R) && scrollable?
    update_scroll_up if Input.press?(:L) && scrollable?
  end
 
  def update_all_text_height
    @all_text_height = 1
    if @item
      height = state_conditions_text.compact.size + @item.expanded_features.compact.size
      @all_text_height = line_height * (height + 2.25)
    end
  end
 
  def state_conditions_text
    @item ? @item.removal_conditions_text : []
  end
 
  def scrollable?
    @all_text_height && @all_text_height > contents_window_height
  end
 
  def contents_height
    @all_text_height && @all_text_height > contents_window_height ? @all_text_height : super
  end
 
  def contents_window_height
    height - standard_padding * 2
  end
 
  def update_scroll_down
    if @scroll_pos <= @all_text_height - contents_window_height
      @scroll_pos += 1
      self.oy = @scroll_pos
    end
  end
 
  def update_scroll_up
    if @scroll_pos >= 0
      @scroll_pos -= 1
      self.oy = @scroll_pos
    end
  end
 
  def reset_font_settings
    change_color(normal_color)
    contents.font.bold = Font.default_bold
    contents.font.italic = Font.default_italic
  end
 
  def draw_horz_line(x, y, width = contents_width, colour = header_colour)
    line_y = y + line_height / 2 - 1
    contents.fill_rect(x, line_y, width, 2, colour)
  end

  def draw_horz_line_w_shadow(x, y, width = contents_width, colour = header_colour)
    draw_horz_line(x + 1, y + 1, width, Color.new(0,0,0,translucent_alpha))
    draw_horz_line(x, y, width, colour)
  end
 
  def header_colour; text_color(HEADER_COLOUR); end
  def id_colour; text_color(ID_COLOUR); end
  def state_name_colour; text_color(STATE_NAME_COLOUR); end
 
  def draw_data_info
    return unless @item
    change_color(state_name_colour)
    contents.font.size = Font.default_size
    contents.font.bold = STATE_NAME_BOLD
    draw_state_name(@item, 0, 0, contents_width)
    reset_font_settings
    draw_horz_line_w_shadow(0, line_height * 1.25) if DRAW_HEADER_LINES
    draw_line_header(line_height * 1.25, "Removal Conditions")
    line = 2.25
    line += draw_restrictions(line)
    if @item.expanded_features.compact.size > 0
      draw_horz_line_w_shadow(0, line_height * line) if DRAW_HEADER_LINES
      draw_line_header(line_height * line, "Features")
      line += 1
      line += draw_features(line)
    end
    contents.font.size = Font.default_size
  end
 
  def draw_line_header(y, text)
    change_color(header_colour)
    contents.font.size = Font.default_size - 2
    dx = DRAW_HEADER_LINES ? 24 : 4
    contents.clear_rect(24, y, text_size(text).width + 8, line_height + 4) if DRAW_HEADER_LINES
    draw_text(dx, y, contents_width, line_height, text)
  end
 
  def draw_restrictions(line)
    contents.font.size = Font.default_size - 4
    state_conditions_text.each_with_index do |cond, i|
      next if cond.nil?
      # split the line to change the colour after the first colon
      res = cond.partition(":")
      res = '\c[' + AMN_StateConfig::ID_COLOUR.to_s + ']' + res[0] + res[1] + '\c[0]' + res.last
      draw_text_ex(4, line_height * (i + line), res)
    end
    return state_conditions_text.size
  end
 
  def draw_features(line)
    contents.font.size = Font.default_size - 4
    change_color(system_color)
    @item.expanded_features.each_with_index do |f, i|
      next if f.nil?
      if f.is_a?(RPG::BaseItem::Feature)
        name = KRX::TraitsNamer.feature_name(f.code, f.data_id, f.value)
      else name = f
      end
      # split the line to change the colour after the first colon
      res = name.partition(":")
      res = '\c[' + AMN_StateConfig::ID_COLOUR.to_s + ']' + res[0] + res[1] + '\c[0]' + res.last
      draw_text_ex(4, line_height * (i + line ), res)
        end
    return @item.features.size
  end
 
end

class Scene_StateMenu < Scene_MenuBase
 
  def start
    super
    create_help_window
    create_data_window
    create_list_window
  end
 
  def create_data_window
    dy = @help_window.height
    dx = AMN_StateConfig::LIST_WINDOW_WIDTH
    @data_window = Window_DataStates.new(dx, dy, Graphics.width - dx, Graphics.height - dy)
  end
 
  def create_list_window
    dy = @help_window.height
    dw = @data_window.x
    @list_window = Window_StateList.new(0, dy, dw, Graphics.height - dy)
    @list_window.help_window = @help_window
    @list_window.data_window = @data_window
    @list_window.set_handler(:cancel, method(:return_scene))
    @list_window.activate.select(0)
  end
 
end
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,644
Reaction score
562
First Language
English
Primarily Uses
RMVXA
*saved.

And here is my addon for CSCA Encyclopedia
Ruby:
# Show state features in CSCA encyclopedia
# Roninator2
# requires
# CSCA Core
# CSCA Menu organizer (for menu command, unless you have your own way.)
# CSCA encyclopedia
# Kread-Ex Traits Namer

class CSCA_Window_EncyclopediaInfo < Window_Base
  include KRX::TraitsNamer

  def draw_state_information(item)
    csca_draw_icon(item)
    csca_draw_name(item)
    contents.font.size = 16
    change_color(system_color)
    draw_text(72,line_height,contents.width,line_height,"Restriction:")
    draw_text(72,line_height*2-4,contents.width,line_height,"Priority:")
    draw_text(0,line_height*3,contents.width,line_height,"Minimum Turns:")
    draw_text(0,line_height*4-4,contents.width,line_height,"Maximum Turns:")
#~     draw_text(0,line_height*5-8,contents.width,line_height,"Remove After Battle:")
#~     draw_text(0,line_height*6-12,contents.width,line_height,"Remove By Restriction:")
#~     draw_text(0,line_height*7-16,contents.width,line_height,"Remove By Damage:")
#~     draw_text(0,line_height*8-20,contents.width,line_height,"Chance On Damage:")
#~     draw_text(0,line_height*8,contents.width,line_height,"Remove By Walking:")
#~     draw_text(0,line_height*9-4,contents.width,line_height,"Steps To Remove:")
    change_color(normal_color)
    restriction_string = item.restriction
    case restriction_string
    when 0; restriction_string = "None"
    when 1; restriction_string = "Attack Enemies"
    when 2; restriction_string = "Attack Anyone"
    when 3; restriction_string = "Attack Allies"
    when 4; restriction_string = "Can't Move"
    end
    if item.auto_removal_timing != 1 && item.auto_removal_timing != 2
      max_turn = "N/A"
      min_turn = "N/A"
    else
      max_turn = item.max_turns.to_s
      min_turn = item.min_turns.to_s
    end
    item.remove_at_battle_end ? b_remove = "Yes" : b_remove = "No"
    item.remove_by_restriction ? r_remove = "Yes" : r_remove = "No"
    if item.remove_by_damage
      d_remove = "Yes"
      d_chance = item.chance_by_damage.to_s + "%"
    else
      d_remove = "No"
      d_chance = "N/A"
    end
    if item.remove_by_walking
      w_remove = "Yes"
      w_steps = item.steps_to_remove.to_s
    else
      w_remove = "No"
      w_steps = "N/A"
    end
    draw_text(170,line_height,contents.width,line_height,restriction_string)
    draw_text(147,line_height*2-4,contents.width,line_height,item.priority.to_s)
    draw_text(115,line_height*3,contents.width,line_height,min_turn)
    draw_text(115,line_height*4-4,contents.width,line_height,max_turn)
#~     draw_text(165,line_height*5-8,contents.width,line_height,b_remove)
#~     draw_text(180,line_height*6-12,contents.width,line_height,r_remove)
#~     draw_text(140,line_height*7-16,contents.width,line_height,d_remove)
#~     draw_text(140,line_height*8-20,contents.width,line_height,d_chance)
#~     draw_text(150,line_height*8,contents.width,line_height,w_remove)
#~     draw_text(135,line_height*9-4,contents.width,line_height,w_steps)
    d = line_height * 5 - 5 unless d == 0
        @item = item
    item.features.each_with_index do |data, e|
      code = @item.features[e].code
      data_id = @item.features[e].data_id
      value = @item.features[e].value
      string = KRX::TraitsNamer.feature_name(code, data_id, value)
      draw_text(5, d, contents.width, line_height, string)
      d += line_height - 5
    end
    csca_draw_custom_note(0,line_height*11-12,contents.width,line_height,item)
  end
end
The commented out lines can be adjusted to the users preferences.
 
Joined
Apr 17, 2013
Messages
93
Reaction score
6
First Language
English
Primarily Uses
N/A
Ok, been experimenting with both your suggestions. Moonless Night I just can't get it to run, it keeps crushing. Also how would I go about adding it to the Main Menu?

Ronin while yours does work, it still keeps a lot of "useless" info from CSCA's script (for example there is one uneeded menu in there the players have to go through despite none of his other encyclopedia categories being enabled, + it has the percentage completed stats below the list which just don't fit.)

Still, both of you, thanks for your time.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,644
Reaction score
562
First Language
English
Primarily Uses
RMVXA
a lot of "useless" info
What do you want to get rid of?
The Categories can be disabled very, very easily.

ow would I go about adding it to the Main Menu
Use this
Ruby:
module AMN
  module STATMENU
    STAT_TEXT = "Status Screen"
  end
end
class Scene_Menu < Scene_MenuBase 
  alias amn_stat_menu_add_menu_command create_command_window 
  def create_command_window   
    amn_stat_menu_add_menu_command   
    @command_window.set_handler(:stat2, method(:command_stat2)) 
  end
  def command_stat2 
    SceneManager.call(Scene_StateMenu)
  end
end
class Window_MenuCommand < Window_Command 
  alias amn_stat_menu_command_add_to_menu add_main_commands 
  def add_main_commands     
    amn_stat_menu_command_add_to_menu   
    add_command(AMN::STATMENU::STAT_TEXT, :stat2, main_commands_enabled) 
  end
end
 
Last edited:
Joined
Apr 17, 2013
Messages
93
Reaction score
6
First Language
English
Primarily Uses
N/A
What do you want to get rid of?
The Categories can be disabled very, very easily.
1)The initial menu that the player has to go through to enter the encyclopedia. Since I only use the States Library, there might as well be a direct shortcut to it from the Main Menu instead.
2)Completion percentage for the states, at the bottom left of the screen.
 
Joined
Apr 17, 2013
Messages
93
Reaction score
6
First Language
English
Primarily Uses
N/A
Heh, I just realised you had posted something else below that. Yes, this is perfect! Thanks, both of you!

Admin, you may lock this now.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People1.png & SF_People1.png added!!!!

Adventurer:
"Why your body looks like a bird?"

Stranger:
"Because I'm harpy"

Adventurer:
"Clap along if you feel like a room without a roof"

*Both dancing to Pharrell Williams song*
Stream will be live shortly with a make-up session of the Interactive Text Adventure! Feel free to drop by!
Pootscooter wrote on Pharonix's profile.
Hey @Pharonix, just wondering what you're up to lately and if you've had an opportunity to check out the LTBS thread in the past few days...(a couple of us could really use your expertise). Hope you are well and Happy Thanksgiving!

Forum statistics

Threads
105,506
Messages
1,014,263
Members
137,173
Latest member
zoetsoi
Top