• 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!
[v20.1\v21.1] Arcky's Poké Market

Resource [v20.1\v21.1] Arcky's Poké Market v1.6.0

If I am reading the code on line 618 correctly, you make a list of items and separate all of them by commas except the last two, when the last two items should still have a comma between them (before the word "and").
Within my own game, I've already written a function that formats lists properly (and it even lets me use "or" if need be) which I imported from an earlier non-Pokémon project of mine. But for your own plugin, I'd suggest this:
if tallyItems.length > 2
string = tallyItems[0..-2].join(', ')
string += ", and #{tallyItems[-1]}"
else
string = tallyItems.join(" and ")
end
Notice that the top line is now if the list size is greater than 2, not 1, and that there's now a comma on the second line. And then the else statement now uses a join of its own.

Additionally, you're going to want to remove all the dollar signs in the pre-set text in the settings menu. Now that you can handle more currencies than just Pokedollars, it's causing the text to display that symbol twice if developers use a pre-set seller.

In a similar vein, I suggest adding this (or something similar) to before the using() do loop within pbChooseNumber:
f = ""
f2 = ""
case $currency.downcase
when "money", "gold"
f = "$ "
when "coins"
f2 = " Coins"
when "battle points", "bp"
f2 = " BP"
end
And then you want to change the instances of numwindow.text to:
numwindow.text = _INTL("x{1}<r>{2}{3}{4}", curnumber, f, (curnumber * itemprice).to_s_formatted, f2)

Lastly, if discount is numeric during the beginning stages of pbPokemonMart where it is parsing the developer's inputs, currency will always be set to "money" regardless of what the developer uses as the currency input.
You want to write the code as follows:
elsif checkTrueFalseOrNil(useCat) # useCat is given or cantSell is given
if discount.is_a?(Numeric) # discount given (currency and cantSell optional)
if checkTrueFalseOrNil(currency)
cantSell = currency
currency = "money"
end
elsif discount.is_a?(String) # currency given (cantSell optional)
if checkTrueFalseOrNil(currency)
cantSell = currency
currency = discount
discount = nil
end
 
Last edited:
If I am reading the code on line 618 correctly, you make a list of items and separate all of them by commas except the last two, when the last two items should still have a comma between them (before the word "and").
Within my own game, I've already written a function that formats lists properly (and it even lets me use "or" if need be) which I imported from an earlier non-Pokémon project of mine. But for your own plugin, I'd suggest this:
if tallyItems.length > 2
string = tallyItems[0..-2].join(', ')
string += ", and #{tallyItems[-1]}"
else
string = tallyItems.join(" and ")
end
Notice that the top line is now if the list size is greater than 2, not 1, and that there's now a comma on the second line. And then the else statement now uses a join of its own.

Additionally, you're going to want to remove all the dollar signs in the pre-set text in the settings menu. Now that you can handle more currencies than just Pokedollars, it's causing the text to display that symbol twice if developers use a pre-set seller.

In a similar vein, I suggest adding this (or something similar) to before the using() do loop within pbChooseNumber:
f = ""
f2 = ""
case $currency.downcase
when "money", "gold"
f = "$ "
when "coins"
f2 = " Coins"
when "battle points", "bp"
f2 = " BP"
end
And then you want to change the instances of numwindow.text to:
numwindow.text = _INTL("x{1}<r>{2}{3}{4}", curnumber, f, (curnumber * itemprice).to_s_formatted, f2)

Lastly, if discount is numeric during the beginning stages of pbPokemonMart where it is parsing the developer's inputs, currency will always be set to "money" regardless of what the developer uses as the currency input.
You want to write the code as follows:
elsif checkTrueFalseOrNil(useCat) # useCat is given or cantSell is given
if discount.is_a?(Numeric) # discount given (currency and cantSell optional)
if checkTrueFalseOrNil(currency)
cantSell = currency
currency = "money"
end
elsif discount.is_a?(String) # currency given (cantSell optional)
if checkTrueFalseOrNil(currency)
cantSell = currency
currency = discount
discount = nil
end
Hey, I appreciate your suggestions but I don't see a point in changing any of these. I did delete the dollar signs in the presets so maybe you didn't copy over the new settings file. About the commas that list the items, if you bother with it that it should be item1, and item2 feel free to change that but I see it more correctly when it's item1 and item2. Otherwise idk what you're pointing at. For the argument converting, I tested this and it worked for every possibility but in v1.4.0 I'll remove this and use a new argument handler. If you want to discuss more about this with me, feel free to join my server
 
