Page 1 of 1

unleveled training cost?

Posted: Fri Dec 03, 2021 12:06 pm
by John Doom
I'd like to make a mod to make training cost not scale with player level, however...

Code: Select all

        public virtual int GetTrainingPrice()
        {
            int costPerLev = IsMember() ? memberTrainingCost : nonMemberTrainingCost;
            return costPerLev * GameManager.Instance.PlayerEntity.Level;
        }
...I don't see how I can mod this function without changing the sourcecode itself. I know there are unscaled mods for loots, dungeons and spells, I'd like to know how they work and see if their solution can be applied here as well. Help? :?:

UPDATE: I've found "Unleveled Spells"' source code, I understand the modder replaced all the effects using a specific Daggerfall's function. I don't think the same is possible with training. Do you know how other mods did it?

UPDATE2: I've found "public static void RegisterCustomUIWindow(UIWindowType windowType, Type windowClassType)", this would let me replace/override the whole training window, though it seems a bit too much to me :?

Re: unleveled training cost?

Posted: Fri Dec 03, 2021 3:00 pm
by Shapur
You could make a pull request on github.
If it's just something simple you need (like making some functions virtual), it will probably be added to the game relatively soon.

Re: unleveled training cost?

Posted: Fri Dec 03, 2021 3:03 pm
by John Doom
:) Hopefully. In the meantime I went with the window replacement: viewtopic.php?f=14&t=5254