Page 1 of 1

Please add an API hook for changing entity resistances

Posted: Fri Jun 05, 2020 2:39 am
by swizzlewizzle
Currently resistances are read-only on the prototypes.

In order to open up the ability to have weapons that make an entity "weak" to certain damage, as well as to introduce buffs that modify resistance dynamically, i'd like to request that a RW API method to modify resistances by their name and type (flat/%) is added.

:shock:

Re: Please add an API hook for changing entity resistances

Posted: Fri Jun 05, 2020 4:18 am
by Rseding91
Sorry but that's not going to happen. To modify anything runtime means it needs to exist as a copy in RAM for each entity and be saved/loaded. That would add a lot of overhead to the game even when no mod was using it.

Re: Please add an API hook for changing entity resistances

Posted: Fri Jun 05, 2020 4:36 am
by swizzlewizzle
In that case, how about for character entities only, then?

Edit: Looks like we've been tossed in the trash.

Re: Please add an API hook for changing entity resistances

Posted: Sat Jun 06, 2020 12:49 pm
by Boodals
You can script this yourself by using the on_entity_damaged event and adding/removing health.