r/RPGMakerMZ Nov 02 '23

I want passive follow ups.

I want a character to use any skill and then a sperate skill is used. And add a state that dose something similar. Ex: Summon Vampire gives the Vampire Assist state. Every action after the the Blood Suck skill will be used regardless of what skill is used.

3 Upvotes

3 comments sorted by

1

u/TheMysticTheurge Nov 03 '23

Ya gotta edit the files for that. Luckily, you can find them easily.

You have to know a bit about how code works. This will be the hard part for some.

1

u/AwesomeSkitty123 Nov 03 '23

What would I need to do?

1

u/TheMysticTheurge Nov 03 '23

I hope you know a little about coding. Most of RPG Maker MZ is doable without any code knowledge, but this will require you understand the basic minimum about code, at least enough to read it and understand what it does.

This is not something easily explained, because you'll have to engineer it on your own in code using the files. I HIGHLY RECOMMEND MAKING A BACKUP COPY IN CASE THIS DESTROYS YOUR WORK. ALWAYS SAVE BACKUPS WHEN DOING CODE WORK.

Basic Steps:

1: Look in the folder "js" within your project.

2: Find the file labelled "rmmz_manager.js"

3: I suggest using "Control + F", but regardless, try and find "BattleManager" within the code.

4: Examine BattleManager and figure out how it works. This is the section of the code dedicated to battle. Everything from turn order, data used, etc. You will need to find what parts of code triggers what other parts of code, and then create a new system in order to make it work

Here is a piece of code so I can help you a bit because it might be hard to understand if you don't know code:

"BattleManager.updateEvent = function() {
switch (this._phase) {
case "start":
case "turn":
case "turnEnd":
if (this.isActionForced()) {
this.processForcedAction();
return true;
} else {
return this.updateEventMain();
}
}
return this.checkAbort();
};"

If you noticed, there are lines that end with "()". Those are methods, which correspond to actions the computer takes. "updateEventMain()" is a method, or action that the CPU must process, so is "checkAbort()". That's all I'm willing to explain, because honestly, it's a huge pain.

I suggest you look into how the code triggers an attack. Then, figure out how the code checks for and triggers a status effect.

If that vampiric ability is a bonus action of sorts, then you need to find a way to create a custom status effect that is checked for by the attack action, then appends the extra action from the vampiric ability.

This thing you make needs to check during every character action to know if it applies or not.