[MOD 0.13] Black Market (sell and buy on the market)

Topics and discussion about specific mods
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by binbinhfr »

You probably try to load an old map.
Try this :
BlackMarket_1.0.18.zip
My mods on the Factorio Mod Portal :geek:
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by Airat9000 »

binbinhfr wrote:You probably try to load an old map.
Try this :
The attachment BlackMarket_1.0.18.zip is no longer available
:( not load!!!
Attachments
bandicam 2016-08-18 00-46-45-870.jpg
bandicam 2016-08-18 00-46-45-870.jpg (173.83 KiB) Viewed 7403 times
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by Qon »

binbinhfr wrote: > But now rocket fuel and satellite costs 101u!

even after the rescan ? and if you wait the next hour ? maybe I found a problem, but I'm not sure, because prices are OK for me.
If it still do not work, please export CSV file and send it to me with BlackMarket-specials.txt.
Yes, even after rescan and waiting AFK hours.
binbinhfr wrote: > Other items seems to have gotten more expensive.

As I told you, I changed resource prices, but nothing else. Then prices are dynamics and can vary x0.5 to x2
(that's why water goes down to 1 and not less)
Well PAMKII wen from 16 MU to 18 MU when you lowered the resource prices. Ores went from ~100 -> 20 while plates went from 187 -> 100. Before plates were worth 87% more than ores. Now the are worth 400% more than the ores. Same with some other things. So somehow the price raise from crafting is valued more than before.
binbinhfr wrote: > And when I try to select an item to buy the GUI buttons don't react when I try to click to select an item.

Strange. Did you open the list of price before the chest ?
Then if you want to edit an order, you have to click on the icon order and then in the items list.
For me it works.
Maybe. But then I closed it and clicked again and it still happened I think. I'll try to get the exact steps next time it happens.
binbinhfr wrote: > Can't stockpile rocket fuel before patch :o

Can you rephrase, I did not get it.
With the bug described above I couldn't buy lots of rockt fuel and satellites while the price was bugged to 101 U. But then it became possible to buy so now I have several chests full ready to be sold when the price bug is fixed :twisted:
binbinhfr wrote:EDIT: try 1.0.18 in next message
Yeah, when I get the time.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by binbinhfr »

With the bug described above I couldn't buy lots of rockt fuel and satellites while the price was bugged to 101 U.
I really need more details about this bug because I did not get any problem like that...
My mods on the Factorio Mod Portal :geek:
sabriath
Inserter
Inserter
Posts: 26
Joined: Fri Jan 10, 2014 6:49 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by sabriath »

Some ideas:

1. Allow the chests to connect to the wire network. The condition could be to enable or disable the chest given a check....this way the buy/sell can be turned on and off. The buy chest will automatically send a signal of "B" with the total cost of the purchase order in queue, and the sell chest will send a signal of "S" with the total evaluation price of everything inside the chest.
2. Have the prices fluctuate based on player pressure....for example, if the player keeps buying belts, then belts would increase in price, and items being sold would reduce in price. In order to prevent the possibility of "cheating" (buying a massive amount to raise price and then resell it or even more), limit the amount of a single item purchase/sale to the size of the box (10,000 units of a single item) and only fluctuate the price by 0.0001% per unit.

As an example, if you buy 1,000 Iron Ore at 98, which is 98,000 plus 3920 lowest tax, price would increase to 98.098...selling the max of 10,000 back to try and gain profit would yield 980,980 minus 39,239.20 tax, reduce price to 97.117, and total net profit of 839,820.8. If you had sold your original stock of 9,000 Iron Ore instead of bothering to inflate the market first, it would have given you 882,000 minus 35,280 tax, reduce price to 97.118, total net of 846,720. This makes it a deterrent for people to manipulate the market directly.

3. Every hour or so, have the code choose a few items at random and fluctuate their prices randomly, trying to stay within 30% of initial market price. If the item is extremely over/under priced, have it move toward nominal (so that over time, items return back to normal values).

I think this would make it seem more fluid and allow more network programming (say you are buying Ore and selling Plates, if the price has shifted to the point that you are not making a good enough profit, you turn the boxes off until market returns to normal).
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by binbinhfr »

Thx for the ideas.
I already had in mind sending values to the circuit network. (I add it officially to the todo list of the initial post)

In a previous message you can download last test version (I need testers ;-) ) : it allows fluid and energy sell/buy but also introduces a law of sell/buy that makes prices fluctuate.

For random fluctuations, I still ask myself. I don't want the user to be lost into complex pricing that he will finally not understand. Not every player is used to circuit programming to trigger sell/buy at the good moment.
My mods on the Factorio Mod Portal :geek:
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by Airat9000 »

binbinhfr wrote:Thx for the ideas.
I already had in mind sending values to the circuit network. (I add it officially to the todo list of the initial post)

In a previous message you can download last test version (I need testers ;-) ) : it allows fluid and energy sell/buy but also introduces a law of sell/buy that makes prices fluctuate.

