Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
540
Reaction score
1,369
First Language
Norwegian
Primarily Uses
RMMZ
Anyone know of a plugin that can do this? Basically the same as the Name Input Processing... scene only that you can type/edit the name of a class instead of actor name?

Or maybe something that works around it, making it so an actor slot determines the name of a class?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,715
Reaction score
9,875
First Language
German
Primarily Uses
RMMV
the problem with your idea is that multiple actors can have the same class - what do you do in this case? renaming the class on one actor would automatically give the class on the other actor the same new name.

I think you better explain what you want and how you want to use it in more detail, and then we can see how we can help you.
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
540
Reaction score
1,369
First Language
Norwegian
Primarily Uses
RMMZ
the problem with your idea is that multiple actors can have the same class - what do you do in this case? renaming the class on one actor would automatically give the class on the other actor the same new name.

I think you better explain what you want and how you want to use it in more detail, and then we can see how we can help you.

I would like my main character (actor 1) to be able to name his/her class anything (In a similar way to how name input works). If you want your class to be ''Poopknight'' then you can. No other actor would have this class if that makes it easier.

Not just a list of predetermined names which is basically just changing an actors class (backup plan).

guug.PNG
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,013
Reaction score
2,351
First Language
Dutch
Primarily Uses
RMMV
you can use the a scriptcall for that part if you need it, followed by the
name input.

but if you have 4 actors, you need to create 4 different scriptcalls,
each with their own class, in case other actors gain the same class
as Andar explained.

if this is what you want, I can give you the scriptcall, for a single
actor, it doesn't matter that much though, but I also wonder why
you want to "rename" a class name?

if i's a warrior, you can name the class "Archer" as you cannot get a bow
anywhere.

so the other question if you can rename it, what exact purpose does it give?
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
540
Reaction score
1,369
First Language
Norwegian
Primarily Uses
RMMZ
you can use the a scriptcall for that part if you need it, followed by the
name input.

but if you have 4 actors, you need to create 4 different scriptcalls,
each with their own class, in case other actors gain the same class
as Andar explained.

if this is what you want, I can give you the scriptcall, for a single
actor, it doesn't matter that much though, but I also wonder why
you want to "rename" a class name?

if i's a warrior, you can name the class "Archer" as you cannot get a bow
anywhere.

so the other question if you can rename it, what exact purpose does it give?

The idea is that my main character's class will be like Morrowind/Oblivion's create your own class feature.

- Chose a sprite
- Name the character
- Choose a class
- Name/rename the class

The three first ones are in the engine, the last one is only possible by changing class afaik. But then you would only have a set number of options, not the ability to freely name it anything (like character names).
 

Ratatattat

Veteran
Veteran
Joined
Mar 22, 2020
Messages
238
Reaction score
230
First Language
English
Primarily Uses
RMMV
so the other question if you can rename it, what exact purpose does it give?
The idea is that my main character's class will be like Morrowind/Oblivion's create your own class feature.
Yes! Like my Oblivion character, Zefon the Magic Guy :) "Magic Guy" being the class I made. Love that feature.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,001
Reaction score
3,177
First Language
English
Primarily Uses
RMMV
So try this.

Make a dummy actor. Use the Name input processing to change the name of that dummy actor. Then use the event command Script and say: $dataClasses[X].name=$dataActors[Y].name;
where X and Y are the respective IDs for your class and dummy actor.

I'm not sure that will work properly, because the $data arrays are supposed to be static and read directly from your database, but that's how you'd try without writing a plugin.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,715
Reaction score
9,875
First Language
German
Primarily Uses
RMMV
The solution given by @ATT_Turan will only work temporarily.

the data segments are NOT saved but reloaded whenever a game is loaded, so the change name will be there during the game it was changed, but back to the original as soon as the game is quit and reloaded.

you'll need a full plugin to implement saving the changed classname and reloading it on loading a savefile.
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
540
Reaction score
1,369
First Language
Norwegian
Primarily Uses
RMMZ
I figured as much, not really based on my knowledge tho :p
Hopefully someone will know of something I can use or make something :3

If not then its plan 2, make as many options as possible for the player to choose from xD

First one will deffo be Poopknight!
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,001
Reaction score
3,177
First Language
English
Primarily Uses
RMMV
The solution given by @ATT_Turan will only work temporarily.

the data segments are NOT saved but reloaded whenever a game is loaded, so the change name will be there during the game it was changed, but back to the original as soon as the game is quit and reloaded.
Well, I was thinking that. But then I was thinking how making changes to the database requires starting a new game, so I wasn't positive what would save or not.

But I just tested it and you're correct, loading the game overwrites the change. You'd need a plugin that changes every place the code looks at the name of the class.
 

Ratatattat

Veteran
Veteran
Joined
Mar 22, 2020
Messages
238
Reaction score
230
First Language
English
Primarily Uses
RMMV
Could you find a way to have a common event run upon loading that just re-sets the class name to the dummy actor's name? So even though you're not really changing the data files, it's like a workaround?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,715
Reaction score
9,875
First Language
German
Primarily Uses
RMMV
@Ratatattat
yes and no

it would have to be a constantly running common event because the engine has nothing in events that is triggered by loading, and that means it will cost a lot of performance.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,001
Reaction score
3,177
First Language
English
Primarily Uses
RMMV
Could you find a way to have a common event run upon loading that just re-sets the class name to the dummy actor's name? So even though you're not really changing the data files, it's like a workaround?
The event system doesn't have a way to know you've loaded a game.

So sure, you could put an autorun on every map that will do that, but it wouldn't run until you'd changed maps once. To do something otherwise would require...a plugin (which kind of defeats the purpose, using a plugin to avoid using a different plugin).

