Parallel Research

by Tename

Allows researching multiple technologies at the same time, evenly distributing the workload between all available labs.

Utilities
12 days ago
2.0
2.71K

g *Possibly* ignoring science pack quality?

2 months ago

See title: I calculated out how much tech I could get done with maraxsis science packs, but then I got way less than that much tech completed.

It's possible I calculated it incorrectly (not all my labs have the same prod) but if I ignore the quality value, I am getting much closer to the actual value of science I got.

2 months ago

Related note: It's possibly also ignoring lab quality? Namely, LabPrototype has uses_quality_drain_modifier (and then QualityPrototype has its own values) but I didn't see that used when I looked through the codebase to figure out why my science pack calculation was so incorrect.

I might've just missed it, but I thought I'd bring it up incase it really was forgotten.

2 months ago

I think you're right in that uses_quality_drain_modifier isn't accounted for. There's a readable runtime property science_pack_drain_rate_percent that Parallel Research uses, but it's only on the lab prototype, so it can't take into account lab quality. As for why this wasn't implemented earlier, probably because no vanilla lab uses it, and neither do most modded labs. The documentation about the feature outright lies, which definitely doesn't help matters.

2 months ago

Yeah, there is a bug with quality. It appeared recently enough, because everything definitely worked fine in the past. Will fix it soon.

2 months ago

Okay, the science pack quality bug is fixed.

As for uses_quality_drain_modifier thing, unless I'm blind there is no way to check if a lab prototype actually uses that property at runtime, so it cannot be implemented right now.

2 months ago

Hmm, you're right.

I don't know how much you care/if you want to bother, but: You could try using ModData. In data-final-fixes, save every lab's uses_quality_drain_modifier into data.raw["mod-data"][key], then it (should?) be readable through prototypes.mod_data[key]. LuaQualityPrototype has science_pack_drain_multiplier, so you shouldn't need to transfer more than a true/false for each lab.

2 months ago

In this case it's possible to implement it.

Just gonna have to wait till 2.0.58 hits stable.

2 months ago

Technically it's possible to use helpers.compare_versions(helpers.game_version, "2.0.58") >= 0 to add conditional behavior based on the game version, letting experimental players access the feature, while still running on stable. helpers has been available in the runtime stage for a while, but a recent update prior to the current stable exposed it at the prototype stage as well.

Given that it wouldn't really be necessary once the version hits stable except for people who specifically downgrade their game, it's ultimately your choice whether or not doing this would be worth the effort.

a month ago

Didn't bothered with comparing versions, 2.0.60 is stable and so it's now implemented.

New response