Please add an API hook for changing entity resistances

Things that we aren't going to implement
Post Reply
swizzlewizzle
Burner Inserter
Burner Inserter
Posts: 10
Joined: Thu May 14, 2020 7:58 am
Contact:

Please add an API hook for changing entity resistances

Post 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:

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Please add an API hook for changing entity resistances

Post 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.
If you want to get ahold of me I'm almost always on Discord.

swizzlewizzle
Burner Inserter
Burner Inserter
Posts: 10
Joined: Thu May 14, 2020 7:58 am
Contact:

Re: Please add an API hook for changing entity resistances

Post by swizzlewizzle »

In that case, how about for character entities only, then?

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

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: Please add an API hook for changing entity resistances

Post by Boodals »

You can script this yourself by using the on_entity_damaged event and adding/removing health.

Post Reply

Return to “Won't implement”