Or, as Andar ninja'd, a straight up parallel process that's doing it constantly for very little reason.
 

Ratatattat

Veteran
Veteran
Joined
Mar 22, 2020
Messages
238
Reaction score
230
First Language
English
Primarily Uses
RMMV
Aha! I figured it out :) This works in MV, so I'm not sure if you'll have to change anything to make it work with MZ, but give it a try :p

Just copy and paste it as a plugin (and obviously change the class and actor IDs as needed).

Code:
var Imported = Imported || {};
Imported.test = true;

var test = {};
(function($) {
    "use strict";

    $.Scene_Map_updateScene = Scene_Map.prototype.updateScene;
    Scene_Map.prototype.updateScene = function() {
        $.Scene_Map_updateScene.call(this);
        if (!SceneManager.isSceneChanging()) {
            this.updateClassName();
        }
    };

    Scene_Map.prototype.updateClassName = function () {
        if ($dataClasses[1] !== null && $dataClasses[1].name !== $dataActors[2].name) {
            $dataClasses[1].name = $dataActors[2].name;
        }
    };

})(test);

If it works and you use it, free use no credits necessary.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,908
Reaction score
2,226
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi there!

Did you consider using the Actor Nickname, instead of the class name, for that feature?
1650995319293.png

It's easier, since the nickname will be saved on the save file, and you don't have to worry about persist the class name across save files, since they are not saved by default.
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
540
Reaction score
1,369
First Language
Norwegian
Primarily Uses
RMMZ
Hi there!

Did you consider using the Actor Nickname, instead of the class name, for that feature?
View attachment 224374

It's easier, since the nickname will be saved on the save file, and you don't have to worry about persist the class name across save files, since they are not saved by default.

I did not.....This time. But now that you mention it....I have done that before *sigh* I seem to be very scatterbrained lately xD
 

Ratatattat

Veteran
Veteran
Joined
Mar 22, 2020
Messages
238
Reaction score
230
First Language
English
Primarily Uses
RMMV
So, curious how this turned out, did you end up figuring it out with nicknames or using the script? :p

P.S. How do you show only the nickname instead of the class beside the character's name, in case I ever wanna go this route for something? Or is there just like an easier way to do this in MZ that doesn't exist in MV?
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
540
Reaction score
1,369
First Language
Norwegian
Primarily Uses
RMMZ
I'm gonna be honest, I forgot about this for a bit, a lot of distractions around me atm :p

For showing nicknames, I used Visustella Mainmenu core and just switch the drawActorClass with drawActorNickname in the JS code. Not sure about MV.

But that method has the same problem as the class one, You can only change between pre-determined nicknames. Not like name processing.

Trying the script atm, but im bad at this stuff :p

The script does change the name of my test class (3 in my case) to the dummy actor's name (20 in my case) in game.

var Imported = Imported || {};
Imported.test = true;
var test = {};
(function($) {
"use strict";
$.Scene_Map_updateScene = Scene_Map.prototype.updateScene;
Scene_Map.prototype.updateScene = function() {
$.Scene_Map_updateScene.call(this);
if (!SceneManager.isSceneChanging()) {
this.updateClassName();
}
};
Scene_Map.prototype.updateClassName = function () {
if ($dataClasses[3] !== null && $dataClasses[3].name !== $dataActors[20].name) {
$dataClasses[3].name = $dataActors[20].name;
}
};
})(test);

But using name processing (on actor 20) to change it again does not work. Have I misunderstood something perhaps?
 

Ratatattat

Veteran
Veteran
Joined
Mar 22, 2020
Messages
238
Reaction score
230
First Language
English
Primarily Uses
RMMV
I'm gonna be honest, I forgot about this for a bit, a lot of distractions around me atm :p

For showing nicknames, I used Visustella Mainmenu core and just switch the drawActorClass with drawActorNickname in the JS code. Not sure about MV.

But that method has the same problem as the class one, You can only change between pre-determined nicknames. Not like name processing.

Trying the script atm, but im bad at this stuff :p

The script does change the name of my test class (3 in my case) to the dummy actor's name (20 in my case) in game.

var Imported = Imported || {};
Imported.test = true;
var test = {};
(function($) {
"use strict";
$.Scene_Map_updateScene = Scene_Map.prototype.updateScene;
Scene_Map.prototype.updateScene = function() {
$.Scene_Map_updateScene.call(this);
if (!SceneManager.isSceneChanging()) {
this.updateClassName();
}
};
Scene_Map.prototype.updateClassName = function () {
if ($dataClasses[3] !== null && $dataClasses[3].name !== $dataActors[20].name) {
$dataClasses[3].name = $dataActors[20].name;
}
};
})(test);

But using name processing (on actor 20) to change it again does not work. Have I misunderstood something perhaps?

Hmm... I'll have to try it out after my exam later! I'll let you know what I figure out :)

But also, that screenshot is of changing the nickname of actor 10, not name input processing for actor 20?
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
540
Reaction score
1,369
First Language
Norwegian
Primarily Uses
RMMZ
Hmm... I'll have to try it out after my exam later! I'll let you know what I figure out :)

But also, that screenshot is of changing the nickname of actor 10, not name input processing for actor 20?
Ahh, I just forgot to remove an attachment, I was going to show visually how nicknames worked at first but figured most people prolly knew. Just me that never used that feature xD
 

Latest Threads

Latest Profile Posts

I know I'll put one of my game's sprites here to give the illusion that I am a productive member of game society.
handelspriteanim.gif
Preparing untested English localization for DOWNFALLEN.

unknown-43.png
Sometimes I wonder if I feature creep... 225 magic spells is a lot lol.

Forum statistics

Threads
124,500
Messages
1,164,060
Members
163,329
Latest member
milkpowder
Top