Nathaniel's Balmora Candle Shop, Pelagiad Townhouse and Vos Apartment

Learn about OpenMW mod compatibility, check for problematic mods, discuss issues, and give us feedback about your experience with modded OpenMW.
Post Reply
User avatar
Iolite
Posts: 4
Joined: 24 Jun 2019, 03:51

Nathaniel's Balmora Candle Shop, Pelagiad Townhouse and Vos Apartment

Post by Iolite » 27 Nov 2019, 20:22

These three mods (one shop and two houses) utilize scripted lights which are designed to be toggled on and off. They work fine in vanilla engine, however all have issues in OpenMW. Balmora Candle Shop in particular is still playable, because the only problematic scripted light is located upstairs, behind a locked door and is not crucial to the gameplay. However, the houses rely on these lights exclusively and are therefore currently considered "broken".

Mods in question:
http://www.mw.modhistory.com/download-98-13094
http://www.mw.modhistory.com/download-44-13128
http://www.mw.modhistory.com/download-98-14016

Normal behaviour: lights like sconces and chandeliers are activated with spacebar, changing their lit-unlit status and representing it via custom icon. You can change their state any time you want.

Behaviour in OpenMW: lights can change their state only once or twice per game session, and have trouble updating their icon until the game's next launch. So if you activated a candle, it will light up, but the icon will show "unlit" state. After that, you can do nothing to the light whatsoever. If you exit and the launch OpenMW again, you will find the light still in "lit" state, and the icon will be correctly updated this time. If you activate the light to unlit it, it will go off now and update its icon correctly once again. Then you can activate it into "lit" state once more, but the icon won't be updated and the light will again be irresponsive until the next session.

This is tested under Win7 x64 with OpenMW 0.46.0 Nightly. Both the log and console are oddly silent on this matter. I would appreciate any help to make these mods playable in OpenMW, though I am aware that severe scripting errors might be discovered, rendering it incurable.

User avatar
Iolite
Posts: 4
Joined: 24 Jun 2019, 03:51

Re: Nathaniel's Balmora Candle Shop, Pelagiad Townhouse and Vos Apartment

Post by Iolite » 28 Nov 2019, 00:28

Additionally, OpenMW seems to treat these objects as regular lights, even showing "Duration: 0 s" info.

After using "activate" console command and pressing spacebar on such a light two copies of it appeared in character's inventory. One is "lit" and the other is "unlit". It appears that this mod relies on copies of such lights and enables/disables them on demand to show the light's current status. Each copy has a correctly signed icon. Activating unlit copy will spawn a lit one. Activating lit copy afterwards will disable the lit copy, but leave the unlit one, allowing to repeat the cycle.

Although I'm unfamiliar with Morrowin'd scripting language, after opening the mod in OMW-CS and inspecting scripts I noticed the enable/disable commands. It is thus possible that the mod operates by spawning and despawning a lit copy of an unlit light upon activation. Both object appear in the same place, and in the original game the lit copy can be reached without any problem, while in OpenMW something seems to interfere, and you end up activating the unlit copy that should be hidden instead. Therefore, this could not be a scripting issue, but something related to activation range of models.

The script can possibly be tweaked in such a way that only one copy exists at a time, this might resolve the issue.

User avatar
eddie5
Posts: 11
Joined: 27 Jun 2019, 11:26

Re: Nathaniel's Balmora Candle Shop, Pelagiad Townhouse and Vos Apartment

Post by eddie5 » 09 Dec 2019, 01:26

This looks really messed up to me from just looking at the code. I looked at the candle shop only, but...

Activate is funky, I don't fully understand how it works TBH: whatever you use it on needs to check OnActivate, but that part of the script usually calls activate itself without an infinite loop - magic! So if it's doing the fall-through default activation option and the light has the pickup-able flag set, running activate on it could pick it up, yes. I suspect the author didn't envision you getting one into your inventory. This might be where your 2nd copy is coming from. As for the multiple state changes not working - there are on and off versions of the object: the script on *one* of those disables itself & enables the other whereas the other just sets a variable. So yeah. I suspect you're on to something with the idea of making the other script do the reversed enable/disable. The real mystery to me is how this works on vanilla at all, not why it doesn't in OMW. :?:

I notice that, unless I'm completely at sea about defining lights (which is a very real possibility) both the on & off versions put out the same amount of light to the same distance, so only the mesh itself really changes...?

User avatar
Iolite
Posts: 4
Joined: 24 Jun 2019, 03:51

Re: Nathaniel's Balmora Candle Shop, Pelagiad Townhouse and Vos Apartment

Post by Iolite » 10 Dec 2019, 20:57

I see. Thanks for taking a look at it. So, this is yet another encounter with the supernatural, irrational coding... Weird. Maybe there's more than one type of "activate" command, or something like that? Oh well.

I'm pretty sure that all the scripted lights in these mods aren't supposed to be portable in any way, what happened after calling activate seems like a curious accident... Looks like the script can be simplified somehow, but to make it less esoteric the vanilla behaviour needs to be analyzed, I agree. One hell of a riddle!

Meanwhile, I'd like to point out that I didn't find any suitable analogue to Balmora Candle Shop. There is one similar mod for Vivec city, also found on MMH - but it's far less atmospheric as I recall. And there aren't many vendors with restocking light sources in vanilla game unfortunately... At least that sconce doesn't break the whole mod. As for the houses, well, there's plenty of alternatives - but, of course, without this unique detail of playing with switches (or should I say, matches).

I remember a mod for Oblivion with a similar behaviour, the Alchemist's Cave by Trollf. It utilizes a few activators as some switchable torches. Maybe this can spill some light on this matter (pun intended). :idea:

About the unchanging value of light range... Looks so. I don't know much about the difference between the static and portable lights either, but since the mod uses vanilla assets (aside from icons), I can see why it could simply switch the meshes instead of actual lights.

Post Reply