• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Ame broke more things

AmethystRain

pixie-powered judgment!
253
Posts
11
Years
  • Seen Nov 28, 2022
No, jk, I don't know if I actually did break them. I'm just running into a couple crashes, was hoping someone could help me sort through them:

Here's the first one, and more critical of the two. It happens when the player speaks to a dependent event on a map other than the one in which she follows the player from. I have two other dependent events earlier in the game neither of which have this problem (although one of those never leaves its own map).

Here's the error:

---------------------------
Pokemon Reborn
---------------------------
Exception: NoMethodError
Message: undefined method `unlock' for nil:NilClass
Interpreter:512:in `command_end'
Interpreter:295:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
Scene_Map:65:in `loop'

The event:
http://prntscr.com/hxdfj
The common event:
http://prntscr.com/hxdjh
The call:
http://prntscr.com/hxdon


########################################

Secondly, I have an issue with roaming Pokemon. I haven't successfully found the Pokemon myself yet but one of my players did. He reported this crash:

http://img443.imageshack.us/img443/6061/6255bde3ea9f4e4780d2f15.png

Here's the line 235 it specifies (not that I've (knowingly) edited it):
http://prntscr.com/hxe3p
The part that I did edit:
http://prntscr.com/hxe77



Any ideas what I'm doing wrong? :x
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
1. Don't have dependent events which can go to a different map. They just don't work properly, obviously. Plus there's a horrible glitch when crossing over map boundaries.

2. One selling point of v10 is that roaming Pokémon actually work. This time. I've made that claim so often, but never actually tested them... but this time I have!
 

AmethystRain

pixie-powered judgment!
253
Posts
11
Years
  • Seen Nov 28, 2022
Auauau, nonono, actually I figured it out this morning o~o
Apparently as long as there's an event with the same ID on the map that the event is taken to, it's all good~ My dependent was 21 so most of the maps I tried it on didn't have that many. Made some spares and it worked great.
Map boundaries I'm sure are a problem. I'll just keep it in mind to avoid those. ^^

As for the roaming, good to know that wasn't my fault at least. \o/
 

AmethystRain

pixie-powered judgment!
253
Posts
11
Years
  • Seen Nov 28, 2022
I'm just gonna keep reusing this topic for issues specific to my project, so I don't clutter stuff across 83984 threads.

Anyway, uh, I ran into this crash today:
http://prntscr.com/myje9
It happens whenever a certain map loads (be that via connections, or if I try to warp to it.) It was working yesterday, and to my knowledge I haven't edited anything on that map, so I'm confused. Any help interpreting what the source of this problem might be? :c
 

FL

Pokémon Island Creator
2,443
Posts
13
Years
  • Seen Apr 16, 2024
I'm just gonna keep reusing this topic for issues specific to my project, so I don't clutter stuff across 83984 threads.

Anyway, uh, I ran into this crash today:
http://prntscr.com/myje9
It happens whenever a certain map loads (be that via connections, or if I try to warp to it.) It was working yesterday, and to my knowledge I haven't edited anything on that map, so I'm confused. Any help interpreting what the source of this problem might be? :c
This error occurs when you have a event with a condition with a variable value (Number) and this variable was a word (String). Example: You have a event that only start when the variable 40 has 1 or more, but the variable 40 has the rival name.

Note that some strings may have only numbers. To correctly check, just go in debug and enter in the variables (the part that you can edit the variables values). If the variable has a number value (like 25), but when you click the value goes to 0, so it's a string. But if the string is "0", you unable to find with this method.
 

AmethystRain

pixie-powered judgment!
253
Posts
11
Years
  • Seen Nov 28, 2022
Aa...
...aa...
...aa...
...aa...
*checks 100+ events on the map*
...aaaha!

Found it~ And fixed. Looks like I must have forgotten to set the right variable on this page for the condition, and the variable it was on never had a string in it before. Much thanks. c:
 

AmethystRain

pixie-powered judgment!
253
Posts
11
Years
  • Seen Nov 28, 2022
Okay, new question.

So I'm working with puddles and terrain tags. Like in third gen, you know those little pools of water, you step on them and your reflection shows, but you can't surf or fish or anything, right? Terrain Tag 6 has the reflecting still-water, but it's surfable. So I checked to see if anyone else had asked about terrain tags for puddles, and they had.

Maruno told them this:
You'll need to make a new terrain tag that just shows reflections, then.

Firstly, read up on terrain tags in the wiki. Note that the editor can give tiles any terrain tag at all, not just the ones listed in the table there, so it's easy to just give your puddles terrain tag 14.

As far as I can imagine, all you need to do is edit a single line near the top of Spriteset_Map:

Code:
if @event.map.terrain_tag(@event.x,nextY)!=6 && @event.map.terrain_tag(@event.x,nextY)!=14

Add the stuff in red. I think that's all you really need to do. If you want other effects, such as changing the battle backgrounds to depict a puddle environment, you'll need to make a few other changes too.

Cool, I thought, let's go do that. So I check out Spriteset Map, and as far as I can tell, it's been changed a bit since then.
The line that I think was previously referenced now looks like this:
if @event.map.terrain_tag(@event.x,nextY)!=PBTerrain::StillWater

...Huh. Okay, well, I tried throwing on that bit in red anyway, and some... very strange things happened. Tiles disappearing and the screen going to black. Well, that must be wrong.

What would be the proper way to go about setting up a new terrain tag for puddles, given this code's apparent revision? Or am I just ah, missing it?
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
That's what you get for following old instructions. I've added two new terrain tags since then (SootGrass and Bridge), and you used SootGrass which does what you've experienced.

Look in class PBTerrain for the first unused number (probably 16), and use that instead. I stand by my comment that that's probably all you need to do.
 

AmethystRain

pixie-powered judgment!
253
Posts
11
Years
  • Seen Nov 28, 2022
Oh. Well, now don't I feel stupid.
I wanted to check out that class before, but I wasn't sure which script section it was in (just now found it on a guess), so for my future reference is there some way I can search to see where a certain class is defined...?

*is still stupid anyway for having read the wiki first and not connected the dots with the soot grass thing listed there, herp derp*
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
With the Script Editor (F11) open, press Ctrl+Shift+F and search for the phrase "class PBTerrain" (or whatever you're looking for. You can also right-click in the list on the left and choose "Find" for the same option.
 

AmethystRain

pixie-powered judgment!
253
Posts
11
Years
  • Seen Nov 28, 2022
Oooh. Okie, that's neat. Hopefully I can be less tedious in my asky things now. Thanks~
 

AmethystRain

pixie-powered judgment!
253
Posts
11
Years
  • Seen Nov 28, 2022
Commence tediousness.

---------------------------
Pokemon Reborn
---------------------------
Exception: RuntimeError
Message: Script error within event 200, map 36 (Obsidia Ward):
Exception: NoMethodError
Message: Section121:368:in `pbDayCareGenerateEgg'undefined method `abilityIndex' for #<PokeBattle_Pokemon:0xb3db0e0>
***Full script:
pbDayCareGenerateEgg
$PokemonGlobal.daycareEgg=0
$PokemonGlobal.daycareEggSteps=0
Interpreter:243:in `pbExecuteScript'
(eval):1:in `pbExecuteScript'
Interpreter:1600:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Interpreter:276:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
I've got a player reporting this when withdrawing an Egg from the daycare. Confirmed to be just in my project- the original Essentials works fine- but I tried copying over the script for Egg Generation line for line from the fresh Essentials (theoretically fixing any accidental changes to the script) and this is still happening. The Daycare-guy event who gives you the egg is also directly copied from the unmodified version.

