[MOD] Unleveled Spells released

A curated forum for compatible and maintained mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
meritamas
Posts: 98
Joined: Sun Apr 07, 2019 6:16 am
Location: Slovak Republic

Re: [MOD] Unleveled Spells released

Post by meritamas »

Ralzar wrote: Thu Jun 25, 2020 2:22 pm Ah damn. That's hard to say. But I'm leaning towards "no".

Also, I just got the same kinda bug, but with a spell. The standard Balyanas Balm spell. Which I think I bought without having the mod active.

If the problem is spells and magic items being generated without your mod, you might look into having some way of flagging spell effects as modded and then a script on startup that checs all spells and magic items.
Please, could you send over the save with the dysfunctional Balyanas Balm as well?

One thing I tried was that I edited your artifact into my own save, not changed anything else and it works. Levitation, as it was meant to be. The mod even reports the duration calculation - as if the player had cast the spell. Then, I turned off the Unleveled Spells mod, still works. Then back, still works. So in the case of my save, having the mod on or off does not seem to make a difference: the Bracer works.

Nonetheless, when I load your save I try to use the Bracer with the mod on, it doesn't work - the game hangs. When I turn the mod off, it does work.
I am out of ideas for now as to what could cause such a peculiar behavior.

Will put in the item description from the save to share an interesting observation though.

Code: Select all

{
				"uid": 33554567,
                    "shortName": "Leaping %it",
                    "nativeMaterialValue": 0,
                    "dyeColor": "Chain",
                    "weightInKg": 0.5,
                    "drawOrder": 0,
                    "value1": 330,
                    "value2": 2097152,
                    "hits1": 1490,
                    "hits2": 1500,
                    "hits3": 0,
                    "stackCount": 1,
                    "enchantmentPoints": 1500,
                    "message": 0,
                    "legacyMagic": [
                        0,
                        4,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1,
                        -1
                    ],
                    "customMagic": null,
                    "playerTextureArchive": 0,
                    "playerTextureRecord": 0,
                    "worldTextureArchive": 207,
                    "worldTextureRecord": 13,
                    "itemGroup": "Jewellery",
                    "groupIndex": 1,
                    "currentVariant": 0,
                    "isQuestItem": false,
                    "questUID": 0,
                    "questItemSymbol": null,
                    "trappedSoulType": "None",
                    "className": null,
                    "poisonType": "None",
                    "potionRecipe": 0,
                    "repairData": null,
                    "timeForItemToDisappear": 0,
                    "timeHealthLeechLastUsed": 0,
                    "$version": "v1"
				}

The peculiar part is the 'legacy magic' bit - it seems that there are some effects that are 'legacy'. I plan to study this a bit more in the coming days to learn what they do and how they work (and what the difference is to 'normal' effects). May not get us closer to resolving the concrete issue but it seems interesting to pursue nonetheless.
Interest in expanding and improving the Magic system, Capitalism and an Unleveled World.

Amlealok
Posts: 1
Joined: Tue Jun 23, 2020 12:24 am

Re: [MOD] Unleveled Spells released

Post by Amlealok »

I appear to be running into the same issue as Ralzar. Casting any of the current spells I have in addition to drinking my potions will cause the game to crash.
Attachments
SAVE17.zip
(253.9 KiB) Downloaded 24 times

User avatar
Ralzar
Posts: 1656
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: [MOD] Unleveled Spells released

Post by Ralzar »

I might be that you will need to include a RestoreSaveGame function that checks all player spells and replaces them if they are not your variants.

I am bettering the legacy stuff is spell formulas sourced from the Daggerfall files. RP&R: Items had a problem with the Jumping spell crashing the spell book if you didn't have the properly updated Daggerfall installed. Which implies that the spell was drawing data from there for the spell code.
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

User avatar
TheLacus
Posts: 1275
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: [MOD] Unleveled Spells released

Post by TheLacus »

Please make sure to follow folder structure for Vortex Mod Manager or disable Mod Manager button. Thank you. :)
Mod System documentation - Learn how to create mods for Daggerfall Unity.
Modder Discussion - General help and discussion for the mod system.
Github Issues - Submit a bug report for the game, including the mod system.

