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.
Please add an API hook for changing entity resistances
-
- Burner Inserter
- Posts: 10
- Joined: Thu May 14, 2020 7:58 am
- Contact:
Re: Please add an API hook for changing entity resistances
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.
If you want to get ahold of me I'm almost always on Discord.
-
- Burner Inserter
- Posts: 10
- Joined: Thu May 14, 2020 7:58 am
- Contact:
Re: Please add an API hook for changing entity resistances
In that case, how about for character entities only, then?
Edit: Looks like we've been tossed in the trash.
Edit: Looks like we've been tossed in the trash.
Re: Please add an API hook for changing entity resistances
You can script this yourself by using the on_entity_damaged event and adding/removing health.