Character profile page

Hi.

I'm trying to make a character profile page for the game I'm working on but I don't know how to pull up variables and stuff for how I envisioned it. I will make for each character a background image that will have all the characters, window borders, and text boxes drawn out and as much text filled out as possible. The only thing I would need to fill in is the profile page and game_variables which should be pulled from the game.

I don't think you could do that through an editor but maybe you can I just don't know what script calls to make.

What I made so far is this:
When a player uses an item, a common event is called and the player selects which character's profile page he wants to open. Based on his selection, a profile image for that character is displayed (through show picture) and information stored in game_variables should be displayed or x character.

This is the part where I'm having trouble. I don't know how to make a script call to pull out a variable value and display it in x,y position. This needs to be done for all other variables. And when a player closes the image, I need to be able to clear all the variables as well.

Am I going about this the wrong way? My knowledge of scripting is very limited. I can edit an already existing script, but to make my own is impossible. This was the only way I could think of doing this.

Does anyone know any scripts I could maybe use/edit to make something like this?
most of the game values you can get through control variable : game data (which is much more than just the map ID).

you can place variables inside show text to display them, and with message type plugins and gab window plugins you can move and resize the show text however you want.

and you can place text into any variable by placing a string with "string" into the script box of control variable, it will be automatically displayed as text inside the show text.
I found somewhere that you can use ChatGPT to make scripts for RPG Maker and I just tried and it's insane how good it works. The AI just created this whole script in about ten minutes. Most of the time was me telling it to add, change, and remove stuff from the script. The script works exactly how I want it. The only thing I need to do now is make small script changes to display the character information that I want. The AI even added the scroll left and right through available characters. Amazing stuff. It blows my mind.

I wonder just how good this script is. I mean it works, but is it well made?

I just noticed the scrolling thing doesn't work right. I want it to only through the characters that have their switch turned on. Switches are from 601 to 611. But I have to wait until I can ask him to change that for 3 hours. LOL. I get error when I scroll and the characters switch isn't turned on.

Ruby:
#==============================================================================
# ** Scene_CharacterProfile
#------------------------------------------------------------------------------
# This scene shows the character profile including actor information and image.
#==============================================================================
class Scene_CharacterProfile < Scene_Base
  # Initialize the scene with the actor's ID from game variable 221
  def initialize
    @actor_id = $game_variables[221]
  end

  # Start the scene
  def start
    super
    create_background
    create_actor_info
  end

  # Create the background
  def create_background
    @background_sprite = Sprite.new
    @background_sprite.bitmap = Cache.picture("Profile_Background")
  end

  # Create the actor information display
  def create_actor_info
    @actor = $game_actors[@actor_id]
    if @actor.nil?
      msgbox("Actor with ID #{@actor_id} does not exist.")
      $scene = Scene_Map.new
      return
    end

    # Create and position the character image
    @character_sprite = Sprite.new
    begin
      @character_sprite.bitmap = Cache.picture("actor_#{@actor_id}")
    rescue
      msgbox("Image for actor ID #{@actor_id} not found.")
      $scene = Scene_Map.new
      return
    end
    @character_sprite.x = 0
    @character_sprite.y = 0

    # Create the information window with the specified size
    @info_window = Window_Base.new(0, 0, 544, 416)
    update_info_window
  end

  # Update the information window with the actor's data
  def update_info_window
    @info_window.contents.clear
    @info_window.contents.draw_text(0, 0, 544, 32, "Name: #{@actor.name}")
    @info_window.contents.draw_text(0, 32, 544, 32, "Class: #{@actor.class.name}")
    @info_window.contents.draw_text(0, 64, 544, 32, "Level: #{@actor.level}")
    # Add additional actor information based on game variables
    @info_window.contents.draw_text(0, 96, 544, 32, "HP: #{$game_variables[1]}")
    @info_window.contents.draw_text(0, 128, 544, 32, "MP: #{$game_variables[2]}")
  end

  # Terminate the scene
  def terminate
    super
    dispose_background
    dispose_actor_info
  end

  # Dispose of the background
  def dispose_background
    @background_sprite.bitmap.dispose
    @background_sprite.dispose
  end

  # Dispose of the actor information display
  def dispose_actor_info
    @character_sprite.bitmap.dispose if @character_sprite.bitmap
    @character_sprite.dispose
    @info_window.dispose
  end

  # Update the scene
  def update
    super
    update_actor_selection if Input.trigger?(Input::LEFT) || Input.trigger?(Input::RIGHT)
    if Input.trigger?(Input::B) # Return to the previous scene when the B button is pressed
      Sound.play_cancel
      $scene = Scene_Map.new
    end
  end

  # Update actor selection based on input
  def update_actor_selection
    if Input.trigger?(Input::LEFT)
      previous_actor
    elsif Input.trigger?(Input::RIGHT)
      next_actor
    end
    update_info_window
    update_character_image
  end

  # Select the previous actor
  def previous_actor
    loop do
      @actor_id = (@actor_id - 1)
      @actor_id = 10 if @actor_id < 1
      break if $game_actors[@actor_id] && $game_switches[600 + @actor_id]
    end
    @actor = $game_actors[@actor_id]
  end

  # Select the next actor
  def next_actor
    loop do
      @actor_id = (@actor_id + 1) % 11
      @actor_id = 1 if @actor_id == 0
      break if $game_actors[@actor_id] && $game_switches[600 + @actor_id]
    end
    @actor = $game_actors[@actor_id]
  end

  # Update the character image
  def update_character_image
    @character_sprite.bitmap.dispose if @character_sprite.bitmap
    @character_sprite.bitmap = Cache.picture("actor_#{@actor_id}")
  end
