Strange scripting adventures in OpenMW .48 RC9

Post about your mods, learn about OpenMW mod compatibility, check for problematic mods, discuss issues, and give us feedback about your experience with modded OpenMW.
User avatar
FXN55
Posts: 38
Joined: 01 Dec 2022, 02:44

Strange scripting adventures in OpenMW .48 RC9

Post by FXN55 »

I was hesitant to post because a previous scripting question over in Content Development by me has yet to even be commented on, but this is bugging the hell out of me.

I'm attempting to attach a script to an object, that when activated, asks one question. If the answer is yes, it casts a spell that fortifies three attributes for a short period of time. If the answer is no, nothing. Simple, right? Hah!

The script posted below worked at some point in time. There has been a slight variation since. I can't recall really because after it worked the first time, I got a little cocky and added a messagebox directly under the Cast part of the script that described the spell's effects. Saved, tested, failed and hasn't worked since. I've cut and pasted parts in and out, broken it down to just the basic OnActivate and Cast portions and I get the same results. It seems like the script wants to work. The cast animation and sound play but stops half-way. Like a pitcher winding up...then stops mid-point to pick his ass!
Spoiler: Show
I even thought I had created the spell incorrectly so, I replaced my spell with the base spell, 'heavy burden', and got the same results. And yes, my spell is set to cast on-target.

What's really odd to me is this: Right before the script's one and only success, I activated the object and got the half-casting effect I mentioned above, then thought about some potions I had created earlier. When I went to test them out in-game, I noticed that they had no effect unless your alchemy skill was at a certain point, don't know what that is, I just raised it via console to 100 and the potion took effect. So, I thought maybe that's the answer! I raised alchemy to 100...activate...nothing. Raised restoration and mysticism to 100 and like magic! The spell took efffect.

And then I went back into it a buggered it up somehow.

So, any insight would be greatly appreciated.
LoneWolf
Posts: 138
Joined: 26 Sep 2017, 19:13

Re: Strange scripting adventures in OpenMW .48 RC9

Post by LoneWolf »

I was hesitant to post because a previous scripting question over in Content Development by me has yet to even be commented on
Keep in mind this forum has many lurkers but not many posters.


https://en.uesp.net/wiki/Morrowind_Mod:Cast may be relevant.

I'd try player->cast and set the spell to always succeed with 0 or 1 as mana cost so magic skills don't matter for this cast.
User avatar
FXN55
Posts: 38
Joined: 01 Dec 2022, 02:44

Re: Strange scripting adventures in OpenMW .48 RC9

Post by FXN55 »

Keep in mind this forum has many lurkers but not many posters.
Indeed it does.

But, I believe you misunderstood. I don't want the player to cast the spell. I want the object to cast upon the player. The spell is already set to always succeed and the cost was set to 0. I set it to 1, as per your suggestion, and still the same result. Is my script not sound? This has got me annoyed. I spent seemingly all day yesterday going through relevant information and by all accounts, this script should work. All it is, is a stripped down version of the base shrine script.

Anyways, thanks for your reply, at least.
LoneWolf
Posts: 138
Joined: 26 Sep 2017, 19:13

Re: Strange scripting adventures in OpenMW .48 RC9

Post by LoneWolf »

I did indeed misunderstand.

I looked up the script for the Kummu shrine and the spell it casts , kummu_shrine_sp .
It is a on Touch spell, not on Target.

That matches this sentence on the uesp page I linked
In the original Morrowind release, a touch spell can be cast by any object but must be directed at a specific REFERENCE to an NPC or creature. Targeted and self spells can only be cast by an NPC or creature.
Try changing your spell to on Touch.
User avatar
FXN55
Posts: 38
Joined: 01 Dec 2022, 02:44

Re: Strange scripting adventures in OpenMW .48 RC9

Post by FXN55 »

Wow. It works. And you know, I read that linked page and seen the passage you quoted, and it didn't sink in. I thought I knew better. Maybe I've had my head in front of this screen too long.

I believe the one time the script fired off yesterday was when it was set to On-Touch because at some point, I had changed it to On-Target...just didn't remember when. And now I do. Hah! As mentioned above, too long in front of the screen.

Anyways, thanks for the direction. Now, I can move on to other aspects of the mod I'm working on.
User avatar
AnyOldName3
Posts: 2661
Joined: 26 Nov 2015, 03:25

Re: Strange scripting adventures in OpenMW .48 RC9

Post by AnyOldName3 »

Why are you using RC9? We got up to RC12.1, and have now tagged the actual 0.48 release. Use that instead.
User avatar
FXN55
Posts: 38
Joined: 01 Dec 2022, 02:44

Re: Strange scripting adventures in OpenMW .48 RC9

Post by FXN55 »

AnyOldName3 wrote: 19 Jul 2023, 00:27 Why are you using RC9? We got up to RC12.1, and have now tagged the actual 0.48 release. Use that instead.
Uhhh...because I'm lazy. Hah! I actually have RC11 unpacked and ready to go but it's the setting up process that I loathe, to be honest. I was planning to upgrade when the Linux RC12 build posts. So, in the meantime...

RC9 hasn't really given me any issues to where I thought maybe I should trade up. Good job so far on the builds for Linux.

What does 'tagged the actual 0.48 release' actually mean? That you guys are close to a release?
User avatar
AnyOldName3
Posts: 2661
Joined: 26 Nov 2015, 03:25

Re: Strange scripting adventures in OpenMW .48 RC9

Post by AnyOldName3 »

The release has kind of happened, but no one's actually made the release builds. Linux distros that grab our source code and build it themselves may already have the actual 0.48 release, but none of the ones we make ourselves have been done yet, so we've not put the announcement post on the blog.
I actually have RC11 unpacked and ready to go but it's the setting up process that I loathe, to be honest.
If you've unpacked it, that should be all the setting up done already. There shouldn't be anything else.
User avatar
FXN55
Posts: 38
Joined: 01 Dec 2022, 02:44

Re: Strange scripting adventures in OpenMW .48 RC9

Post by FXN55 »

AnyOldName3 wrote: 19 Jul 2023, 02:13 The release has kind of happened, but no one's actually made the release builds. Linux distros that grab our source code and build it themselves may already have the actual 0.48 release, but none of the ones we make ourselves have been done yet, so we've not put the announcement post on the blog.
I actually have RC11 unpacked and ready to go but it's the setting up process that I loathe, to be honest.
If you've unpacked it, that should be all the setting up done already. There shouldn't be anything else.
I was referring to rebuilding content lists, profiles and such from the launcher. When I began using RC9, that was the first time I'd dealt with such a thing and let's just say, it was a learning experience. But you say that some distros may already have .48, huh? I'm on KDE Neon, which is in need of an upgrade, by the way. Like I said...lazy. But I'm going to do some checking around for updates and see what I find.

*Edit*
My distro's software download utility still has 0.47's flatpak up. But I did notice the RC12 for Linux's flatpak posted
here-> https://openmw.org/2022/openmw-0-48-0-i ... -rc-phase/. That one slipped by me, as I don't remember seeing it post in the forum. I was kinda waiting for the x64 generic option though.

I'll close this for now because I'm way off-topic. Reply at your discretion.
User avatar
AnyOldName3
Posts: 2661
Joined: 26 Nov 2015, 03:25

Re: Strange scripting adventures in OpenMW .48 RC9

Post by AnyOldName3 »

I was referring to rebuilding content lists, profiles and such from the launcher.
These are all shared between different versions. You've already set them up, so they don't need setting up again.
Post Reply