Page 1 of 1

Is there formula override for enemyentity?

Posted: Mon Jul 04, 2022 3:36 pm
by dutchovenfarts
one feature that would be great is to limit the scaling of npcs in enemyentity where it assigns the level to the pc's. i don't see any overrides unless i missed it. would this be possible or would this cause issues?
the idea is to maybe cap npc level scaling and allow settings to tune it, and add variability so you could run into stronger or weaker npcs, and also cap the scaling so that at higher levels combat doesn't get monotonous with multiple npcs.

Re: Is there formula override for enemyentity?

Posted: Mon Jul 04, 2022 6:09 pm
by Kab the Bird Ranger
The approach I've taken so far is to register to `EnemyEntity.OnLootSpawned`. This event is called at the very end of the process of creating an enemy, so it won't be overwritten by DFU further. At that point, your mod can access all the structures involved in an enemy (mostly the `EnemyEntity` part) and change all its stats if desired.

Unlike Formula overrides, you have no way of ensuring you're the only mod doing this, however.