The Elder Scrolls V: Skyrim

The Elder Scrolls V: Skyrim

PWC - Exit on Demand
Syrris 20 Sep, 2013 @ 4:34pm
Unable to exit beast form: some testing.
I've been testing the problem of being unable to revert properly. The common symptom is that using the sheath/first person trick produces the expected flare, but you then remain in a werewolf body.

It appears that, when this happens, the game considers you to no longer be a werewolf (fast travel is re-enabled, character/inventory/magic menu can be accessed), BUT for some reason the game isn't setting your character's race back to its original, leaving it as werewolfbeastrace without any of the associated scripted UI limitations. (You still can't use forges/enchanting tables/etc because the model lacks appropriate animations, though.)

I have established one trigger for this that always seems to apply: if your character was a werewolf before initiating the companions questline (via another mod, adding the power via the console, etc) the beast form transformation script seems to break at the moment that you complete "Take Up Arms", causing the above issue if you were in werewolf form at the time, or causing the transformation to not go off at all for the first few attempts (using the beast Form power) if you were not in werewolf form at the time that "Take Up Arms" was completed. (The ability is still expended until it recharges, but the script seems to be faulting at some point and as a result you don't actually change.)

The ability seems to work normally thereafter once you manage to use it successfully, but I don't know whether the transformation script will break again at some other point in the quest chain. The inability to properly revert (losing the UI limitations but keeping the body) suggests that for some reason the game is losing track of what your original race was and thinks the 'werewolfbeastrace' was it. Unfortunately, I'm completely useless with the toolset so I have no idea what part of the quest scripts or objects might be interacting to cause this problem.

I haven't yet had time to go through a "normal" joining and obtaining of the werewolf power at the Underforge to test whether the problem also also occurs in that case (or what later events might trigger it) or if it's only being one "too soon" that causes this trouble.

--

EDIT: While I used console commands to expedite the process, and that could theoretically affect the outcome, I've done a little more testing of the trigger point in the Companions questline and it seems that as long as you are not in werewolf form when you complete Taking Up Arms, and the do not use the Beast Form power until after the Whiterun rampage sequence of The Silver Hand (when you wake up at Gallows Rock and Aela talks to you again), or try to exit the rampage early with sheath/first person from this mod, the script doesn't break, even if you have the Beast Blood power (aka are a werewolf) before Taking Up Arms.

This probably means that Taking Up Arms causes something to be initialized in preparation for the later rampage sequence and either being in beast form at the time or trying to transform before the rampage sequence actually occurs causes the werewolf transformation scripts to break. It *is* apparent that the Whiterun rampage transformation uses some code different from the normal sequence, if only because the "So What?" mod also by Paradox does not seem to affect NPC reactions during that one scene (they all go hostile, as usual).
Last edited by Syrris; 20 Sep, 2013 @ 6:08pm
< >
Showing 1-6 of 6 comments
Paradox  [developer] 21 Sep, 2013 @ 2:07am 
I didn’t come across this problem myself (I think when I got to that part of the quest line I was in human form). My mod is just activating the part of the werewolf hidden quest that causes reversion to human form. This is the normal way the script reverts when the timer runs out. It is possible that if you were to be in werewolf form before this quest without my mods installed you could have this problem anyway. It could also be that this quest uses its own transform and revert code and that using the original revert may break the quest. If I have time I may have a look through the quest to see what it is doing.

As for the NPC hate and the "Werewolf? So what?" mod, the mod only removes the faction and crime changes the script preforms, so if someone is scripted to hate you for being a werewolf (transformed or not) or for being in a quest stage, that mod will not stop it.

On another note, I am having a problem myself now that my save game is getting large. Now when I try to turn back the spell/script that checks for the changing stances (sheath weapons, change to first person) seems to be lagging or failing to register at all. I will have to have a look and see if I can make it a little more robust (maybe a little more aggressive on the checking).

Thanks Syrris for going to all this trouble to find the cause of the problem. I will see what I can do, but I make no promises. This is just a hobby for me and I don’t really want it to turn into a second job. I have added the source code files to the BSA files in my mods so if anyone else is interested in finding problems and solutions or just using my mods to create their own, they can. I am generally of the opinion that code should be shared and built upon and not hidden and hoarded.

Anyway, thanks again.
Syrris 21 Sep, 2013 @ 3:20am 
Okay, I may have found the source of the problem.

"CompanionsHousekeepingScript" has a function called "PlayerJoin". Among other things, it checks the player's current race and stores it as the variable "PlayerOriginalRace" (with specific error handling if the original race was a vampire version). This presumably means that if the player is in beast form at the time, it'll store werewolfbeastrace as their original race, thereby making the reversion script change them "back" to it from that point on.


It also includes the following lines:
; set up the spell tracking so the first time you cast it doesn't count
PlayerIsWerewolfVirgin = true

This also appears in "WerewolfChangeEffectScript":
; if this is the first time, don't actually do anything (transform handled in rampage script)
if ( (C00 as CompanionsHousekeepingScript).PlayerIsWerewolfVirgin )
; Debug.Trace("WEREWOLF: Player's first time; bailing out.")


And the rampage event does indeed have its own separate script (or rather, set of scripts for handling various aspects of it). This would seem to be what's causing the failed transformation attempts between joining the faction at the end of "Taking Up Arms" and the conclusion of the rampage sequence, with the separate rampage sequence script also explaining why issues can arise if someone reverts early using the Exit On Demand method.


In this case it would seem that the problem isn't specifically with the Exit On Demand mod (or other mods in this series) - it's an issue connected to the fact that other mods and/or console commands can result in the player having the beast blood ability before the game's off-the-shelf scripts expect it to, and they're not hardened against this possibility.

I'm not sure how to fix the "PlayerIsWerewolfVirgin" issue since it would require rewriting the way those interconnected scripts work, but the PlayerOriginalRace problem might be solved by capturing that value at some other point instead of at the time the player joins the Companions faction, perhaps checking for it each time Beast Blood is activated. Alternatively, an interactive object could be added to the game (probably as a separate mod) to allow the player to check on and if necessary change that reference. Either would have the side benefit of solving the potential issue of a character undergoing a race change for some other reason (console being the most likely, but I suppose that mods and/or other special events could also cause this).

It would be best to implement either or both of these solutions in an independent mod however, since the script-faults are presumably incidental to the PWC mods - it's probably just that people using PWC are also more likely to be using other mods that allow them to become a werewolf ahead of the game's expected schedule.
Paradox  [developer] 21 Sep, 2013 @ 5:01am 
Thanks Syrris, I do remember something about the race being stored when you first become a werewolf. This problem of storing your original race also affects people who use console commands or mods to change their race after they have become a werewolf.

A new mod to help people to reset their stored base race is a good idea. I’m not going to make it myself but it sounds like you might be able to do it yourself. You already know were/how the scripts are storing the value. And you can check out PWC - Permanent Werewolf for an example on how I externally referenced the quest/script variable that stores werewolf beast form duration.

If you do want to try making the mod yourself, let me know and I will see if I can help you.

Thanks again Syrris, great work.
Syrris 21 Sep, 2013 @ 2:42pm 
Unfortunately, I can poke through scripts to find suspicious-looking entries like those, but it's beyond me to actually build anything in the toolset and I have the further problem that it crashes if I try to load any DLC .esms (which makes it difficult to ensure that any mod would play nice with Dawnguard's werewolf changes).

I did just look up the console commands on the UESP and while it's easy enough to change global variables, I don't see anything that would allow in-game console modification of the PlayerOriginalRace entry used by that script. Resetting the Taking Up Arms quest and doing it again doesn't seem to work either.

The console does of course allow the player to "setrace" directly, but they'd need to do it every time they reverted from 'officially' being a werewolf (such reversion being necessary to re-enable the menus and such that are disabled by the transformation script).


Still, at least we know what's causing the problem so that people can avoid it.
Paradox  [developer] 22 Sep, 2013 @ 5:41am 
The crash problem you’re having is a known problem that has an INI file change that fixes it (it is odd that Bethesda hasn’t fixed it yet). I can’t remember the specifics but you can find it online.

As for changing the in “quest script variable”, that’s what I was talking about when I said have a look at PWC - Permanent Werewolf for an example (I change the duration variable in the quest script to prolong beast form).

The idea for this mod would be to have maybe a spell that is given to the player the moment the mod is installed (most of my PWC mods do this but the spell is of the ability type and not a castable spell). That spell would run a script to set the race for the werewolf quest script ether to the player’s current race (like it is done in the original werewolf scripts) or maybe ask the player to choose a race from a pop-up message window.

If you want to try let me know and I can try and help you. Either way thanks for the information above.
Rotiart 12 Dec, 2013 @ 4:12pm 
Turning your char back into your original race works well :3 just a little hard and drastic, So what I suggest you do is have a trigger key or something that triggers your race back to whatever you were upon un-transformation
< >
Showing 1-6 of 6 comments
Per page: 1530 50