• 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

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
Hey, would there be a way to set a limit to how many charms you could toggle on at the same time?
Like, when you were to toggle the fourth charm on, the game would "You can only have 3 charms toggled on!", or something like that.
Being able to increase/decrease that number during gameplay would be awesome, too.

Thanks for the awesome script!
Thank you. I will look into adding an option for limiting Charms.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
614
You could simply add the option and have it allow for more charms that there are as the default value and a way to "deactivate" the option. If people reduce the number, they would be choosing to limit the amount of active charms.

Also, maybe you'll want to add a visual count of active charms/max active charms on the scene if the value is less than the number of charms that can be activated at once.

That or the message when trying to activate more charms than possible (that's probably the easiest way).
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
You could simply add the option and have it allow for more charms that there are as the default value and a way to "deactivate" the option. If people reduce the number, they would be choosing to limit the amount of active charms.

Also, maybe you'll want to add a visual count of active charms/max active charms on the scene if the value is less than the number of charms that can be activated at once.

That or the message when trying to activate more charms than possible (that's probably the easiest way).
Yeah.. I was thinking something along these lines, but the graphic is probably the best route. Going to run into a problem with the way the elemental charms are coded, though, I think. I'll try to tackle it in the morning. Probably going to bed soon.

Ruby:
    if $player.activeCharm?(charm)
      $player.charmsActive[charm] = false
    elsif active_charms_count < (CharmCaseSettings::MAX_ACTIVE_CHARMS + 1)
# +1 is for the Wishing Charm.. It will take a slot. I'll end up having to put in a conditional that is equal to the setting if !activeCharm?(:WISHINGCHARM) and +1 #if activeCharm?(:WISHINGCHARM).

      $player.charmsActive[charm] = true

    else
      pbMessage("You've reached the maximum limit of active charms (#{CharmCaseSettings::MAX_ACTIVE_CHARMS}).")
    end
  end
Should be a fun little challenge.
Also trying to think of other options.. I think by this point, we've covered almost everything. I have a Bug Contest one not released yet, thinking of a customizable stat one?(Like one that you can choose each stat you want to add. Make it OP or NOP). Stuck on the itemfinder and twin charm ones.
Don't know if the Seeker Charm is even possible with the way RPGXP works?(Refreshs all trainer battles).
If anyone else has any other suggestions, ideas, or anything feel free to shout 'em out.
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
drdoom76 updated Charm Case with a new update entry:

V1.09

# V1.09 - Added setting to limit Active Charms used. By default, set to false.
# If true, can set the number of maximum Charms that can be active at once.
# Added PBS items file for V21.1 users. Should be able to drag and drop and not have to mess with PBS.
# ****The original 4 charms (Exp, Catching, Oval, and Shiny) have not been included into this file, to avoid duplication.
# Restructured pbGiveAllCharms and pbGiveAllECharms
# Added pbRemoveCharm(charm). You can now remove a...

Read the rest of this update entry...
 

Phye

Moon Guardian
Member
Joined
Oct 25, 2022
Posts
29
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.3]

Script error in event 3 (coords 13,1), map 5 (Postwick)
Exception: NoMethodError
Message: undefined method `>=' for nil:NilClass

***Full script:
$player.has_pokedex = true
pbReceiveItem(:TOWNMAP)
pbReceiveItem(:POKEMONBOXLINK)
pbGainCharm(:EXPALLCHARM)

Backtrace:
[Charms Case] Charm Case Script.rb:82:in `pbGainCharm'
(eval):4:in `execute_script'
Interpreter:138:in `eval'
Interpreter:138:in `execute_script'
Interpreter_Commands:1177:in `command_355'
Interpreter_Commands:116:in `execute_command'
Interpreter:130:in `block in update'
Interpreter:86:in `loop'
Interpreter:86:in `update'
Scene_Map:167:in `block in update'
Was checking my game from the beginning again and noticed that the charm case plugin isn't working for some reason. I mean the dialogue for not having the charm case pops up as usual but at the end of it, it crashes and gives me this error. No clue what it is about.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
614
I thing this:
1696625803907.png

should be this?
1696625851327.png

Try making the change (in line 82 of Charm Case Script) and see if it solves the problem.

If it does, it could be because USE_MAX_CHARM_SETTING is true or false and the game was trying to see if it was higher or lower than @active_count (a number).
 

Phye

Moon Guardian
Member
Joined
Oct 25, 2022
Posts
29
I thing this:
View attachment 21744
should be this?
View attachment 21745
Try making the change (in line 82 of Charm Case Script) and see if it solves the problem.

If it does, it could be because USE_MAX_CHARM_SETTING is true or false and the game was trying to see if it was higher or lower than @active_count (a number).
That fixes the issue! No more errors! :D Thanks a lot!
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
I thing this:
View attachment 21744
should be this?
View attachment 21745
Try making the change (in line 82 of Charm Case Script) and see if it solves the problem.

If it does, it could be because USE_MAX_CHARM_SETTING is true or false and the game was trying to see if it was higher or lower than @active_count (a number).
Thanks Lin. I have fixed the main file and re-uploaded.
Contest Charm has officially been added as well.
Hoping to release V1.1 tonight with the Link Charm and maybe a couple new Charms, just need to do more testing.
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
drdoom76 updated Charm Case with a new update entry:

V1.1

# V1.1 - Added Link Charm - A charm which increases and decreases probability of encounters.
# Link Charm - For Captured / KO'ed Pokemon, it will increase encounter chance by 10 * the Chain Count. Stores 1 Species.
# Link Charm - For Fled From Pokemon, it will decrease encounter chance by 10 * the Fled Chain Count. Can store the rest of the Species.
# Constantly Chaining will eventually reduce the chances to 100% chance of 1 Species(Capture/KOed), and 0% for the rest(Fled).
# At Chain Count...

Read the rest of this update entry...
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
drdoom76 updated Charm Case with a new update entry:

V1.2

Added Color Charm - Doubles chance of encountering a Pokemon with a special Hue.
#Pokemon Color Variants is REQUIRED.

Added Crafting Charm - Gains an extra item when crafting and reduces materials needed when crafting by 1.
#Either Item Crafting UI or Item Crafting UI Plus is REQUIRED. DO NOT INSTALL BOTH.
**For the time being, the screen does not display the modifications. It pops up with a "surprise message" that alerts them that the Crafting Charm did something. I might change this in...

Read the rest of this update entry...
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
614
Just to be sure, this only happens when this plugin is installed? All this plugin does with those panels is update them so any pokemon added because of the wishing charm properly appears and doesn't throw an error as far as I have seen so I am not sure why the pokemon's HP are acting like that.

Could you also say which pokemon essentials version you are using so it can be tested?
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
Just to be sure, this only happens when this plugin is installed? All this plugin does with those panels is update them so any pokemon added because of the wishing charm properly appears and doesn't throw an error as far as I have seen so I am not sure why the pokemon's HP are acting like that.

Could you also say which pokemon essentials version you are using so it can be tested?
Thank you for helping out.
I'll look into it and see exactly what it could be on my end. In the meantime, Lin has a little more experience in the interactive bag.
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
drdoom76 updated Charm Case with a new update entry:

V1.13

# V1.3 - I've went through an redesigned a bit of the code to allow better capability with other Plugins / Script changes. The following are the Charms and methods that are effected.
# The changes should now just run the modifications, followed by the original script.
# Changed the handling of pbItemBall for Twin Charm. This will add for much better capability with other Plugins/script changes with the pbItemBall method.
# Changed the handling of the Link Charm a bit to work with Plugins...

Read the rest of this update entry...
 

ClessioTV

Cooltrainer
Member
Joined
Sep 24, 2022
Posts
220
Just to be sure, this only happens when this plugin is installed? All this plugin does with those panels is update them so any pokemon added because of the wishing charm properly appears and doesn't throw an error as far as I have seen so I am not sure why the pokemon's HP are acting like that.

Could you also say which pokemon essentials version you are using so it can be tested?
Hello, I am using version 20.1
 

ClessioTV

Cooltrainer
Member
Joined
Sep 24, 2022
Posts
220
I also got this when I last loaded the game with the new version (1.13) of the plugin

(Still on 20.1)
[2023-10-29 19:10:37 +0100]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Error in Plugin: [Charms Case]
Exception: SyntaxError
Message: [Charms Case] Charm Case Charm Effects.rb:1724: syntax error, unexpected `end', expecting end-of-input

Backtrace:
Section008:653:in `eval'
Section008:653:in `block (2 levels) in runPlugins'
Section008:643:in `each'
Section008:643:in `block in runPlugins'
Section008:634:in `each'
Section008:634:in `runPlugins'
Section395:28:in `mainFunctionDebug'
Section395:18:in `block in mainFunction'
Section014:80:in `pbCriticalCode'
Section395:18:in `mainFunction'
 

OkunoShio

Cooltrainer
Member
Joined
Oct 22, 2022
Posts
127
Thanks for the update - looking forward to testing it this evening! I have one more sidenote on Elemental Charms. When testing those, I was not sure if they work as intended, as it seems they will limit spawns to ONLY the Pokémon of the respective type instead of just increasing the odds of the respective type. For example, this is an encounter list on my Route 1:

Code:
LandNight,21
    19,SPINARAK,3,6
    18,SEEDOT,3,6
    14,SHUPPET,3,6
    14,GIRAFARIG,3,6
    10,CORPHISH,3,6
    10,DRIFLOON,3,6
    5,KLEFKI,3,6
    5,HOUNDOUR,3,6
    5,ORICORIO_3,3,6

When activating the Normal Charm, I find nothing but Girafarig (since it is the only Normal type in this list). In the settings, I also decreased the "ELEMENTAL_CHARM_ENCOUNTER_RATE" in the settings file to 25 instead of 40, so my understanding is that the odds for finding Girafarig should now be 25% instead of 14% (that's how I understand "blanket change"), right? Thanks for looking into this and thanks again for your awesome work!
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
Thanks for the update - looking forward to testing it this evening! I have one more sidenote on Elemental Charms. When testing those, I was not sure if they work as intended, as it seems they will limit spawns to ONLY the Pokémon of the respective type instead of just increasing the odds of the respective type. For example, this is an encounter list on my Route 1:

Code:
LandNight,21
    19,SPINARAK,3,6
    18,SEEDOT,3,6
    14,SHUPPET,3,6
    14,GIRAFARIG,3,6
    10,CORPHISH,3,6
    10,DRIFLOON,3,6
    5,KLEFKI,3,6
    5,HOUNDOUR,3,6
    5,ORICORIO_3,3,6

When activating the Normal Charm, I find nothing but Girafarig (since it is the only Normal type in this list). In the settings, I also decreased the "ELEMENTAL_CHARM_ENCOUNTER_RATE" in the settings file to 25 instead of 40, so my understanding is that the odds for finding Girafarig should now be 25% instead of 14% (that's how I understand "blanket change"), right? Thanks for looking into this and thanks again for your awesome work!
It pretty much mimics the effect of using a pokemon with an ability such as flashfire, lightning rod, etc. So yes, it will guarantee the encounter. The encounter rate activation should be based on the setting, as you understood it. I was toying with it a little and accidentally left it 100<100. It should be corrected now. Please let me know if you find anything else.

Essentially, it should be set up that if you have Normal Charm activated, it will give you a "favored type" of normal. If a random number 1-100 < setting, the normal pokemon will always spawn (if it rolls < setting). If not, it's suppose to be normal * calculation of the encounter.
 
Last edited:
Back
Top