For random fluctuations, I still ask myself. I don't want the user to be lost into complex pricing that he will finally not understand. Not every player is used to circuit programming to trigger sell/buy at the good moment.
:D not upload game old message in photo
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by binbinhfr »

Airat9000 wrote: :D not upload game old message in photo
Not easy to understand what is the problem...
Please update and tell me if it works :
BlackMarket_1.0.19.zip
(1.15 MiB) Downloaded 109 times
My mods on the Factorio Mod Portal :geek:
Wtcan334
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sun Aug 14, 2016 11:55 am
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by Wtcan334 »

The game is crashing on new scenario creation with this error:

2588.807 Error MainLoop.cpp:698: Exception at tick 98: Error while running event on_tick (ID 0)
__BlackMarket__/control.lua:466: attempt to compare number with nil

There are also nine of these messages on scenario creation:

Resource not available: <bob's ores>

The game only crashes once the tab key is pressed to clear the popup and calculations begin for BlackMarket. The crash also occurs on BlackMarket_1.0.18 which used to work for me. I think that the problem lies with the changes to RSO as the crashes only started once I upgraded to the latest version of that mod.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by binbinhfr »

Wtcan334 wrote:The game is crashing on new scenario creation with this error:
I tested all 3 scenarios (free, sandbox,supply) and had no problem.
Did you test these scenarios ? Which one in particular ?
Did you test without BlackMarket installed to see if it's not a problem with another mod ?

"Resource not available: <bob's ores>"
this message is not from my mod.
I will try with RSO.
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by binbinhfr »

I found the problem with the line 466 error.
corrected here :
BlackMarket_1.0.20.zip
(1.15 MiB) Downloaded 125 times
Please tell me if the error disappeared

for the rest (RSO, bobore, etc...) I cannot reproduce the problem (I installed RSO and all bobs).
I don't think it is a problem with my mod. Because the message isn't generated by my mod, and I do not touch resources. I only read them. Try to uninstall BlackMarket to see if the problem is still here. If it is still here, then contact the other modders (bob/rso).
My mods on the Factorio Mod Portal :geek:
Wtcan334
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sun Aug 14, 2016 11:55 am
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by Wtcan334 »

binbinhfr wrote:
Wtcan334 wrote:The game is crashing on new scenario creation with this error:
I tested all 3 scenarios (free, sandbox,supply) and had no problem.
Did you test these scenarios ? Which one in particular ?
Did you test without BlackMarket installed to see if it's not a problem with another mod ?

"Resource not available: <bob's ores>"
this message is not from my mod.
I will try with RSO.
The game crashes on the freeplay and supply scenarios. It also crashes on the second scenario due to another mod before the crash would occur with BlackMarket. When BlackMarket is toggled off the crash doesn't happen but it still crashes when BlackMarket is toggled on and RSO is toggle off so it can't be due to RSO.

Edit: BlackMarket_1.0.20 fixed the error. I'm not sure why it was happening with BlackMarket_1.0.18 though since I was able to play just fine a few days ago with it.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by binbinhfr »

Edit: BlackMarket_1.0.20 fixed the error. I'm not sure why it was happening with BlackMarket_1.0.18 though since I was able to play just fine a few days ago with it.
It was a subtile bug : it was depending of the speed at which the price scan was done and if the day change (noon) was close...

