Welcome to the AFK Mods bug tracker. In order to report an issue, you need to have a VALIDATED account to post one. Once you have followed the link the registration email sent you, please select a project from the drop down menu below. Select “Open New Issue” and fill out the form with as many details as possible.

Please also consider sending your bug report to Bethesda if you are reporting on an issue with Skyrim Special Edition, Fallout 4, or Starfield. Doing so will help everyone on all platforms.

Issue Data
Status: New
Issue Type: Bug Report
Project: Unofficial Skyrim Special Edition Patch
Component: Skyrim SE: Vanilla
Category: Quests & Dialogue
Assigned To: Nobody
Platform: Windows PC
Severity: Low
Votes: 2
Watching: N/A
Opened By bladeshriek on Mar 21, 2021 12:09 am
Last Edited By BlackPete on Mar 21, 2021 12:27 am

Issue #29846: Morokei does not attack (with fixes)

 
This is a re-post of an issue from ~2012. However, unlike the post back then this one does include a potential solution. I'm in no way an expert with Papyrus & AI packages, so these changes would have to be reviewed. But if the USSEP team has any time to do so I will say that I tested extensively (probably died to the boss over a hundred times) and have had decent results.

Not sure if the linked issue thing works but the originally reported issue is here: 1451

Observed

In the Staff of Magnus quest, Morokei may sometimes do the following unexpectedly (I believe in both vanilla and modded environments):

  • Ignore combat entirely

  • Initiate combat partially (such as with self-buff), and then ignore combat entirely

  • Initiate combat but after a 5-10 second delay

  • Not use his full repertoire of spells (even occasionally or rarely, depending on the player's level and presence of mods)


  • Expected

  • Morokei should aggro pretty much instantly against a non-stealth character that is within the raw detection radius, and should always stay in combat

  • And he should have a good chance of detecting stealth characters

  • And finally he should use additional abilities besides his magic-stick, at least occasionally


  • Solution (summary)

  • Papyrus changes to quest stage 95's fragment for dunLabyrinthian

  • Package flag change MG07DunLabyMorokeiShieldedPKG


  • Solution (detailed)

    Change the above fragment to the following:

    Alias_Morokei.getActorReference().EnableAI(FALSE)
    
    Alias_MagicBarrier.getReference().playAnimation(barrierDownAnim)
    Alias_MagicBarrier.getReference().disable()
    
    Alias_Morokei.getActorReference().setGhost(FALSE)
    Alias_Morokei.getActorReference().setActorValue("aggression",3)
    Alias_Morokei.getActorReference().removeSpell(ghostAbility)
    Alias_Morokei.getActorReference().setNoFavorAllowed(FALSE)
    Alias_Morokei.getActorReference().setAlpha(1.0)
    Alias_Morokei.getActorReference().EnableAI(TRUE)
    Alias_Morokei.getActorReference().equipItem(MG07StaffofMagnus, FALSE, TRUE)
    
    Alias_Morokei.getActorReference().EvaluatePackage()
    Alias_Morokei.getActorReference().SetLookAt(Game.GetPlayer(), TRUE)
    Alias_Morokei.getActorReference().startCombat(game.getPlayer())
    
    Alias_MagicBarrier.getReference().delete()

    And finally disable "No Combat Alert" in the above package

    What this does NOT fix

    Without stealth modifying mods (like RAID), a high-sneak toon attacking from certain corners of the arena can probably take down the boss before he performs any attacks or completes detection. This is just a flaw in the base game that has been endlessly discussed. This boss fight - like many others - is better with stealth modifying mods because they make this scenario impossible without a huge perk investment.

    If the player stands near the boss while the barrier is present, and strikes one of the thralls, the boss will squirm a bit and try to get out (to no avail, unless pathing really glitches out). I'm fairly sure this is a vanilla behavior and is unaffected by these changes.

    In vanilla, dragon priest combat styles weigh heavily towards use of staves. Morokei has one, and it's not very good (low damage throughput). In vanilla he is likely going to be a trivialized boss in many play-throughs for this reason.

    Explanation

    So this boss fight has a ton of issues; I don't think there's any one change that totally fixes the fight. To be clear, I have no idea what's going on under the hood when Morokei does the "I'm going to pretend I'm in combat, but not attack you" routine that was originally reported in '12. But just glancing at the fragment script and the associated package, I can venture some guesses below.

    The unmodified script does a few things that seem to be screwed up:

  • It forces the boss to keep his magic-stick equipped, which precludes the ability to use spells in the other hand or to dual-cast. If he does fight the player without issue, he is likely to just use his staff attack. With the flag to "equipItem" changed, he can unequip his staff to cast certain spells that may or may not be available depending on the player's level. The vanilla combat styles weight staves A LOT, so it's unlikely a player will see more than one or two casts in a long fight. Many mods modify Dragon Priests however, so this script is bad for vanilla but way worse for mods.

  • It has a countdown of 5 real-time seconds (at minimum) to clean up a record. This can keep the boss in his quest AI package needlessly long, and seems to also delay the boss's ability to transition into combat. I tested without this "sleep" call and observed no unwanted effects; it is likely a completely pointless delay since the record in question is disabled in the same fragment.

  • The quest AI package configures the boss to skip the alert stage and go straight to combat if he transitions into it from that package. This seems to totally wreck Morokei's combat routine if the player is undetectable when the transitions occurs; maybe the PC has a good sneak skill, or maybe he/she's behind a pillar. WIthout the flag the boss has the usual alert stage and will search for the player. Even better, if he summons atronachs (from mods, but rarely from vanilla) they'll seek out the player too.

  • The vanilla script relies on whenever packages are refreshed to get 'em out of the quest stage if the boss is unable to start combat (player is far away or undetectable). Forcing an AI reload seems to help there.

  • The vanilla script is missing a call to force the boss to stalk the player. This makes it more likely for the boss to aggro immediately when the barrier is lifted- even against sneaky toons- instead of doing dumb stuff (like getting sneak-chained)


  • So ignoring combat seems to be rooted in the script and the associated quest package. Specifically, the script does not refresh the actor's AI and sleeps at minimum 5 real-time seconds. The quest package also does not use the normal detection routines, which destroys the call to initiate combat if the player is far away or otherwise undetectable.

    His use of 100% Staff of Magnus drain is just due to the equip call forcing it to remain equipped.

    What is optional in the fix; Only one thing from my testing. I set the boss to frenzy-level aggression because it seemed more apt & loreful to me (the ghosts, while enthralled, are still his enemy). It also makes the fight more organic if the player decides to interrupt the ghosts, possibly from a distance. The boss will engage with them before going for the player.

    Otherwise, it seems like to get the best results all the changes are needed. Hope this is of use to USSEP because this fight was a major disappointment before I made these tweaks :grinning: I'm running with Skyrim Revamped and Know Your Enemy, so this boss is actually a total monstrosity when he aggros quickly, stays in combat and uses his full repertoire of spells. Apologies if the category is wrong, let me know if it should be under Skyrim SE instead of USSEP.



    Attached Files:

    Screenshot 2021-03-21 004044_Morokei_Combat_Alert_Flag.png
    Screenshot 2021-03-21 004319_quest_dunLabryinthian.png

    Related Issues: 1451