HIME's Placeholder State - TypeError issue with skill scope…. Help?

Quite.Toxick

Veteran
Veteran
Joined
May 29, 2016
Messages
90
Reaction score
91
First Language
German, English
Primarily Uses
Hello everyone,


I have encountered a little problem with HIME's "Placeholder State" plugin, and I simply can't figure it out.


Here's the situation: 


I have a Regeneration skill, which is suposed to be stackable once. 


To accomplish that, I used the mentioned plugin.


I created three states:


Regen1 (ID23) that gives 10% HP Regen


Regen2 (ID56) that gives 20% HP Regen


RegenX that is a placeholder state that applies Regen1 or, if the character is already affected by it, Regen2 instead. As a placeholder, it lasts for merely one action.


The Regeneration skill applies the RegenX state at 100% rate. 


I did the same for Poison, so I have Poison1 (ID4) and Poison2 (ID55), as well as the placeholder state PoisonX.


Regeneration and Poison are supposed to cancel each other out, so RegenX can also remove a "stack" of Poison, and vice versa.


Therefore the note tag of RegenX looks like this: 

//applies Regen or removes Poison


//Regen1 can stack to Regen2


<placeholder state>


  if (a.isStateAffected(4)) {a.removeState(4);}


    else {if (a.isStateAffected(55)) {a.removeState(55); a.addState(4);}


    else {if (a.isStateAffected(23)) {a.removeState(23); a.addState(56);}


    else {if (a.isStateAffected(56)) {a.resetStateCounts(56);}


    else {a.addState(23);}}}}


</placeholder state>


PoisonX looks just like it, but with swapped stateIDs, of course. 


PoisonX is working like a charm.


Applying RegenX crashes the game with a "TypeError: cannot read property 'autoRemovalTiming' of undefined. 


I narrowed the problem down to the scope of the Regeneration skill… 


It is supposed to be the user or an ally. This causes the crash.


If I change the scope to enemy, it works fine, just like the skill applying PoisonX does. 


For both placeholder states, the Auto Removal Timing is Action End, 1~1 Turns. 


I changed all the numbers around in this section, but to no avail, the problem really seems to lie with the scope.


Does anybody out there have an idea how to address this issue?


Do I have to change something in the note tag? Or how can I define the undefined?  :distrust:


Or do you know a different way to achieve the desired effect, so I can circumvent the issue?


Thanks in advance for your feedback!


PS: I'm also using Yanfly's Target Core and Selection Control plugins, but they don't seem to be the problem, as the crash also occurs when I turn these plugins off. And I wouldn't know that any of the other plugins interfere with targeting...
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,665
Reaction score
13,275
First Language
English
Primarily Uses
RMMV
please reproduce the error, then open the console (F8) and grab a screenshot of the console log and post here.  That provides more detailed error information.


Also provide a link to the plugin so we can check it out.


It seems a strange error if the issue is really the scope.
 
Last edited by a moderator:

Quite.Toxick

Veteran
Veteran
Joined
May 29, 2016
Messages
90
Reaction score
91
First Language
German, English
Primarily Uses
Hey Shaz, thank you for the quick reply. 


The more you know… I'm new in the RMMV business, so sorry for not posting the information in the first place  :)  


I didn't even know about the console… this will help finding problems so much easier. So that already was worth it.  :rock-right:


Here is the link to the plugin: http://himeworks.com/2016/01/placeholder-states/


And attached you can see the Console Log. Apparently more plugins are involved than I thought.


By deactivating them one by one i was able to narrow it down to the "BattleEngineCore" by Yanfly… (which received an update recently, which might be a good reason why I haven't encountered that problem before). 


If I turn it off there is no crash… but I really hope there is another fix, because without this plugin my whole project would just turn meh.


Then I'd rather let go on this whole Regen idea.


So I hope there's still hope? 


Console Log.png
 
Last edited by a moderator:

Quite.Toxick

Veteran
Veteran
Joined
May 29, 2016
Messages
90
Reaction score
91
First Language
German, English
Primarily Uses
Okay… I just had an inspiration, I guess.


I took the "script" from my RegenX state and put it directly into the Regeneration skill notes, but within note tags from Yanfly's DamageCore:

<Before Eval>


  if (a.isStateAffected(4)) {a.removeState(4);}


    else {if (a.isStateAffected(55)) {a.removeState(55); a.addState(4);}


    else {if (a.isStateAffected(23)) {a.removeState(23); a.addState(56);}


    else {if (a.isStateAffected(56)) {a.resetStateCounts(56);}


    else {a.addState(23);}}}}


</Before Eval>


And this works. 


So I circumvented the PlaceholderState plugin entirely.


This way, however, activation through an actual skill is required. I can't attach it to attacks, as you could with a state (for whatever reason someone would like add a beneficial state to an attack).


Thus, crisis averted  BD


Nevertheless I would be curious what the actual problem is… because I would actually prefer it being a state, as those can be resisted, attached (as mentioned above) and can serve as common reference for several skills, items, etc.


So any held would still be highly appreciated!  :blush:


(sorry for the double post, but i thought a new line of thought might justify a separate box)
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Finally did a test of sorts for the opening of my game... ... including this shot here.
My current status!?
It might be... QUAKE!!! :o
At least that was true several hours ago. :p
Quexp wrote on Shaz's profile.
I absolutely love your profile/pic! :kaoluv:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
I made a battle results screen for my minigame.. any feedback? :)

Forum statistics

Threads
100,686
Messages
978,418
Members
132,310
Latest member
hnhat
Top