Page 1 of 1

Dev build/Linux: pacification regression [RESOLVED]

Posted: Thu Jan 10, 2019 9:29 pm
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.

Re: Dev build/Linux: pacification regression

Posted: Thu Jan 10, 2019 9:31 pm
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?

Re: Dev build/Linux: pacification regression

Posted: Thu Jan 10, 2019 9:50 pm
by pango
How comes this one is pacific (without new message) after save/reload?

Re: Dev build/Linux: pacification regression

Posted: Sat Jan 12, 2019 4:14 pm
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)


Re: Dev build/Linux: pacification regression

Posted: Sat Jan 12, 2019 4:47 pm
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.

Re: Dev build/Linux: pacification regression

Posted: Mon Jan 14, 2019 2:24 am
by R.D.
Will take a look soon.

Re: Dev build/Linux: pacification regression

Posted: Sat Jan 19, 2019 4:46 am
by R.D.
Fixed.