Seemingly incompatible with Secret Bases Remade
When I was using his script, an error occurred:
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]
Script error in event 9 (coords 15,8), map 101 (Zero Town)
Exception: ArgumentError
Message: wrong number of arguments (given 6, expected 7..9)
***Full script:
pbSecretBaseMart([
:SMALLDESK
])
Backtrace:
[Arcky's Poke Market] 001_PokeMarket_Main.rb:1020:in `initialize'
[Secret Bases Remade] 007_SecretBaseMart.rb:151:in `new'
[Secret Bases Remade] 007_SecretBaseMart.rb:151:in `pbStartBuyOrSellScene'
[Secret Bases Remade] 007_SecretBaseMart.rb:187:in `pbStartBuyScene'
[Secret Bases Remade] 007_SecretBaseMart.rb:391:in `pbBuyScreen'
[Secret Bases Remade] 007_SecretBaseMart.rb:482:in `block in pbSecretBaseMart'
[Secret Bases Remade] 007_SecretBaseMart.rb:478:in `loop'
[Secret Bases Remade] 007_SecretBaseMart.rb:478:in `pbSecretBaseMart'
(eval):1:in `execute_script'
Interpreter:138:in `eval'
 
Seemingly incompatible with Secret Bases Remade
When I was using his script, an error occurred:
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]
Script error in event 9 (coords 15,8), map 101 (Zero Town)
Exception: ArgumentError
Message: wrong number of arguments (given 6, expected 7..9)
***Full script:
pbSecretBaseMart([
:SMALLDESK
])
Backtrace:
[Arcky's Poke Market] 001_PokeMarket_Main.rb:1020:in `initialize'
[Secret Bases Remade] 007_SecretBaseMart.rb:151:in `new'
[Secret Bases Remade] 007_SecretBaseMart.rb:151:in `pbStartBuyOrSellScene'
[Secret Bases Remade] 007_SecretBaseMart.rb:187:in `pbStartBuyScene'
[Secret Bases Remade] 007_SecretBaseMart.rb:391:in `pbBuyScreen'
[Secret Bases Remade] 007_SecretBaseMart.rb:482:in `block in pbSecretBaseMart'
[Secret Bases Remade] 007_SecretBaseMart.rb:478:in `loop'
[Secret Bases Remade] 007_SecretBaseMart.rb:478:in `pbSecretBaseMart'
(eval):1:in `execute_script'
Interpreter:138:in `eval'
Ye that might be the case indeed that it's not compatible. I saw you joining my server so I can help you further there if you want, it'll be easier than here.
 
Seems if you enable use cat for Shelf Marts, they don't actually sort the categories. 'Regular' Poke Marts do however.
 
Seems if you enable use cat for Shelf Marts, they don't actually sort the categories. 'Regular' Poke Marts do however.
That's normal, shelfs are categories on their own. And in the guide it doesn't say anything about enabling categories as far as I remember.
 
I'm encountering an issue with the Unreal Time plugin, where even if the in game time passes either naturally or by the use of the command to advance time, the marts never update their refresh times. I don't know if it's an issue you'll be interested in looking but I'm reporting it nonetheless
 
I'm encountering an issue with the Unreal Time plugin, where even if the in game time passes either naturally or by the use of the command to advance time, the marts never update their refresh times. I don't know if it's an issue you'll be interested in looking but I'm reporting it nonetheless
That's strange, I'm sure I tested the plugin a lot with the unreal time engine. As long as you're on v1.4 of this plugin you should be fine. If possible send me more details on discord
 
That's strange, I'm sure I tested the plugin a lot with the unreal time engine. As long as you're on v1.4 of this plugin you should be fine. If possible send me more details on discord
Hey Arcky! Same problem here. Is there any threat about this on discord?
 
You can check in my discord, I helped someone a few weeks ago with a similar problem
Thank you, Arcky. Is the thread in Eevee expo discord? Or do you have your own discord. I was looking for the thread in the first one but no luck with the time issue.
 
Thank you, Arcky. Is the thread in Eevee expo discord? Or do you have your own discord. I was looking for the thread in the first one but no luck with the time issue.
Ah it's in my discord server, link should be on the overview page of this recourse.
 
I would like to know where in the script may I change the color of the item names in the Poke Mart Shop.

Mart Screencap
this should be here, otherwise search for Color and experiment
Ruby:
Expand Collapse Copy
class Window_PokemonMart < Window_DrawableCommand
  def initialize(stock, adapter, x, y, width, height, viewport = nil, pokeMartTracker = nil, discount)
    @stock       = stock
    @adapter     = adapter
    @pokeMartTracker = pokeMartTracker
    @discount    = discount
    super(x, y, width, height, viewport)
    if Essentials::VERSION.include?("21")
      @selarrow    = AnimatedBitmap.new("Graphics/UI/Mart/cursor")
    else
      @selarrow    = AnimatedBitmap.new("Graphics/Pictures/martSel")
    end
    @baseColor   = Color.new(88, 88, 80)
    @shadowColor = Color.new(168, 184, 184)
    @baseColor2  = Color.new(160, 160, 168)
    @shadowColor2 = Color.new(208, 208, 216)
    self.windowskin = nil
  end
this is located from line 906 up to line 923 in the 001_PokeMarket_Main.rb file. Contact me through discord if you still need help with something
 
Last edited:
this should be here, otherwise search for Color and experiment
Ruby:
Expand Collapse Copy
class Window_PokemonMart < Window_DrawableCommand
  def initialize(stock, adapter, x, y, width, height, viewport = nil, pokeMartTracker = nil, discount)
    @stock       = stock
    @adapter     = adapter
    @pokeMartTracker = pokeMartTracker
    @discount    = discount
    super(x, y, width, height, viewport)
    if Essentials::VERSION.include?("21")
      @selarrow    = AnimatedBitmap.new("Graphics/UI/Mart/cursor")
    else
      @selarrow    = AnimatedBitmap.new("Graphics/Pictures/martSel")
    end
    @baseColor   = Color.new(88, 88, 80)
    @shadowColor = Color.new(168, 184, 184)
    @baseColor2  = Color.new(160, 160, 168)
    @shadowColor2 = Color.new(208, 208, 216)
    self.windowskin = nil
  end
this is located from line 906 up to line 923 in the 001_PokeMarket_Main.rb file. Contact me through discord if you still need help with something

Awesome I shall check it out and experiment. Thank you. ^-^

Edit: It works! Thank you so much. The items list text colors did change.
 
Last edited:
Back
Top