meritamas
Posts: 98
Joined: Sun Apr 07, 2019 6:16 am
Location: Slovak Republic

Re: [MOD] Unleveled Spells released

Post by meritamas »

TheLacus wrote: Mon Jun 29, 2020 4:15 pm Please make sure to follow folder structure for Vortex Mod Manager or disable Mod Manager button. Thank you. :)
Thanks for drawing my attention to this :)
I activated the 'disable Mod Manager' option for now.
In the future I plan to put some effort into making the mod compatible with more stuff (like Linux and OSX versions), but for now it seems I am quite busy trying to figure out what causing this bug Ralzar and Amlealok reported.
Amlealok wrote: Sun Jun 28, 2020 2:04 am I appear to be running into the same issue as Ralzar. Casting any of the current spells I have in addition to drinking my potions will cause the game to crash.
Thanks for reporting the issue and providing the save game. Will be looking at it.
Ralzar wrote: Sun Jun 28, 2020 6:49 am I might be that you will need to include a RestoreSaveGame function that checks all player spells and replaces them if they are not your variants.

I am bettering the legacy stuff is spell formulas sourced from the Daggerfall files. RP&R: Items had a problem with the Jumping spell crashing the spell book if you didn't have the properly updated Daggerfall installed. Which implies that the spell was drawing data from there for the spell code.
Thanks for the idea and the time you are putting into resolving the issue. The thing is, in the save games, I only see the spell effect Keys and the parameters of the spell. From what I see there, things should work okay. So far, I couldn't discern any reference to any of the spells being of an unmodded or of a modded version. It's just the Key and the parameters. Hence, if the paramteres of the vanilla spell and the modded spell are the same, it should work okay.

Just a few more brief thoughts. I'll need to go over things again, dig deeper.
It is clear now that I don't even know what the source of the issue could be.

Another test I did. I built a version of the mod that doesn't override the Levitate effect class. The crash still occurs. I went: 'Heh?'

Let's not forget that I had tried the same artifact with my own character. It worked okay, with mod, withour mod.
Then I thought: maybe there is some difference between my character and Ralzar's. Maybe the source is that my character was created with the mod on. Then I tried with my earlier character that I created before the mod. The artifact worked, with mod, without mod.
But something is clearly wrong, since with Ralzar's save, it hangs my game too if the mod is on. I took a look at the save but I have no idea what could be wrong or even where to start searching for the source of the problem. I haven't given up yet, but this will likely take time.
Interest in expanding and improving the Magic system, Capitalism and an Unleveled World.

User avatar
Ralzar
Posts: 1656
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: [MOD] Unleveled Spells released

Post by Ralzar »

As I suggested, using the RestoreSave function could work. It's normally intended to get data from a savefile and apply it to the mods values etc. Like, for example, I store how wet your character is as an INT then RestoreSave makes sure to get that info from the savegame and apply it to the mod.
However, you can also use RestoreSave to run code. For example: with my Realistic Wagon mod the RestoreSave function runs methods ofr removing the the wagon from the game world and placing it over again, because the terrain height does some crazy stuff leading to the original coordinates being up in the air or under ground.

My point being, that you can use RestoreSave to run your methods to overwrite any data that might be hanging on from before the mod was applied. Like editing all the spells in the spellbook for example.
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

User avatar
Ralzar
Posts: 1656
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: [MOD] Unleveled Spells released

Post by Ralzar »

How stable is this mod now? Did any further bug fixing ever get done?
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

meritamas
Posts: 98
Joined: Sun Apr 07, 2019 6:16 am
Location: Slovak Republic

Re: [MOD] Unleveled Spells released

Post by meritamas »

Ralzar wrote: Mon Aug 24, 2020 8:22 am How stable is this mod now? Did any further bug fixing ever get done?
No, sadly I only got back here a few days ago.
What I managed is to get it to work with 0.10.27. That wasn't a big effort. Will try to find more time in the future. Problem is, I really don't know how much I'll find. I do this as a hobby and have a lot of things that come first. Will try.

Post Reply