tinkie99

Villager
Member
Joined
Feb 17, 2021
Messages
16
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
16
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
16
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,490
Reaction score
14,818
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

Currently trying to add items in the same style as Kyrise's excellent icons. I like having a large variety of items :3 KyriseandMe.PNG
Create MiniMaps, Sprites for MV Enemies, & Aethereal Plane Battlebacks | RPG Maker News #74

Vtubers Vs MOTHER.png

This might be my next project. You like it?
I'm off to search the master script list for my skill issue. HOORAY! FUN!
Fun fact: Digimon is an isekai :kaoswt2:

Forum statistics

Threads
112,328
Messages
1,067,417
Members
145,964
Latest member
Senkiji
Top