边缘世界 RimWorld

边缘世界 RimWorld

Quality Affects HP
120 条留言
xuelin 10 月 2 日 上午 2:57 
It has been resolved. I have created a localized compatible version, but this type of mod that modifies durability is not compatible with other mods that have an impact on it. I don't understand many things
dontshoot 9 月 28 日 下午 1:44 
@SappyZoe figured it out, it wasn't your mod, sorry
xuelin 9 月 28 日 上午 9:18 
Can you make the two mods compatible? Here is a link to another mod that can adjust the durability of an item based on its raw materials. After using two mods at the same time, I created a new item and the durability panel displayed was not correct. Here is an example: durability value: 1250/780. Normally, it should be 1250/1250, but the durability limit displayed is 780
Please, I really want the two mods to work together.:steamhappy:
Current mod: Change durability according to quality HP: 2898409109: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2898409109
Change durability according to material HP: 3417700766: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3417700766
SappyZoe  [作者] 9 月 22 日 下午 2:52 
@dontshoot the only thing I could imagine is if the masterwork/legendary ones have low durability %, even if the actual hitpoints is still high (compared to normal gear). I think traders won't buy those? Otherwise I can't think how this mod would affect that.

@Staysan_V I couldn't reproduce your issue, and given people are still using the mod and no one else reported the same issue, I don't think it's something I can do anything about.
dontshoot 9 月 20 日 上午 7:11 
Faced an issue when I couldn't sell high quality clothing to orbital trader, thinking maybe this mod has something to do with that? Same trader bought capes made from same material of good/excellent quality but won't buy masterworks/legendary ones.
Stasyan_V 9 月 11 日 下午 11:52 
Good day, after the last update the mod does not work correctly. everything that is made comes with basic durability. clothes, weapons and furniture. will there be an update of the mod?
epq1176 8 月 23 日 上午 5:11 
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  [作者] 8 月 22 日 上午 4:23 
Yes, that's correct, I used it to implement mod settings.
HugsLib is linked on this mod page.
小米智能收割机 8 月 21 日 下午 7:02 
After the update, an additional "HugsLib" is required as a prerequisite?
SappyZoe  [作者] 8 月 21 日 下午 1:25 
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 8 月 21 日 上午 7:46 
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  [作者] 8 月 21 日 上午 6:38 
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  [作者] 8 月 21 日 上午 6:36 
@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 8 月 21 日 上午 5:06 
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 8 月 20 日 下午 12:22 
incompatible with the Vehicle Framework
the item’s current HP doesn’t change even though the Max HP does
T 8 月 19 日 上午 10:28 
@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
Naruto 8 月 19 日 上午 8:50 
I have no idea which of my mods is causing the conflict. When I load into the game, there are no errors or anything, but the stuff I make at the workbench just doesn't count.

Like, if the list says craft 10 jackets, I make one, and it still shows 0/10. Didn't realize it until I noticed a ton of jackets piling up in my storage!
Potato 8 月 18 日 上午 10:43 
Is it a bug that high-quality [products/items/equipment] still require maintenance after being made?
Serge 8 月 17 日 上午 11:17 
So i did this <factorLegendary>3</factorLegendary> and now my legendary cataphract armor stats look like that:
4000/1200 (with default hp of 400, so startHP=10x but MaxHP=3x)
Serge 8 月 17 日 上午 11:15 
@SappyZoe sorry for long reply, didn't see notification. I have modified *exactly* through xml, tweaked these values (both sets):
```
<nomatch Class="PatchOperationAdd">
<xpath>Defs/StatDef[defName="MaxHitPoints"]</xpath>
<value>
<parts>
<li Class="StatPart_Quality">
<factorAwful>0.5</factorAwful>
<factorPoor>0.75</factorPoor>
<factorNormal>1</factorNormal>
<factorGood>1.75</factorGood>
<factorExcellent>3</factorExcellent>
<factorMasterwork>6</factorMasterwork>
<factorLegendary>10</factorLegendary>
```
In previous version they tweaked both MaxHP and StartHP, but now they tweak only the starting hp
SanguinarcAQL 8 月 17 日 上午 2:04 
Hey! Thanks for the mod, I'm probably not the first to ask but, could we have a mod menu to edit HP factor per quality ? I'm way too dumb to locate a mod file and edit code c:
Rovstam 8 月 13 日 下午 4:00 
As for building having low hp i see it as a net profit (lower wealth)

