Quality Lib


Provides a library for modders to easily interface with Quality and add quality stats to any item/entity.

Internal
3 months ago
2.0
2.23K
Transportation Logistics Trains Combat Armor Mining Fluids Logistic network Manufacturing Power Storage

g Questions on how this works

4 months ago

So I read the information tab about 5 times to make sure I followed and have a few questions:

  1. Why is ["storage-tank"] included twice in the api call? Is the first call the type THEN the entity?

II. Why do you need to add custom entities? Don't all quality named entities already exist? Everything I look at using the in-game help shows quality leveling on, at the very least, hitpoints. So that implies that quality entity exists or was generated at the very least. Why double this up? Can you not edit the already existing quality-named entities?

In the early days of the expansion release I was looking into how to add Quality features to my Nuclear Bots mod and everything I saw told me it wasn't possible to change what the base game wouldn't allow me to with quality. Super frustrating. Was there an API change that allows this?

Been playing and modding this game for 10 years, and I'm still amazed at how great the game and community is.

4 months ago

Oh, yeah, and why create the 'common' entity type when that's the base-game quality?

4 months ago

Why is ["storage-tank"] included twice in the api call? Is the first call the type THEN the entity?

Yes. The type distinction is necessary to avoid collisions between entities and items. I'll edit the description to make that more clear.

Why do you need to add custom entities? Don't all quality named entities already exist? Everything I look at using the in-game help shows quality leveling on, at the very least, hitpoints. So that implies that quality entity exists or was generated at the very least. Why double this up? Can you not edit the already existing quality-named entities?

They do not exist, actually! Quality is extremely hardcoded, and there is very little way to actually interact with it with mods. You can edit a few things like mining drill resource drain, science pack drain, beacon power draw, but that's it really. If you want to add quality stats to an item or entity, or even adjust the quality stats of an item or entity, you have to add a new prototype for each quality level. There's no way around this, unfortunately.

In the early days of the expansion release I was looking into how to add Quality features to my Nuclear Bots mod and everything I saw told me it wasn't possible to change what the base game wouldn't allow me to with quality. Super frustrating. Was there an API change that allows this?

There was no change to the API, which is why existing Quality mods are so janky and buggy, and why this mod also has to do such weird stuff in order to make everything work.

Oh, yeah, and why create the 'common' entity type when that's the base-game quality?

It doesn't, that's a typo in the mod description. I'll fix it.

4 months ago

I've adjusted the mod description. Let me know if that makes things more clear or if you think there are any changes to be made!

4 months ago

["PROTOTYPE_FIELD"]={UNCOMMON_VALUE, RARE_VALUE, EPIC_VALUE, UNUSED_VALUE, LEGENDARY_VALUE}

Shouldn't LEGENDARY_VALUE come after EPIC, then UNUSED_VALUE last as a potential 5 extra quality?

I use a custom Mythic Quality mod that adds another quality. And do extra values here cause issues if the player doesn't use extra quality mods?

4 months ago
(updated 4 months ago)

Shouldn't LEGENDARY_VALUE come after EPIC, then UNUSED_VALUE last as a potential 5 extra quality?

No, the game skips over the 4th quality level to go to Legendary at 5. That's why there's a larger than normal jump in quality stats between Epic and Legendary compared to the other quality values.

I use a custom Mythic Quality mod that adds another quality. And do extra values here cause issues if the player doesn't use extra quality mods?

Currently yes. The original idea was for a mod using this mod to handle that issue themselves, but making the library handle it instead wouldn't be difficult and would probably make more sense.

New response