• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Ultimate Move Tutor

Resource Ultimate Move Tutor 1.0

SuperSpyroDragon64

Cooltrainer
Member
Joined
Apr 20, 2022
Posts
165
Actually, what you have just checks if pokemon can learn moves but does nothing. You need to copy the whole default move relearner event after it!
And your first line does nothing.
Every Pokemon I show to the tutor is listed as "Can't learn anything". If I select a Pokemon with that move tutor, the game crashes.
 

SuperSpyroDragon64

Cooltrainer
Member
Joined
Apr 20, 2022
Posts
165
Code:
Expand Collapse Copy
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.4]

Script error in event 68 (coords 37,24), map 111 (Starfall Village)
Exception: ArgumentError
Message: Invalid argument passed to method.
Expected nil to be one of [Symbol, GameData::Move, String], but got NilClass.

***Full script:
pbRelearnMoveScreen(pbGetPokemon(1))
Backtrace:
015:Validation:29:in `validate'
103:GameData:92:in `get'
299:UI_MoveRelearner:86:in `pbDrawMoveList'
299:UI_MoveRelearner:46:in `pbStartScene'
299:UI_MoveRelearner:169:in `pbStartScreen'
299:UI_MoveRelearner:196:in `block in pbRelearnMoveScreen'
082:MessageConfig:574:in `pbFadeOutIn'
299:UI_MoveRelearner:193:in `pbRelearnMoveScreen'
(eval):1:in `execute_script'
033:Interpreter:143:in `eval'
Does this help?
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
I need to see the whole event, because something is wrong with it. It doesn't even select a pokemon. You are trying to teach a move to some void.
1663664739894.png

1663664764373.png


it should looks like this (with movetut variable =4 in your case).
 

SuperSpyroDragon64

Cooltrainer
Member
Joined
Apr 20, 2022
Posts
165
I need to see the whole event, because something is wrong with it. It doesn't even select a pokemon. You are trying to teach a move to some void.
View attachment 12723
View attachment 12724

it should looks like this (with movetut variable =4 in your case).
Does this error message help you?

The NPC is still saying Pokemon cannot learn anything, and crashing my game no matter what I show him.
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
Idk I cannot replicate the problem. Did you changed something in the default move relearner script maybe? It looks like it cannot find any move for your pokemon, so it crashes. Check if the default move relearner works, then add things little by little.
 

SuperSpyroDragon64

Cooltrainer
Member
Joined
Apr 20, 2022
Posts
165
Idk I cannot replicate the problem. Did you changed something in the default move relearner script maybe? It looks like it cannot find any move for your pokemon, so it crashes. Check if the default move relearner works, then add things little by little.
I redownloaded Ultimate Move Tutor and reinstalled it into my game, overwriting copies of the files already present. I don't think I changed anything in the plugin's files. I restart the game and do a full recompile, start from a new game, talk to the NPC, and...

This caused an error that looks different. https://pasteboard.co/zEd4BIlzepYY.png

Also this time the game crashed without letting me select a Pokemon. Until now it would only ever say the Pokemon in my party were unable to learn moves.
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
Hmm, I wonder, could you send the first lines of your move_tutor.rb file? This error might happen if BORW switch is on (you are only allowing moves from an array, which is empty by default). Make sure that banvar is 0 and BORW switch is off. But I agree, you shouldn't be able to teach a move to a pokemon that cannot learn any of them.you need to replace !pbGetPokemon(1).can_relearn_move? by can_learn_move(pbGetPokemon(1))==false
in the conditional branch where the guy says sorry, I can't teach anything.
 
Last edited:

SuperSpyroDragon64

Cooltrainer
Member
Joined
Apr 20, 2022
Posts
165
Still crashing.

