RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Quick help with actor name on save file.

0 Members and 1 Guest are viewing this topic.

********
Furry Philosopher
Rep:
Level 94
Rawr?
2013 Best RPG Maker User (Creativity)Gold - GIAW 11 (Hard)Randomizer - GIAW 11Secret Santa 2013 ParticipantFor frequently finding and reporting spam and spam bots2012 Best RPG Maker User (Mapping)2012 Best RPG Maker User (Programming)Secret Santa 2012 ParticipantGold - GIAW 9Project of the Month winner for September 2008For taking a crack at the RMRK Wiki2011 Best RPG Maker User (Programming)2011 Best Veteran2011 Kindest Member2010 Best RPG Maker User (Story)2010 Best RPG Maker User (Technical)
I'm still pretty bad at scripting, but this should be an easy enough one for me to do. Replacing the standard sprite bitmap on a save file with one particular actor's name (which will be used as chapter names rather than a character name). Unfortunately, no matter what I do I cannot get it to work right. I can get rid of the sprite easily, and can put in the text exactly as I want it to be if I were to type the text in directly, but it simply will not take the actor name itself no matter what I do. I wanted to be able to get it on my own, but it clearly there's something I'm missing. Anyone able to give me a pointer?




*
Rep:
Level 87
want to post what you've already got?  Or at least the bit where you're TRYING to put in the actor's name?
Always remember you're unique.
Just like everybody else.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Best RPG Maker User (Scripting)2010 Best Use Of Avatar And Signature Space
Sorry for not noticing this before Zylos :( The problem is likely the window loads the data from the save file. It doesn't load $game_actors.

There are two ways to fix this, save actor names into @characters rather than the filenames, or else load up to $game_actors.

To save actor names instead of filenames, you would need to modify the write_save_data method of Scene_Save. Notice that the first thing it dumps is an array it makes of each actor's character name and hue. If you changed that to instead be each actor's name, then you could access the names from the @characters array in Window_SaveFile.

Otherwise you can load up to game_actors in Window_SaveFile instead of stopping at game_variables as they do.

Note this part in Window_SaveFile

Code: [Select]

    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @game_self_switches = Marshal.load(file)
      @game_screen = Marshal.load(file)
      @game_actors = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end

and then you could access name through:

@game_actors[id].name