Question About VictorEngine Materia System

Ian_39

Villager
Member
Joined
Mar 9, 2019
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hello, all! I'm in need of some help. I'm using VE's Materia System for a project, and I'm wanting to create a Materia that the player has to equip like any other Materia to gain AP through battle, but instead of giving access to spells, it is able to perform special abilities that allow the player to solve puzzles in dungeons or open secret paths depending on the Materia's level. (Example: A Wind Materia that allows the player to leap to a higher place on the map to reach a secret entrance if the Materia is at Level 2, or a Fire Materia that burns away a large tree to reveal a chest if it's at Level 3). I already know that I want to tie a variable to the Materia's AP, but I don't know what script I need to call up in the Control Variables tab to do this. Any help?

- Ian
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
You can do this via the materia objects on the actors, but in order to check the AP for a given materia you'd have to know its ID.
 

Ian_39

Villager
Member
Joined
Mar 9, 2019
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
You can do this via the materia objects on the actors, but in order to check the AP for a given materia you'd have to know its ID.
What script do I use in the Control Variables command to do this? The IDs of the Materia are Armors 83 - 88.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
So you want to store the AP of that materia in a variable, right? I'm guessing you need to make sure the materia is equipped as well?
 

Ian_39

Villager
Member
Joined
Mar 9, 2019
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
So you want to store the AP of that materia in a variable, right? I'm guessing you need to make sure the materia is equipped as well?
Yes!
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
On a specific party member or just at least one of them?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
And if more than one is equipped you want the highest?
 

Ian_39

Villager
Member
Joined
Mar 9, 2019
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
And if more than one is equipped you want the highest?
That won’t be a problem as I’m planning on these being only one for each element.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
Ah so you don't have the thing where a max level materia births a new one?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
Okay, to check whether a party member has one equipped, do

Code:
$gameParty.members().some(member => member.equipedMateria($dataArmors[id of materia]))
Then to store the AP of that materia in a variable, do this inside the conditional branch using the above condition:

Code:
$gameParty.members().map(member => member.allMaterias()).filter(materiaList => materiaList[0] !== undefined && materiaList[0].id() === id of materia)[0][0].ap()
 

Ian_39

Villager
Member
Joined
Mar 9, 2019
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Okay, to check whether a party member has one equipped, do

Code:
$gameParty.members().some(member => member.equipedMateria($dataArmors[id of materia]))
Then to store the AP of that materia in a variable, do this inside the conditional branch using the above condition:

Code:
$gameParty.members().map(member => member.allMaterias()).filter(materiaList => materiaList[0] !== undefined && materiaList[0].id() === id of materia)[0][0].ap()
Thank you! You're a lifesaver!
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
It took me forever to get the syntax of that map and filter right. XD
 

Ian_39

Villager
Member
Joined
Mar 9, 2019
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
It took me forever to get the syntax of that map and filter right. XD
I just tested it, but it won't pass the first conditional branch where it checks to see if the Materia is equipped. I'll copy what I put in to the Script below:
$gameParty.members().some(member => member.equipedMateria($dataArmors85))
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
You forgot the square brackets around the ID.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
Always happy to be of assistance. :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top