• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Repositioning Sprites

FHJoker

Re-thinking Osmium
88
Posts
16
Years
Anybody get an error when trying to reposition individual sprites? I tried an unedited version of Essentials (11) and still get it.

Exception: NoMethodError
Message: undefined method `[]' for nil:NilClass
PokeBattle_Pokemon:729:in `initialize'
PokemonSpritePos #####:141:in `new'
PokemonSpritePos #####:141:in `pbChangeSpecies'
PokemonSpritePos #####:176:in `pbSpecies'
PokemonSpritePos #####:170:in `loop'
PokemonSpritePos #####:190:in `pbSpecies'
PokemonSpritePos #####:278:in `pbStart'
PokemonSpritePos #####:277:in `loop'
PokemonSpritePos #####:285:in `pbStart'
EditorMain #####:252:in `pbEditorMenu'
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
That's a known bug. Delete the problem line in the Editor's scripts (PokeBattle_Pokemon 729).
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Really really. The Editor crashes because $game_switches hasn't been defined, yet that code is behaving as if does.

The actual fix is to use if $game_switches && $game_switches[32] there instead, but I went for brevity. It can be deleted in the Editor's scripts without worry, although this "actual" fix allows that script section to be identical in both the game and the Editor, which is convenient.
 
199
Posts
14
Years
  • Seen Jul 6, 2022
Really really. The Editor crashes because $game_switches hasn't been defined, yet that code is behaving as if does.

The actual fix is to use if $game_switches && $game_switches[32] there instead, but I went for brevity. It can be deleted in the Editor's scripts without worry, although this "actual" fix allows that script section to be identical in both the game and the Editor, which is convenient.

It continues without working

Code:
---------------------------
Pokemon Essentials
---------------------------
Exception: NoMethodError

Message: undefined method `[]' for nil:NilClass

PokeBattle_Pokemon:729:in `initialize'

PokemonSpritePos #####:141:in `new'

PokemonSpritePos #####:141:in `pbChangeSpecies'

PokemonSpritePos #####:176:in `pbSpecies'

PokemonSpritePos #####:170:in `loop'

PokemonSpritePos #####:190:in `pbSpecies'

PokemonSpritePos #####:278:in `pbStart'

PokemonSpritePos #####:277:in `loop'

PokemonSpritePos #####:285:in `pbStart'

EditorMain #####:252:in `pbEditorMenu'

This exception was logged in ./errorlog.txt.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Which scripts did you edit? The one called Scripts.rxdata, or the one called EditorScripts.rxdata (which you temporarily renamed to Scripts.rxdata so you could open them in RMXP)? Because you should do the latter.
 
199
Posts
14
Years
  • Seen Jul 6, 2022
Which scripts did you edit? The one called Scripts.rxdata, or the one called EditorScripts.rxdata (which you temporarily renamed to Scripts.rxdata so you could open them in RMXP)? Because you should do the latter.

????:surprised:
I opened the "Clean" Essential v11 ( RPG Maker XP), then Script Editor and modified the (PokeBattle_Pokemon 729).
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
The External Editor (that Editor.exe you run) uses a different set of scripts to the game you're making. The scripts it uses are called EditorScripts.rxdata in the Data folder.

If you want to edit them, you'll need to rename the file to Scripts.rxdata (moving the existing file of that name out of the way temporarily) and then open your game in RMXP. It'll look like your game, but the scripts you see will be the Editor's scripts. Those are the ones you need to change if you want to change how the External Editor works.

After you made the change, save the project and close RMXP. Rename the file back to its original name, and move your actual game's script file back.

Makes sense, I suppose.
 
199
Posts
14
Years
  • Seen Jul 6, 2022
I did not know that the file EditorScript.data was another Script.

Now I understand everything.
Thank you for the explanation! :D
 
Back
Top