Jump to content

Wounded NPC Compatibility

Closed 3.0.7

Ace
Ace

Posted

Hello Nivex, im using woundnpc plugin just woundering is there anyway to make the npc's inventories to be cleared after there fully dead cause as of right now there inventory is emptied when wounded and they respawn naked with no kit, thank you. 

 

nivex

Posted (edited)

hi, no. if they're being stripped then that means the death hook was called already. that hook is explicitly for deaths, and trying to cancel it will not work for my npcs.

player.inventory.SafelyStrip();

you can delete that from the .cs but it's silly to use a death hook as a non-death hook. that makes no sense to me 😛

 

 

Edited by nivex
Ace

Posted (edited)

Thanks Nivex as always for your lightening quick replies, I'm not sure how wounded npc works exactly in terms of hooks but with betternpc and other npcies it works just fine, I attached a short clip showing a example of what i mean that you can take a quick look at, with raidablebases npcs it seems to strip them when there wounded instead of when there actually dead so if they manage to get back up from wounded state they are naked with nothing just seeing if there is any workaround, maybe some config option in the config files or anything, asides from manually editing .cs file don't like editing plugins i didn't make something will always tend to break its not sustainble in the long term with updates and such 😆

Edited by Ace
nivex

Posted

hi, just edit the plugin. it'll be in the next update too

Ace

Posted

ok will do, sounds great, thank you Nivex. 

  • Like 1
Ace

Posted

Sorry to bother you again I removed player.inventory.SafelyStrip(); line in cs, but yeah seems like RB Npc's freakout and just get stuck/freeze guess it just doesn't want to function with Wounded NPC, with other Npc's is working fine so i don't know. 🫠

nivex

Posted (edited)

.

 

Edited by nivex
nivex

Posted (edited)

I just bought that plugin and it's working with my npcs. some of them do stop moving and responding for several seconds afterwards which has always happened. not sure why, but they continue to move and respond whenever that freeze breaks.

I found a bug in his plugin. BasePlayer.BecomeWounded is called, but BasePlayer.woundedDuration isn't set afterwards. nor is BasePlayer.WoundingTick canceled. so the game still overrides his timer periodically. reproduce by giving them a 100% chance to revive, they will die periodically when the game kills them in the BasePlayer.WoundingTick method.

I'll add a few wounded checks to my plugin which will save a little resources when they're wounded.

Edited by nivex
Ace

Posted

Amazing as always nivex thank you ❤️

nivex

Posted

np, to be clear, he will need to fix his bug. my changes are simply performance improvements. have fun

nivex

Posted

Changed Status from Pending to Closed

2m

Downloads

Total number of downloads.

9.5k

Customers

Total customers served.

138.4k

Files Sold

Total number of files sold.

2.9m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.