tinkie99

Villager
Member
Joined
Feb 17, 2021
Messages
17
Reaction score
0
First Language
Dutch
Primarily Uses
RMMZ
So I'm trying to create a passive aura for characters. Those passives will give the whole party a boost but the passive should only work when the specified party member is in the main party and not in the sub party.
I'm using Skillstatescore from visustella are a plugin now. When I try to run it. It crashes so the script doesn't work I think but I have no idea how to try to have the actor as a main party member condition this is what I use right now... The 17 refers to the 17th actor in my list.


<JS Passive Condition>

BattleManager.allBattleMembers().contains($gameActors.actor(17));

condition = true

</JS Passive Condition>
 

tinkie99

Villager
Member
Joined
Feb 17, 2021
Messages
17
Reaction score
0
First Language
Dutch
Primarily Uses
RMMZ
RangeError: Maximum call stack size exceeded
at Game_Actor.Game_BattlerBase.<computed>.<computed> (VisuMZ_0_CoreEngine.js:6816)
at Game_Actor.Game_BattlerBase.<computed>.<computed> (VisuMZ_1_ElementStatusCore.js:3319)
at Game_Actor.Game_BattlerBase.initMembers (VisuMZ_1_BattleCore.js:15748)
at Game_Actor.Game_BattlerBase.<computed>.initMembers (VisuMZ_1_SkillsStatesCore.js:2300)
at Game_Actor.Game_Battler.initMembers (rmmz_objects.js:3296)
at Game_Actor.initMembers (rmmz_objects.js:4029)
at Game_Actor.Game_BattlerBase.initialize (rmmz_objects.js:2623)
at Game_Actor.Game_Battler.initialize (rmmz_objects.js:3292)
at Game_Actor.initialize (rmmz_objects.js:4024)
at new Game_Actor (rmmz_objects.js:4010)

Keeps spamming this in my devtool.
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
608
Reaction score
320
First Language
German
Primarily Uses
This can sometimes happen when you check for an actor during that actors creation. (In this case, because the creation process is not yet completed, the game gets stuck trying to create new copies of the actor).

You could try to escape that by adding a check if the actor is already created:
Code:
<JS Passive Condition>
if ($gameActors._data[this.actorId()]) {

   condition = $gameParty.battleMembers().contains($gameActors.actor(17));

}
</JS Passive Condition>
(Although this might not work with actor-cloning plugins or similar addons that allow for more actors).

BattleManager.allBattleMembers() (= combined party and enemy troop members) includes your non-battle-party while you are not actually in battle. Since you are only checking for actors and not enemy troop members I'd suggest using $gameParty.battleMembers() instead.

Hope this helps in some way. :)
 

tinkie99

Villager
Member
Joined
Feb 17, 2021
Messages
17
Reaction score
0
First Language
Dutch
Primarily Uses
RMMZ
This can sometimes happen when you check for an actor during that actors creation. (In this case, because the creation process is not yet completed, the game gets stuck trying to create new copies of the actor).

You could try to escape that by adding a check if the actor is already created:
Code:
<JS Passive Condition>
if ($gameActors._data[this.actorId()]) {

   condition = $gameParty.battleMembers().contains($gameActors.actor(17));

}
</JS Passive Condition>
(Although this might not work with actor-cloning plugins or similar addons that allow for more actors).

BattleManager.allBattleMembers() (= combined party and enemy troop members) includes your non-battle-party while you are not actually in battle. Since you are only checking for actors and not enemy troop members I'd suggest using $gameParty.battleMembers() instead.

Hope this helps in some way. :)
It works thanks!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,521
Reaction score
14,843
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.



@tinkie99 , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.

 

Latest Threads

Latest Profile Posts

Hey RPG members!!

How do you finish projects? Some new game developers start off strong but end up losing momentum. What keeps you motivated while working on new projects?
Feeling wee sleepy.. ZzzZ
So many threads to move to the right place. My post count is awesome, but 95% of it is due to moving things.
So...I decided to make music for my game... Because i've never done anything musical in my life. I even failed music in school, you basically just had to show up to pass and I somehow failed xD
Original Character Contest Winners Season 3 Pack! is now live!

Forum statistics

Threads
112,445
Messages
1,068,339
Members
146,098
Latest member
igorduffeck
Top