Jump to content

[Skyrim] Keyword data location


Kesta

Recommended Posts

Hey hey,

 

Trackdown is down (again ? :( ) for me it seems. Considering the problem, I figured I could open a full thread on the subject.

 

First and foremost : What brought me here. I was having dragon randomly spawned on a custom city located in a custom worldspace. And I didn't want that. After a look, everything seemed alright... but no, the quest event spawning dragons, WIChangeLocation09 (00050AF1) is still fired when I enter the city... and a dragon attack. With all the complications you can imagine.

 

After a deep look, I noticed that the distinction is actually made by this condition :

 

GetKeywordDataForCurrentLocation, checking for the keyword WIDragonsToggle, and wanting it... superior OR EQUAL to 0 (ZERO). At first sight, I thought "So, if the current location doesn't have the keyword at all, I guess this function return -1"... except that my location do not have the keyword, but dragons are still spawned in here through this quest/event node (double checked through story event log and papyrus fragments debug, that's the culprit, 200% sure.)

 

Now I'm kinda wondering :

If I change this condition to >= 1, am I actually going to break anything ? The "keyword data" for locations is a float, and the one concerning WIDragonsToggle seems to be altered through 2 functions in WIFunctionsScript, but I'm not sure which script is actually calling functions from here... if any. And I'm confused about the impact. As far as I see it, altering this value can potentially "fake" the absence of this keyword by setting it to zero, thus preventing dragons attack to occur here... except it probably won't since the Condition is still superior or equal to 0...

 

 

In the end, there is two questions :

Did I miss something really important ?

Shouldn't USLEEP modify this condition so that it read "> 0" instead of ">= 0" ?

 

 

Edit : I can confirm that by checking through scripts, an absence of the keyword on the location return 0.0 

Link to comment
Share on other sites

If you modify MQ106TurnOffRandomDragons [000C65BB] to anything other than 0, the entire set of conditions will fail and dragons will not spawn. 

 

Since your cell(s) are custom, you most likely have some means of being teleported to the appropriate location.  Just before the transition, get and store the current value of that variable, then set it to anything other than 0.  And whenever you allow the player to return to Skyrim worldspace, reset the variable to the value that you stored.

Link to comment
Share on other sites

If you modify MQ106TurnOffRandomDragons [000C65BB] to anything other than 0, the entire set of conditions will fail and dragons will not spawn. 

 

Since your cell(s) are custom, you most likely have some means of being teleported to the appropriate location.  Just before the transition, get and store the current value of that variable, then set it to anything other than 0.  And whenever you allow the player to return to Skyrim worldspace, reset the variable to the value that you stored.

 

Hey, thanks for the idea. I was not really looking for a workaround (honestly, I'd rather edit the set of conditions and display a clear conflict in xEdit than messing with vanilla content this way, any error potentially breaking the game).

The thing is, there is a condition on this event that look like it's explicitly designed so that only locations intended to be attacked by dragons are attacked by dragons, and that because of what look like an oversight from Beth, any this condition is useless because checking for the wrong value. If this is indeed the case, then there is no point in setting a workaround while the root cause can be fixed.

Link to comment
Share on other sites

Could have been an intent at one point.  Could also be that they changed their mind.  I recall that they did some adjustments to dragon spawns in one of the patches but I don't know the specifics.

Link to comment
Share on other sites

Anyway, since I couldn't find more infos, and testing this is... awfully boring, I came up a fairly decent solution :

 

A script pool every 24 in-game hour, to check the number of days left before the next dragon attack (WINextGragon - GameDay, those are two global variable automatically updated by the engine and dragon spawn system).

If there is 1 day left or less, it add 3 to the WINextDragon. In the end, there is at least 1 to 4 days left before the next dragon attack, which never occur. Better than simply preventing it, this also avoid to have a 100% chance to be jumped on by a dragon whenever you go back to skyrim.

 

The script run in a magic effect, conditioned by a spell that check for the current's player location (since the condition is valid if a sub-location have the location checked as a parent). Only thing is to make sure is that any of the location in the new worldspace properly refer to the one checked in the condition as parent or top-parent.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...