First off, hope I'm in the right topic.
I'm trying to write a scriplet that allows the player to rename a given class to whatever the want. I've got it work, but it won't save. I rename the class and it shows as the new name everywhere in the game. I can save the file, but when I load it the class's name reverts back to it's original name. I thought it was because I wrote it into the wrong area in scripts (meaning one that doesn't save in the save file), so I put it in Game_System.. but still no luck.
Any help would be great 😉
I'm trying to write a scriplet that allows the player to rename a given class to whatever the want. I've got it work, but it won't save. I rename the class and it shows as the new name everywhere in the game. I can save the file, but when I load it the class's name reverts back to it's original name. I thought it was because I wrote it into the wrong area in scripts (meaning one that doesn't save in the save file), so I put it in Game_System.. but still no luck.
Any help would be great 😉
Code:
#==============================================================================# ■ Game_System #==============================================================================# Script call in event:# $game_system.rename_class(1)#==============================================================================class Game_System ActorID_for_Renaming = 8 # Actor ID for renaming purpose Name_Length = 12 # Character length for class name #-------------------------------------------------------------------------- # new method: rename_class #-------------------------------------------------------------------------- def rename_class(class_id) name_length = 12 # Max length for name class_name = $data_classes[class_id].name # Get current class name # Change actor place holder name to class name $game_actors[ActorID_for_Renaming].name = class_name # Call Name Input scene SceneManager.call(Scene_Name) SceneManager.scene.prepare(ActorID_for_Renaming, name_length) # Wait for the Naming process to stop Fiber.yield # Change the class name to the input name $data_classes[class_id].name = $game_actors[ActorID_for_Renaming].name endend