Dev build/Linux: pacification regression [RESOLVED]

Locked
User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Dev build/Linux: pacification regression [RESOLVED]

Post by pango »

It seems there has been some regression in pacification: when I get a message that I pacified some monster with a language/etiquette skill, it keeps attacking me.
If I save/reload the game, the monsters finally becomes pacific. So I'm not sure the gamesave will be of any use.
Attachments
SAVE1.zip
(479.71 KiB) Downloaded 84 times
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Dev build/Linux: pacification regression

Post by Hazelnut »

Are you sure there are not 2 of the mobs and you pacify one that you're unaware of and the other attacks?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Dev build/Linux: pacification regression

Post by pango »

How comes this one is pacific (without new message) after save/reload?
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Dev build/Linux: pacification regression

Post by Hazelnut »

I loaded the save and as you said found the vamp was pacified. I did get an error on load however, although I've no idea if it's anything to do with the issue. From comments in this code, it seems it's simply an issue with the loading and re-init of cyclic dependencies. Doubt this is connected to your issue.

Code: Select all

EntityEffect.RestoreEffectSaveData() could not find SerializableEnemy for LoadID 26169480 in StateManager.
UnityEngine.Debug:LogError(Object)
DaggerfallWorkshop.Game.MagicAndEffects.EntityEffectManager:GetCasterReference(EntityTypes, UInt64) (at Assets/Scripts/Game/MagicAndEffects/EntityEffectManager.cs:1825)
DaggerfallWorkshop.Game.MagicAndEffects.EntityEffectManager:RestoreInstancedBundleSaveData(EffectBundleSaveData_v1[]) (at Assets/Scripts/Game/MagicAndEffects/EntityEffectManager.cs:1762)
DaggerfallWorkshop.Game.Serialization.SerializableEnemy:RestoreSaveData(Object) (at Assets/Scripts/Game/Serialization/SerializableEnemy.cs:209)
DaggerfallWorkshop.Game.Serialization.SerializableStateManager:RestoreEnemyData(EnemyData_v1[]) (at Assets/Scripts/Game/Serialization/SerializableStateManager.cs:407)
DaggerfallWorkshop.Game.Serialization.SaveLoadManager:RestoreSaveData(SaveData_v1) (at Assets/Scripts/Game/Serialization/SaveLoadManager.cs:837)
DaggerfallWorkshop.Game.Serialization.<LoadGame>c__Iterator2:MoveNext() (at Assets/Scripts/Game/Serialization/SaveLoadManager.cs:1170)

RestoreInstancedBundleSaveData() could not restore effect as caster was not found.
UnityEngine.Debug:LogWarning(Object)
DaggerfallWorkshop.Game.MagicAndEffects.EntityEffectManager:RestoreInstancedBundleSaveData(EffectBundleSaveData_v1[]) (at Assets/Scripts/Game/MagicAndEffects/EntityEffectManager.cs:1782)
DaggerfallWorkshop.Game.Serialization.SerializableEnemy:RestoreSaveData(Object) (at Assets/Scripts/Game/Serialization/SerializableEnemy.cs:209)
DaggerfallWorkshop.Game.Serialization.SerializableStateManager:RestoreEnemyData(EnemyData_v1[]) (at Assets/Scripts/Game/Serialization/SerializableStateManager.cs:407)
DaggerfallWorkshop.Game.Serialization.SaveLoadManager:RestoreSaveData(SaveData_v1) (at Assets/Scripts/Game/Serialization/SaveLoadManager.cs:837)
DaggerfallWorkshop.Game.Serialization.<LoadGame>c__Iterator2:MoveNext() (at Assets/Scripts/Game/Serialization/SaveLoadManager.cs:1170)

See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Dev build/Linux: pacification regression

Post by Hazelnut »

Yep, that has nothing to do with this issue as I thought. The problem is caused by resume persuing previous target code added to EnemySenses on 6th Jan in commit 6afc9428 by Allofich. Basically the last target is the player so this code restores the player as target after the target is removed due to being non-hostile.

Code: Select all

                    // If had a valid target before, resume pursuing it. Looks better to first finish any attack animation.
                    if (lastTarget != null && lastTarget.Entity.CurrentHealth > 0 && !mobile.IsPlayingOneShot())
                        target = lastTarget;
Allofich, going to leave this one to you since, while I could fix this specific issue, I don't have enough understanding of the code to ensure other aspects are not compromised.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Dev build/Linux: pacification regression

Post by R.D. »

Will take a look soon.

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Dev build/Linux: pacification regression

Post by R.D. »

Fixed.

Locked