Profile Specific Variables?

Status
Not open for further replies.

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
119
Reaction score
18
First Language
English
Primarily Uses
RMVXA
You need to be way more specific next time with your request, it's really not fun or easy trying to help people who only give pieces of info hahahaha

View attachment 166604

class Window_SaveFile < Window_Base:
Code:
  def refresh
    contents.clear
    change_color(normal_color)
    name = Vocab::File + " #{@file_index + 1}"
    draw_text(4, 0, 200, line_height, name)
    @name_width = text_size(name).width
    draw_party_characters(152, 58)
    draw_playtime(0, contents.height - line_height, contents.width - 4, 2)
   # . . . . . new code . . . . . #
    if @file_index == 0 #@index 0 = save file 1, @index 1 = save file 2 etc
      #change this to whatever you want
      draw_text(4, 32, 544, line_height, $game_variables[1], 0)
    else
      #change this to whatever you want
      draw_text(4, 32, 544, line_height,  $game_actors[1].name, 0)
    end
  end
I'll definitely try this, but I'm at a loss for how I could be more specific than the sample image I posted earlier:
What I'm wanting is somewhere in between, where any time you load/save a file, it displays something like this:
Considering that it displays as expected, but not WHAT is expected, I'm 99% sure the issue is what I'm assigning to the variable "id".

So I need a way to call actor names on specific files.
all suggestions so far is to basically to find one piece of data display it, which is why your results are this
@zeroscares
I was hoping that there was a script call along the lines of:
Load_file_data(1).actor's[12].name
That would allow me to do exactly what I was looking for:
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
93
Reaction score
18
First Language
português
Primarily Uses
RMVXA
I meant to be more specific in your first post. I first thought you just wanted to reference the variable in the game maps.

The code I sent before should work for you then

EDIT: also, to respond to: "Load_file_data(1).actor's[12].name"
There's nothing like that you can use :guffaw: That's not how the save file windows draw information anyways.
 
Last edited:

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
119
Reaction score
18
First Language
English
Primarily Uses
RMVXA
"Load_file_data(1).actor's[12].name"
There's nothing like that you can use :guffaw: That's not how the save file windows draw information anyways.
I know that now, lol. I knew it would probably be a bit more complicated than that, but I was hoping there'd be something of that ilk. I'll try out your method and get back to you.
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
119
Reaction score
18
First Language
English
Primarily Uses
RMVXA
Code:
if @file_index == 0 #@index 0 = save file 1, @index 1 = save file 2 etc 
#change this to whatever you want 
draw_text(4, 32, 544, line_height, $game_variables[1], 0) 
else 
#change this to whatever you want 
draw_text(4, 32, 544, line_height, $game_actors[1].name, 0) 
end
I only now got a good look at this, but it looks like this is still binary? The first profile, the second profile, the third profile, the fourth profile (and so on) would all need distinct results, so... Are you sure I don't need a variable for every profile...?
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
93
Reaction score
18
First Language
português
Primarily Uses
RMVXA
You could probably push the value into an array, so it could use one variable for many values

Honestly, what are you trying to do? You are just adding new information about your request with every post! Your sample image specifically just showed one value you wanted. Please explain clearly hahaha
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,816
Reaction score
622
First Language
English
Primarily Uses
RMVXA
what are you trying to do?
It's like what I said.

I believe he wants to have a description (or name/word) displayed on the save screen from data that is in the save file.
The ISSUE is that he has NEVER specified what that value is. His example was actor[12] name from profile 14.
Well unless actor 12 changes in the database while he is playing the game, the name will always be the same.
So that's just not going to work if he is expecting a different name for each save file.

I have no idea what he wants.
would all need distinct results
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
119
Reaction score
18
First Language
English
Primarily Uses
RMVXA
The ISSUE is that he has NEVER specified what that value is. His example was actor[12] name from profile 14.
Well unless actor 12 changes in the database while he is playing the game, the name will always be the same.
So that's just not going to work if he is expecting a different name for each save file.

