djmango / BlackMarket2

A mod for Factorio economics

Home Page:https://mods.factorio.com/mod/BlackMarket2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modded items cost 20u

einarur opened this issue · comments

(Crosspost from the factorio mod forum)

Hi!

Played factorio a few years ago and really enjoyed Blackmarket, so I am really glad to see that someone has picked up the code and further developed it, good man!

Testing this in a game with AngelBob and Pyanodon we are having trouble with a lot of the items having price of 20u, which seems to be the unknown item price. For example, saphirite ore is correctly priced at 30u, but crushed saphirite is priced at 20u.
Ive tried disabling pyanodon but still same problem. Any idea on how we might fix this?

BM2 has had long-standing issues with interpreting the price of items such as crushed ore or the water counterparts found in AngelBob. See this issue for more detail. I revamped the price system a while back, which largely solved the issue, but some of the recipes still are trouble and I don't currently have the time to investigate. Feel free to submit a pull request with further details, and I can merge or put in a fix.

Thanks for the quick reply. Could you provide some details on the info you have on the issue and we could investigate a bit for you. Had a quick look at the code and get the impression that the problem could be:

  1. that it is not looking up the entity type correctly, assigning «Resource» to items which are not raw materials
  2. something fails with the recipe lookup on the more advanced items, making it assign «unknown» to one of the ingredients lower in the chain, overriding the correct price
  3. It computes the price of intermediaries like crushed ore before it computes price of the raw ore, somehow messing up the prices

Looks like it's a item classification issue. See https://mods.factorio.com/mod/BlackMarket2/discussion/5fe4ac9ced2b9458fd7b5c2b#post-4 for more details, I'm going to have to rebuild that system it seems.