• 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.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

Resource [20.1+] BP System 1.0.8

4AllNighterGrinder64

4 Sleepless nights to update to Teal Mask Part 1
Member
Joined
Nov 23, 2023
Posts
23
I assume the problem comes because both plugins edit pbEndOfBattle. I'll look at the terastallization code to see if it's the case.

Edit: Lucidious plugin does touch pbEndOfBattle but there should be no reason for my plugin to stop the terastallization from ending. I don't know why it's happening but I think I know a possible way to fix it.
I will try out the updated BP System soon. I will let you know if the conflict with terastallization is fixed.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,232
I assume the problem comes because both plugins edit pbEndOfBattle. I'll look at the terastallization code to see if it's the case.

Edit: Lucidious plugin does touch pbEndOfBattle but there should be no reason for my plugin to stop the terastallization from ending. I don't know why it's happening but I think I know a possible way to fix it.
I didn't have the chance to look at the plugin before you updated it, but I imagine it was likely a load order issue, so my alias of this method was being overwritten instead of aliasing the method like it's supposed to.

Though, linking the BP acquisition to the same method that the player acquires money through seems like a much better and more logical way to go about it, anyway.

As a separate issue though, I notice that you're using the Essentials Deluxe compiler method for adding PBS info. That's fine, but unless your plugin depends on this to work, I would advise against this. Fiddling with how the compiler works is messy and very risky business, and leaves your plugin prone to compatibility issues. Which is why I abandoned that whole method of doing things in the new v21 plugin. It seems like your plugin implements all of this simply to provide an example for two items, which imo, is not worth all of that complex code when you can simply just post a picture of an example instead. But that's just my two cents.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
I added the compiler thinking it would be easier to add the BP prices to items that way than to go through all the items in the files but if it causes trouble I have no issue taking it down and adding images on how they should be added.
 

4AllNighterGrinder64

4 Sleepless nights to update to Teal Mask Part 1
Member
Joined
Nov 23, 2023
Posts
23
I assume the problem comes because both plugins edit pbEndOfBattle. I'll look at the terastallization code to see if it's the case.

Edit: Lucidious plugin does touch pbEndOfBattle but there should be no reason for my plugin to stop the terastallization from ending. I don't know why it's happening but I think I know a possible way to fix it.
I have tested out 1.0.6 of the BP System plugin with all of the Deluxe Battle Kit plugins. Terastallization works as intended now. The plugin conflict with the previous version and the DBK Terastallization add on is now fixed. I forgot to test out Mega Evolution and Z-Moves on my end, but they were working fine before the update fixed the plugin conflict with Terastallization.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Well, that problem is carried from the v21 version since I didn't touch the line that causes it. I'll upload the fix but you can do it yourself by going to 02 - Shop/BP_Shop and deleting or commenting out line 341. The line in question is itemprice /= 2 if !@buying.
 

CelestialFearow

Venipede User
Member
Joined
Jul 24, 2020
Posts
200
Well, that problem is carried from the v21 version since I didn't touch the line that causes it. I'll upload the fix but you can do it yourself by going to 02 - Shop/BP_Shop and deleting or commenting out line 341. The line in question is itemprice /= 2 if !@buying.
Alright!
 

rafahbit

Trainer
Member
Joined
Oct 21, 2020
Posts
53
Hello, I wanted the BP shop to be similar to Arcky's Poké Mart, so I created a Ruby file to configure the shop outside the event. This includes a command to call different shops and a badge system, all editable within the Ruby file. You can add various items and BP shops with this setup.
Since it's practically replacing the BP shop with another one, you can also configure the vendor's messages here.

I'm not very good with programming, so I try to create things with the help of ChatGPT. I didn't have any issues with the plugin below; it worked correctly. However, I can't guarantee there are no problems. I'm sharing it here for anyone who wants to implement it.


battle_point_shops:
Expand Collapse Copy
#===============================================================================
# Battle Point Shops Plugin
#to call the shop, just place it in an event: pbOpenBPShop(shopid)
#example: pbOpenBPShop(1)
#===============================================================================