I have no idea what he wants.
The end goal is to allow the player to attach a name to a profile (which could be useful if there are multiple people playing the game, labeling playthroughs, or anything else that would need some distinguishment between profiles other than playtime). I'm sorry if I've been unclear.
Considering that the game already has a function for allowing the player to rename things (through actors), I figured that would be the easiest way to allow the player to label profiles.
If anyone's got any better ideas for that, I'm seriously open to suggestions.

Edit: I suppose another good example of what I'm looking for would be some of the Legend of Zelda games. Every LoZ game I can think of off the top of my head (except Breath of the Wild) has had the ability to attach a name to a profile.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,816
Reaction score
622
First Language
English
Primarily Uses
RMVXA
attach a name to a profile
Now it's a little more clear.
I suppose someone could make a save system (can't remember if one exists) where you create a profile name, then every save you do is under that one save file.

There is a zelda file save system by hudell, but it's not a perfect match to zelda it does do what you want.

And I just adjusted that save system to be more like zelda. You can't pick another save slot once you start the game.
Ruby:
# Zelda Save System for VXAce by Hudell
# Free for non commercial and commercial use
# Contact : brian@hudell.com
# URL: www.hudell.com
module Hudell_Zelda_Save_System
  NUMBER_OF_SAVES = 3
  NAME_MAX_CHARACTERS = 10
  SAVE_POSITION = 2 # variable hold position save index
  SAVE_MESSAGE = "Save successful"
  ACTOR_INDEX = 9 # actor used to save the game.
  # this is the actor that will be renamed. (actor name changed)
  # the actor name is the name that shows for the save scene

  def self.chosen_slot=(value)
    @chosen_slot = value
  end
 
  def self.chosen_slot
    @chosen_slot
  end
 
  def self.delete_save
    return if @chosen_slot.nil?
    return if @chosen_slot < 0
    DataManager::delete_save_file(@chosen_slot)
  end
end

class Scene_File < Scene_MenuBase
  def item_max
    return Hudell_Zelda_Save_System::NUMBER_OF_SAVES
  end
  def visible_max
    return 3
  end 

  def create_help_window
    @help_window = Zelda_Window_Help.new(1)
    @help_window.set_text(help_window_text)
  end 
 
  def ensure_cursor_visible
    self.top_index = index if index < top_index
    self.bottom_index = index if index > bottom_index
    @savefile_windows.each do |window|
      window.refresh
    end
  end
 
  def create_savefile_viewport
    @savefile_viewport = Viewport.new
    @savefile_viewport.rect.y = @help_window.height
    @savefile_viewport.rect.height -= @help_window.height
    @savefile_viewport.rect.x = 0
  end 
 
  def start
    super
    create_help_window
    create_savefile_viewport
    create_savefile_windows
    create_options_windows
    init_selection
  end 
 
  def savefile_height
    saves_height = Graphics.height - (@help_window.height * 3)
    return saves_height / visible_max
  end
   
  def create_options_windows
    @savefile_windows << Window_DeleteSave.new(savefile_height * 3, 1, @savefile_viewport)
  end
 
  alias :hudell_zelda_save_screen_update_savefile_selection :update_savefile_selection
  def update_savefile_selection
    hudell_zelda_save_screen_update_savefile_selection if @block_cursor.nil?
  end
 
  def cursor_down(wrap)
    @index = (@index + 1) % (Hudell_Zelda_Save_System::NUMBER_OF_SAVES + 1) if @index < item_max - 1 || wrap
    ensure_cursor_visible
  end

  def cursor_up(wrap)
    @index = (@index - 1 + (Hudell_Zelda_Save_System::NUMBER_OF_SAVES + 1)) % (Hudell_Zelda_Save_System::NUMBER_OF_SAVES + 1) if @index > 0 || wrap
    ensure_cursor_visible
  end
end

class Game_System
  def load_playtime
    Graphics.frame_count = @frames_on_save
  end
 
  def reset_playtime
    @frames_on_save = 0
    Graphics.frame_count = 0
  end
 
  def save_playtime
    @frames_on_save = Graphics.frame_count
  end
end

class Window_SaveOption < Window_Base
  attr_reader :selected
 
  def standard_padding
    return 8
  end 
 
  def window_height
    fitting_height(1)
  end

  def initialize(y, option_index, viewport)
    @viewport = viewport
    y += @viewport.oy + fitting_height(1)
    y += fitting_height(option_index) if option_index > 0
    super(0, y, Graphics.width, window_height)
    refresh
    @selected = false
  end 

  def update_cursor
    if @selected
      cursor_rect.set(0, 0, contents.width, contents.height)
    else
      cursor_rect.empty
    end
  end
 
  def refresh
    contents.clear
    change_color(normal_color, SceneManager::scene_is?(Scene_Load))
  end

  def selected=(value)
    @selected = value
    update_cursor
  end
end

class Window_DeleteSave < Window_SaveOption
  def refresh
    super
    draw_text(10, 0, contents_width, line_height, 'Delete Save File')
  end
end

class Window_EmptyOption < Window_SaveOption
  def window_height
    fitting_height(1) * 2
  end
end

class Scene_Load < Scene_File
    def help_window_text
        'Please select a file'
    end
 
  def on_savefile_ok
    super
   
    if @index <  Hudell_Zelda_Save_System::NUMBER_OF_SAVES
      if DataManager.load_game(@index)
        on_load_success
      else
        Hudell_Zelda_Save_System::chosen_slot = @index
        start_empty_file
      end
    else
      #Delete save file
      Hudell_Zelda_Save_System::chosen_slot = -1
      SceneManager::call(Scene_DeleteSave)
    end
  end
 
  def start_empty_file
    DataManager::setup_new_game
    if $game_party.members.length == 0
      Sound.play_buzzer
      return
    end
    SceneManager.call(Scene_NewName)
    SceneManager.scene.prepare($game_party.members[Hudell_Zelda_Save_System::ACTOR_INDEX].id, Hudell_Zelda_Save_System::NAME_MAX_CHARACTERS)
    # Roninator2 edit
    $game_variables[Hudell_Zelda_Save_System::SAVE_POSITION] = @index
    $game_system.reset_playtime
    DataManager::save_game(Hudell_Zelda_Save_System::chosen_slot)
  end
end

class Scene_NewName < Scene_Name
  def on_input_ok
    @actor.name = @edit_window.name
    $game_system.reset_playtime
    DataManager::save_game(Hudell_Zelda_Save_System::chosen_slot)
    return_scene
  end
end

class Scene_AdditionalSave < Scene_File
 
  def create_options_windows
    @savefile_windows << Window_EmptyOption.new(savefile_height * 3, 0, @savefile_viewport)
  end
 
  def cursor_down(wrap)
    @index = (@index + 1) % item_max if @index < item_max - 1 || wrap
    ensure_cursor_visible
  end

  def cursor_up(wrap)
    @index = (@index - 1 + item_max) % item_max if @index > 0 || wrap
    ensure_cursor_visible
  end
end

class Scene_DeleteSave < Scene_AdditionalSave
  alias :hudell_zelda_save_system_start_delete :start
  def start
    hudell_zelda_save_system_start_delete
    create_confirm_window
  end
 
  def create_confirm_window
    @confirm_window = Window_ConfirmDeletion.new
    @confirm_window.hide.deactivate
    @confirm_window.set_handler(:yes, method(:on_confirm_deletion))
    @confirm_window.set_handler(:cancel, method(:on_cancel_deletion))
  end
 
  def confirm_deletion
    @confirm_window.show
    @confirm_window.activate
    @confirm_window.select(0)
    @block_cursor = true
  end
 
  def on_confirm_deletion
    Hudell_Zelda_Save_System::delete_save
    return_scene
  end
 
  def on_cancel_deletion
    return_scene
  end
 
  def help_window_text
    'Delete which file?'
  end
 
  def first_savefile_index
    0
  end
 
  def on_savefile_ok
    super
    if @index < Hudell_Zelda_Save_System::NUMBER_OF_SAVES
      if DataManager.load_game(@index)
        Hudell_Zelda_Save_System::chosen_slot = @index
        confirm_deletion
      else
        Sound.play_buzzer
      end     
    end
  end 
end

class Scene_Save < Scene_File
    def help_window_text
        'Please select a file'
    end
 
  def on_savefile_ok
    super
    unless @index < Hudell_Zelda_Save_System::NUMBER_OF_SAVES
      Sound.play_buzzer
      return
    end

    if DataManager.save_game(@index)
      on_save_success
    else
      Sound.play_buzzer
    end
  end 
end

class Window_SaveFile < Window_Base
  def initialize(height, index)
    super(30, index * height, Graphics.width - 30, height)
    @file_index = index
    refresh
    @selected = false
  end

  def standard_padding
    return 8
  end 
 
  def viewport_top_index
    SceneManager.scene.top_index
  end
 
  def refresh
    contents.clear
    #Do not paint windows currently out of screen
    if (@file_index < viewport_top_index) or (@file_index > viewport_top_index + 2)
      self.windowskin = nil
      return
    end
    self.windowskin = Cache.system("Window")
    change_color(normal_color)
    file_name = 'File ' + (@file_index + 1).to_s + ': '
    name = ''
    draw_party_characters(60, line_height + 32)
    draw_text(10, 0, 200, line_height, file_name)
    header = DataManager.load_header(@file_index)
    gold = ''
    hp = '0'
    hp_name = Vocab::hp
    mp = '0'
    mp_name = Vocab::mp
    if header
      if !header[:name].nil?
        name = header[:name]
      end
      if !header[:gold_s].nil?
        gold = header[:gold_s] + ' G'
      end
      draw_text(210, 0, 200, line_height, name)
      draw_text(Graphics.width - 250, 0, 200, line_height, gold, 2)
      if !header[:hp].nil?
        hp = header[:hp]
      end
      bottom_line = contents.height - line_height
      medium_line = bottom_line - line_height
      draw_text(210, medium_line, 200, line_height, hp_name + ': ' + hp.to_s)
      draw_text(210, bottom_line, 200, line_height, mp_name + ': ' + mp.to_s)
      draw_playtime(Graphics.width - 250, bottom_line, 200, 2)
    end
  end
 
  def update_cursor
    if @selected
      cursor_rect.set(0, 0, contents_width, contents_height)
    else
      cursor_rect.empty
    end
  end 
end

module DataManager
  def self.make_save_header
    header = {}
    header[:characters] = $game_party.characters_for_savefile
    header[:playtime_s] = $game_system.playtime_s
    header[:gold_s] = $game_party.gold.to_s
   
    if $game_party.members.length > 0
      header[:name] = $game_party.members[0].name
      header[:hp] = $game_party.members[0].hp
      header[:mp] = $game_party.members[0].mp
    else
      header[:name] = ''
      header[:hp] = 0
      header[:mp] = 0
    end
    header
  end 
 
end

class Zelda_Window_Help < Window_Help
  def standard_padding
    return 8
  end 
end

class Window_ConfirmDeletion < Window_Command
  def initialize
    super(Graphics.width - window_width, Graphics.height - window_height)
    select_symbol(:cancel)
    self.openness = 0
    open   
  end
 
  def make_command_list
    add_command('  Delete this save file', :yes)
    add_command('  Quit', :cancel)
  end
 
  def window_width
    Graphics.width
  end

  def standard_padding
    return 8
  end 
 
  def window_height
    fitting_height(1) * 2
  end
end

class Window_TitleCommand < Window_Command
  def continue_enabled
    return true
  end

  def make_command_list
    add_command(Vocab::continue, :continue, continue_enabled)
    add_command(Vocab::shutdown, :shutdown)
  end
end

class Game_Interpreter

  def command_352
    return if $game_party.in_battle
    DataManager.save_game_without_rescue($game_variables[Hudell_Zelda_Save_System::SAVE_POSITION])
    Fiber.yield
    $game_message.add(sprintf(Hudell_Zelda_Save_System::SAVE_MESSAGE, $game_party.name))
  end
end
 
Last edited:

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
119
Reaction score
18
First Language
English
Primarily Uses
RMVXA
Now it's a little more clear.
I suppose someone could make a save system (can't remember if one exists) where you create a profile name, then every save you do is under that one save file.

There is a zelda file save system by hudell, but it's not a perfect match to zelda it does do what you want.

And I just adjusted that save system to be more like zelda. You can't pick another save slot once you start the game.
Ruby:
# Zelda Save System for VXAce by Hudell
# Free for non commercial and commercial use
# Contact : brian@hudell.com
# URL: www.hudell.com
module Hudell_Zelda_Save_System
  NUMBER_OF_SAVES = 3
  NAME_MAX_CHARACTERS = 10
  SAVE_POSITION = 2 # variable hold position save index
  SAVE_MESSAGE = "Save successful"
  ACTOR_INDEX = 9 # actor used to save the game.
  # this is the actor that will be renamed. (actor name changed)
  # the actor name is the name that shows for the save scene

  def self.chosen_slot=(value)
    @chosen_slot = value
  end

  def self.chosen_slot
    @chosen_slot
  end

  def self.delete_save
    return if @chosen_slot.nil?
    return if @chosen_slot < 0
    DataManager::delete_save_file(@chosen_slot)
  end
end

class Scene_File < Scene_MenuBase
  def item_max
    return Hudell_Zelda_Save_System::NUMBER_OF_SAVES
  end
  def visible_max
    return 3
  end

  def create_help_window
    @help_window = Zelda_Window_Help.new(1)
    @help_window.set_text(help_window_text)
  end

  def ensure_cursor_visible
    self.top_index = index if index < top_index
    self.bottom_index = index if index > bottom_index
    @savefile_windows.each do |window|
      window.refresh
    end
  end

  def create_savefile_viewport
    @savefile_viewport = Viewport.new
    @savefile_viewport.rect.y = @help_window.height
    @savefile_viewport.rect.height -= @help_window.height
    @savefile_viewport.rect.x = 0
  end

  def start
    super
    create_help_window
    create_savefile_viewport
    create_savefile_windows
    create_options_windows
    init_selection
  end

  def savefile_height
    saves_height = Graphics.height - (@help_window.height * 3)
    return saves_height / visible_max
  end
  
  def create_options_windows
    @savefile_windows << Window_DeleteSave.new(savefile_height * 3, 1, @savefile_viewport)
  end

  alias :hudell_zelda_save_screen_update_savefile_selection :update_savefile_selection
  def update_savefile_selection
    hudell_zelda_save_screen_update_savefile_selection if @block_cursor.nil?
  end

  def cursor_down(wrap)
    @index = (@index + 1) % (Hudell_Zelda_Save_System::NUMBER_OF_SAVES + 1) if @index < item_max - 1 || wrap
    ensure_cursor_visible
  end

  def cursor_up(wrap)
    @index = (@index - 1 + (Hudell_Zelda_Save_System::NUMBER_OF_SAVES + 1)) % (Hudell_Zelda_Save_System::NUMBER_OF_SAVES + 1) if @index > 0 || wrap
    ensure_cursor_visible
  end
end

class Game_System
  def load_playtime
    Graphics.frame_count = @frames_on_save
  end

  def reset_playtime
    @frames_on_save = 0
    Graphics.frame_count = 0
  end

  def save_playtime
    @frames_on_save = Graphics.frame_count
  end
end

class Window_SaveOption < Window_Base
  attr_reader :selected

  def standard_padding
    return 8
  end

  def window_height
    fitting_height(1)
  end

  def initialize(y, option_index, viewport)
    @viewport = viewport
    y += @viewport.oy + fitting_height(1)
    y += fitting_height(option_index) if option_index > 0
    super(0, y, Graphics.width, window_height)
    refresh
    @selected = false
  end

  def update_cursor
    if @selected
      cursor_rect.set(0, 0, contents.width, contents.height)
    else
      cursor_rect.empty
    end
  end

  def refresh
    contents.clear
    change_color(normal_color, SceneManager::scene_is?(Scene_Load))
  end

  def selected=(value)
    @selected = value
    update_cursor
  end
end

class Window_DeleteSave < Window_SaveOption
  def refresh
    super
    draw_text(10, 0, contents_width, line_height, 'Delete Save File')
  end
end

class Window_EmptyOption < Window_SaveOption
  def window_height
    fitting_height(1) * 2
  end
end

class Scene_Load < Scene_File
    def help_window_text
        'Please select a file'
    end

  def on_savefile_ok
    super
  
    if @index <  Hudell_Zelda_Save_System::NUMBER_OF_SAVES
      if DataManager.load_game(@index)
        on_load_success
      else
        Hudell_Zelda_Save_System::chosen_slot = @index
        start_empty_file
      end
    else
      #Delete save file
      Hudell_Zelda_Save_System::chosen_slot = -1
      SceneManager::call(Scene_DeleteSave)
    end
  end

  def start_empty_file
    DataManager::setup_new_game
    if $game_party.members.length == 0
      Sound.play_buzzer
      return
    end
    SceneManager.call(Scene_NewName)
    SceneManager.scene.prepare($game_party.members[Hudell_Zelda_Save_System::ACTOR_INDEX].id, Hudell_Zelda_Save_System::NAME_MAX_CHARACTERS)
    # Roninator2 edit
    $game_variables[Hudell_Zelda_Save_System::SAVE_POSITION] = @index
    $game_system.reset_playtime
    DataManager::save_game(Hudell_Zelda_Save_System::chosen_slot)
  end
end

class Scene_NewName < Scene_Name
  def on_input_ok
    @actor.name = @edit_window.name
    $game_system.reset_playtime
    DataManager::save_game(Hudell_Zelda_Save_System::chosen_slot)
    return_scene
  end
end

class Scene_AdditionalSave < Scene_File

  def create_options_windows
    @savefile_windows << Window_EmptyOption.new(savefile_height * 3, 0, @savefile_viewport)
  end

  def cursor_down(wrap)
    @index = (@index + 1) % item_max if @index < item_max - 1 || wrap
    ensure_cursor_visible
  end

  def cursor_up(wrap)
    @index = (@index - 1 + item_max) % item_max if @index > 0 || wrap
    ensure_cursor_visible
  end
end

class Scene_DeleteSave < Scene_AdditionalSave
  alias :hudell_zelda_save_system_start_delete :start
  def start
    hudell_zelda_save_system_start_delete
    create_confirm_window
  end

  def create_confirm_window
    @confirm_window = Window_ConfirmDeletion.new
    @confirm_window.hide.deactivate
    @confirm_window.set_handler(:yes, method(:on_confirm_deletion))
    @confirm_window.set_handler(:cancel, method(:on_cancel_deletion))
  end

  def confirm_deletion
    @confirm_window.show
    @confirm_window.activate
    @confirm_window.select(0)
    @block_cursor = true
  end

  def on_confirm_deletion
    Hudell_Zelda_Save_System::delete_save
    return_scene
  end

  def on_cancel_deletion
    return_scene
  end

  def help_window_text
    'Delete which file?'
  end

  def first_savefile_index
    0
  end

  def on_savefile_ok
    super
    if @index < Hudell_Zelda_Save_System::NUMBER_OF_SAVES
      if DataManager.load_game(@index)
        Hudell_Zelda_Save_System::chosen_slot = @index
        confirm_deletion
      else
        Sound.play_buzzer
      end    
    end
  end
end

class Scene_Save < Scene_File
    def help_window_text
        'Please select a file'
    end

  def on_savefile_ok
    super
    unless @index < Hudell_Zelda_Save_System::NUMBER_OF_SAVES
      Sound.play_buzzer
      return
    end

    if DataManager.save_game(@index)
      on_save_success
    else
      Sound.play_buzzer
    end
  end
end

class Window_SaveFile < Window_Base
  def initialize(height, index)
    super(30, index * height, Graphics.width - 30, height)
    @file_index = index
    refresh
    @selected = false
  end

  def standard_padding
    return 8
  end

  def viewport_top_index
    SceneManager.scene.top_index
  end

  def refresh
    contents.clear
    #Do not paint windows currently out of screen
    if (@file_index < viewport_top_index) or (@file_index > viewport_top_index + 2)
      self.windowskin = nil
      return
    end
    self.windowskin = Cache.system("Window")
    change_color(normal_color)
    file_name = 'File ' + (@file_index + 1).to_s + ': '
    name = ''
    draw_party_characters(60, line_height + 32)
    draw_text(10, 0, 200, line_height, file_name)
    header = DataManager.load_header(@file_index)
    gold = ''
    hp = '0'
    hp_name = Vocab::hp
    mp = '0'
    mp_name = Vocab::mp
    if header
      if !header[:name].nil?
        name = header[:name]
      end
      if !header[:gold_s].nil?
        gold = header[:gold_s] + ' G'
      end
      draw_text(210, 0, 200, line_height, name)
      draw_text(Graphics.width - 250, 0, 200, line_height, gold, 2)
      if !header[:hp].nil?
        hp = header[:hp]
      end
      bottom_line = contents.height - line_height
      medium_line = bottom_line - line_height
      draw_text(210, medium_line, 200, line_height, hp_name + ': ' + hp.to_s)
      draw_text(210, bottom_line, 200, line_height, mp_name + ': ' + mp.to_s)
      draw_playtime(Graphics.width - 250, bottom_line, 200, 2)
    end
  end

  def update_cursor
    if @selected
      cursor_rect.set(0, 0, contents_width, contents_height)
    else
      cursor_rect.empty
    end
  end
end

module DataManager
  def self.make_save_header
    header = {}
    header[:characters] = $game_party.characters_for_savefile
    header[:playtime_s] = $game_system.playtime_s
    header[:gold_s] = $game_party.gold.to_s
  
    if $game_party.members.length > 0
      header[:name] = $game_party.members[0].name
      header[:hp] = $game_party.members[0].hp
      header[:mp] = $game_party.members[0].mp
    else
      header[:name] = ''
      header[:hp] = 0
      header[:mp] = 0
    end
    header
  end

end

class Zelda_Window_Help < Window_Help
  def standard_padding
    return 8
  end
end

class Window_ConfirmDeletion < Window_Command
  def initialize
    super(Graphics.width - window_width, Graphics.height - window_height)
    select_symbol(:cancel)
    self.openness = 0
    open  
  end

  def make_command_list
    add_command('  Delete this save file', :yes)
    add_command('  Quit', :cancel)
  end

  def window_width
    Graphics.width
  end

  def standard_padding
    return 8
  end

  def window_height
    fitting_height(1) * 2
  end
end

class Window_TitleCommand < Window_Command
  def continue_enabled
    return true
  end

  def make_command_list
    add_command(Vocab::continue, :continue, continue_enabled)
    add_command(Vocab::shutdown, :shutdown)
  end
end

class Game_Interpreter

  def command_352
    return if $game_party.in_battle
    DataManager.save_game_without_rescue($game_variables[Hudell_Zelda_Save_System::SAVE_POSITION])
    Fiber.yield
    $game_message.add(sprintf(Hudell_Zelda_Save_System::SAVE_MESSAGE, $game_party.name))
  end
end
Thank you so much, especially for being patient; this script will definitely suffice.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,783
Reaction score
4,726
First Language
English
Primarily Uses
RMMZ

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.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Bendyizzt wrote on staggqueen's profile.
Hello Newcomer...
I haven't make anything new yet, but I'm back addicted to writing some MZ plugins. Man, I wish I have more free time like I did 5 years ago.
Holy cow... work is demanding and I'm back in college. I'm kind of scared of my dad right now after the incident, but at least I don't live with him all the time. Anyway, working on Fandom Scouts and my FNAF character set. The FNAF sprites are actually going to be used in the game... unfortunately the enemy sprites are FNAF World traces, so no sharing those.

Forum statistics

Threads
107,691
Messages
1,031,477
Members
139,814
Latest member
af2390
Top