Black Market 2

by djmango

Sell and buy items/fluids/energy on the black market using trading chests/tanks/accumulators, choosing the frequency of exchanges and related fees. You can now sell your overproduction and buy things that you don't want to craft by yourself. You can also use these trading units as a paying shipment system.

1 year, 2 months ago
0.17 - 1.1
17.6K

g Credits shown as nanu

3 years ago

Hi,

I updated to the newest version today and a few hours into the game I realized my credits were shown as nan rather than a few millions. Is there a way to reset my credits to a valid value without losing my progress?

3 years ago

I'm currently working on a fix for this, but to fix your money without resetting just use this command https://github.com/djmango/BlackMarket2/issues/21#issuecomment-687856872

3 years ago

Great, that fixed the problem.
Thank you for the quick response!

3 years ago
(updated 3 years ago)

Got the same problem running angels/bobs mods with angels crushed stone getting an infmu in value. also slag is valued ~35k for some reason o0

Edit: actually quite alot endgame items from different mods are listed as -infMu- not sure what causes this.

3 years ago

These mods have recipes that have the same item as a product and ingredient, leading to an infinite loop when BM2 tries to evaluate item cost. I've been working on fixes for these but it's getting a little convoluted.

3 years ago

So shouldn't this be fixed by setting the deph to lets say 1, so it won't loop? on the other hand i have not noticed any difference between 10 and 1

3 years ago

that's the expected behavior but I have to investigate why that's not happening

3 years ago

I've tried to set the prices manually through editing the bm2-specials. But it seems your version is not giving one out any more? I looked for it in factorio main dir/script-output (where it used to be) and in the %appdata% folder, but haven't found one after I backup>delted the file.

3 years ago

I have no idea why its not outputting, if you're a modder could you check my code? I haven't messed with the outputting much

3 years ago

I just put an update out, should fix the sludge issue with angels/bobs

3 years ago

hm, just updated the mod. I dunno what the "sludge issue" was, but for crushed stone and most of bobs advanced tech the infMu problem persists.

Unfortunatly I'm not a modder myself. if it was a smaller piece of code I maybe could have figured some things out by trial and error. I don't think I'm capable of going through thousands of lines of code I barely understand :(
wheres the actual calculation starting in your code? I guess I could give it a shot anyways

3 years ago

oh that's strange, I thought I just verified that the crushed worked. I'll have to check with more mods it guess. look at the compute_item_cost function

3 years ago

starting line 788? was just looking at that ;) were the comments written by you? so that i know what im dealing with here

3 years ago

yes I wrote them

3 years ago

Okay so there are a few things comming to my mind .first thing is how would you determine what is the definitiv recipe for any given material to be calculated. bc many of the incorrectly calculated items are actually dependent on byproducts in angels/bobs mods having 15 to 25+ ways to get them. slag for example is a pretty low tier item, yet worth 36k.It has about 23 recipes, but as far as i can see theres not much depth to it.it mostly breaks down to what should be determined raw resources - therefore stops iterating. im still trying to figure out why thats not the case with crushed stone tho :/

2nd: since your recipe depth max doesn't seem to have any effect on very complex products there might be something wrong here( since im no modder or familiar with .lua i am afraid im no help on that topic.

3rd: im gonna send you some screens of my csv with the inf prices i hope you can get any clues out of that
https://pasteboard.co/Jqj3QTE.jpg
https://pasteboard.co/Jqj496S.jpg
https://pasteboard.co/Jqj4sDR.jpg

i know i had one more thing but i just cant remember xD

3 years ago

Fixed in latest update

This thread has been locked.