How are item effects represented in the JavaScript?

HighTyrol

Villager
Member
Joined
Jun 8, 2020
Messages
20
Reaction score
1
First Language
English
Primarily Uses
RMMV
How are item effects represented in the JavaScript? I have been trying to figure out how to choose which aspects of an item are randomized when using Yanfly's independent items. I have already read through Yanfly's plugin's code and did not see anything there about it. Although, maybe I missed it. Some of the effects that I care about the most are HP and MP recovery and Damage. I am currently reading through the rpg_core.js and have not found anything yet. Although I am only about 1/3 of the way through and by no means understand it all. If anyone could show me where I could find the names used for these properties in the script.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
You won't find a definition of an effect in the JavaScript files - they're just a plain object with four fixed keys. (Technically, only the "code" key matters, you could dump anything you want in there if you defined a custom code, as I've done a few times.)

It is documented however - if you open the user manual (Help -> Contents) and scroll down the bottom, there is a "JS Library" section. Expand that, scroll down almost to the bottom, and click on "~ Effect". In general the entries beginning with a "~" describe the format of the database objects, while other entries are the classes defined in the JavaScript files.

In the case of effects, the "code" key is a magic value describing the type of the effect. These magic values are listed in the JavaScript files - search "function Game_Action" in rpg_objects.cpp and you should find the list.
 

HighTyrol

Villager
Member
Joined
Jun 8, 2020
Messages
20
Reaction score
1
First Language
English
Primarily Uses
RMMV
Thank you for your help.
 

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

Latest Threads

Latest Profile Posts

Made a surprising amount of progress in these past two days. Really helps when parallax mapping breaks limitation and allowing me to be creative and make maps that match my vision.
Let's promote our amazing artists in RPG Maker community! I posted right now about my game Phil Alone on Twitter and I decided to thanks Lime Zu, the amazing artist that did all the pixel assets for my game!
I just realised that the reason behind me not being able to make a game may be the lack of my original resources. I just dont like the look of MV faces and sprites, lol. Guess I will have make my own art.
I'm posting a commission art soon! :kaoswt2:
So here's a fun/tragic fact about me: I have an awful memory. But to be correct, I have memory "leaks". My memory is actually amazing, my issue is I can't keep memories for long, in fact, I once forgot my name. :kaoswt2:

Forum statistics

Threads
107,456
Messages
1,029,815
Members
139,586
Latest member
chikenwyngx
Top