Yanfly Passive States giving error

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I have had this script in the project from the beginning, and passive states were allotted then. I have play tested on several occasions, the latest being yesterday morning. There has never been a problem. But then the following message appeared, before I got to the title screen:
Capture.PNG

All that I had done (that I remember) between the successful and unsuccessful play tests were the following:
Created a new battle animation for a boss.
Imported two new SEs.
Wrote some NPC dialogues

Because I do not know what line 198 is trying to do, I don't know where to begin any bug hunting.

Can anyone make any suggestions about what might be happening?
Thanks.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Are you sure that's the script exactly as you have it?

Line 198 in the script you linked to is this:
Code:
for state_id in self.actor.passive_states
but the error you have is 'no method each'. That line does not use the .each method.

Just in case for x in y implicitly calls .each, it is saying the actor it's trying to access doesn't exist. Just check all your actors and make sure they all look okay.

Have you changed your party lineup in the System Tab or deleted any actor slots? Resequenced any scripts?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
If it worked before, then it is either an incompatibility with a script added later or some data change (like removing a database entry that was configured to be used.

I suggest you use the backtracer and give us a screenshot of the full error sequence (the backtracer is linked in my tutorial "how to use a script" in my signature), then we might be able to help better
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Shaz That is what my line 198 shows
upload_2018-9-22_10-8-47.png

No actors have been changed, deleted or added. No scripts have been resequenced.

@Andar This is what appears in the console
upload_2018-9-22_10-18-51.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
@Kes :
just for clarification - that is the output in the moment the error message appears???
because all that are just messages printed there from commands inside their scripts.
With the backtracer active, it should repeat the error message you got and then follow it with a stacktrace of script names and line numbers similiar to the default console output of MV...
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
As Shaz said, line 198 doesn't have the word 'each', it must be pointed into somewhere else.
My 'debug' method might not be an ordinary one, but try this

> CTRL + SHIFT + F
> Type '.each'
> It will show result of "<script slot name> (line number)"
> Try to find one that has line number 198

Not sure if it will help, but worth to try as I don't think you will be willing to share demo.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Andar That is exactly what the console showed. I replaced the Main script with the backtracer one as per the instruction on Hime's website. Am I supposed to do something else as well?

@TheoAllen I tried that and the only line 198 with each in it was Yanfly's Target Manager
upload_2018-9-22_11-57-5.png

I disabled it, but it made no difference, the error message still occurred.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
Welp, let's try another method. This might seems silly, but might work
First use my backtracer
Second, add this
Code:
class NilClass
  def each
    backtrace
    msgbox "Check console"
    exit
  end
end
Third, trigger the error.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@TheoAllen

EDIT
I went with google translate for the instructions and placed it above Main but under all custom scripts.
Here is what was given in the txt file
Created on : 2018-06-28 13:54:49 +0100
=================================================
extra kill count --- Line: 11:in `execute_damage'
Game_Battler --- Line: 519:in `item_apply'
Yanfly Battle Engine --- Line: 1415:in `item_apply'
Yanfly Elemental Pop-ups --- Line: 147:in `item_apply'
Yanfly Battle Engine --- Line: 3001:in `apply_item_effects'
Scene_Battle --- Line: 597:in `invoke_item'
Yanfly Battle Engine --- Line: 3109:in `invoke_item'
Yami Battle Symphony --- Line: 3350:in `invoke_item'
Yami Battle Symphony --- Line: 847:in `block (2 levels) in action_skill_effect'
Yami Battle Symphony --- Line: 847:in `times'
Yami Battle Symphony --- Line: 847:in `block in action_skill_effect'
Yami Battle Symphony --- Line: 844:in `each'
Yami Battle Symphony --- Line: 844:in `action_skill_effect'
Yami Battle Symphony --- Line: 528:in `block in perform_actions_list'
Yami Battle Symphony --- Line: 516:in `each'
Yami Battle Symphony --- Line: 516:in `perform_actions_list'
Yami Battle Symphony --- Line: 860:in `action_autosymphony'
Yami Battle Symphony --- Line: 531:in `block in perform_actions_list'
Yami Battle Symphony --- Line: 516:in `each'
Yami Battle Symphony --- Line: 516:in `perform_actions_list'
Yami Battle Symphony --- Line: 3316:in `block in use_item'
Yami Battle Symphony --- Line: 3314:in `each'
Yami Battle Symphony --- Line: 3314:in `use_item'
Yanfly Battle Engine --- Line: 2990:in `execute_action'
Yami Battle Symphony --- Line: 3373:in `execute_action'
Yanfly Lunatic States --- Line: 642:in `execute_action'
Vlue Basic Combos --- Line: 58:in `process_action'
Scene_Battle --- Line: 48:in `update'
Yanfly Command autobattle --- Line: 406:in `update'
Scene_Base --- Line: 14:in `main'
Moghunter weather effects --- Line: 817:in `main'
SceneManager --- Line: 23:in `run'
Khas Ultra Lighting --- Line: 2003:in `run'
Main --- Line: 7:in `block in <main>'
F12 Fix --- Line: 47:in `call'
F12 Fix --- Line: 47:in `block in rgss_main'
:1:in `block in rgss_main'
:1:in `loop'
:1:in `rgss_main'
F12 Fix --- Line: 37:in `rgss_main'
Main --- Line: 7:in `<main>'
ruby:in `eval'

Though to be honest, given the date of the file, I think this is an old one.

EDIT 2
When I deleted the txt file and ran it again, there wasn't a new one, so that indeed must have been generated by something else months ago. I assumed that I would find the printout in the game folder as the console still just showed what was in the screenpost I posted above. Do I look elsewhere for it?
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
@Kes my question would be, did you trigger the error, and the log still shown the way you posted?
You seems to have weird case
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@TheoAllen In order to trigger the error, all I have to do is to try and play the game and before the title screen comes up, I get the error, and the log still printed as shown in the earlier screen shot.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
If even console fail to trace the error, then I give up. Without the game context, there is nothing we could do.
But by your wording, you can't even get to play the game because it can't even show title screen?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@TheoAllen That's right, it can't even show the title screen.

I know this is a big ask, so please feel free to say no, but would you be prepared to look at the project? It's only about 73Mb, so quite small.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
@Kes it's alright, send me PM.
 
  • Like
Reactions: Kes

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
@TheoAllen In order to trigger the error, all I have to do is to try and play the game and before the title screen comes up, I get the error, and the log still printed as shown in the earlier screen shot.
If the error message is the same as in the first post, the backtracer is NOT active.
If the backtracer script is active, then that windows that opens with the error message will only say "an error has occured, open console for details" (or something similiar, It's been some time since I last seen it).

More specifically, the backtracer script has a special installation instruction to work, because it does NOT go in the regular materials section of the script editor, it needs to replace the main.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
TIL, the line "for state_id in self.actor.passive_states" is iteration that is same as using '.each' function, which is legit why the error thrown that way. I sent the solution in PM, should works, unless it doesn't.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Andar As I said in post #7, I did replace Main with the backtracer. It didn't help.

However, @TheoAllen's solution works beautifully and I am now back on track.

Thank you both for your help with this. Much appreciated.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
For those who are curious, to put it simply, from the bunch of scripts thrown together into the project, it somehow messed with database load order that the passive state notetag didn't load properly (it just how Yanfly did their script). I managed to fool around by forcing them to load the notetag when the function '.passive_states' is called rather than diagnosing what was actually going on.

@Kes now time to report it to the mod so it can be closed
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top