So now everything is ok ?
Did you find other problems ?
Because I'd like to publish this version officilially on the portal.
For me, I did not encounter other bugs, but this mod depends so much on other mods configurations...
My mods on the Factorio Mod Portal :geek:
Wtcan334
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sun Aug 14, 2016 11:55 am
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by Wtcan334 »

I haven't found any other problems so far and I have ~100 mods installed so it should be fine.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by binbinhfr »

OK so let's go publishing !!! :-D

PS : and thx for your valuable help.
My mods on the Factorio Mod Portal :geek:
axazol
Burner Inserter
Burner Inserter
Posts: 10
Joined: Wed Mar 02, 2016 12:20 am
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by axazol »

Money from the air, literally.
Image
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by binbinhfr »

axazol wrote:Money from the air, literally.
Image
What is this mod producing air ? What is the price of air ?
It's strange that you open a trader tank and you show me the GUI of a trader accumulator...
I wonder how it could be... Bug ?

You can also sell water, but the price is low. And if you sell too much, the price gets even lower.
My mods on the Factorio Mod Portal :geek:
axazol
Burner Inserter
Burner Inserter
Posts: 10
Joined: Wed Mar 02, 2016 12:20 am
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by axazol »

binbinhfr wrote:
axazol wrote:Money from the air, literally.
Image
What is this mod producing air ? What is the price of air ?
It's strange that you open a trader tank and you show me the GUI of a trader accumulator...
I wonder how it could be... Bug ?

You can also sell water, but the price is low. And if you sell too much, the price gets even lower.
For example:
Image
Bio Industries
Bobplates
Items w/o recipe is present in "buy" list:
Image

Also some mods, like "rail tanker" generate copies of existing items, just adding suffixes for them (.."tm" or .."-in-tanker") previous post, that can't be sold or obtained by usual ways. Or "angelsinfiniteores" adding to the game new type of "virtual" resources.
I suggest to ignore all items w/o recipes. Also set price to zero for items, which can be produced by recipes w/o ingredients. And as result all manufactured items get a negative coefficient.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by binbinhfr »

Hi axazol

thx for your return.

Working on this mod for a while now, I already faced the problems you are describing.

But alas problems are more complex. The problem is that a lot of mods introduces some custom "resources" without declaring them as resources. I have to identify these items. So items that are products of no recipes but are ingredients of some recipes are most of the time this kind of "undeclared" resources. If I just skip them, we are losing somes resources, and some pricing of all derivated products.

More than that, when you are using several mods, items are also often produced by several different recipes : you can have an item that is produced with no ingredients in one mod, and produced with ingredients in another one !... Not easy to automatically decide which is the "logical" recipe to keep for pricing, because one of them is often just a modder trick, but not always the one you think... :-)

You've got a lot of "special" tricky mods like railtanker, reverse factory, dark replicator, etc... that complexify the task, duplicating recipes and adding a big mess, making it difficult to extract a general pattern.
I suggest to ignore all items w/o recipes. Also set price to zero for items, which can be produced by recipes w/o ingredients. And as result all manufactured items get a negative coefficient.
If you look at the code, you will see that it is already the case for your both suggestions.

Except for Liquid air : it was already introduced in config.lua as an exception, responding to one early player demand, but now, I had a closer look at it and I agree that is is far too expensive. I suppressed this declaration and it will now be classified as a free product and priced 0. Derivated products (CO, etc...) will have a lowered price in consequence.

And except Ucoin : this is an item from my mod, which allow withdraw some cash in "solid gold". Then you can give this to another player if you wanna exchange money.

About "test mode items" : for me, they are listed as unknown, so unpriced. Please try now.

I will also price water to 0, to avoid easy exploit.

The electricity icon in the tank was a bug. I corrected it.

Thx for your help. Please update ingame.
My mods on the Factorio Mod Portal :geek:
axazol
Burner Inserter
Burner Inserter
Posts: 10
Joined: Wed Mar 02, 2016 12:20 am
Contact:

Re: [MOD 0.13] Black Market (sell and buy on the market)

Post by axazol »


As a possible solution or just yet another idea about pricing (pseudocode):

Image

Btw, in my previous last screenshot hidden groups still present in BM GUI, or i miss something?
Post Reply

Return to “Mods”