Page 3 of 3

Re: Trouble with drained attributes after disease

Posted: Sat Dec 07, 2019 9:21 pm
by Hazelnut
Interkarma wrote: Sat Dec 07, 2019 12:39 am Just hit me up on git or dev forums if there's anything I can do to help.
Thanks for the classic save. Is there an easy way to apply a drain effect on the player in DFU, or could you provide me a save for that. I've not used magic much.

Re: Trouble with drained attributes after disease

Posted: Sat Dec 07, 2019 9:28 pm
by Interkarma
Create an area at range drain spell and blast it at the ground or a wall in front of you so that you're caught in the AOE radius. That classic save has one in the spellbook if you import character.

Re: Trouble with drained attributes after disease

Posted: Sat Dec 07, 2019 9:31 pm
by Hazelnut
Thanks. Currently checking for drain incumbents like this:

Code: Select all

            // Check for free stat restoration (Temple members)
            if (guild.FreeHealing())
            {
                EntityEffectManager playerEffects = playerEntity.EntityBehaviour.GetComponent<EntityEffectManager>();
                if (playerEffects != null)
                {
                    IEntityEffect drainEffect = playerEffects.FindIncumbentEffect<DrainEffect>();
                    if (drainEffect != null)
                    {
                        DaggerfallMessageBox messageBox = new DaggerfallMessageBox(uiManager, DaggerfallMessageBox.CommonMessageBoxButtons.YesNo, 403, uiManager.TopWindow);
                        messageBox.OnButtonClick += ConfirmStatReset_OnButtonClick;
                        messageBox.Show();
                    }
                }
            }
is that the best way?

Then planning to do this to reset the stats:

Code: Select all

            if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes)
            {
                EntityEffectManager playerEffects = playerEntity.EntityBehaviour.GetComponent<EntityEffectManager>();
                playerEffects.EndIncumbentEffect<DrainEffect>();
            }
Again, please shout if I am doing this wrong.

Re: Trouble with drained attributes after disease

Posted: Sat Dec 07, 2019 9:37 pm
by Interkarma
That's good! Should just mention that player will have one drain effect per attribute drained, so there might be several active.

I'd create a helper similar to CureAllDiseases() in EnityEffectManager that can end all drain incumbents in a single call.

Re: Trouble with drained attributes after disease

Posted: Sat Dec 07, 2019 9:38 pm
by Hazelnut
Okay will do that then.

I tried importing the save from classic. Breaks. Maybe cos this character is a hacked one. Not sure.

Re: Trouble with drained attributes after disease

Posted: Sat Dec 07, 2019 10:03 pm
by Interkarma
Odd, that save imports just fine for me. Not sure either.

Re: Trouble with drained attributes after disease

Posted: Sat Dec 07, 2019 10:23 pm
by Hazelnut
Well it was easy enough to create a save to test in DFU once you told me what the spell was and how to self harm with it. :)

Unfortunately removing the incumbent drain effects doesn't restore the stats, or the removal is not working. Sorry to do this, but have submitted a PR for you to check/fix because I don't know where to go from here and I need to go rest my arm now. I've at least done the bit that I consider my area of expertise - guild services.

https://github.com/Interkarma/daggerfal ... /pull/1637

Re: Trouble with drained attributes after disease

Posted: Sat Dec 07, 2019 10:49 pm
by Interkarma
I can see where I've lead you astray here, my apologies. I'll send a fix to that PR when I can. We can continue discussion there.

Re: Trouble with drained attributes after disease

Posted: Mon Dec 09, 2019 8:57 am
by fuzzydodge
hello again
my character is now curate rep:89 with Tempel of Kynareth , but there is no offer of everyone in the temple to restore
attributes, but at this time my char has no drained attributes, do they only offer repair if my attributes are damaged?
iam still watching from time to time NOT to get a desease ..but thats pretty shity... :) and kill gameflow and fun.
If there is realy no chance to repiar damaged attributes Daggerfall coud get bad frustating. I will go testing on
and if so .. hope for a fix :) .
Perhaps someone else could go on testing this attribute thing.
..and thank you all :) :)

Re: Trouble with drained attributes after disease

Posted: Mon Dec 09, 2019 9:21 am
by Interkarma
Attribute recovery is available from 0.10.14, provided character is of rank to qualify and has current attribute damage. This is accessed through the "cure disease" service as normal, but won't trigger offer unless attributes are damaged.

If you still have troubles under those conditions, please post a save. This is a recent addition and bugs are always possible.

Outside of temples, you can also use the spellmaker to create spells which recover attribute damage.