Is there formula override for enemyentity?

Talk about the mods you'd like to see in Daggerfall Unity. Give mod creators some ideas!
Post Reply
Posts: 20
Joined: Thu Jun 23, 2022 9:17 pm

Is there formula override for enemyentity?

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

User avatar
Kab the Bird Ranger
Posts: 106
Joined: Tue Feb 23, 2021 12:30 am

Re: Is there formula override for enemyentity?

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

Post Reply