RimWorld

RimWorld

141 ratings
Quality Affects HP
4
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5, 1.6
File Size
Posted
Updated
177.752 KB
6 Dec, 2022 @ 11:41am
21 Aug @ 6:20am
7 Change Notes ( view )

Subscribe to download
Quality Affects HP

In 1 collection by SappyZoe
Mods by Fluxilis / Logan76667
2 items
Description
Makes quality affects hitpoints of all things, so higher quality means that items like armor last longer.

To be clear, if something has Quality and Hitpoints, this mod will probably affect that. That includes apparel and weapons that have Quality, as well as furniture and art. If a mod adds quality to something that doesn't have it in the base game, it should apply to that too.

Hp factors are:
  • Awful: x0.5
  • Poor: x0.75
  • Normal: x1
  • Good: x1.75
  • Excellent: x3
  • Masterwork: x6
  • Legendary: x10

You can change the Hp factors in the mod settings, but you must restart the game after changing, and it'll create some jank if you do it for an existing save.


Savegame Compatibility
Not good.

Will _technically_ work with existing savegame, but requires some manual maintanance to make it work seamlessly※.
Adding this mod won't crash or break your save, but all existing things with quality will have their maxhp changed, but not their current hp. This means that, for example, all of your untouched legendary gear and furniture will now be at 10% hp.

Similar when removing from a savegame.
Max hp will be reset to Vanilla values, but current hp won't, so your higher quality things may have current hp > max hp. This shouldn't cause any serious issues though.

※With my other mod, using the "Fix All Buildings" and "Fix Every Pawn's Gear" Actions, you'll be good to go without any of the issues or weirdness mentioned above. You can unsubscribe from that mod as soon as you're done.
If you feel like fixing everything to 100%HP is cheating, there are also debug actions to set stuff to x% of max HP as you wish.
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2898787033


Mod Compatibility
Should be compatible with most mods.

Compatibility issues could exist if a mod:
  • Adds new Quality levels
  • Allows you to change the Quality of an already existing item.
  • Makes changes to the MaxHitPoints def or otherwise affects max hitpoints
  • Uses different functions to create new items. Those will have their max hp modified, but there's a chance they will spawn at incorrect current hp.


Feedback welcome.
Feel free to do whatever you want with this mod including editing and reposting (WTFPL License).
Popular Discussions View All (1)
8
13 Aug @ 12:57pm
Log console Yellow thing
Rovstam
114 Comments
epq1176 23 Aug @ 5:11am 
Even when no other mods are enabled, the code in this mod that adjusts item hit points executes twice when an item is created.
This is why, when used together with Infusion, an item's hit points can exceed its maximum limit.
SappyZoe  [author] 22 Aug @ 4:23am 
Yes, that's correct, I used it to implement mod settings.
HugsLib is linked on this mod page.
七云 21 Aug @ 7:02pm 
After the update, an additional "HugsLib" is required as a prerequisite?
SappyZoe  [author] 21 Aug @ 1:25pm 
Alright, so that's fixed now?
Don't think there's anything I can do about the Infusion thing, but I'll see if they have a public repo so I can see what they're doing.
epq1176 21 Aug @ 7:46am 
In earlier versions, the vehicle frame caused newly built furniture to spawn without full HP.
Infusion 2 also can modifie item's maximum HP, and when used together with Quality Affects HP, it seems to result in the HP being multiplied twice
SappyZoe  [author] 21 Aug @ 6:38am 
Also I added the much requested settings, so you can choose the multipliers per quality level.
Note though that you need to set this before you start a new game, and relaunch the game after changing the settings.
SappyZoe  [author] 21 Aug @ 6:36am 
@Potato do you mean they're not created at full HP?
That's a bug. Is this still happening in the new version? And if yes, does it happen for all types of things (armor, weapons, furniture) or only specific?

@Naruto this should be mostly fixed, I wasn't rounding currentHP before, while maxhp does so automatically.

@eqp1176 Sorry I'm not sure what you mean, I haven't used any vehicle mods before. I also don't know Infusion, does that mod also change the maxHP of items?
epq1176 21 Aug @ 5:06am 
Correction: Vehicle frames affect the current HP of structures
Also, it is not compatible with Infusion 2; the durability bonus from Infusion 2 can cause items to exceed their maximum HP
epq1176 20 Aug @ 12:22pm 
incompatible with the Vehicle Framework
the item’s current HP doesn’t change even though the Max HP does
T 19 Aug @ 10:28am 
@Naruto if the item has more than hp than it's 'max hp' (e.g., 121/100), the item won't count since the filter is looking for an item that's max 100% hp