CSCA Encyclopedia + Yanfly New game+

I am looking for a script that allows me to carry over all the information that is collected in the encyclopedia (weapons/armor/monsters/ext.) to a new game plus. Any help is appreciated.
I'm getting better. Slowly...
Spoiler: Yanfly Savegame Plus CSCA Encyclopedia
Ruby:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Save Engine Add-On: New Game+ for CSCA Encyclopedia v1.01
# -- Last Updated: 2020.05.14
# -- Level: Normal
# -- Requires: YEA - Ace Save Engine v1.01+
# -- Requires: YEA - Ace Save Engine Addon: New Game+ v1.00
#==============================================================================

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2020.05.13 - Started Script and Finished.
# 2020.05.14 - improved function and added enemies
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# set the range of variables used for saving the csca data.
# This script is using by default variables
# 101, 101, 102, 103, 104, 105, 107, 108, 109 # a total of 9
# Also lets you specify what data to save.
# Change items to false to not save items, etc.
#==============================================================================
module YEA
  module NEW_GAME_PLUS
    CARRY_OVER_CSCA_VARIABLES = [101..109] # must be a range of 9 inclusive
    CSCA_ITEMS = true
    CSCA_WEAPONS = true
    CSCA_ARMOR = true
    CSCA_SKILLS = true
    CSCA_STATES = true
    CSCA_ENEMY = true
    CSCA_CUSTOM = true
    CSCA_DESCRIPTION = true
  end
end
if $imported["YEA-SaveEngine"]
  if $imported["YEA-NewGame+"]

module YEA
  module NEW_GAME_PLUS
    module_function
    def convert_integer_array(array)
      result = []
      array.each { |i|
        case i
        when Range; result |= i.to_a
        when Integer; result |= [i]
        end }
      return result
    end
    CARRY_OVER_CSCA_VARIABLES = convert_integer_array(CARRY_OVER_CSCA_VARIABLES)
  end
end
module DataManager
  def self.setup_new_game_plus(index)
    create_new_game_plus_objects(index)
    $game_map.setup($data_system.start_map_id)
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    $game_player.refresh
    $game_party.csca_reset_encyclopedia
    Graphics.frame_count = 0
  end
  def self.create_new_game_plus_objects(index)
    load_game_without_rescue(index)
    ngp_reset_switches
    ngp_reset_variables
    ngp_reset_self_switches
    ngp_reset_csca_variables
    ngp_reset_actors
    ngp_reset_party
  end
  def self.ngp_reset_csca_variables
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[0]] = $game_party.csca_items
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[1]] = $game_party.csca_weapons
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[2]] = $game_party.csca_armors
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[3]] = $game_party.csca_states
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[4]] = $game_party.csca_skills
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[5]] = $game_party.csca_custom_enc
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[6]] = $game_party.csca_descriptions
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[7]] = $game_party.csca_enemies
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[8]] = $game_party.csca_defeated_number
  end
end

class Game_Party < Game_Unit
  def csca_reset_encyclopedia
    @csca_items = []
    @csca_weapons = []
    @csca_armors = []
    @csca_states = []
    @csca_skills = []
    @csca_custom_enc = []
    @csca_descriptions = []
    @csca_enemies = []
    @csca_defeated_number = []
    YEA::NEW_GAME_PLUS::CSCA_ITEMS ? @csca_items = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[0]] : nil
    YEA::NEW_GAME_PLUS::CSCA_WEAPONS ? @csca_weapons = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[1]] : nil
    YEA::NEW_GAME_PLUS::CSCA_ARMOR ? @csca_armors = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[2]] : nil
    YEA::NEW_GAME_PLUS::CSCA_STATES ? @csca_states = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[3]] : nil
    YEA::NEW_GAME_PLUS::CSCA_SKILLS ? @csca_skills = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[4]] : nil
    YEA::NEW_GAME_PLUS::CSCA_CUSTOM ? @csca_custom_enc = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[5]]: nil
    YEA::NEW_GAME_PLUS::CSCA_DESCRIPTION ? @csca_descriptions = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[6]] : nil
    YEA::NEW_GAME_PLUS::CSCA_ENEMY ? @csca_enemies = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[7]] : nil
    YEA::NEW_GAME_PLUS::CSCA_ENEMY ? @csca_defeated_number = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[8]] : nil
    for i in 0...$data_system.variables.size
      next if i <= 0
      next if !YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES.include?(i)
      $game_variables[i] = 0
    end
  end
end

  end
end
I'm getting better. Slowly...
Spoiler: Yanfly Savegame Plus CSCA Encyclopedia
Ruby:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Save Engine Add-On: New Game+ for CSCA Encyclopedia v1.00
# -- Last Updated: 2020.05.13
# -- Level: Normal
# -- Requires: YEA - Ace Save Engine v1.01+
# -- Requires: YEA - Ace Save Engine Addon: New Game+ v1.00
# -- Created by Roninator2
#==============================================================================

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2020.05.13 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# set the range of variables used for saving the csca data.
# does not include enemies or number killed. Those are reset to 0
# here is variables 101, 101, 102, 103, 104, 105, 107 # a total of 7
#==============================================================================
module YEA
  module NEW_GAME_PLUS
    CARRY_OVER_CSCA_VARIABLES = [101..107] # must be a range of 7 inclusive
  end
