• 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!
Charm Case

Resource Charm Case V1.5

OkunoShio

Cooltrainer
Member
Joined
Oct 22, 2022
Posts
127
Oh my - I had the same issue with the bag screen and missed the bug report on it in this section - I had no idea that your plugin was the source of it and tried to figure out where it came from, and I am so happy it is now fixed! This was one of the biggest bugs left in my game - thank you!!
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
Oh my - I had the same issue with the bag screen and missed the bug report on it in this section - I had no idea that your plugin was the source of it and tried to figure out where it came from, and I am so happy it is now fixed! This was one of the biggest bugs left in my game - thank you!!
I'm glad it worked out for you. Sorry it took so long and ended up being a pretty easy fix. 😅
If anymore issue arise, please let me know. Also, I'm always up to any questions, suggestions, comments, or complaints. 😁
 

OkunoShio

Cooltrainer
Member
Joined
Oct 22, 2022
Posts
127
I just realized that the Oval Charm is somehow displayed inside the Elemental Charm List (also deactivating the other elemental charms when activated, however it still counts towards my maximum charm limit). I was briefly searching through the scripts, but could not find the reason for this. (Note: I am still on Charm Case v1.41, in case you fixed this in the latest update already, I apologize :) )

1699549250362.png
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
I just realized that the Oval Charm is somehow displayed inside the Elemental Charm List (also deactivating the other elemental charms when activated, however it still counts towards my maximum charm limit). I was briefly searching through the scripts, but could not find the reason for this. (Note: I am still on Charm Case v1.41, in case you fixed this in the latest update already, I apologize :) )

View attachment 22532
Eh, that's a new one. I'll look into it, but I've not noticed anything like that. Please check you called it with pbGainCharm and not pbGainElementCharm. I'll try to figure out how else that's possible, and try to put in some fail-safes, is that's the cause.
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
I just realized that the Oval Charm is somehow displayed inside the Elemental Charm List (also deactivating the other elemental charms when activated, however it still counts towards my maximum charm limit). I was briefly searching through the scripts, but could not find the reason for this. (Note: I am still on Charm Case v1.41, in case you fixed this in the latest update already, I apologize :) )

View attachment 22532
Please let me know if that was the cause. If not, I'm at a loss. It will currently allow you to put regular charms in the elemental case (obviously it shouldn't) but I didn't notice anything weird with the oval charm going into the right place. Using pbGainElementCharm(:OVALCHARM) did push it into the Elemental Case, though. I'll try to have a fix later tonight or tomorrow when I release an Evolution Charm (requires less levels to evolve) and Substitute's Seeker Charm(Instead of refreshing trainers on game continue, it will only allow you to reset daily), as well as a few other minior tweaks.
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
You were indeed correct! This was a user issue haha! :) Apologies for the false alert!
No worries. I'm still going to add a failsafe just incase. Thank you for pointing out a flaw on my end. A simple if statement seems to correct the problem and will cause the opposite gain to be called if the wrong type of charm.
 
Last edited:

SomebodyRandom

Trainer
Member
Joined
Feb 13, 2022
Posts
61
Dumb little idea I had, what if elemental charms also improved luck with those types? Like the fire elemental charm would give better IVs and stuff like that for fire types, and maybe they could also give a doubled chance of finding pokemon with that tera type
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
614
I'm not the one who made those charms so I don't know how to add the double chance for tera type but I know a way for the IV (and other things where you edit the generated wild pokemon). I could add it into the plugin but I'm not sure what things one may want to edit from wild generated pokemon. Anyway, here's an example of better IV (it can probably be optimized):
Ruby:
EventHandlers.add(:on_wild_pokemon_created, :elemental_charm
  proc { |pkmn|
    for type in pkmn.types do
      type = type + "CHARM"
      if $player.activeCharm?(type)
        typeMatch = true
      end
    end
    if typeMatch
      stats = [:HP, :ATTACK, :DEFENSE, :SPECIAL_ATTACK, :SPECIAL_DEFENSE, :SPEED]
      for stat in stats do
        pkmn.iv[stat] += 10
        pkmn.iv[stat] = [pkmn.iv[stat] + 10, Pokemon::IV_STAT_LIMIT].min
      end
      pkmn.calc_stats
    end
  }
)
You can change the code inside the if typeMatch for anything else you can modify for a pokemon.