Would be even cooler if you made an option so all new buildings have 10% hp
Rovstam 8 月 13 日 下午 4:00 
The mod is fine as it is mate.

No need to destroy my save-file lol
SappyZoe  [作者] 8 月 13 日 上午 7:00 
sorry folks, I still can't reproduce the furniture error, the current Hitpoints are set correctly as expected (with a 3hp margin of error because of rounding).

I looked into implementing the mod differently, because the way it's done now is pretty dang janky.
Unfortunately MaxHP is readonly and can only be changed through xml defs (as far as I know).
Here I'm changing the StatDef for MaxHitpoints directly, not the thingdefs, so I can't make it only affect apparel (which would be the easy solution).

I'm changing currentHP with a Postfix Harmony Patch to CompQuality.SetQuality, so after an object's quality is set, the hitpoints are set.

I've put the xml and c# code into a pastebin [pastebin.com], if anyone wants to have a look.
R3tr0_g5m3r 8 月 12 日 上午 4:23 
it raises max durability of items
but remain its current durability
Masked Monster 8 月 7 日 上午 4:33 
Well let's hope OP comes back to fix it or maybe a fix by someone else ...
Arc 7 月 31 日 下午 3:17 
After more testing it seems like the code changes weren't necessary with caching turned off. 1.5's dll worked without issue when I replaced the 1.6 dll with it. I'm a bit out of my depth looking at any of this, but I think the problem is that the maxhp value is retrieved and cached before quality modifiers are taken into account, leading to the game ignoring the true value in favor of the outdated cache value when it goes to set the starting HP.
Arc 7 月 30 日 下午 4:07 
I thing I found a workaround for the furniture bug. The maxHP statdef is set as cacheable and I guess (I do not know how2computer) it caches the value before applying the quality multiplier. If you remove the <cacheable>true</cacheable> line from the maxhp statdef it seems (from 2 minutes of testing) to properly set hp on construction.
Jolak 7 月 30 日 下午 3:17 
By moving the furniture that is built damaged, they've been able to repair the furniture without reloading the game. Although, I've yet to find a way for the furniture to spawn fully repaired
-PYROMANIAC- 7 月 30 日 上午 7:53 
is there a way to exclude structures and only have the clothes side of it
EtsuyaH 7 月 30 日 上午 4:56 
Have the same problem, that the furniture is built damaged. Saving and loading triggers the repair for me.
Masked Monster 7 月 30 日 上午 4:38 
Same problem as Commissar_Dell, my masterwork furnitures gets like 100/600 HP when constructed, and yeah either u dmg the furnitures to repair them or u reload the game. Ppl will not repair them automatically even if u right click the thingy.
Commissar_Dell 7 月 29 日 下午 9:28 
I'm having a similar issue with furniture being built "damaged" at their vanilla HP and my pawns not wanting to repair them. Temporary workaround is to damage the furniture then my pawns repair it to the values set by this mod.
SappyZoe  [作者] 7 月 26 日 上午 11:12 
@Serge max hp is set through xml (in Patches), that one's pretty easy to tweak
Interesting, how did you modify the starting hp? because _those_ are hardcoded
秋叶似剪刀 7 月 25 日 下午 8:12 
Yeah seems mod sequence solved my issue, medic bed is fine for me now. Sry I am not sure how to get a log cuz it didn't report errors when hp issues happened. Thanks for tracking issues and providing solutions quickly.
Serge 7 月 25 日 上午 9:34 
Can we tweak the multipliers or are they hardcoded? I tried lowering legendary multipliers from 10x to 3x, and that afffects only starting HP (not max HP) - is there a repo somewhere i can pull request to fix this?
Xyllisa Meem Paradox Station 7 月 24 日 下午 4:17 
Also having a similar issue, gear works fine but structures all default to their normal vanilla HP amount, and won't get repaired.
Rovstam 7 月 22 日 下午 1:39 
Please make an option to have that building bug enablable. I have a legendary couch that's worth 98 silver lmao. Having buildings at low HP IS an inherently good thing You have good stuff for low wealth. it's a win-win (except if you plan on sell those things)
rocketralpho 7 月 22 日 上午 9:01 
I have been having the same issue. Did you guys manage to fix it? People seem to have it slightly different but my issue is that when ever I make a building, like a bed it's at normal health there was a similar problem was before the mod got updated to 1.6 but the differences is that now when making gear it is normal works fine. when before it had the same problem as the beds and chairs
SappyZoe  [作者] 7 月 21 日 上午 9:26 
hmm has to be a compatibility issue too, it's working fine for me.
If you can get me a log I can have a look at that too, I want to fix the other minify issue too when I have some time, but I'm not confident that will fix your issue
Łucznik 7 月 21 日 上午 8:49 
no, they have to repair it again
SappyZoe  [作者] 7 月 21 日 上午 8:44 
When you install it after minify, does it go back to full health?
I know that minified items are not working full right now, but the inner thing should be working okay
Łucznik 7 月 21 日 上午 5:23 
Negative, they get built like normal. When built they start at 100 health (even though their max is like 400) and pawns wont repair unless you move it to another spot. When you minify it then its current health goes down to vanilla levels even though it was at its max health before the minify.
SappyZoe  [作者] 7 月 21 日 上午 2:25 
@Iopy the log says it's trimmed to 10k lines, the info I'm looking for is not there.
It should show up in the (hopefully shorter) in-game debug log window though (the left-most button in the dev-mode bar at the top). Can you get me that?

