• 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!
Free Market

Resource Free Market 2.0.2

wrigty12

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

Free Market - "Is this item still available?" - Buy items from random NPCs!

Inspired by social media marketplaces and secondhand purchasing websites, this plugin allows you to purchase lots of items from NPCs in your game.

Version
  • This plugin works for v20.1 and v21.1
Features
  • Item Lots: Define item lots that can be sold in your game. You can also add generic lots on-the-fly during your game if you wish. These lots are very customizable. For instance, you can have your rival sell you 145 Masterballs for...

Read more about this resource...
 
It's like a command script "randomItem = true" in FREE_MART_Settings
I still don't know what exactly you're asking for. Can you explain what you are looking to happen?

If you're looking for a lot to be a random item, you can look at the :BASICITEM1, :BASICITEM2, and :BASICITEM3 example configurations. You just need to set :item to be an array containing any of the items to pull from.
 
Last edited:
I still don't know what exactly you're asking for. Can you explain what you are looking to happen?

If you're looking for a lot to be a random item, you can look at the :BASICITEM1, :BASICITEM2, and :BASICITEM3 example configurations. You just need to set :item to be an array containing any of the items to pull from.
Damn...I miss this one.
Thank you..it's solved my problem.
 
wrigty12 updated Free Market with a new update entry:

1.1 - The Proc Update

BEFORE UPDATING ANY FILES: If you have made any edits to the 000_Settings, 002_Configuration, or 002a_Configuration_SocialLinks files, make sure to make a backup of those files before updating the plugin. If you copy over files to update, it will overwrite your changes.

Change Log
  • ⭐New feature: Run code after purchase. By adding :after_purchase and setting it to a proc, you can set up any code you wish to run after the...

Read the rest of this update entry...
 
wrigty12 updated Free Market with a new update entry:

Update 1.2 - Pokemon and Trade Lots

BEFORE UPDATING ANY FILES: If you have made any edits to the 000_Settings, 002_Configuration, or 002a_Configuration_SocialLinks files, make sure to make a backup of those files before updating the plugin. If you copy over files to update, it will overwrite your changes.

Change Log
  • ⭐New feature: Pokémon lots. You can now sell or trade Pokémon in a Free Market lot. Details about all the new parameters for these lots, as...

Read the rest of this update entry...
 
Another killer plugin - the addition of Pokemon lots is awesome.

Is there a way to increase the frequency of lot refreshes? Like every 6 hours or 12 hours, rather than daily?
 
Another killer plugin - the addition of Pokemon lots is awesome.

Is there a way to increase the frequency of lot refreshes? Like every 6 hours or 12 hours, rather than daily?
Not currently. Personally I felt like anything more frequent than 24 hours is a bit rushed, but I also use Unreal Time. I'll look into adding that customization
 
wrigty12 updated Free Market with a new update entry:

Update 2.0 - Player Lots

BEFORE UPDATING ANY FILES: As part of this update, some file names and setting names have been changed. You may need to redo some of your 000_Settings or 002_Configurations (now 3 different files). Any custom currency will need to be remade using the updated 005a_Currencies_CustomExample file. It's recommended to make a backup copy of your current Free Market plugin folder and reintroduce your edits to this new version once installed.

Change...

Read the rest of this update entry...
 
Hello, thank you for your plugin — I really enjoy this feature! However, I’ve encountered an issue. When I start a new game, the market works perfectly fine and the items appear as expected. But later, when I try to save the game, sometimes I get the following error and the game crashes. (This problem has never occurred before using this plugin.) My development version is Essentials 20.1.

v20.1 Hotfixes 1.0.7]
Exception: TypeError
Message: no _dump_data is defined for class Proc
Backtrace:
SaveData:150:in `dump'
SaveData:150:in `save_to_file'

After extensive testing, I found that the issue specifically happens when the market includes TRADE Pokémon items. The crash occurs when I include the following two lines in a TRADE Pokémon item:

:trade_condition => proc { |yourpkmn| yourpkmn.level <= 20 },
:trade_condition_message => proc { |species_name| _INTL("Requested: Level 20 or lower {1}", species_name) },

So it seems the crash is caused by the use of proc objects, possibly because they can’t be serialized with Marshal.dump during the save process.
If I remove these two lines, the game saves normally. I hope this detail helps track down the issue. Thank you very much for your time and for developing such a great plugin!
 
Last edited:
Hello, thank you for your plugin — I really enjoy this feature! However, I’ve encountered an issue. When I start a new game, the market works perfectly fine and the items appear as expected. But later, when I try to save the game, sometimes I get the following error and the game crashes. (This problem has never occurred before using this plugin.) My development version is Essentials 20.1.

v20.1 Hotfixes 1.0.7]
Exception: TypeError
Message: no _dump_data is defined for class Proc
Backtrace:
SaveData:150:in `dump'
SaveData:150:in `save_to_file'

After extensive testing, I found that the issue specifically happens when the market includes TRADE Pokémon items. The crash occurs when I include the following two lines in a TRADE Pokémon item:

:trade_condition => proc { |yourpkmn| yourpkmn.level <= 20 },
:trade_condition_message => proc { |species_name| _INTL("Requested: Level 20 or lower {1}", species_name) },

So it seems the crash is caused by the use of proc objects, possibly because they can’t be serialized with Marshal.dump during the save process.
If I remove these two lines, the game saves normally. I hope this detail helps track down the issue. Thank you very much for your time and for developing such a great plugin!
Well, I learned something today! I have an idea in mind to make this work, so the next update should fix this.
 
wrigty12 updated Free Market with a new update entry:

Update 2.0.1 - Various fixes

The only files that was changed were 001_Data, 003_MarketUI, 004_PlayerLots, and 006_Utilities. You only need to replace those files with the updated one for this update.

Change Log
  • 🛠️Fixed handling of procs throughout the plugin so it doesn't crash when you save your game.
  • 🛠️Fixed a crash that would occur for trade lots without :trade_condition set.
  • 🛠️Fixed player lot buyer names not being properly displayed if the NPC's :name was a proc.

Read the rest of this update entry...
 
This looks super promising! Do you happen to have any screenshots or the like lying around of what the resource would look like in game?

This might help me decide if it's something I would like to have in my own project or not!
 
This looks super promising! Do you happen to have any screenshots or the like lying around of what the resource would look like in game?

This might help me decide if it's something I would like to have in my own project or not!
I haven't bothered adhering to the new hosting policy for images so I don't have any to post here.

Since you're also on the discord, search the discord for "Free Market" and you'll find posts I've made that show off how it looks.
 
I haven't bothered adhering to the new hosting policy for images so I don't have any to post here.

Since you're also on the discord, search the discord for "Free Market" and you'll find posts I've made that show off how it looks.
No worries, it doesn't matter to me too much where I have to look, as long as I can see. I appreciate it!
 
wrigty12 updated Free Market with a new update entry:

Update 2.0.2 - Crash Fixes

The only files that was changed were 001_Data and 003_MarketUI. You only need to replace those files with the updated one for this update.

Change Log
  • 🛠️Fixed a crash that would occur if you set the ID of one of your Free Market item lots to be the same as an item ID, and you tried to sell that item as a personal lot
  • 🛠️Fixed a crash that would occur when interacting with a sold personal lot if you don't have the Social Links plugin installed.

Read the rest of this update entry...
 
Back
Top