If people want this feature added, make a list and I'll see if it can be added.
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
Dumb little idea I had, what if elemental charms also improved luck with those types? Like the fire elemental charm would give better IVs and stuff like that for fire types, and maybe they could also give a doubled chance of finding pokemon with that tera type
As of right now, I don't much plan on adding anything as I kind of burnt myself out. I had no intention of adding tera type data, as it wasn't common when I make the Case in the first place. As always, LinKazamines solution should work for the first part of what you would like. I am still open to helping people add their own Charms, just PM me and I'll help you through the process. If I get enough extra Charms to add, I might update the Case with new Charms in it, I just ran out of ideas.
 

SomebodyRandom

Trainer
Member
Joined
Feb 13, 2022
Posts
61
As of right now, I don't much plan on adding anything as I kind of burnt myself out. I had no intention of adding tera type data, as it wasn't common when I make the Case in the first place. As always, LinKazamines solution should work for the first part of what you would like. I am still open to helping people add their own Charms, just PM me and I'll help you through the process. If I get enough extra Charms to add, I might update the Case with new Charms in it, I just ran out of ideas.
Is there any chance you can update this to fix an issue I had with another plugin? I remembered Orange's Nature Expansion and I have two issues with Charm Case and it.

Issue 1. The Nature Charm UI is kinda broken, probably because it has no idea what to do with natures that boost 2 stats and lower 2 other stats
1708148007354.png


Issue 2: With the Spirit Charm and a Pathetic (new nature) pokemon (might be an issue with the nature charm as well but I can't tell what nature I'm even selecting) when I try to do a wild encounter, this happens
1708148052380.png
 

SomebodyRandom

Trainer
Member
Joined
Feb 13, 2022
Posts
61
Also, is it possible to give charms to the opponent? I only just noticed charms like the Resistor and STAB charms exist
 

rafahbit

Novice
Member
Joined
Oct 21, 2020
Posts
42
Recently I updated all the scripts of my game from scratch, without any changes, and I'm experiencing 2 issues with the charm case that I didn't have before:

The first one occurs when I try to open the charm case without any charms.
[v21.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `length' for nil:NilClass

Backtrace:
[Charms Case] Charm Case Script.rb:320:in `itemCount'
SpriteWindow_text:1144:in `refresh'
SpriteWindow_text:1076:in `initialize'
[Charms Case] Charm Case Script.rb:307:in `initialize'
[Charms Case] Charm Case Script.rb:502:in `new'
[Charms Case] Charm Case Script.rb:502:in `pbCharmSetupScene'
[Charms Case] Charm Case Script.rb:527:in `pbStartCharmScene'
[Charms Case] Charm Case Script.rb:706:in `pbBuyScreen'
[Charms Case] Charm Case Charm Effects.rb:8:in `block (2 levels) in <main>'
MessageConfig:575:in `pbFadeOutIn'
The second one happens when I pick up any charm other than the elemental ones. In this case, if I pick up an elemental charm first along with the charm case, no error occurs.
[v21.1 Hotfixes 1.0.7]

Script error in event 18 (coords 11,13), map 6 ( Poké Center)
Exception: NoMethodError
Message: undefined method `length' for nil:NilClass

***Full script:
pbGainCharm(:BALANCECHARM)
Backtrace:
[Charms Case] Charm Case Script.rb:251:in `countActiveCharms'
[Charms Case] Charm Case Script.rb:3:in `pbToggleCharm'
[Charms Case] Charm Case Script.rb:111:in `pbGainCharm'
(eval):1:in `execute_script'
Interpreter:138:in `eval'
Interpreter:138:in `execute_script'
Interpreter_Commands:434:in `command_111'
Interpreter_Commands:29:in `execute_command'
Interpreter:130:in `block in update'
Interpreter:86:in `loop'

If I take the watercharm or any other elemental first, simply no errors occur.
 

Eyebull21

Novice
Member
Joined
Aug 8, 2019
Posts
10
getting two errors when using the debug menu.


[2024-03-13 08:23:25 -0400]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.7]

