• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Berry Core and Dex

Resource Berry Core and Dex 1.6

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
678
wrigty12 submitted a new resource:

Berry Core and Dex - Creates a Berrydex for the player to Gather 'Em All!

With so many Berries available, I always thought a Berrydex would be a nice addition to the game. Using the existing Pokedex in Essentials as a base, I've created the Berrydex Plugin.

Note: This also acts as a Berry Core for other plugins I've created. It can be used on its own, but will be required for some of my other Berry-related plugins.

Version
  • This plugin works for v20.1
  • I haven't tested v21.1 yet, but plan to soon to make sure this is compatible. I...

Read more about this resource...
 
heya! I have two questions about the plugin that I couldn't figure out by myself
I see there's a way to call it from the bag, but what about the pause menu?
Also how do I call the berrycount in things like the trainer card?
 
heya! I have two questions about the plugin that I couldn't figure out by myself
I see there's a way to call it from the bag, but what about the pause menu?
Also how do I call the berrycount in things like the trainer card?
1) I didn't create handling for pause menu or like an item that opens the full dex since people may want it used in different ways and some plugins require different build, etc. You can just look at existing items or pause menu setup to create your own and just call pbBerryDex in those. Something like this could work (but I didn't test it since I'm not using the base pause menu)
Ruby:
Expand Collapse Copy
MenuHandlers.add(:pause_menu, :berrydex, {
  "name"      => _INTL("Berrydex"),
  "order"     => 15,
  "condition" => proc { next  pbCanViewBerryDex? },
  "effect"    => proc { |menu|
    pbPlayDecisionSE
    pbBerryDex
    menu.pbRefresh
    next false
  }
})

2) The pbBerryDexCount function listed in the Setup and Documentation guide is what you'll want to call to get the count, so you can use that in your Trainer Card edits
 
The code wrigty12 posted is identical to what I have made in my game, and I can assure it works on default base menu.
 
I'm running v20.1 and I'm not able to get pbBerryDex to do anything. I've tried it via NPC and via pause menu item, but pbBerryDex doesn't pull up a BerryDex in either, it just skips over the command entirely.

I've tried manually toggling on with pbToggleBerryDex(true) and toggling via a switch and ACCESS_BERRYDEX_SWITCH_ID but neither of those changed anything.

Any idea why this might be the case?
 
I'm running v20.1 and I'm not able to get pbBerryDex to do anything. I've tried it via NPC and via pause menu item, but pbBerryDex doesn't pull up a BerryDex in either, it just skips over the command entirely.

I've tried manually toggling on with pbToggleBerryDex(true) and toggling via a switch and ACCESS_BERRYDEX_SWITCH_ID but neither of those changed anything.

Any idea why this might be the case?
After you toggled the BerryDex to be true, did you register a berry either manually or by receiving a berry item? The Dex will only appear if you have at least 1 berry registered. That said, I can probably add a message saying why it's not opening.
 
After you toggled the BerryDex to be true, did you register a berry either manually or by receiving a berry item? The Dex will only appear if you have at least 1 berry registered. That said, I can probably add a message saying why it's not opening.
I think that it's better if you add a message when the player doesn't have any berry registered. I have the same issues as pkmnacademia, i didn't tested it more cus i was running out of time and maybe today, i will test it more. By the way, i use the plugin: Bag Screen with interactable Party, i think that this should work without any problem if we have that plugin right?
 
I think that it's better if you add a message when the player doesn't have any berry registered. I have the same issues as pkmnacademia, i didn't tested it more cus i was running out of time and maybe today, i will test it more. By the way, i use the plugin: Bag Screen with interactable Party, i think that this should work without any problem if we have that plugin right?
The next update will include a message to the player if they don't have any berries registered when pbBerryDex is called.

Yeah, my plugin was developed with that Bag Screen plugin installed. There is no interaction between the two plugins.
 