end

# Script call to open the character profile page
def open_character_profile
  $scene = Scene_CharacterProfile.new
end
Chat GPT doesn't know anything, and pretty much every coder here won't debug or help with scripts generated by it. You'd be better off doing what Andar said.
You will have a hard time finding anyone on these forums to help with Chatgpt or AI generated stuff.


EDIT* @TRIDIUM - Stop reading my mind!
you can use ChatGPT to make scripts for RPG Maker and I just tried and it's insane how good it works.
No, it doesn't work at all - you just have been very lucky with the randomiser inside the AI.

What all AIs do is compile a list of existing parts created by real programmers (or artists or musicians ...) tagged witrh keywords of what they do, then ran your keywords against the list of keywords they have and randomly select one of the code that has fitting keywords before running it through a syntax check and so on.

if there are enough preexisting scripts that do what you want and if you know how to pinpoint keywords, then you have a good chance of getting something working.
but since it's copied from existing scripts/plugins you are mostly still better off looking for the original.

If you want something that was never done before or if you have no idea how to describe what you want, the results of any AI are absolute crap, and the programmers of this forum have long grown tired of trying to fix those randomized jumbles of pseudo-script.

As someone once said - it is only a question of time until an alphanumeric randomizer recreates shakespeare's complete works - a question of very, very long time...
I can understand people's aversion to AI stuff since they probably invested a lot of hours of coding and reading material to get to the level they are now. I just didn't know the aversion was this bad in the community. I guess I'll probably stop asking for help here then.

EDIT:
Oh, I didn't know that. So the AI is just blatantly copying parts of other people's scripts? Hm... Dunno...
I haven't read much into the inner workings of AI. I guess I'll need to read a bit about it before I come to some kind of opinion about it all.
Did you read any of what he said?
It's not because some coders are butthurt that AI is taking their jobs. That's a whole nuther thing.

Did you actually try what Andar suggested?
@kR1pt0n1t3
this aversion has absolutely nothing to do with the numbers of hours someone used to learn programming.
it has to do with how AIs work internally, and you probably missed my answer above where I described that.
We really did a disservice to humanity as a whole by adopting calling large language models "Ai". To the layman it gives the wrong impression of things. I wonder in the distant future when we have actual artificial intelligence what we'll need to adjust our language to call it. Synthetic consciousness?
The text above edit was posted before Andar's message.

I didn't come here to start with the intention to start an AI debate. If I knew people were so heated about it, I wouldn't have even mentioned it that I tried it.

In any case, I'm pretty sure I can modify the AI-generated script to suit my needs since basically all the stuff I didn't know how to do works in the script, and the rest I know how to modify and adjust. A mod can close or delete this thread.

Thank you all.
Well, I think you're missing the point, but I respect the desire to not get into another AI debate. Good luck with your project!
This thread is closed due to being solved. If you need it reopened, let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/character-profile-page.169460/