MZ Name Input Processing for Class

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?
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.
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
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?
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).
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.
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.
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.
I figured as much, not really based on my knowledge tho 😛
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!
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.
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?
@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.
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.
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 😛

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.
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.
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
So, curious how this turned out, did you end up figuring it out with nicknames or using the script? 😛

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?
I'm gonna be honest, I forgot about this for a bit, a lot of distractions around me atm 😛

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 😛

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.

Spoiler: Script
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?
I'm gonna be honest, I forgot about this for a bit, a lot of distractions around me atm 😛

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 😛

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.

Spoiler: Script
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?
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

Original thread: https://forums.rpgmakerweb.com/threads/name-input-processing-for-class.147097/