@Tony Stank are you using a mod that lets you directly create buildings like beds and chairs in minified (uninstalled) form, rather than building a bed, and then uninstalling them?

@Sisyphean the value is still percentage based same as before. so a modded piece of gear at 50% hp has the same value as an unmodded piece of gear at 50%hp.
What do you mean by weapon stats? Do you mean reducing the damage they deal when the weapon is damaged?
Iopy 7 月 20 日 下午 10:15 
Hey SappyZoe, here is the log with Verbose Logging turned on, hope it helps identify the problem:

https://gist.github.com/HugsLibRecordKeeper/334175e2152b6987846fe913e24cdca6
Łucznik 7 月 20 日 下午 9:14 
After making placeables like beds and chairs, their hp starts at 100 and you have to reinstall the item elsewhere so it can be repaired and also if you uninstall the item its "max" health goes to 100 (vanilla max hp)
Sisyphean 7 月 20 日 下午 6:28 
This is pretty nice. How does this affect the value? Is it still percentage based? Would love to see this also affect weapon stats because people are intentionally dropping the durability as a wealth dump.
Iopy 7 月 20 日 上午 6:26 
No worries, I'll do that tomorrow and get back to you, thanks for your assistance.
SappyZoe  [作者] 7 月 20 日 上午 6:16 
@Iopy Hmm I couldn't reproduce the issue with the mods I thought were clashing, and also didn't see anything in their source code that would stop mine from working as intended.

I updated the mod with some verbose logging, so if you send me what that spits out, I'll have another look. (you need to enable dev mode, and then in dev options, enable verbose logging, and restart the game)
Iopy 7 月 20 日 上午 4:52 
@SappyZoe, tried moving it above VEF and VSE and still getting the error log, here's the log:

https://gist.github.com/HugsLibRecordKeeper/c02e5ed6f89415fabf1140e48c8f7b2d