After you toggled the BerryDex to be true, did you register a berry either manually or by receiving a berry item? The Dex will only appear if you have at least 1 berry registered. That said, I can probably add a message saying why it's not opening.
Registering a Berry first changed something, but now I'm running into an error. I've tried a couple different methods of opening the Dex (via Start Menu and via event interaction) but both resulted in something like this:
1698881387377.png
 
Registering a Berry first changed something, but now I'm running into an error. I've tried a couple different methods of opening the Dex (via Start Menu and via event interaction) but both resulted in something like this:
View attachment 22382
Likely it's because you didn't start a new game, so the berrydexIndex global hasn't been initialized.

I can add handling for those situations, but in the meantime start a new save file or have an event or something run the following script, then save your game:
$PokemonGlobal.berrydexIndex = []
 
Likely it's because you didn't start a new game, so the berrydexIndex global hasn't been initialized.

I can add handling for those situations, but in the meantime start a new save file or have an event or something run the following script, then save your game:
$PokemonGlobal.berrydexIndex = []
That made it work for me - thank you!
 
I know these questions are never anyone's favourites, but do we think the plugin may function in V19.1? I can't imagine too many berry related functions have changed in updates.

Failing that, how difficult would we imagine it to be to backdate the plugin myself? :]
 
I know these questions are never anyone's favourites, but do we think the plugin may function in V19.1? I can't imagine too many berry related functions have changed in updates.

Failing that, how difficult would we imagine it to be to backdate the plugin myself? :]
Go ahead and try downloading it and see if it works. I have no plans to look into getting it to work with anything earlier than v20, but if there is an obvious tweak needed I can provide guidance.
 
wrigty12 updated Berry Core and Dex with a new update entry:

Update 1.1 - More infrastructure for other plugins

Change Log
  • New feature: pbChooseBerryMultiple, a command with a custom scene to choose multiple berries at once. See the Setup and Documentation document for more info.
  • Added infrastructure for Preferred Zones (which comes with Berry Planting Improvements).
  • Added handling to prevent a crash when opening the Berrydex in a save file created from before plugin installation.

Read the rest of this update entry...
 
Hi, I'm having an issue getting this to work, I have an npc that activates my access to the BerryDex and I have put the BerryDex itself in the PC. When I then try to access it, it says I have no berries which is true. Then I go outside and pick an Oranberry, and go back inside and try to click the option, but nothing happens. I tried adding the "register oranberry" script to the berry picking event but I couldn't really get it to work. I am using version 21.1 though so perhaps that is the issue, but if there's something I'm missing otherwise I would really appreciate the help!
 
Hi, I'm having an issue getting this to work, I have an npc that activates my access to the BerryDex and I have put the BerryDex itself in the PC. When I then try to access it, it says I have no berries which is true. Then I go outside and pick an Oranberry, and go back inside and try to click the option, but nothing happens. I tried adding the "register oranberry" script to the berry picking event but I couldn't really get it to work. I am using version 21.1 though so perhaps that is the issue, but if there's something I'm missing otherwise I would really appreciate the help!
The fact that the "you have no berries" message stops appearing after you pick a berry means the berry plant itself is working, no need to add any script calls there.

The debug console isn't showing "$player.has_berrydex is currently false" right?

The only remaining check that happens to block the dex is making sure the switch defined in
Settings::ACCESS_BERRYDEX_SWITCH_ID is active or 0. Did you set a switch ID for that setting?
 
The fact that the "you have no berries" message stops appearing after you pick a berry means the berry plant itself is working, no need to add any script calls there.

The debug console isn't showing "$player.has_berrydex is currently false" right?

The only remaining check that happens to block the dex is making sure the switch defined in
Settings::ACCESS_BERRYDEX_SWITCH_ID is active or 0. Did you set a switch ID for that setting?
I did set my switch, and I DID forget to switch it on 😳 Thank you for the reminder turns out I was just being a bit of an idiot, it works now haha, thanks🙃
 
I did set my switch, and I DID forget to switch it on 😳 Thank you for the reminder turns out I was just being a bit of an idiot, it works now haha, thanks🙃
whew. That's a good sign it works well with v21 though
 
Back
Top