I want to change the attribute name of the state and change the attack name to power, but I need to switch the name freely before choosing the script, because my game is divided into two worlds and needs to switch the name
MV How to modify attribute names with scripts
Javascript/Plugin Supportcan you specify a bit more how often you would have to switch the names in your game?
the vocabs are part of the database. The $data structures are not saved, but can be changed with direct script access.
The problem with that change is that it is not saved, and at any start or at any loading a savedgame it reverts to the original name.
So if the player is mostly in one world you can set those names in the database and simply change them by script command if transferred to the other world.
However if both worlds are equally large and often visited, you'll need a plugin to completely reprogram the $data structure for the vocabs to be dynamically saved.
the vocabs are part of the database. The $data structures are not saved, but can be changed with direct script access.
The problem with that change is that it is not saved, and at any start or at any loading a savedgame it reverts to the original name.
So if the player is mostly in one world you can set those names in the database and simply change them by script command if transferred to the other world.
However if both worlds are equally large and often visited, you'll need a plugin to completely reprogram the $data structure for the vocabs to be dynamically saved.
The two worlds are divided into the real world and the game world. The player controls the character to freely shuttle between the real world and the game world. Just like playing a game, exiting the game will return to the real world. The idea comes from an animation in Japan
I have a plug-in with custom attributes here, but I can't switch freely. At first, I thought that if I can use script to open or close the plug-in, the problem can be solved
You don't literally need to change the attribute name. Just places where the term might pop up.
I believe that Equipment Status, Character Status, and potentially in the Battle Log.
The TextManager in rmmz_manager.js or rpg_manager.js is actually what retrieves the terms from the database for the Menu screens to display.
Excuse me, I wrote this up in MZ but I think MV is virtually the same.
I think you can simply return a different text string for a specific term when a switch is on or off.
Edit: this just changes the name "Attack" to "Power", but the actual stat value is the same.
I'm not sure about the state name. Does that actually get used in the game? I thought it was just an icon.
[img]https://i.imgur.com/rnK1a4I.png[/img]
I believe that Equipment Status, Character Status, and potentially in the Battle Log.
The TextManager in rmmz_manager.js or rpg_manager.js is actually what retrieves the terms from the database for the Menu screens to display.
Excuse me, I wrote this up in MZ but I think MV is virtually the same.
JavaScript:
TextManager.param = function(paramId) {
return $dataSystem.terms.params[paramId] || "";
};
I think you can simply return a different text string for a specific term when a switch is on or off.
JavaScript:
TextManager.param = function(paramId) {
if ($gameSwitches.value(1)){ //when Switch #1 on
return $dataSystem.terms.params[paramId] || "";
}else{ //when Switch #1 off
switch (paramId){
case 2: //Attack
return "Power"
break;
}
return $dataSystem.terms.params[paramId] || "";
}
};
Edit: this just changes the name "Attack" to "Power", but the actual stat value is the same.
I'm not sure about the state name. Does that actually get used in the game? I thought it was just an icon.
[img]https://i.imgur.com/rnK1a4I.png[/img]
Thanks for your help, I'm so stupid, I just remembered to replace TextManager.param in rpg_manager.js directly after trying for an afternoon,
Original thread: https://forums.rpgmakerweb.com/threads/how-to-modify-attribute-names-with-scripts.147354/