C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
I am using Yami's Skill Equip (http://forums.rpgmakerweb.com/index.php?/topic/6727-skill-equip/) and Engr. Adiktuzmiko's Passive States Add-on (http://forums.rpgmakerweb.com/index.php?/topic/25936-yes-skill-equip-add-on-passive-states/).

Both scripts work fantastic! However, I have come across a small problem with, I think, the Passive States add-on script:

5R2PwTq.png
This happens when unequipping a passive skill that increases the character's max HP by 150%. It eventually goes away and reverts back to 200 HP, when it refreshes after twenty steps. However, in that time, it is possible to enter battle like this!

I have tested both scripts in a clean project and the issue still occurs.

All I'm looking for is, hopefully, a small fix that makes it so that when passive skills like this are unequipped, the effects of those skills are removed immediately.

If you need anymore information, just let me know.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,032
First Language
Tagalog
Primarily Uses
RMVXA
You could maybe try this snippet

Code:
class Game_Actor    alias refresh_passive_states_adik_fix refresh_passive_states_adik  def refresh_passive_states_adik    refresh_passive_states_adik_fix    refresh  endend
 

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
Engr. Adiktuzmiko,

Getting a couple of errors.

The first (done in the clean project with only your script plus the original script):

Script 'Game_Actor' line 171: NoMethod Error occured.

undefined method `collect' for nil:NilClass
The second issue, in my other project, seems to be causing a compatibility issue with Fomar's Dual Wield Free Hands script (http://pastebin.com/raw.php?i=sewHVQZ7):

Script 'Fomar0153_Dual_Wield_Free_Hands' line 43: NoMethodError occured.

undefined method `each_with_index' for nil:NilClass
Thoughts? I hate to throw compatibility issues into the mix. Hope it isn't too much of a problem.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,032
First Language
Tagalog
Primarily Uses
RMVXA
Those aren't from my script, mine doesn't have any collect method, nor does it use it...


PS: Make sure the snippet was below the add-on script btw.
 
Last edited by a moderator:

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
The snippet was below the add-on script.

Just tested in another clean project. Using only the original Skill Equip script and Add-on script, making no configurations whatsoever to them. Testing those two alone works fine. Once I add the snippet below the add-on, I get that same error (the first one I listed).
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,032
First Language
Tagalog
Primarily Uses
RMVXA
Hmmm. weird... the line in question has something to with the equip variable of Game_Actor... It somehow takes the equips variable as nil or something.


When are you actually having the error?
 
Last edited by a moderator:

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
As soon as I select "New Game" from the title screen.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,032
First Language
Tagalog
Primarily Uses
RMVXA
Ah yes... It makes sense now, seems like I'm causing it to refresh before equips are even set up...

Try to change refresh to refresh unless @equips.nil?
 

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
Like this?

class Game_Actor alias refresh_passive_states_adik_fix refresh_passive_states_adik def refresh_passive_states_adik refresh_passive_states_adik_fix refresh unless @equips.nil endendI think I might be doing something wrong, because this returns this error (again, as soon as I hit "New Game"):

Script 'Refresh' line 6: NoMethodError occured.

undefined method `nil' for nil:NilClass
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,032
First Language
Tagalog
Primarily Uses
RMVXA
Uhm, I said .nil? You fprgot the question mark
 

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
Oops. Thought that was just part of the sentence.

Adding a question mark causes a SystemStack Error. stack level too deep. Again, right when I select New Game.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,032
First Language
Tagalog
Primarily Uses
RMVXA
Hmmm...

Then delete refresh and just use these directly

hp = [[hp,mhp].min,0].max

mp = [[mp,mmp].min,0].max
 

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
Apologies for my continued ignorance (I really having no coding knowledge whatsoever), but what do you mean by use directly?

Like this?

class Game_Actor alias refresh_passive_states_adik_fix refresh_passive_states_adik def refresh_passive_states_adik refresh_passive_states_adik_fix hp = [[hp,mhp].min,0].max mp = [[mp,mmp].min,0].max endendUsing this snippet causes this error upon selecting New Game:

Script 'Game_Actor' line 336: TypeError occured.

no implicit conversion from nil to integer

Thanks for bearing with me, by the way.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,032
First Language
Tagalog
Primarily Uses
RMVXA
Hmmmm... So its running even while actor isnt yet initialized fully... Hmmm...

Try to add this before the hp and mp lines

return if hp.nil?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,032
First Language
Tagalog
Primarily Uses
RMVXA
Which error?

Or you could try mhp.nil?
 
Last edited by a moderator:

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
Which error?
Script 'Game_Actor' line 336: TypeError occured.

no implicit conversion from nil to integer

Here is the snippet I used, just to make sure I'm configuring it correctly:

class Game_Actor alias refresh_passive_states_adik_fix refresh_passive_states_adik def refresh_passive_states_adik refresh_passive_states_adik_fix return if hp.nil? hp = [[hp,mhp].min,0].max return if mp.nil? mp = [[mp,mmp].min,0].max endendUsing mhp.nil? yields that same error.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,032
First Language
Tagalog
Primarily Uses
RMVXA
Nooooo... It should just be

return if mhp.nil?

hp = blah

mp =blah

What is that line in Game_Actor?
 

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
Nooooo... It should just be

return if mhp.nil?

hp = blah

mp =blah
Ah, I see. So like this, then:

class Game_Actor alias refresh_passive_states_adik_fix refresh_passive_states_adik def refresh_passive_states_adik refresh_passive_states_adik_fix return if mhp.nil? hp = [[hp,mhp].min,0].max mp = [[mp,mmp].min,0].max endendStill returns the same error.

This is line 336 in Game_Actor:

$data_classes[@class_id]
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,032
First Language
Tagalog
Primarily Uses
RMVXA
Then just do this, for quick fix, not really recommended but oh well

Code:
class Game_Actor    alias refresh_passive_states_adik_fix refresh_passive_states_adik  def refresh_passive_states_adik    refresh_passive_states_adik_fix    begin      hp = [[hp,mhp].min,0].max      mp = [[mp,mmp].min,0].max    rescue      p "Debug: it would error so we stopped it so the game can continue"    end   endend
 

Latest Threads

Latest Posts

Latest Profile Posts

%2FswUmX.png


I'm excited to announce I've received a great deal of feedback from a fellow tactics fan!
bandicam 2023-05-29 22-28-54-159.png
When will I be able to play my own game? There is a lot of work, but I am working hard towards the goal
Add Monser2.png!!
index.php

Happy Memorial Day to those on here like me who live in the United States. :)
Alright got a video of a review of a fake PS5 here. I've decided I'm only going to do maybe 10 videos about bootleg consoles, and then I think I'm going to move on, and post YouTube videos of old video game TV advertisements for franchises like Mario and Sonic and Spyro and all that for a little nostalgia. :cool:

Forum statistics

Threads
131,528
Messages
1,220,549
Members
173,221
Latest member
ZecaVn
Top