# Defines the items available in each store
BATTLE_POINT_SHOPS = {
  1 => [
    :POTION, :GREATBALL, :SUPERPOTION, :ANTIDOTE, :PARALYZEHEAL, :AWAKENING,
    :HYPERPOTION, :SUPERREPEL, :REVIVE,
    :ULTRABALL, :FULLHEAL, :MAXREPEL, :ZINC, :CARBOS, :PPUP, :PPMAX,
    :MAXPOTION, :FULLRESTORE
],
  2 => [
    :POTION,
    :TM01,:TM02,:TM03,:TM04,
    :TM05,:TM06,:TM07,:TM08,
    :TM09,:TM10,:TM11,:TM12,
    :TM13,:TM14,:TM15,:TM16,
    :TM17,:TM18,:TM19,:TM20,
    :TM21,:TM22,:TM23,:TM24,
    :TM25,:TM26,:TM27,:TM28,
    :TM29,:TM30,:TM31,:TM32,
    :TM33,:TM34,:TM35,:TM36
  ]
}


# Define the badges required to access items

BadgesForItems = {
  1 => [:GREATBALL, :SUPERPOTION, :ANTIDOTE, :PARALYZEHEAL, :AWAKENING],
  3 => [:HYPERPOTION, :SUPERREPEL, :REVIVE],
  5 => [:ULTRABALL, :FULLHEAL, :MAXREPEL, :ZINC, :CARBOS, :PPUP, :PPMAX],
  7 => [:MAXPOTION, :ZINC, :CARBOS, :PPUP, :PPMAX],
  8 => [:FULLRESTORE]
}

# Function to open a Battle Points store based on an ID

def pbOpenBPShop(shop_id)
  items = BATTLE_POINT_SHOPS[shop_id]
  if items.nil?
    pbMessage(_INTL("Shop not found."))
    return
  end

# Filter items based on player badges

  items_to_display = items.select do |item|
    # Verifica se o item é válido
    next false unless GameData::Item.exists?(item)

# Checks if the item has an associated badge

    badge_id = BadgesForItems.keys.find do |key|
      BadgesForItems[key].include?(item)
    end
   
    If the item is not associated with a badge or the player has the required badge, the item will be displayed
    badge_id.nil? || ($player.badge_count >= badge_id)
  end

  if items_to_display.empty?
    pbMessage(_INTL("No items available for you at this shop."))
    return
  end

  pbMessage(_INTL("Welcome to the BP Exchange Service!"))
  pbMessage(_INTL("We can exchange your BP for amazing items."))
 
  scene = BattlePointShop_Scene.new
  screen = BattlePointShopScreen.new(scene, items_to_display)
  screen.pbBuyScreen
 
  pbMessage(_INTL("Thank you for visiting."))
  pbMessage(_INTL("Come back when you have more BP to spend."))
 
  $game_temp.clear_mart_prices
end
 
Last edited:

CarmineGGW

Novice
Member
Joined
May 6, 2017
Posts
25
Hi! Quick question I'm using 20.1 with the 20.1 download. but I think this is calling something only in 21.1? Do you have any suggestions?

[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Script error in event 6 (coords 18,18), map 159 (Battle Sim Lobby)
Exception: NoMethodError
Message: undefined method `portion_name' for #<GameData::Item>

***Full script:
pbBattlePointShop([
:POKEBALL, :GREATBALL,
:POTION, :SUPERPOTION,
:ANTIDOTE, :PARALYZEHEAL,
:AWAKENING, :BURNHEAL, :ICEHEAL,
:ESCAPEROPE,
:REPEL
])

Backtrace:
[Lin's BP System] BP_Shop.rb:26:in `getName'
[Lin's BP System] BP_Shop.rb:457:in `block in pbBuyScreen'
[Lin's BP System] BP_Shop.rb:453:in `loop'
[Lin's BP System] BP_Shop.rb:453:in `pbBuyScreen'
[Lin's BP System] BP_Shop.rb:525:in `pbBattlePointShop'
(eval):1:in `execute_script'
Interpreter:143:in `eval'
Interpreter:143:in `execute_script'
Interpreter_Commands:1112:in `command_355'
Interpreter_Commands:116:in `execute_command'
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Well, yes, it is calling a function of 21.1 since I copied the shop from that version and only changed some things that threw me errors because of the different version. Since I was using Improved Item Text from Lucidious to add that function to v20.1 I didn't get this error when testing. You can add that plugin to solve the problem or wait for when I can update this plugin.
 
Back
Top