• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Customizable Battle UI

Resource Customizable Battle UI 1.0

Jangajinx

An Overly Ambitious Developer
Member
Joined
Apr 21, 2023
Posts
213
Remember that save files are based on the game name, not the folder - if the game is still just named "Pokemon Essentials v21", it's pulling from the same place.
Everything relating to the game both the clean one and the one I am developing in \AppData\Roaming are gone. Not sure why it is happen when i have this installed.
 

Jangajinx

An Overly Ambitious Developer
Member
Joined
Apr 21, 2023
Posts
213
After further testing it seems this is what is causing the error. After removing it, but than it bricks the plugin itself instead of the game.

class PokemonSystem
attr_accessor :battle_ui
def initialize
@battle_ui = 0 # Default battle ui (see also Settings::BATTLE_UI)
end
end
 
After further testing it seems this is what is causing the error. After removing it, but than it bricks the plugin itself instead of the game.
Oh, that would explain why I wasn't encountering the issue and you were - because this is when a new PokemonSystem object is created for options, and that's not normally done when there's an existing save file! Good catch, and sorry I was pushing you away from the right solution!
 

Jangajinx

An Overly Ambitious Developer
Member
Joined
Apr 21, 2023
Posts
213
Oh, that would explain why I wasn't encountering the issue and you were - because this is when a new PokemonSystem object is created for options, and that's not normally done when there's an existing save file! Good catch, and sorry I was pushing you away from the right solution!
No worries mate, the problem is I do not know how to resolve it as when I remove it I get an error on the options menu.

[Pokémon Essentials version 21]
[v21 Hotfixes 1.0.1]

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

Backtrace:
[Customizable Battle UI] 001_Script.rb:11:in `block in <main>'
UI_Options:43:in `get'
UI_Options:301:in `block in pbStartScene'
UI_Options:301:in `times'
UI_Options:301:in `pbStartScene'
UI_Options:375:in `pbStartScreen'
UI_Load:324:in `block (2 levels) in pbStartLoadScreen'
MessageConfig:575:in `pbFadeOutIn'
UI_Load:321:in `block in pbStartLoadScreen'
UI_Load:306:in `loop'
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
614
Oh, so it's this error. I think I know a way to solve it. If I'm correct, the error is happening because this plugin only lets Pokemon Essentials create PokemonSystem variables defined in the plugin. All the variables on the options script are still being called and used on other scripts (like the last one mentioned in the error log) but throw errors because those variables are never created. If it's that, change the code you shared earlier with this:
Ruby:
class PokemonSystem
  attr_accessor :battle_ui

  alias custUI_initialize initialize
  def initialize
    custUI_initialize
    @battle_ui = 0 # Default battle ui (see also Settings::BATTLE_UI)
   end
end
This should initialize all the variables in the options script and other plugins that add variables in the PokemonSystem as well as the variable in this plugin. I had the same problem with some of my plugins when trying to test the game without a save file and this solved it.
 

NO3B

Rookie
Member
Joined
Apr 16, 2023
Posts
8
The backtrace doesn't suggest anything is connected to this plugin.
View attachment 20386
Line 29 is pbSetResizeFactor([$PokemonSystem.screensize, 4].min), so if you're getting an error saying that it's trying to compare nil with an integer, that means $PokemonSystem.screensize is nil. This plugin doesn't make any changes to anything relating to screensize, and I was able to install it myself with no issues.
so how to fix this? i have the same problem, what i must change?
 

NO3B

Rookie
Member
Joined
Apr 16, 2023
Posts
8
Oh, so it's this error. I think I know a way to solve it. If I'm correct, the error is happening because this plugin only lets Pokemon Essentials create PokemonSystem variables defined in the plugin. All the variables on the options script are still being called and used on other scripts (like the last one mentioned in the error log) but throw errors because those variables are never created. If it's that, change the code you shared earlier with this:
Ruby:
class PokemonSystem
  attr_accessor :battle_ui

  alias custUI_initialize initialize
  def initialize
    custUI_initialize
    @battle_ui = 0 # Default battle ui (see also Settings::BATTLE_UI)
   end
end
This should initialize all the variables in the options script and other plugins that add variables in the PokemonSystem as well as the variable in this plugin. I had the same problem with some of my plugins when trying to test the game without a save file and this solved it.
Error when enter to Option Menu
Here the log:
[Pokémon Essentials version 21]

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

Backtrace:
[Customizable Battle UI] 001_Script.rb:21:in `block in <main>'
307:UI_Options:43:in `get'
307:UI_Options:301:in `block in pbStartScene'
307:UI_Options:301:in `times'
307:UI_Options:301:in `pbStartScene'
307:UI_Options:375:in `pbStartScreen'
305:UI_Load:324:in `block (2 levels) in pbStartLoadScreen'
079:MessageConfig:575:in `pbFadeOutIn'
305:UI_Load:321:in `block in pbStartLoadScreen'
305:UI_Load:306:in `loop'

How to fix this?
 
Back
Top