temnix Posted October 1, 2019 Share Posted October 1, 2019 I'm looking for a way to implement light - with a mechanic that would respond to a dark environment. There are two types of dark situations: everywhere at night and indoors always. Rooms have nights, too, of course, though they shouldn't matter there. Now, with the Cast spell on condition effect it is possible to make an item, spell or ability that triggers at a certain time. DAWN and DUSK only trigger once, at those exact moments when the sun of Toril rises and sets, if you are up to hear the rooster and... whipporwill, I suppose, but NIGHT comes in right after DUSK and triggers every round until dawn very nicely. But what to do about interiors? I could check for area type with !WEATHER, but where to put these checks? The only idea I have is to patch the scripts of indoor areas to apply a temporary combination of spell states to the party round after round, all the time they spend there, and then the items, e.g. torches, could apply benefits to the characters in those spell states. And outside the same would happen at night. But this is very clumsy and would have to happen a lot of the time. I'm open to better solutions. This is a practical question, because I've just finished making torches. And though I made them give some protective benefits around the clock, I don't know how to make them apply indoors always and not apply outdoors when the sun shines. I can't say I've heard many bright ideas on these forums whenever I've asked, but let me cast the net one more time... Quote Link to comment
Endurium Posted October 1, 2019 Share Posted October 1, 2019 (edited) AreaType(0) script trigger detects indoors (all bits = 0 in ARE 0x48) Or if you want to be less strict, since Dungeon is usually interior and a requires a bit be set, use !AreaType(1) where 1 = Outdoor You could put it on the default player script (Dplayer3 for protagonist, Dplayer 2 for companions, as I recall) to avoid having to modify a slew of indoor area scripts. Edited October 1, 2019 by Endurium Quote Link to comment
temnix Posted October 2, 2019 Author Share Posted October 2, 2019 That would still be too clumsy. Thanks for the suggestion, though. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.