We're getting this error with Zubat (f) x Hoothoot, Zubat x Zubat, Zubat x Crobat and Ninetales x Ninetales.
So far the only breeding pairs we've found that haven't crashed have used Ditto. So that's strange.

Anyone have an idea what might be going on here?
 
189
Posts
14
Years
  • Seen Nov 23, 2023
I'm not that well versed in scripts, but I would hazard a guess that the script is generating an ability index that is higher than the number of abilities the generated Pokémon possesses. For instance, a Pokémon that only has Levitate which is being generated with an index that points to one of the unused slots, or something.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Your problem is that you copied some scripts from Essentials without copying others. They're all interconnected. There's a def abilityIndex in the script section PokeBattle_Pokemon, which you won't have, which the breeding script you copied needs as part of its ability inheritance.

The easier solution is to just delete the ability inheritance part of the breeding script.
 

AmethystRain

pixie-powered judgment!
253
Posts
11
Years
  • Seen Nov 28, 2022
^ That worked, btw c:

Anyway, um, I have a very specific problem now. One of my players posted about an error they got:
RebornHelp_zps007e40c9.jpg


I instructed him to try redownloading, and while his save file did indeed load that time, Map Connections in his save file ONLY have been hit pretty hard.
i.e my save file, connections are perfectly fine; when I switch to his:
RebornWhat_zpsb93755cb.jpg

They no longer sync up as the map scrolls, and in fact become extremely unstable potentially to the point of crashing his game + making it visually unnavigable. Teleporting between connections DOES still work, however. It just looks awful now.

I found where in the script this error is caused:
In PokemonLoad:
Code:
  if !$game_map.events # Map wasn't set up
          $game_map=nil
          $scene=nil
          Kernel.pbMessage(_INTL("The map is corrupt. The game cannot continue."))
          return
However, I'm not really sure what that condition means in spite of the comment. The Map obviously existed, otherwise he wouldn't have been able to save there. And no other players have reported a problem with this map.

This person has almost 70 hours of gameplay time logged onto his save file (?!), so I really would like to do anything possible to make sure he doesn't have to lose his data. Does anyone have an idea what might have caused this error in the first place, or how it can be fixed now?
 

Nickalooose

--------------------
1,309
Posts
16
Years
  • Seen Dec 28, 2023
Try using the older version, then saving on a different map (not next to or on, the broken one) then updating... My theory is, that once he saved, your broken map was 20x20 and your updated version, the map is 20x25... So his game and new connections won't pan out properly since his game hasn't had a hard refresh or any refresh at all since he's right next to the "new" map... Another way to fix it... Start a new game... It's not a scripting problem.
 

FL

Pokémon Island Creator
2,443
Posts
13
Years
  • Seen Apr 16, 2024
The variable '$game_map.events' that contains the NPC positions and other thing in this map aren't working for some reason, possible because of corruption, but there some ways to fix the savefile. Try to enter in a house (a map without connections) and exit, this will make the connections and maps to refresh. Check also if the game version that the save is loaded and the save is created are the same.
 

AmethystRain

pixie-powered judgment!
253
Posts
11
Years
  • Seen Nov 28, 2022
Thanks for the suggestions guys,
@Nickaloose-
The map dimension didn't change; there was no updating involved. He saved in a building on the 8th release of my game at the end of a play session, and loaded the 8th release of my game to play later and it was broken. Unless he acquired RMXP and was playing with the maps (which I think he would have told me), he doesn't have a way to change the map size.

@FL.
The NPC thing sounds VERY possible. The entering a connection-less map was my first idea, but I'm afraid various combinations of saving there, resetting, exiting, etc, have done nothing to fix the connections.

One strange thing I probably should have made clear- the map on which his game became corrupted actually was not one with connections. It was after he re-downloaded (the same version) and was able to load successfully that he stepped outside and found connections were broken.
Which makes it even odder to me...
 
Back
Top