porisius / FicsitRemoteMonitoring

39 stars 7 forks source link

Max Production numbers on getExtractors #27

Closed featheredtoast closed 1 year ago

featheredtoast commented 1 year ago

As promised, I did wait an entire year before finding more bugs :)

Max production numbers seem to be doubly multiplied by overclocking amount on getExtractors

EG this extractor is a fully overclocked mk3 miner on a normal node. (Even if it was pure, max prod of 1500 is still over the 1200 cap):

"building":"Miner Mk.3",
      "location":{
         "x":-44922.0,"y":302273.59375,"z":-2515.800049,
         "rotation":210
      },
      "Recipe":"Iron Ore",
      "production":[
         {
            "Name":"Iron Ore",
            "CurrentProd":341.200012,
            "MaxProd":1500.0,
            "ProdPercent":"22.700001"
         }
      ],
      "ManuSpeed":2.5,
      "IsConfigured":true,
      "IsProducing":false,
      "IsPaused":false,
      "CircuitID":83
porisius commented 1 year ago

I'm tempted to make some debug commands that report back to chat window what the outputs of each item are prior to being calculated. Ought to only need the first in the array of FGBuildables, but might help put this problem to bed. This isn't the first time I have heard about it. getProdStats was notorious back in the day.

porisius commented 1 year ago

This might help... image

porisius commented 1 year ago

Found something... image

This one is going to come in real handy... image

featheredtoast commented 1 year ago

Regarding liquids and gasses oddities, that may be related to the different units represented in game, I've opened another ticket about that stuff here: https://github.com/porisius/FicsitRemoteMonitoring/issues/28

porisius commented 1 year ago

It is possible... figured I would focus down one then the other... if it is a two birds/one stone scenario, high-five for the good aim?

featheredtoast commented 1 year ago

Fair point - I only mention it in case that was conflating confusing numbers in liquid/gas extractors.

porisius commented 1 year ago

Yeah, that wasn't the only spot... apparently the getProdStats was affected. FRM 0.8.15 sent to SMR.

porisius commented 1 year ago

image Let me know if that gets both #27 and #28

featheredtoast commented 1 year ago

Amazing - thanks for the quick fixes again - will be taking a look soon!

featheredtoast commented 1 year ago

The new numbers look much better for both issues!

One correction: "Purity": Normal: should be quoted in JSON "Purity": "Normal" for it to be parse-able

featheredtoast commented 1 year ago

One point of clarification, is MaxProd supposed to be max production the currently set ManuSpeed or at full 100% speed?

I'm seeing maxProd of 960 from a miner even though it's set up for 162.5% speed (780) rather than 200% (960):

{
      "building":"Miner Mk.3",
      "location":{
         "x":-66076.5,"y":296870.71875,"z":-5900.700195,
         "rotation":310
      },
      "Recipe":"Coal",
      "production":[
         {
            "Name":"Coal",
            "CurrentProd":636.200012,
            "MaxProd":960.0,
            "ProdPercent":"81.599998"
         }
      ],
      "Purity": Pure,
      "ManuSpeed":162.5,
      "IsConfigured":true,
      "IsProducing":true,
      "IsPaused":false,
      "CircuitID":83
}
porisius commented 1 year ago

No, and I should have thought about that... It is the Maximum Producible based on the amount of slugs inserted.

Could add a SlugPotential or just change it. Thoughts?

featheredtoast commented 1 year ago

I'd propose just changing it - I personally would prefer it as it makes much more sense to track current output vs max output at the set speed to catch inefficiencies/backups in production chains.

(I don't have any need currently for SlugPotential myself)

porisius commented 1 year ago

image

porisius commented 1 year ago

FRM 0.8.16 sent to SMR

featheredtoast commented 1 year ago

Looks like that did it - looks great!