Profile Specific Variables?

Status
Not open for further replies.

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
So, I know that if you want to know the 12th actor's name, you can use:
Code:
$game_actors[12].name
But is there any way to call specifically the 12th actor's name on, say, the 14th profile specifically?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,647
Reaction score
562
First Language
English
Primarily Uses
RMVXA
You'll have to explain the difference between the 12th actor and the 14th profile.
In the actor tab is the actor list. The 12th actor (in my mind) would be the 12th profile, would it not?
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
You'll have to explain the difference between the 12th actor and the 14th profile.
In the actor tab is the actor list. The 12th actor (in my mind) would be the 12th profile, would it not?
12th actor as in 12th possible party member vs 14th profile as in 14th possible save slot.

The big deal here is that you can rename actors and I'm hoping to be able to allow the player to label profiles.
 

Sparky89

Is proberly eating one of evmaster's Brownie's.
Veteran
Joined
Dec 18, 2019
Messages
152
Reaction score
53
First Language
English
Primarily Uses
RMMV
Not sure if i'm following this well, but you can change/party member/ profile in the events. even if it was just to do the thing your trying then revert it back no?
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Not sure if i'm following this well, but you can change/party member/ profile in the events. even if it was just to do the thing your trying then revert it back no?
That's not what I'm trying to do, no. Here's what I've got in the scripts:
1.JPG
This is what displays if you try to save a file from the profile (Where "Sample" is the name):
2.JPG
This is what displays if you try to load a file:
3.JPG
What I'm wanting is somewhere in between, where any time you load/save a file, it displays something like this:
4.JPG
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.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,647
Reaction score
562
First Language
English
Primarily Uses
RMVXA
So it sounds like you want to display a save count.
Yanfly Engine Ace - Ace Save Engine v1.03

Or do you want custom text on the save file display?
Yami Engine Ace - Save/Load Description
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Or do you want custom text on the save file display?
Yami Engine Ace - Save/Load Description
That sounds about right... Did you mean to include a link?
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
No, I have the script, but didn't look for where it is on the internet
Okay so I just looked into it and it looks pretty cool, but possibly a bit more extra than I intended and still doesn't answer the original question: is there a script call for pulling information from a specific profile, such as an actor name? The fact that someone can build a script like that would imply that you can.
 
Last edited:

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
It's not impossible, right? That is proven by the fact that it should be all over the place in a game, right?
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
55
Reaction score
10
First Language
português
Primarily Uses
RMVXA
you'll need
Code:
class Scene_Save < Scene_File
def on_savefile_ok
    super
    if DataManager.save_game(@index)
      if @index == 2 #Index 0 = Save file 1. Index 1 = Save file 2. etc
        $game_variables[1] = $game_actors[12].name #saves name to Variable 1
      end
      on_save_success
    else
      Sound.play_buzzer
    end
  end
end
make sure the variable you save the name to is a global variable
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
you'll need
Code:
class Scene_Save < Scene_File
def on_savefile_ok
    super
    if DataManager.save_game(@index)
      if @index == 2 #Index 0 = Save file 1. Index 1 = Save file 2. etc
        $game_variables[1] = $game_actors[12].name #saves name to Variable 1
      end
      on_save_success
    else
      Sound.play_buzzer
    end
  end
end
make sure the variable you save the name to is a global variable
I'm not entirely sure what this was supposed to do, but it didn't do anything.
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
55
Reaction score
10
First Language
português
Primarily Uses
RMVXA
- add both scripts in game. customize mik's script to include the variable that saves the actor name
- (player) saves the game into whatever slot you need it on. that will save the actor name into a variable that's permanent accross all save files
- don't use that variable for anything else
- call that variable when you wanna reference the actor name in that slot
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
- add both scripts in game. customize mik's script to include the variable that saves the actor name
- (player) saves the game into whatever slot you need it on. that will save the actor name into a variable that's permanent accross all save files
- don't use that variable for anything else
- call that variable when you wanna reference the actor name in that slot
Sorry about the long wait for a reply, but are you suggesting using as many global variables as I have game slots?
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
55
Reaction score
10
First Language
português
Primarily Uses
RMVXA
Sorry about the long wait for a reply, but are you suggesting using as many global variables as I have game slots?
No
I think you should only need one variable if you want to track a name only on one save file
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
No
I think you should only need one variable if you want to track a name only on one save file
Ah. That's just where the problem lies, though. I have several save files, and I don't want to get rid of them. That's why I was asking if it was possible to call an actor name from a specific save file. It should be possible, I just can't figure out the syntax for it.
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
55
Reaction score
10
First Language
português
Primarily Uses
RMVXA
Ah. That's just where the problem lies, though. I have several save files, and I don't want to get rid of them. That's why I was asking if it was possible to call an actor name from a specific save file. It should be possible, I just can't figure out the syntax for it.
what are you talking about hahahaha
I gave you an example for how to do it above! It should work for a game with multiple save files. With that response, I meant that if you are looking to save one name from one save file (instead of multiple save files), you only need one variable. That doesn't mean you need to get rid of all of your other save files

I don't like making examples, but here is sample code, to show you what I mean :guffaw:
Code:
  def on_savefile_ok
    super
    if DataManager.save_game(@index)
      on_save_success
      if @index == 0 #@index 0 = save file 1, @index 1 = save file 2 etc
        $game_variables[1] = $game_actors[1].name
      end
    else
      Sound.play_buzzer
    end
  end
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
what are you talking about hahahaha
I gave you an example for how to do it above! It should work for a game with multiple save files. With that response, I meant that if you are looking to save one name from one save file (instead of multiple save files), you only need one variable. That doesn't mean you need to get rid of all of your other save files

I don't like making examples, but here is sample code, to show you what I mean :guffaw:
Code:
  def on_savefile_ok
    super
    if DataManager.save_game(@index)
      on_save_success
      if @index == 0 #@index 0 = save file 1, @index 1 = save file 2 etc
        $game_variables[1] = $game_actors[1].name
      end
    else
      Sound.play_buzzer
    end
  end
Okay! So I completely misunderstood what you said the first time, but I think I've got it now, but it looks like it's the same problem as before?
6.JPG
Edit: I... may have misinterpreted what you said several times:
I meant that if you are looking to save one name from one save file (instead of multiple save files), you only need one variable.
That is exactly what my problem is; that I need to call stuff from multiple profiles and haven't found a way to do it yet.
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
55
Reaction score
10
First Language
português
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

1604543765485.png

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
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Lately when I listen to 1970s songs, I always think that the "real world" is still at mid 70s. What we experience now is a futuristic dream. With this point of view, even 80s and 90s looks super futuristic. :D

The GIF of this seemed too cool to bury in replies. :LZSwink:
You may have slept with my aunt... but, given the circumstances, cheers.

- Professor Ian Duncan, 2013
Ami
--- Swimming ---

F.Knight: This Shrine always Flood. We don't have a choice,we have to Swimming in this place
F.Healer: That Insane!
F.Mage: We can use…Boat,rather than Swimming
F.Knight: You guys…Can't Swim?
F.Healer & F.Mage: (Shocked) Eehh??

Forum statistics

Threads
105,525
Messages
1,014,391
Members
137,208
Latest member
M12YT
Top