Exception: NameError
Message: undefined local variable or method `charm_ids' for #<GameData::Item>

Backtrace:
[Charms Compilation] Main.rb:108:in `is_charm?'
[Charms Case] Charm Case Script.rb:722:in `block in pbGiveAllCharms'
GameData:125:in `block in each'
GameData:125:in `each_value'
GameData:125:in `each'
[Charms Case] Charm Case Script.rb:721:in `pbGiveAllCharms'
[Charms Case] Charm Case Charm Effects.rb:85:in `block in <module:MenuHandlers>'
Event_HandlerCollections:121:in `call'
Debug_Menus:138:in `block in pbDebugMenu'
Debug_Menus:100:in `loop'

=================

[2024-03-13 08:35:42 -0400]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `reject' for nil:NilClass

Backtrace:
[Charms Case] Charm Case Script.rb:525:in `pbStartCharmScene'
[Charms Case] Charm Case Script.rb:706:in `pbBuyScreen'
[Charms Case] Charm Case Charm Effects.rb:8:in `block (2 levels) in <main>'
MessageConfig:575:in `pbFadeOutIn'
[Charms Case] Charm Case Charm Effects.rb:5:in `block in <main>'
Event_Handlers:195:in `trigger'
Item_Utilities:63:in `triggerUseFromBag'
Item_Utilities:696:in `pbUseItem'
[[DBK] Terastallization] [003] Item Handlers.rb:80:in `pbUseItem'
[Bag Screen w/int. Party] Script.rb:1472:in `block in pbStartScreen'
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
614
getting two errors when using the debug menu.


[2024-03-13 08:23:25 -0400]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.7]

Exception: NameError
Message: undefined local variable or method `charm_ids' for #<GameData::Item>

Backtrace:
[Charms Compilation] Main.rb:108:in `is_charm?'
[Charms Case] Charm Case Script.rb:722:in `block in pbGiveAllCharms'
GameData:125:in `block in each'
GameData:125:in `each_value'
GameData:125:in `each'
[Charms Case] Charm Case Script.rb:721:in `pbGiveAllCharms'
[Charms Case] Charm Case Charm Effects.rb:85:in `block in <module:MenuHandlers>'
Event_HandlerCollections:121:in `call'
Debug_Menus:138:in `block in pbDebugMenu'
Debug_Menus:100:in `loop'

=================

[2024-03-13 08:35:42 -0400]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `reject' for nil:NilClass

Backtrace:
[Charms Case] Charm Case Script.rb:525:in `pbStartCharmScene'
[Charms Case] Charm Case Script.rb:706:in `pbBuyScreen'
[Charms Case] Charm Case Charm Effects.rb:8:in `block (2 levels) in <main>'
MessageConfig:575:in `pbFadeOutIn'
[Charms Case] Charm Case Charm Effects.rb:5:in `block in <main>'
Event_Handlers:195:in `trigger'
Item_Utilities:63:in `triggerUseFromBag'
Item_Utilities:696:in `pbUseItem'
[[DBK] Terastallization] [003] Item Handlers.rb:80:in `pbUseItem'
[Bag Screen w/int. Party] Script.rb:1472:in `block in pbStartScreen'
Why do you have both the Charms Case and Charms Compilation installed? They are the same. Having them both will probably cause that error and more.
 
Back
Top