Improved market customisation via set_market_item

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Anyone
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Apr 25, 2016 11:02 am
Contact:

Improved market customisation via set_market_item

Post by Anyone »

When you use custom event-like stuff for markets, you get a big red plus sign in the market, would be really nice to be able to add a (custom) sprite here.

When adding an item to the market, you can't set a custom label with the non-"give-item" type. Listening to the market event means you have to get the market item from the market and check the name, which you don't want to "Buff biter damage", but usually some name where typos are less obvious. In case of mods, perhaps even a localized string. It would be nice to have this available as option.

Additionally there's a small issue when buying more than you can carry. It will spill the loot on the floor. I actually thought I bugged the market at some point because people were complaining it was bugged as their items weren't appearing. I was constantly wondering why there were all kinds of items laying around the market until I found out it was the spilled loot. I would prefer to see either a reduced amount in the purchase, or block it completely.

I'm not sure if it should be supported, but prices that cost lower than 1 (ceil when buying on sum) are not possible either. If I were to put a stone wall in the market for 1 coin, I'd have to add bricks for 0.2 (5 bricks is 1 wall), which is currently not possible.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Improved market customisation via set_market_item

Post by Rseding91 »

I can implement something like this but I want to be sure before I make the changes and potentially break everything that uses market items.

Proposed additions:
  • name : string : optional : a simple ID (not enforced to be unique in a given market)
  • icon : sprite_path : optional : this is shown over the default icon
  • description : localised_string : optional : if this is given it's included in the tooltip for the market item (somehow, some tooltips already have descriptions?)
Proposed changes:
  • If you're about to buy something that can't fit *at all* in your inventory it rejects the purchase
As for the sub-1-cost items: that seems useless since you can just do the cost increase on the mod side before adding the offer (5 bricks for 1 coin instead of 1 brick for 0.2 coins). It gets the same result.
If you want to get ahold of me I'm almost always on Discord.

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Improved market customisation via set_market_item

Post by Bilka »

Some more requests that I gathered:
  • Make it possible to disable offers
  • show missing price amount (similar to how recipes have missing ingredients highlighted in red)
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Modding interface requests”