Jump to content

Martimius

Premium Member
  • Posts

    84
  • Joined

  • Last visited

Posts posted by Martimius

  1. Hey y'all, if you didn't know already, I'm the author of the Serana Dialogue Add-On mod.


    Unfortunately my mod was one of those which unfortunately got bonked by the AE Update (not specifically the AE Edition). SDA was preventing a game load, with black screen issues. There was a fix I tried for it (thought of by Lucien's Joseph Russell) where he added a 3 second delay to his mod checker script- and I did the same with mine (we have identical scripts, at least for that part).


    However, while that part of my mod seems to have been fixed, it's not fully stable yet. In my own testing and with other users as well, we can load up the game, save, but loading it up again results in a black screen.


    I have narrowed the cause for this other bug down to one script (it's a silent teleport/follower catchup script). However, here's the doozy part:


    1. The script doesn't even frickin' load on a new game (I verified this by typing sqv for the owning quest on the console) but removing the script seems to fix the issue and allows me to save and reload normally, without black screens.

    2. For some reason, deleting ALL the contents of the script (just deleting everything other than the script name at the start) doesn't seem to work for some reason too. Even the script, empty, doesn't allow you to save and reload.

    3. The script (and I can post the source here) just defines functions and doesn't do anything anyway, unless called for. No way that can be done, since on a new save Serana hasn't even been met yet.


    I'm stumped. Any tips?

  2.  

    To add a cool down, I think you can just add a wait in the script:

     

    Scriptname KillMoveDetectScript extends ActiveMagicEffect 
    
    
    ;Put the condition IsAttacking == 1 on this spell abilities magic effect, have it run on the player.
    
    
    Actor Property PlayerRef Auto
    
    
    Event OnEffectStart(Actor akTarget, Actor akCaster)
        Utility.Wait(0.25) 
        If PlayerRef.IsInKillMove()
            ;do something
            Utility.WaitGameTime(12)
        Endif 
    EndEvent

     

    I did some testing on this, and while my quest init script does give the player the ability (I checked the console), the MGEF script isn't successfully firing. I put a debug notification for whenever the MGEF should fire, but it isn't appearing and the scene where my follower comments isn't starting.

  3. in all honesty if you have the skill it is possible to do anything with code, but there is the kiss principle to consider, and these constant magic effects to check random things, though they work, also increase the likelihood of a call to desktop.

     

     

    a lot of effort for little or no gain, if it for your personal use go for it, if you're thinking of publishing be reasonable and responsible.

    .

    Do you have an alternative then?

  4. Thanks, gotcha. I've been trying to research this online, but I can't seem to find anything: is it possible for a Papyrus script to check if a dialogue line is currently valid and/or on cooldown? Let's say I've conditioned a dialogue line to only be said every 12 in-game hours. If the countdown timer hasn't already been met, how do I make this killmove detect script not trigger the dialogue?

  5. Hey everyone,
    Is there a practical way to get follower NPCs to recognize and comment whenever a player has just finished a killmove on an NPC? I did some of my own research on the Creation Kit wiki and found this,

     

     

    bool Function IsInKillMove() native

     

    Which is a Function which basically tells whether or not a specific actor (in my case, PlayerRef) is in a killmove. However, since this would have to be fired on an event, I wasn't able to find anything related- at least going through all the existing Papyrus events for Skyrim: https://www.creationkit.com/index.php?title=Category:Events. I don't want to use RegisterForSingleUpdate as much as possible since I don't want to hog up Papyrus resources and performance unecessarily.

     

    Any thoughts?

  6.  

    If you're going the SKSE route, I would do it something like this:

     

    Event OnInit()
        RegisterForMenu("Lockpicking Menu")
    EndEvent
    
    Event OnMenuClose(String menuName)
        ObjectReference LockRef = Game.GetCurrentCrosshairRef()
        
        If LockRef.IsLocked() == false 
            Utility.Wait(1)
            Debug.Notification("Lock Picked")
            SDA_LockpickingScene.Start()
        EndIf 
    EndEvent
    Sorry you couldn't get the other way working.

     

    This is just run on a standalone quest, right? No other aliases, magic effects?

  7. As for the lockpicking issue, I've had some progress with troubleshooting, I guess. In the CK, I re-added/auto-filled all the script properties for both the init and magic spell script. So at least now 100% of the time in-game the lockpick detect spell shows up, along with the magic effect. Problem is, the lockpick dialogue scene fires at completely random times, even when I haven't lockpicked anything yet. The scene fires off once, and then never again.

     

     

    Scriptname SDA_LockpickMGEF extends activemagiceffect

    Actor Property PlayerRef Auto
    GlobalVariable Property LockPickDetectGV Auto
    Scene Property SeranaDialogueAddonLockpickScene Auto
    Event OnEffectStart(Actor akTarget, Actor akCaster) ;effect starts after player picks lock
    If akTarget.GetDistance(PlayerRef) < 2000
    Utility.Wait(1)
    Debug.Notification("Lock Picked")
    SeranaDialogueAddonLockpickScene.Start()
    Endif
    Utility.Wait(1)
    LockPickDetectGV.SetValue(Game.QueryStat("Locks Picked")) ;this nullifies the effect, so it can start again after picking a lock.
    EndEvent
    @IshadaMeradin, I also may consider going with the SKSE route instead as it does seen at least somewhat simpler. With the RegisterForMenu command, the wiki says I have to register for a calling form. What's the best way to implement that?
  8. So therefore I should just run this once, like EVENT onInit() when the SEQ quest is run? I was thinking though that we wouldn't have to force the alias to be filled necessarily, since it is filled on a new save (where the mod wasn't installed previously). I was thinking that the quest could be stopped, cleared, restarted in some way? That might mean having the quest restarted on the game startup each time.

     

    Edit: Fixed! Since the game had trouble filling aliases on a SEQ already run before, I just made a new quest and the alias filled properly

  9. This may be something I should hold off now, since it's been giving me more headaches than anything.

     

    And this may not strictly be related to the first issue I encountered in this thread, but what should I do when a scripted scene isn't firing? I basically have a scene (with the same NPC) which should occur after she has said a particular dialogue line to the player. This should be triggered through an "End" fragment in the Topic Info, scripted like this. The scene doesn't have any prerequisites, and is basically just multiple consecutive dialogue actions said by one NPC. The reference alias for it doesn't have anything special ticked for it, other than choosing the unique actor DLC1Serana.

     

     

    ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment

    ;NEXT FRAGMENT INDEX 1
    Scriptname TIF__0563DB54 Extends TopicInfo Hidden
    ;BEGIN FRAGMENT Fragment_0
    Function Fragment_0(ObjectReference akSpeakerRef)
    Actor akSpeaker = akSpeakerRef as Actor
    ;BEGIN CODE
    SeranaDialogueAddonDBComes.Start()
    ;END CODE
    EndFunction
    ;END FRAGMENT
    ;END FRAGMENT CODE - Do not edit anything between this and the begin comment
    Scene Property SeranaDialogueAddonDBComes Auto

     

    The quest does start and the alias fills (since the alias does not have an "Optional" flag checked) but the appropriate scene doesn't trigger after the topic info is said. Also, no errors with the Papyrus script compile.

     

    EDIT: Turns out the alias was not filling. sqv in the console for this quest points to NONE for this alias.

     

    EDIT 2: Ok I think I've solved part of my problem. The aliases did fill on a new testing save (which didn't have the mod installed prior; I was able to tell via the sqv command) and the scripted scene properly fired after the dialogue topic info. My problem now I guess is what to do with existing saves which already had the mod installed- since alias won't be filling on those ones. I also do think a filled alias attached to a scene could possibly fix the problems I've been having with the first lockpick thing. The problem just is getting to fill the quest alias on an existing mod save.

  10. Serana does have a different AI setup than normal followers, perhaps something there is interfering? I know it will take going through almost the entire Dawnguard quest line, but have you tried to see if it works after it is all done and she is no longer needed for any quest specific things?

    The testing save was done after the Dawnguard questline. No quest-related stuff currently running in relation to her mental model.

     

    I've also had trouble testing in the thieves guild quarters for the same reason. try going somewhere more secluded. I think It's a problem with Skyrim's scripting engine. When I tested, I did so on Serana, and it was before I had ever met her in game. I used the script to move her to me.

    Gotcha. Will try going to some NPC's house and try picking a lock there.

  11. Ok, so I tried dylbill's exact test esp (no modifications, I just added a Normal Branch Type dialogue topic with the dialogue (no conditions, other than GetIsID DLC1Serana=1) and also filled the script with that dialogue topic's name. It seems to work at least partly. Clicking on Serana on the debug console, I can see that she at least has "LockPickDetectAbility", but upon picking a lock, there still is no dialogue.

  12. Yeah she is. Definitely less than 2000 units away from me, as per the conditions set on the script.

     

    And @IsharaMeradin, the closest I can possibly get to a new save is a clean Dawnguard testing save (previously made without mods) as unlike other followers, Serana just isn’t someone you can spawn with console commands and get her to act like normal. You have to awake her in Dimhollow Crypt as usual.

  13. Weird. The debug log isn't even firing. I made sure to remove the ":" comment. Also there aren't any preexisting conditions in either topic dialogue (both the normal and the idle). Just the dialogue itself.

     

    The global variable should be set to "Long" and a 0.00 value, right?

     

    Maybe the problem with the event probably not firing is an issue with the game trying to find the Serana actor. In your own testing, did you use this particular NPC, or just some random generic follower?

×
×
  • Create New...