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

Topics and discussion about specific mods
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 »

Yes, I've been testing the new functionality for a few hours now and I've noticed that the price of energy is increasing as more is purchased. I know that this was intended for items, but for power too? And in the tank GUI all liquids are marked with their proper prices, but in the trading chests all are marked as 101u.

Edit: The liquid issue is probably due to the mod railtanker. I can buy all the physical liquid items marked with the railtanker mod in the buy chest.
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've noticed that the price of energy is increasing as more is purchased.
Yes it's for all market prices.
but in the trading chests all are marked as 101u.
Is it on classic vanilla items ?
Press "rescan" to force a rescan of all prices and wait completion.
Then can you press "export" and send me the CSV file in script-output directory,
and make a screencopy of what you see, because I cannot reproduce that.
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 think that the issue is with the railtanker mod and that the items are probably not the liquid items themselves. I've checked the railtanker mod folder and haven't been able to locate any of the items so I suspect that they might be dynamically created for mod-compatibility.
Attachments
BlackMarket-prices.csv
(103.96 KiB) Downloaded 167 times
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 »

New items...
Attachments
mod-list.json
(6.12 KiB) Downloaded 152 times
BlackMarket-specials.txt
(4.12 KiB) Downloaded 140 times
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:I think that the issue is with the railtanker mod and that the items are probably not the liquid items themselves. I've checked the railtanker mod folder and haven't been able to locate any of the items so I suspect that they might be dynamically created for mod-compatibility.
Yes I had a look at the railtanker mod.
It creates fake items that are used to "itemize" fluids.
But these items should be hidden. I asked the modder for this change. I cannot do anything myself.
My mods on the Factorio Mod Portal :geek:
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 »

Code: Select all

Error while running event on_gui_click (ID 1)
__BlackMarket__/control.lua:727: attempt to perform arithmetic on global 'tot' (a nil value)
Didn't get a U value on my screen, just a coin icon with something that looks like a button with nothing in it to the right of it. Thought maybe I have to sell something before it appears. Put some items in a sell chest and pressed evaluate. Tried to eval value of some vanilla artifacts. Error.

Factorio v0.13.16 (wohoo)
BM 1.0.15
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 »

Qon wrote:

Code: Select all

Error while running event on_gui_click (ID 1)
__BlackMarket__/control.lua:727: attempt to perform arithmetic on global 'tot' (a nil value)
Didn't get a U value on my screen, just a coin icon with something that looks like a button with nothing in it to the right of it. Thought maybe I have to sell something before it appears. Put some items in a sell chest and pressed evaluate. Tried to eval value of some vanilla artifacts. Error.

Factorio v0.13.16 (wohoo)
BM 1.0.15
Yes I just detected the "tot" bug too.
For the empty credits buttons, is it possible that you opened the map with something in your hand ?
Or was it only during price scanning ?
Anyway I think I found a correction too.
Please try :
Last edited by binbinhfr on Wed Aug 17, 2016 4:47 pm, edited 1 time in total.
My mods on the Factorio Mod Portal :geek:
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: For the empty credits buttons, is it possible that you opened the map with something in your hand ?
Or was it only during price scanning ?
Anyway I think I found a correction too.
The price scan started when I loaded my world, yes.
My cursor was empty.
1.0.16 fixed the empty U counter.

But now rocket fuel and satellite costs 101u!
Other items seems to have gotten more expensive.

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. Can't stockpile rocket fuel before patch :o
Edit: pressing "new order" sometimes makes it possible to select items. Time to sell water and buy rocket fuel :D

Edit 2: So water fell down to 1u now. Since the original price was 2 it can't go down to 20% of the price with integer prices. But with the small storage capacity of the selling tanks and water now being 1/10 of the privious value at 1u instead of 10 while high end items didn't fall in price it might not be OP any more.
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 »

> 1.0.16 fixed the empty U counter.

ok

> 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.

> 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)

> 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.

Please describe a precise way to trigger this.

> Can't stockpile rocket fuel before patch :o

Can you rephrase, I did not get it.

> Time to sell water and buy rocket fuel :D

;-)

EDIT: try 1.0.18 in next message
Last edited by binbinhfr on Wed Aug 17, 2016 9:14 pm, edited 1 time in total.
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:> 1.0.16 fixed the empty U counter.

ok

> 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.

> 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)

> 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.

Please describe a precise way to trigger this.

> Can't stockpile rocket fuel before patch :o

Can you rephrase, I did not get it.

> Time to sell water and buy rocket fuel :D

;-)

12 ver
17 ver!



try this
The attachment BlackMarket_1.0.17.zip is no longer available
Attachments
bandicam 2016-08-17 23-50-02-360.jpg
bandicam 2016-08-17 23-50-02-360.jpg (158.05 KiB) Viewed 7597 times
bandicam 2016-08-17 23-46-38-030.jpg
bandicam 2016-08-17 23-46-38-030.jpg (129.8 KiB) Viewed 7597 times
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 7425 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:
Post Reply

Return to “Mods”