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

Topics and discussion about specific mods
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:Ha ha ! You like numbers.
For the moment, I am coding and it's quite hard, because I'm also doing the fluids and energy at the same time.
We'll see balancing afterwards, once the code will run. We have to do testings to see what will be the
But if you expect doing some stock exchange optimisation, you will be disapointed because we do not have any graphical tools (curves) to help up following a value. So I guess that most users won't go so far into optimisation. They just will understand that if you sell or buy always the same thing, prices will change.
find bug

buy in items - not in buy :(
Attachments
bandicam 2016-08-16 22-27-02-292.jpg
bandicam 2016-08-16 22-27-02-292.jpg (204.25 KiB) Viewed 7220 times
bandicam 2016-08-16 22-26-10-152.jpg
bandicam 2016-08-16 22-26-10-152.jpg (135.63 KiB) Viewed 7220 times
bandicam 2016-08-16 22-26-00-819.jpg
bandicam 2016-08-16 22-26-00-819.jpg (143.19 KiB) Viewed 7220 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 »

Airat9000 wrote:find bug
buy in items - not in buy :(
I do not understand what I am supposed to see.
Please be more precise, or ask some friend to write in english for you.
Last edited by binbinhfr on Tue Aug 16, 2016 9:35 pm, edited 1 time in total.
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 »

Yes yes, you're right, you can do anything you want and exploit the system : it's called capitalism and stock exchange wolves. Then you can also use the system wisely :-)

For water, I already lower its price in next version.
New basic resources will look like :
["water"] = 3,
["coal"] = 14,
["stone"] = 27,
["iron-ore"] = 19,
["copper-ore"] = 21,
["crude-oil"] = 100,
["raw-wood"] = 51,
["alien-artifact"] = 1000,

For those who want to help me test the new version with fluids/energy and dynamic prices, here is a first version.
You have 2 new techno to research.
Make a backup of your map before test in case... ;-)
Last edited by binbinhfr on Wed Aug 17, 2016 4:48 pm, edited 2 times 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:Yes yes, you're right, you can do anything you want and exploit the system : it's called capitalism and stock exchange wolves. Then you can also use the system wisely :-)

For water, I already lower its price in next version.
New basic resources will look like :
["water"] = 3,
["coal"] = 14,
["stone"] = 27,
["iron-ore"] = 19,
["copper-ore"] = 21,
["crude-oil"] = 100,
["raw-wood"] = 51,
["alien-artifact"] = 1000,

For those who want to help me test the new version with fluids/energy and dynamic prices, here is a first version.


You have 2 new techno to research.
Make a backup of your map before test in case... ;-)
BlackMarket_1.0.14.zip
I say I do not buy things you can see in the photo?
I clicked to buy! things not
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:I say I do not buy things you can see in the photo?
I clicked to buy! things not
When you are using the "buy now" button ?
Does the money decrease ? I mean does it count the purchase price anyway ?
Are you sure that the content of the buying chest is not immediatly transfered to another chest with inserters ?
Please try the new version 1.0.14 above, and tell me if the problem is still here.

PS : when you answer, please click "post reply" and not "quote".
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 water, I already lower its price in next version.
New basic resources will look like :
["water"] = 3,
["iron-ore"] = 19,
["copper-ore"] = 21,
But prices are computed based on material costs (among others) so now everything will be cheaper. The price of water has thus increased compared to everything else! Before water was worth 10% as much as ores. Now it's 15% as much.

I can't load v1.0.14 in Factorio 0.13.13 and updating Factorio is too hard with all the bugs in Factorio so I haven't tested in game though.
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:
binbinhfr wrote: For water, I already lower its price in next version.
New basic resources will look like :
["water"] = 3,
["iron-ore"] = 19,
["copper-ore"] = 21,
But prices are computed based on material costs (among others) so now everything will be cheaper. The price of water has thus increased compared to everything else! Before water was worth 10% as much as ores. Now it's 15% as much.

I can't load v1.0.14 in Factorio 0.13.13 and updating Factorio is too hard with all the bugs in Factorio so I haven't tested in game though.
For prices, I get inspiration of a work from Klonan, one of the devs. Anyway, numbers will always be subject to argumentation in both directions.
If I put water price too low, you will say that it would allow the user to get a free water source anywhere in the desert...

For testing, just edit info.json and lower the base dependency to 0.13.13

What bugs do you have in 0.13.15 ? It works ok for me.
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: If I put water price too low, you will say that it would allow the user to get a free water source anywhere in the desert...
Well that's what your mod water well does. If that isn't OP then how can buying water for some small cost be OP? If you can sell water then wouldn't you balance it around that?
binbinhfr wrote: For testing, just edit info.json and lower the base dependency to 0.13.13
Ok. Thought that there was a reason for 0.13.14 as dependency since you put it in there q:
binbinhfr wrote:What bugs do you have in 0.13.15 ? It works ok for me.
Currently the auto updater reports that there are no new versions.
And when it works sometimes my saves gets corrupted instead.


EDIT:

Code: Select all

Error while running the on_init: __BlackMarket__/control.lua:596: attempt to index local 'player_mem' (a nil value)
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
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 »

Output message when attempting to open a trading entity, and unable to reopen the GUI for that particular entity until it is removed and replaced: Trader already edited by <USERNAME>
Reproduction: Open any trading entity, then quickly press escape and open another trading entity before the GUI for the previous one is closed.
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 lowered water a bit, and increased ores a bit.
Error while running the on_init: __BlackMarket__/control.lua:596: attempt to index local 'player_mem' (a nil value)
should be corrected here
Output message when attempting to open a trading entity, and unable to reopen the GUI
ha ha, you were too quick for my check loop. Corrected.
Did you test trader tanks and trader accus ?

please test :
BlackMarket_1.0.15.zip
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 »

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 151 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 7588 times
bandicam 2016-08-17 23-46-38-030.jpg
bandicam 2016-08-17 23-46-38-030.jpg (129.8 KiB) Viewed 7588 times
Post Reply

Return to “Mods”