Rename Anything

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
Rename Anything

Script by Mr. Bubble





Summary

This script allows players to rename game objects in the database from within a game.

Why would you want to do that? I don’t know, but now you can.

Script

Can be found here: http://wp.me/PxlCT-oM

Installation

Paste this script into its own page within the "Materials" section in the script editor of your project.

How to Use

This script utilizes notetags and script calls. Please read the comments thoroughly.

Compatibility

This script aliases some default VXA methods. There are no default method overwrites.

Requests for compatibility with other scripts are encouraged and welcome.

Terms and Conditions

Free for non-commercial use.

If you wish to use this for commercial games, contact me first.

Please feel free to post coding and efficiency suggestions, script features suggestions, and bug reports.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
How easy is it to re-use the renaming logic in other scripts? (eg: automatic renaming, etc)
 

Chaneque

Prince of Strange Things
Veteran
Joined
Mar 17, 2012
Messages
687
Reaction score
45
First Language
English
Primarily Uses
N/A
Awesome :D I came up with a scenario, btw:

Adventurer: OMG I CAN'T BELIEVE MY SWORD DOESN'T HAVE A NAME I GOTTA NAME IT SOMETHING BADASS *le open scene*

I like this script, it could be very useful.
 

Acetonide

Event Coordinator
Veteran
Joined
Apr 16, 2012
Messages
660
Reaction score
31
First Language
English
Primarily Uses
N/A
Haha.. It could be useful I suppose, but I have yet to come up with a proper use for it, short of nicknaming all your items, of if you did a mess of scripts and items and eventing to make a monster capturing and party based game, and needed to nickname your items/monsters.

Or of course you could do as Kumori would do and name your sword, which would hopefully be sentient. >.>;
 

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
How easy is it to re-use the renaming logic in other scripts? (eg: automatic renaming, etc)
It was pretty easy, though, I chose not to modify anything in regards to window sizes, draw positions/sizes, etc. except for the portrait area.
 

Peltron

Orange Ventius Leader
Veteran
Joined
Jul 7, 2012
Messages
170
Reaction score
11
First Language
English
Primarily Uses
Nice script!

Could be extremely useful to people wanting to make a game similar to Skyrim or what not.

*likes*
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I looked at the script, and I saw where you are making the rename, but I'm wondering how you are actually saving those changes.

Data files are never saved outside of the editor (and they shouldn't because that's basically the game data). I would store these in a custom hash and put it in the save file, but other than that I don't think the changes would be there when the player reloads. Never tested though so maybe I've been doing extra work all along.
 
Last edited by a moderator:

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
I looked at the script, and I saw where you are making the rename, but I'm wondering how you are actually saving those changes.

Data files are never saved outside of the editor (and they shouldn't because that's basically the game data). I would store these in a custom hash and put it in the save file, but other than that I don't think the changes would be there when the player reloads. Never tested though so maybe I've been doing extra work all along.
All RPG::BaseItems have their name as a public instance variable.

From the help file:



Code:
class RPG::BaseItem
  def initialize
    @id = 0
    @name = ''
    @icon_index = 0
    @description = ''
    @features = []
    @note = ''
  end
  attr_accessor :id
  attr_accessor :name
  attr_accessor :icon_index
  attr_accessor :description
  attr_accessor :features
  attr_accessor :note 
end
I just tested a loaded game and the name changes stayed.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
That's interesting then, because it doesn't look like $data_ variables are ever saved.

Strange.

If you start a new game are the changes reverted?
 
Last edited by a moderator:

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
That's interesting then, because it doesn't look like $data_ variables are ever saved.

Strange.

If you start a new game are the changes reverted?
Yeah, it'll be fresh. All I did was use the existing actor renaming process and extended it to all other database objects. Because that's really all what the original code did: acquire an actor data object and change its name.
 
Last edited by a moderator:

Zasian

Advanced N00B
Veteran
Joined
Jul 30, 2012
Messages
145
Reaction score
16
First Language
English
Primarily Uses
I can think of several instances to use this already. Thanks.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Sorry, the test case wasn't reloading a save file, it was reloading the game (eg: reload the data files). So F12 + load file wouldn't capture it.

As mentioned the data files are never saved, so your custom names aren't preserved.

For actor name, that's accessing the Game_Actor's name, not RPG::Actor.
 
Last edited by a moderator:

MooshraKun

Making Dreams Stand Up
Veteran
Joined
Jul 11, 2012
Messages
238
Reaction score
11
First Language
Lokota
Cool Mr. Bubble always surprising us with many useful scripts I think that this would be really a fun little add on.
 

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
Sorry, the test case wasn't reloading a save file, it was reloading the game (eg: reload the data files). So F12 + load file wouldn't capture it.

As mentioned the data files are never saved, so your custom names aren't preserved.

For actor name, that's accessing the Game_Actor's name, not RPG::Actor.
Ah, my apologies. You learn something new everyday. This is the first time I've had to write to the save file. I was even worried that I would run into this kind of situation before this, too. Thanks for the correction.

For everyone else, I've updated the script to v1.1 which should address the saved names issue.
 
Last edited by a moderator:

hyde9318

RMC Coordinator
Veteran
Joined
Apr 1, 2012
Messages
2,593
Reaction score
680
First Language
English
Primarily Uses
RMMV
Really cool script. I think I want to use this, now I just need to figure out where.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top