I was wondering if there is a way to input a name for equipment (Example: After forging a sword you can name the sword).
If anyone can help, I would be increasingly grateful :D
class Game_System
def rename_weapon(weapon_id, name)
$data_weapons[weapon_id].name = name
File.open('Data/Weapons.rxdata', 'wb') {|f| Marshal.dump($data_weapons, f)}
end
def rename_armor(armor_id, name)
$data_armors[armor_id].name = name
File.open('Data/Armors.rxdata', 'wb') {|f| Marshal.dump($data_armors, f)}
end
def rename_item(item_id, name)
$data_items[item_id].name = name
File.open('Data/Items.rxdata', 'wb') {|f| Marshal.dump($data_items, f)}
end
end
Use the following script calls:
$game_system.rename_weapon(WEAPON_ID, NAME)
$game_system.rename_armor(ARMOR_ID, NAME)
$game_system.rename_item(ITEM_ID, NAME)
The changes will not show in the editor right away if the project is open in it, the project will need reloaded afterwards for it to take effect, but this only matters when testing the game.
Thanks, man. This should work out nicely with my Custom Blacksmith System :3
However, this isn't going to work well with an encrypted game, am I right? Wouldn't it be better to store it into Game_System where it's saved on a Save file basis rather than a global basis?