Yanfly's Actor Transformations Lunatic Code: how to use?

Andronius

Apprentice
Veteran
Joined
Mar 29, 2016
Messages
102
Reaction score
117
First Language
English
Primarily Uses
RMMV
Hello everyone. Just downloaded @Yanfly's Actor Transformations Lunatic Code, but I'm having trouble setting it up. I'm sorry to ask this, and I hope I'm posting this question in the correct place, (perhaps it's something very easy and obvious for those familiar with Coding and Lunatic Mode), but it's the first time EVER I have to use or set-up code or lunatic mode.  
Already watched the video several times, but I wish it included the following info for noobs, and a SEPT BY STEP explanation on how to set it up correctly, showing in de video how she went to each folder or place in the computer to find the following:

  • ¿Where do I find The filename of the character graphic?

  • ¿Where do I find The index of the character graphic used?

  • ¿Where do I find The filename of the face graphic?

  • ¿Where do I find The index of of the face graphic used?

  • ¿Where do I find The filename of the battler graphic?

All these red values are refering to the current actor, or the actor in which I want to transform? In other words: must I replace the values in red with the current actor (normal State) which is about to transform, OR the values of the transformed actor (transformed State)? 


I don't know if I'm asking this correctly, I have problems with these bits of the code, and I appreciate very much if someone would be so kind as to explain this to me in the easiest way possible:


<Custom Apply Effect>
// Check if user is an actor.
if (user.isActor()) {
// Archive the previous settings.
user._prevCharName = user._prevCharName || user._characterName;
user._prevCharIndex = user._prevCharIndex || user._characterIndex;
user._prevFaceName = user._prevFaceName || user._faceName;
user._prevFaceIndex = user._prevFaceIndex || user._faceIndex;
user._prevBattlerName = user._prevBattlerName || user._battlerName;
// Check if the actor ID is 1.
if (user.actorId() === 1) {
// The filename of the character graphic without the file extension. <= Where do I find this?
var charName = 'HaroldSSJ';
// The index of the character graphic used. <= Where do I find this?
var charIndex = 0;
// The filename of the face graphic without the file extension. <= Where do I find this?
var faceName = 'HaroldSSJ';
// The index of of the face graphic used. <= Where do I find this?
var faceIndex = 0;
// The filename of the battler graphic without the file extension. <= Where do I find this?
var battlerName = 'Harold_SSJ1';
// Check if the actor ID is 2.


Code:
  }
  // Changes the character image to the setting applied from above.
  user.setCharacterImage([COLOR=rgb(0,0,255)]charName, charIndex[/COLOR]); [FONT='comic sans ms'][COLOR=rgb(128,0,128)]<= Do I have to replace/change something here?[/COLOR][/FONT]
  // Changes the face image to the setting applied from above.
  user.setFaceImage([COLOR=rgb(0,0,255)]faceName, faceIndex[/COLOR]); [FONT='comic sans ms'][COLOR=rgb(128,0,128)]<= Do I have to replace/change something here?[/COLOR][/FONT]
  // Changes the battler image from the setting applied from above.
  user.setBattlerImage([COLOR=rgb(0,0,255)]battlerName[/COLOR]); [FONT='comic sans ms'][COLOR=rgb(128,0,128)]<= Do I have to replace/change something here?[/COLOR][/FONT]
  // Refreshes the user's appearance.
  user.refresh(); [FONT='comic sans ms'][COLOR=rgb(128,0,128)]<= Do I have to put something inside this brackets?[/COLOR][/FONT]
}
</Custom Apply Effect>

and this:


<Custom Remove Effect>
// Retrieve archived settings.
var charName = user._prevCharName;
var charIndex = user._prevCharIndex;
var faceName = user._prevFaceName;
var faceIndex = user._prevFaceIndex;
var battlerName = user._prevBattlerName;
// Changes the character image to the archived setting.
user.setCharacterImage(charName, charIndex);
// Changes the face image to the archived setting.
user.setFaceImage(faceName, faceIndex);
// Changes the battler image from the archived setting.
user.setBattlerImage(battlerName);
// Clear archived data.
user._priorityCharacterName = undefined;
user._priorityCharacterIndex = undefined;
user._prevFaceName = undefined;
user._prevFaceIndex = undefined;
user._priorityFaceName = undefined;
user._priorityFaceIndex = undefined;
user._prevFaceName = undefined;
user._prevFaceIndex = undefined;
user._priorityBattlerName = undefined;
user._prevBattlerName = undefined;
// Refreshes the user's appearance.
user.refresh();
</Custom Remove Effect>


THANKS IN ADVANCE! ^___^  


 

InBlast

The Mad Hamster
Veteran
Joined
Nov 2, 2015
Messages
287
Reaction score
89
First Language
French
I will try to anwser you but I never used this plugin.


var charName = 'HaroldSSJ';


This will create a variable called "charName", and it will contain 'HarlodSSJ' (which is the name of your image)


So, no need to change the blue part of :


user.setCharacterImage(charName, charIndex);


or the others of this part. You only need to change the red ones.


Usually in coding, when you have a function beginning by "set" like :


user.setCharacterImage(charName, charIndex)


It will change the value of some hidden variables. It's OOP programmation. To be easy to understand, "user" is a class with a lot of parameters (variables).


For example, they should be a variable like this :


user.charName, or user.charIndex


But, by convention, we can't do user.charName = newCharName. because you will have acess to the variable and you can do some **** with it ^^.


So, if you want to change these variables, you need to call a method. It's a function that is specific to the class (here it's user).


And, the methods used to change the class parameters are starting by "set".


Sooo, 


user.setCharacterImage(charName, charIndex)


will change these parameters to their new value. 


So, in the red part, you have to put the......... transformed actor ! because your function will change the actual values to new ones.


Voila, I tried to explain a little to you an easy way (it's more complicated than that in reality, but I hope you understand a little ^^)


And I don't know at all about where to find the image and index names ^^
 

Andronius

Apprentice
Veteran
Joined
Mar 29, 2016
Messages
102
Reaction score
117
First Language
English
Primarily Uses
RMMV
:rock-left: BD :rock-right:  Thanks so much for taking the time @InBlast The Mad Hamster! All this coding and stuff is very difficult for me to understand  :distrust:  But your answer helped: I was able to transform my Druid into a Spider, and the images and stats (buffs) and skills changed correctly! (would have never thought to Morph an actor would be SI DiFFICULT  ;_;  .


I'm having 2 main problems with my Morphing Skill:

  1. The Druid correctly transforms into the Spider. When he does, his stats (Attack, Defense, Agility, etc) increase correctly, and also he 'learns' a new set of Skills (Spider Skills) and can't use his normal human skills. This is very fine, BUT when the spider attacks, it keeps showing the Drui's previously equipped weapon, a staff, and that looks very odd. I'd like the Spider not to show the Druid's previously equipped weapon without having to use the <Seal equip: Weapon> option in the State Traits.
  2. When the Duid dies while transformed into the Spider, and then it's revived by other actor with a Potion or Spell, all the settings and stats go back to the normal human Druid state... BUT THE SPIDER IMAGE REMAINS. This is very odd. I'd like the actor fuction logically, meaning: if the Druid dies in human form and is revived in battle, then he should revive in human form with his human traits, skills and equip; if the Druid dies in Spider form and is revived in battle, then he should revive in Spider form with his Spider traits and skills. 

^_____^ Don't know if this makes any sense! Probably it's very advanced stuff, I wouldn't know. I appreciate very much any help! Thanks  :popcorn:
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
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

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top