end

if $imported["YEA-SaveEngine"]
  if $imported["YEA-NewGame+"]

  module YEA
    module NEW_GAME_PLUS
      module_function
      def convert_integer_array(array)
        result = []
        array.each { |i|
          case i
          when Range; result |= i.to_a
          when Integer; result |= [i]
          end }
        return result
      end
      CARRY_OVER_CSCA_VARIABLES = convert_integer_array(CARRY_OVER_CSCA_VARIABLES)
    end
  end
  module DataManager
    def self.setup_new_game_plus(index)
      create_new_game_plus_objects(index)
      $game_map.setup($data_system.start_map_id)
      $game_player.moveto($data_system.start_x, $data_system.start_y)
      $game_player.refresh
      $game_party.csca_reset_encyclopedia
      Graphics.frame_count = 0
    end
    def self.create_new_game_plus_objects(index)
      load_game_without_rescue(index)
      ngp_reset_switches
      ngp_reset_csca_variables
      ngp_reset_variables
      ngp_reset_self_switches
      ngp_reset_actors
      ngp_reset_party
    end
    def self.ngp_reset_csca_variables
      $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[0]] = $game_party.csca_items
      $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[1]] = $game_party.csca_weapons
      $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[2]] = $game_party.csca_armors
      $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[3]] = $game_party.csca_states
      $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[4]] = $game_party.csca_skills
      $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[5]] = $game_party.csca_custom_enc
      $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[6]] = $game_party.csca_descriptions
    end
  end

  class Game_Party < Game_Unit
    def csca_reset_encyclopedia
      @csca_items = []
      @csca_weapons = []
      @csca_armors = []
      @csca_states = []
      @csca_skills = []
      @csca_custom_enc = []
      @csca_descriptions = []
      @csca_items = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[0]]
      @csca_weapons = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[1]]
      @csca_armors = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[2]]
      @csca_states = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[3]]
      @csca_skills = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[4]]
      @csca_custom_enc = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[5]]
      @csca_descriptions = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[6]]
    end
  end

  end
end
So what are the variables for? I don't have any variables set up for the encyclopedia.
So what are the variables for
set the range of variables used for saving the csca data.
I'll add in that they should be unused variables.

*Edit. Updated script Missed two parts. You have to add these variables to the New Game Plus script variables section to save the data. Fixed
Also added code to clean up variables.
set the range of variables used for saving the csca data.
I'll add in that they should be unused variables.

*Edit. Updated script Missed two parts. You have to add these variables to the New Game Plus script variables section to save the data. Fixed
Also added code to clean up variables.
Is it possible to add something in the script that transfers the enemies that the player has gotten in the bestiary that is within the encyclopedia?
Is it possible to add
I was hoping you wouldn't ask that. It gave me an error before, but I'll see what I can do.
Did you also need the enemies killed count as well?

You realize that you can just type a message in and not click on reply every time?
You can also highlight specific text and then click reply.
You realize that you can just type a message in and not click on reply every time?
Yes I do realize that. And ye I need the kill count as well.
Seems like I improved the code while trying to fix some glitches. It is working for me. You let me know if there are problems for you.
Spoiler: CSCA Encyclopedia + New Game Plus addon
Ruby:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Save Engine Add-On: New Game+ for CSCA Encyclopedia v1.00
# -- Last Updated: 2011.12.26
# -- Level: Normal
# -- Requires: YEA - Ace Save Engine v1.01+
# -- Requires: YEA - Ace Save Engine Addon: New Game+ v1.00
#==============================================================================

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2020.05.13 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# set the range of variables used for saving the csca data.
# This script is using by default variables
# 101, 101, 102, 103, 104, 105, 107, 108, 109 # a total of 9
#==============================================================================
module YEA
  module NEW_GAME_PLUS
    CARRY_OVER_CSCA_VARIABLES = [101..109] # must be a range of 9 inclusive
  end
end
if $imported["YEA-SaveEngine"]
  if $imported["YEA-NewGame+"]

module YEA
  module NEW_GAME_PLUS
    module_function
    def convert_integer_array(array)
      result = []
      array.each { |i|
        case i
        when Range; result |= i.to_a
        when Integer; result |= [i]
        end }
      return result
    end
    CARRY_OVER_CSCA_VARIABLES = convert_integer_array(CARRY_OVER_CSCA_VARIABLES)
  end
