Hi guys
is there a way to make longer names for items,actors,monsters and so on?
The field of the editor is very limited.
Maybe a script or something?
For example: i want to create a weapon named " Legendary Greatsword of the Endless Dragonslayers"
I already edited my menu scripts for enough space to show such a name but the database of RMXP is messing up...
You can edit everything by script calls.
$data_weapons[ID].name = "Legendary Greatsword of the Endless Dragonslayers"
Same with most everything else.
$data_actors
classes
weapons
items
armors
enemies
Or via configuration method
module RPG
class Weapon
def name
return case @id
when 1 then "Bronze Sword of Epic Justice and Friendship"
when 2 then "Iron Sword for Better Slashing and Stuff"
else
@name
end
end
end
class Armor
def name
return case @id
when 4 then "Mythirl Shield Blessed by Faeries of Another Dimension"
else
@name
end
end
end
class Item
def name
return case @id
when 1 then "Healing Potion from Crushed Juniper Berries"
else
@name
end
end
end
end
Works fine.
Thx alot you two!
Quote from: gameus on September 30, 2014, 03:58:09 pm
You can edit everything by script calls.
$data_weapons[ID].name = "Legendary Greatsword of the Endless Dragonslayers"
Same with most everything else.
$data_actors
classes
weapons
items
armors
enemies
This doesn't get saved with the save file.
Quote from: KK20 on September 30, 2014, 04:14:30 pm
Or via configuration method
module RPG
class Weapon
def name
return case @id
when 1 then "Bronze Sword of Epic Justice and Friendship"
when 2 then "Iron Sword for Better Slashing and Stuff"
else
@name
end
end
end
class Armor
def name
return case @id
when 4 then "Mythirl Shield Blessed by Faeries of Another Dimension"
else
@name
end
end
end
class Item
def name
return case @id
when 1 then "Healing Potion from Crushed Juniper Berries"
else
@name
end
end
end
end
This can't be dynamically changed during the game.
Just being a dick~
But requester does not want dynamic.
HAH!
just because I feel like oneuping both of you.
class Game_System
attr_accessor :dynamic_item_properties
alias ryex_dynamic_item_properties_initialize initialize
def initialize
@dynamic_item_properties = {}
ryex_dynamic_item_properties_initialize
end
end
module RPG
class Weapon
def name
key = "weapon_" + @id.to_s + "_name"
if $game_system.dynamic_item_properties.has_key?(key)
$game_system.dynamic_item_properties[key]
else
@name
end
end
end
class Armor
def name
key = "armor_" + @id.to_s + "_name"
if $game_system.dynamic_item_properties.has_key?(key)
$game_system.dynamic_item_properties[key]
else
@name
end
end
end
class Item
def name
key = "item_" + @id.to_s + "_name"
if $game_system.dynamic_item_properties.has_key?(key)
$game_system.dynamic_item_properties[key]
else
@name
end
end
end
end
Now you can dynamically and permanently change an item's name with
$game_system.dynamic_item_properties["weapon_" + ID + "_name"] = "Legendary Greatsword of the Endless Dragonslayers"
Ha! now both problems are solved Blizz!
:nod:
Ew, long script call. Just because the average user doesn't typically follow instructions, I'd probably add methods in Interpreter to shorten it up, something that's easy to remember.
change_weapon_name(ID, NAME)
And for teh lulz, I'd also add a way to revert the item's custom name back to its database form.
oh fine, here
class Game_System
attr_accessor :dynamic_item_properties
alias ryex_dynamic_item_properties_initialize initialize
def initialize
@dynamic_item_properties = {}
ryex_dynamic_item_properties_initialize
end
end
module RPG
class Weapon
def name
key = "weapon_" + @id.to_s + "_name"
if $game_system.dynamic_item_properties.has_key?(key)
$game_system.dynamic_item_properties[key]
else
@name
end
end
end
class Armor
def name
key = "armor_" + @id.to_s + "_name"
if $game_system.dynamic_item_properties.has_key?(key)
$game_system.dynamic_item_properties[key]
else
@name
end
end
end
class Item
def name
key = "item_" + @id.to_s + "_name"
if $game_system.dynamic_item_properties.has_key?(key)
$game_system.dynamic_item_properties[key]
else
@name
end
end
end
end
class Interpreter
def change_weapon_name(id, name)
$game_system.dynamic_item_properties["weapon_" + id + "_name"] = name
end
def revert_weapon_name(id)
$game_system.dynamic_item_properties.delete("weapon_" + id + "_name")
end
def change_armor_name(id, name)
$game_system.dynamic_item_properties["armor_" + id + "_name"] = name
end
def revert_armor_name(id)
$game_system.dynamic_item_properties.delete("armor_" + id + "_name")
end
def change_item_name(id, name)
$game_system.dynamic_item_properties["item_" + id + "_name"] = name
end
def revert_item_name(id)
$game_system.dynamic_item_properties.delete("item_" + id + "_name")
end
end
now it can be called with pretty names from scripts calls and you can revert it
scripts calls look like
change_weapon_name(ID, "Legendary Greatsword of the Endless Dragonslayers")
change_armor_name(ID, "Cheapest cloth armor available")
change_item_name(ID, "Poison, Don't Drink")
then set them back to database defaults with
revert_weapon_name(ID)
revert_armor_name(ID)
revert_item_name(ID)
Wait... did we just create a new script because we felt like onaping each other?
Meh, don't care. if anyone feels like claiming it and putting it in the database feel free.
Slap a "cannot be used in saved games" label and database it 8)
hey, I did the work of writing it, I even had to look at the RMXP scripts again to remember this shit. YOU can database it ya lazy slop! :V:
A little bit late, but i just wanted to say:
You guys are awsome :)
Thx