Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: [0.8.1a RC8] Oddity with non-econ commodities appearing on market  (Read 1509 times)

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile

So I have a non-econ commodity:
Code: csv
name,id,demand class,base price,price variability,utility,decay,origin,tags,stack size,cargo space,icon,sound id,sound id drop,order,economyTier,econUnit,iconWidthMult
High Value Prisoner,prisoner,crew,5000,,5,0.25,,nonecon,1000,0,graphics/icons/cargo/crew3.png,ui_cargo_crew,ui_cargo_crew_drop,19,2.5,100,0.6
When I start a new game, the commodity appears in the list of commodities in circulation (between the organs and the drugs in this case):
Spoiler
[close]
I don't know if they actually exist in the market's stockpiles, but I do know that I didn't write any code to put them there.
The "met demand of X units in reserve" number is indeed the same as that of the vanilla commodity for that demand class (crew, in this case).

Was able to make them not appear in UI by setting econUnit to 10000.

PS: Why does econUnit affect the availability of the commodity for sale in submarkets (as in, if stockpiles are low then econUnit also needs to be low for any units to appear for sale), in addition to the display logic in the market info? This was quite confusing to deal with, given that its behavior wasn't documented anywhere that I know of.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: [0.8.1a RC8] Oddity with non-econ commodities appearing on market
« Reply #1 on: June 07, 2017, 08:33:27 AM »

Not 100% sure on the econUnit question, but the issue here is the demand class of "crew". It should be something else, unique to the commodity. You can't have a mix of normal and nonecon commodities with the same demand class or things get weird.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: [0.8.1a RC8] Oddity with non-econ commodities appearing on market
« Reply #2 on: June 08, 2017, 03:58:49 AM »

Ah, okay, I'll try that.

(I recall game used to CTD if a commodity had an arbitrary demand class)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: [0.8.1a RC8] Oddity with non-econ commodities appearing on market
« Reply #3 on: June 08, 2017, 09:04:27 AM »

Really? They're all arbitrary, though, so that'd be pretty odd.

Ahh - the demand class has to match the id of the "primary" commodity. That might be what you were seeing.
Logged