end
module DataManager
  def self.setup_new_game_plus(index)
    create_new_game_plus_objects(index)
    $game_map.setup($data_system.start_map_id)
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    $game_player.refresh
    $game_party.csca_reset_encyclopedia
    Graphics.frame_count = 0
  end
  def self.create_new_game_plus_objects(index)
    load_game_without_rescue(index)
    ngp_reset_switches
    ngp_reset_variables
    ngp_reset_self_switches
        ngp_reset_csca_variables
    ngp_reset_actors
    ngp_reset_party
  end
  def self.ngp_reset_csca_variables
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[0]] = $game_party.csca_items
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[1]] = $game_party.csca_weapons
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[2]] = $game_party.csca_armors
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[3]] = $game_party.csca_states
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[4]] = $game_party.csca_skills
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[5]] = $game_party.csca_custom_enc
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[6]] = $game_party.csca_descriptions
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[7]] = $game_party.csca_enemies
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[8]] = $game_party.csca_defeated_number
  end
end

class Game_Party < Game_Unit
  def csca_reset_encyclopedia
    @csca_items = []
    @csca_weapons = []
    @csca_armors = []
    @csca_states = []
    @csca_skills = []
    @csca_custom_enc = []
    @csca_descriptions = []
    @csca_enemies = []
    @csca_defeated_number = []
    @csca_items = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[0]]
    @csca_weapons = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[1]]
    @csca_armors = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[2]]
    @csca_states = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[3]]
    @csca_skills = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[4]]
    @csca_custom_enc = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[5]]
    @csca_descriptions = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[6]]
    @csca_enemies = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[7]]
    @csca_defeated_number = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[8]]
    for i in 0...$data_system.variables.size
      next if i <= 0
      next if !YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES.include?(i)
      $game_variables[i] = 0
    end
  end
end

  end
end
Seems like I improved the code while trying to fix some glitches. It is working for me. You let me know if there are problems for you.
Spoiler: CSCA Encyclopedia + New Game Plus addon
Ruby:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Save Engine Add-On: New Game+ for CSCA Encyclopedia v1.00
# -- Last Updated: 2011.12.26
# -- Level: Normal
# -- Requires: YEA - Ace Save Engine v1.01+
# -- Requires: YEA - Ace Save Engine Addon: New Game+ v1.00
#==============================================================================

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2020.05.13 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# set the range of variables used for saving the csca data.
# This script is using by default variables
# 101, 101, 102, 103, 104, 105, 107, 108, 109 # a total of 9
#==============================================================================
module YEA
  module NEW_GAME_PLUS
    CARRY_OVER_CSCA_VARIABLES = [101..109] # must be a range of 9 inclusive
  end
end
if $imported["YEA-SaveEngine"]
  if $imported["YEA-NewGame+"]

module YEA
  module NEW_GAME_PLUS
    module_function
    def convert_integer_array(array)
      result = []
      array.each { |i|
        case i
        when Range; result |= i.to_a
        when Integer; result |= [i]
        end }
      return result
    end
    CARRY_OVER_CSCA_VARIABLES = convert_integer_array(CARRY_OVER_CSCA_VARIABLES)
  end
end
module DataManager
  def self.setup_new_game_plus(index)
    create_new_game_plus_objects(index)
    $game_map.setup($data_system.start_map_id)
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    $game_player.refresh
    $game_party.csca_reset_encyclopedia
    Graphics.frame_count = 0
  end
  def self.create_new_game_plus_objects(index)
    load_game_without_rescue(index)
    ngp_reset_switches
    ngp_reset_variables
    ngp_reset_self_switches
        ngp_reset_csca_variables
    ngp_reset_actors
    ngp_reset_party
  end
  def self.ngp_reset_csca_variables
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[0]] = $game_party.csca_items
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[1]] = $game_party.csca_weapons
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[2]] = $game_party.csca_armors
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[3]] = $game_party.csca_states
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[4]] = $game_party.csca_skills
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[5]] = $game_party.csca_custom_enc
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[6]] = $game_party.csca_descriptions
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[7]] = $game_party.csca_enemies
    $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[8]] = $game_party.csca_defeated_number
  end
end

class Game_Party < Game_Unit
  def csca_reset_encyclopedia
    @csca_items = []
    @csca_weapons = []
    @csca_armors = []
    @csca_states = []
    @csca_skills = []
    @csca_custom_enc = []
    @csca_descriptions = []
    @csca_enemies = []
    @csca_defeated_number = []
    @csca_items = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[0]]
    @csca_weapons = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[1]]
    @csca_armors = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[2]]
    @csca_states = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[3]]
    @csca_skills = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[4]]
    @csca_custom_enc = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[5]]
    @csca_descriptions = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[6]]
    @csca_enemies = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[7]]
    @csca_defeated_number = $game_variables[YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES[8]]
    for i in 0...$data_system.variables.size
      next if i <= 0
      next if !YEA::NEW_GAME_PLUS::CARRY_OVER_CSCA_VARIABLES.include?(i)
      $game_variables[i] = 0
    end
  end
end

  end
end
YOU ARE A CODING GOD!! THANK YOU!
Made a small improvement. You can now specify what parts to save.

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/csca-encyclopedia-yanfly-new-game.121492/