Code:
Expand Collapse Copy
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Script error in event 28 (coords 12,10), map 22 (Pokémon League entrance)
Exception: NoMethodError
Message: undefined method `can_learn_move' for #<Interpreter @event_id: 28>

***Full script:
pbChoosePokemon(1, 3, proc{ |pkmn|
can_learn_move(pkmn)
  }, true
)

Backtrace:
(eval):2:in `block in execute_script'
283:UI_Party:1134:in `block in pbChooseAblePokemon'
283:UI_Party:1133:in `each'
283:UI_Party:1133:in `pbChooseAblePokemon'
283:UI_Party:1500:in `block in pbChoosePokemon'
082:MessageConfig:575:in `pbFadeOutIn'
283:UI_Party:1496:in `pbChoosePokemon'
(eval):1:in `execute_script'
033:Interpreter:143:in `eval'
033:Interpreter:143:in `execute_script'

Here's my NPC https://pasteboard.co/q73yTaXhA40m.png but nothing seems to be wrong with him that I can see.
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
It can look stupid but did you select a pokemon? You didn't include the part that check if you select nothing.
but yeah, the only thing I could say would be to add a p pbGetPokemon(1) to see if a valid pokemon is really selected.
I don't think you changed anything in ui party but just in case check the lines indicated by the error message.
And small advice, use the default move relearner as a base to build your NPC, you just need to change a few things
 
Last edited:

SuperSpyroDragon64

Cooltrainer
Member
Joined
Apr 20, 2022
Posts
165
It can look stupid but did you select a pokemon? You didn't include the part that check if you select nothing.
but yeah, the only thing I could say would be to add a p pbGetPokemon(1) to see if a valid pokemon is really selected.
I don't think you changed anything in ui party but just in case check the lines indicated by the error message.
And small advice, use the default move relearner as a base to build your NPC, you just need to change a few things
Fixed that and it worked earlier today on an old save file, but when bugtesting on a new save file now there's a new error.

https://pasteboard.co/wmxumwBFZFEY.png

Code:
Expand Collapse Copy
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Script error in event 28 (coords 12,10), map 22 (Pokémon League entrance)
Exception: SystemStackError
Message: stack level too deep

***Full script:
pbChoosePokemon(1, 3, proc{ |pkmn|
can_learn_move(pkmn)
  }, true
)

Backtrace:
015:Validation:18:in `block (2 levels) in validate'
015:Validation:18:in `any?'
015:Validation:18:in `block in validate'
015:Validation:16:in `each'
015:Validation:16:in `map'
015:Validation:16:in `validate'
103:GameData:92:in `get'
132:Species:286:in `get_baby_species'
132:Species:286:in `get_baby_species'
132:Species:286:in `get_baby_species'

What have I done wrong?
 
Last edited:

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
Check if you didn't install the plugin twice. There is a duplicate and the script is looping endlessly
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
check what's displayed in the console when you compile, sometimes something you deleted from your plugin folder is still in the data. If it's not the problem check if you are not using another plugin that could conflict with this one. I assume you still have the default code in your essentials scripts, if it's not the case, go where the error is and compare the code with the original one
 

SuperSpyroDragon64

Cooltrainer
Member
Joined
Apr 20, 2022
Posts
165
check what's displayed in the console when you compile, sometimes something you deleted from your plugin folder is still in the data. If it's not the problem check if you are not using another plugin that could conflict with this one. I assume you still have the default code in your essentials scripts, if it's not the case, go where the error is and compare the code with the original one
Here's the error message I get when I start a new game and talk to the Ultimate Move Tutor. But for some reason he works fine on an old save.

Error message:
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Script error in event 33 (coords 12,10), map 22 (Beta Test Zone)
Exception: SystemStackError
Message: stack level too deep

***Full script:
pbChoosePokemon(1, 3, proc{ |pkmn|
can_learn_move(pkmn)
}, true
)

Backtrace:
015:Validation:18:in `block (2 levels) in validate'
015:Validation:18:in `any?'
015:Validation:18:in `block in validate'
015:Validation:16:in `each'
015:Validation:16:in `map'
015:Validation:16:in `validate'
103:GameData:92:in `get'
132:Species:286:in `get_baby_species'
132:Species:286:in `get_baby_species'
132:Species:286:in `get_baby_species'

He has no "SelfSwitch A version" or variable checks that should be affected by my old save. He turns Variable 34 for Stabmons mode and Variable 35 for the Banlist on when you talk to him, offers to teach your Pokemon a move, and if you say yes he runs this script.

pbChoosePokemon(1, 3, proc{ |pkmn|
can_learn_move(pkmn)
}, true
)

Conditional branch check for variable 1 to check if it's <0, he says "Changed your mind? Alright" if true. If false, Conditional Branch runs the script "pbRelearnMoveScreen(pbGetPokemon(1))".

Conditional branch check for "can_learn_move(pbGetPokemon(1))==false", if true he says "\bSorry, that Pokemon can't learn anything I can teach.".

By the way to prevent crashes when the player teaches his Pokemon a Z-Move and uses it without the stone or a base move to be turned into a Z-Move I added Z-Moves and Dynamax Moves to the blacklist.

Blacklist=[[],[:BREAKNECKBLITZ,:ALLOUTPUMMELING],[:SUPERSONICSKYSTRIKE],[:ACIDDOWNPOUR],[:SUPERSONICSKYSTRIKE],[:TECTONICRAGE],[:CONTINENTALCRUSH],[:SAVAGESPINOUT],[:NEVERENDINGNIGHTMARE],[:CORKSCREWCRASH],[:INFERNOOVERDRIVE],[:HYDROVORTEX],[:BLOOMDOOM],[:GIGAVOLTHAVOC],[:SHATTEREDPSYCHE],[:SUBZEROSLAMMER],[:DEVASTATINGDRAKE],[:BLACKHOLEECLIPSE],[:TWINKLETACKLE],[:CATASTROPIKA],[:TENMILLIONVOLTTHUNDERBOLT],[:STOKEDSPARKSURFER],[:EXTREMEEVOBOOST],[:PULVERIZINGPANCAKE],[:GENESISSUPERNOVA],[:SINISTERARROWRAID],[:MALICIOUSMOONSAULT],[:OCEANICOPERETTA],[:SPLINTEREDSTORMSHARDS],[:LETSSNUGGLEFOREVER],[:CLANGOROUSSOULBLAZE],[:GUARDIANOFALOLA],[:SEARINGSUNRAZESMASH],[:MENACINGMOONRAZEMAELSTROM],[:LIGHTTHATBURNSTHESKY],[:SOULSTEALING7STARSTRIKE],[:MAXGUARD],[:MAXKNUCKLE],[:MAXSTEELSPIKE],[:MAXOOZE],[:MAXQUAKE],[:MAXAIRSTREAM],[:MAXWYRMWIND],[:MAXPHANTASM],[:MAXFLUTTERBY],[:MAXDARKNESS],[:MAXSTRIKE],[:MAXFLARE],[:MAXGEYSER],[:MAXROCKFALL],[:MAXHAILSTORM],[:MAXOVERGROWTH],[:MAXLIGHTNING],[:MAXSTARFALL],[:MAXMINDSTORM],[:GMAXVINELASH],[:GMAXWILDFIRE],[:GMAXCANNONADE],[:GMAXVOLCALITH],[:GMAXDRUMSOLO],[:GMAXFIREBALL],[:GMAXHYDROSNIPE],[:GMAXVOLTCRASH],[:GMAXMALODOR],[:GMAXSTUNSHOCK],[:GMAXBEFUDDLE],[:GMAXSMITE],[:GMAXCUDDLE],[:GMAXGOLDRUSH],[:GMAXSTONESURGE],[:GMAXSTEELSURGE],[:GMAXCENTIFERNO],[:GMAXSANDBLAST],[:GMAXFOAMBURST],[:GMAXWINDRAGE],[:GMAXGRAVITAS],[:GMAXFINALE],[:GMAXSWEETNESS],[:GMAXTARTNESS],[:GMAXREPLENISH],[:GMAXDEPLETION],[:GMAXRESONANCE],[:GMAXCHISTRIKE],[:GMAXTERROR],[:GMAXSNOOZE],[:GMAXMELTDOWN],[:GMAXONEBLOW],[:GMAXRAPIDFLOW],[]]
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
It could be a weird interaction with ZUD plugin. What I would advise is, test if the same setup work in vanilla essentials then add plugins one by one until it crashes. You probably have to merge the faulty codes together.
Another thing you can try is to use the default move relearner script instead of the can_learn_move one and see if it works (it will crash if you try to teach moves to something like magikarp but it's just for the test).
The weird thing is that the error doesn't come directly from my plugin and your setup seems correct so I'm a little lost here
 

SuperSpyroDragon64

Cooltrainer
Member
Joined
Apr 20, 2022
Posts
165
When I run the game with just
meta.txt
move_check.rb
move_tutor.rb
in the location Downloads\Pokemon Citrine\Plugins\Move_tutor

The plugin does not load and the NPC meant to use the plugin crashes the game.

When I run the game with these files and a zip file containing a copy of these files in the plugin folder, the NPC works... sometimes.

Sometimes the code runs whether there's a zip in there or not, and talking to the NPC in an existing save file is fine, but starting a new game and talking to him causes this error:

[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Script error in event 33 (coords 12,10), map 22 (Beta Test Zone)
Exception: SystemStackError
Message: stack level too deep

***Full script:
pbChoosePokemon(1, 3, proc{ |pkmn|
can_learn_move(pkmn)
}, true
)

Backtrace:
015:Validation:18:in `block (2 levels) in validate'
015:Validation:18:in `any?'
015:Validation:18:in `block in validate'
015:Validation:16:in `each'
015:Validation:16:in `map'
015:Validation:16:in `validate'
103:GameData:92:in `get'
132:Species:286:in `get_baby_species'
132:Species:286:in `get_baby_species'
132:Species:286:in `get_baby_species'


Please tell me how to make your code work.
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
Tbh as I can't reproduce the error I don't know from where it comes. When you run it alone are you sure there wasn't anything else active? Removing plugins from the folder do not remove them from the game, delete plugin.rxdata in your data folder to force compile. Did you try to run the default move relearner npc with the stabmon switch active?
 

SuperSpyroDragon64

Cooltrainer
Member
Joined
Apr 20, 2022
Posts
165
I'm sure there was nothing else active that would be causing any issues because removing them didn't solve the issue. https://pasteboard.co/2DfHb7jI5B98.png Could the problem be the move tutor NPC?

Every time I turn the game on I hold shift so the game recompiles everything. But I'll try deleting plugin.rxdata like you said...

Hey, it worked! I can use the ultimate move tutor! On my existing save file. Let me test something. I'll make a new save file, select my name and gender and starter Pokemon, go to the move tutor- and it crashes.

[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Script error in event 33 (coords 12,10), map 22 (Beta Test Zone)
Exception: SystemStackError
Message: stack level too deep

***Full script:
pbChoosePokemon(1, 3, proc{ |pkmn|
can_learn_move(pkmn)
}, true
)

Backtrace:
015:Validation:18:in `block (2 levels) in validate'
015:Validation:18:in `any?'
015:Validation:18:in `block in validate'
015:Validation:16:in `each'
015:Validation:16:in `map'
015:Validation:16:in `validate'
103:GameData:92:in `get'
132:Species:286:in `get_baby_species'
132:Species:286:in `get_baby_species'
132:Species:286:in `get_baby_species'


I just don't know what went wrong. Could it be this part? The blacklist doesn't seem to actually work and ban the Gmax/Z-moves it's supposed to now that I'm looking at Pidgey's list of moves and seeing stuff there that should be banned.

Blacklist=[:BREAKNECKBLITZ],[:ALLOUTPUMMELING],[:SUPERSONICSKYSTRIKE],[:ACIDDOWNPOUR],[:SUPERSONICSKYSTRIKE],[:TECTONICRAGE],[:CONTINENTALCRUSH],[:SAVAGESPINOUT],[:NEVERENDINGNIGHTMARE],[:CORKSCREWCRASH],[:INFERNOOVERDRIVE],[:HYDROVORTEX],[:BLOOMDOOM],[:GIGAVOLTHAVOC],[:SHATTEREDPSYCHE],[:SUBZEROSLAMMER],[:DEVASTATINGDRAKE],[:BLACKHOLEECLIPSE],[:TWINKLETACKLE],[:CATASTROPIKA],[:TENMILLIONVOLTTHUNDERBOLT],[:STOKEDSPARKSURFER],[:EXTREMEEVOBOOST],[:PULVERIZINGPANCAKE],[:GENESISSUPERNOVA],[:SINISTERARROWRAID],[:MALICIOUSMOONSAULT],[:OCEANICOPERETTA],[:SPLINTEREDSTORMSHARDS],[:LETSSNUGGLEFOREVER],[:CLANGOROUSSOULBLAZE],[:GUARDIANOFALOLA],[:SEARINGSUNRAZESMASH],[:MENACINGMOONRAZEMAELSTROM],[:LIGHTTHATBURNSTHESKY],[:SOULSTEALING7STARSTRIKE],[:MAXGUARD],[:MAXKNUCKLE],[:MAXSTEELSPIKE],[:MAXOOZE],[:MAXQUAKE],[:MAXAIRSTREAM],[:MAXWYRMWIND],[:MAXPHANTASM],[:MAXFLUTTERBY],[:MAXDARKNESS],[:MAXSTRIKE],[:MAXFLARE],[:MAXGEYSER],[:MAXROCKFALL],[:MAXHAILSTORM],[:MAXOVERGROWTH],[:MAXLIGHTNING],[:MAXSTARFALL],[:MAXMINDSTORM],[:GMAXVINELASH],[:GMAXWILDFIRE],[:GMAXCANNONADE],[:GMAXVOLCALITH],[:GMAXDRUMSOLO],[:GMAXFIREBALL],[:GMAXHYDROSNIPE],[:GMAXVOLTCRASH],[:GMAXMALODOR],[:GMAXSTUNSHOCK],[:GMAXBEFUDDLE],[:GMAXSMITE],[:GMAXCUDDLE],[:GMAXGOLDRUSH],[:GMAXSTONESURGE],[:GMAXSTEELSURGE],[:GMAXCENTIFERNO],[:GMAXSANDBLAST],[:GMAXFOAMBURST],[:GMAXWINDRAGE],[:GMAXGRAVITAS],[:GMAXFINALE],[:GMAXSWEETNESS],[:GMAXTARTNESS],[:GMAXREPLENISH],[:GMAXDEPLETION],[:GMAXRESONANCE],[:GMAXCHISTRIKE],[:GMAXTERROR],[:GMAXSNOOZE],[:GMAXMELTDOWN],[:GMAXONEBLOW],[:GMAXRAPIDFLOW]

edit: tried it like this, got a new error.


BORW=59
Blacklist=[[:BREAKNECKBLITZ,:ALLOUTPUMMELING,:SUPERSONICSKYSTRIKE,:ACIDDOWNPOUR,:SUPERSONICSKYSTRIKE,:TECTONICRAGE,:CONTINENTALCRUSH,:SAVAGESPINOUT,:NEVERENDINGNIGHTMARE,:CORKSCREWCRASH,:INFERNOOVERDRIVE,:HYDROVORTEX,:BLOOMDOOM,:GIGAVOLTHAVOC,:SHATTEREDPSYCHE,:SUBZEROSLAMMER,:DEVASTATINGDRAKE,:BLACKHOLEECLIPSE,:TWINKLETACKLE,:CATASTROPIKA,:TENMILLIONVOLTTHUNDERBOLT,:STOKEDSPARKSURFER,:EXTREMEEVOBOOST,:PULVERIZINGPANCAKE,:GENESISSUPERNOVA,:SINISTERARROWRAID,:MALICIOUSMOONSAULT,:OCEANICOPERETTA,:SPLINTEREDSTORMSHARDS,:LETSSNUGGLEFOREVER,:CLANGOROUSSOULBLAZE,:GUARDIANOFALOLA,:SEARINGSUNRAZESMASH,:MENACINGMOONRAZEMAELSTROM,:LIGHTTHATBURNSTHESKY,:SOULSTEALING7STARSTRIKE,:MAXGUARD,:MAXKNUCKLE,:MAXSTEELSPIKE,:MAXOOZE,:MAXQUAKE,:MAXAIRSTREAM,:MAXWYRMWIND,:MAXPHANTASM,:MAXFLUTTERBY,:MAXDARKNESS,:MAXSTRIKE,:MAXFLARE,:MAXGEYSER,:MAXROCKFALL,:MAXHAILSTORM,:MAXOVERGROWTH,:MAXLIGHTNING,:MAXSTARFALL,:MAXMINDSTORM,:GMAXVINELASH,:GMAXWILDFIRE,:GMAXCANNONADE,:GMAXVOLCALITH,:GMAXDRUMSOLO,:GMAXFIREBALL,:GMAXHYDROSNIPE,:GMAXVOLTCRASH,:GMAXMALODOR,:GMAXSTUNSHOCK,:GMAXBEFUDDLE,:GMAXSMITE,:GMAXCUDDLE,:GMAXGOLDRUSH,:GMAXSTONESURGE,:GMAXSTEELSURGE,:GMAXCENTIFERNO,:GMAXSANDBLAST,:GMAXFOAMBURST,:GMAXWINDRAGE,:GMAXGRAVITAS,:GMAXFINALE,:GMAXSWEETNESS,:GMAXTARTNESS,:GMAXREPLENISH,:GMAXDEPLETION,:GMAXRESONANCE,:GMAXCHISTRIKE,:GMAXTERROR,:GMAXSNOOZE,:GMAXMELTDOWN,:GMAXONEBLOW,:GMAXRAPIDFLOW]]
Whitelist=[[],[:OUTRAGE],[:OUTRAGE,:DRAGONASCENT]]

Exception `NoMethodError' at [Ultimate Move Tutor] move_check.rb:59 - undefined method `include?' for nil:NilClass
Exception `EventScriptError' at 033:Interpreter:182 - EventScriptError
 
Last edited:

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
the script wasn't made with zud plugin so maybe gmax moves are coded differently. But even if there are moves that don't exist in your game, it shouldn't crash. For the banlist, when you changed it, did you set your variable 35 back to 0? because actually, it sees an empty thing instead of your banlist.
 
Back
Top