Jump to content

Disable Fast Travel when wearing DD items


Recommended Posts

Hi there,

 

I'd like to find a lightweight mod which has the option to disable Fast Travel when the main character is wearing DD restraints. If I remember correctly Cursed Loot has a function like that, but I don't want to use that huge mod only for this small feature.

 

Ideally this would be a non-changeable option if the character wears DDs.

 

If there is no such mod, other fast travel disabling options might be acceptable too, like Better Fast Travel.

 

Thanks,

M

Link to comment

It wouldn't be too hard to make, but it'll need a script that periodically disables fast travel because changing cells resets it.

 

EDIT: I also think it'll need an event or something to detect the equipping of a device. The periodic check should only be running while the player is wear restraints.

 

EDIT2: I don't know if another mod can use DD's mod events. :/

But this is what the script could look like:

Spoiler

Zadlibs Property libs Auto


Function OnInit()

    CheckFastTravel()

EndFunction


Event OnUpdate()

    CheckFastTravel()

EndEvent


Event OnPlayerLoadGame()

    CheckFastTravel()

EndEvent


Event OnLocationChange(Location akOldLoc, Location akNewLoc)

    CheckFastTravel()

EndEvent


Function CheckFastTravel()

    If Self.IsRunning()

        Return

    EndIf

 

    if libs.playerref.WornHasKeyword(libs.zad_Lockable)
        Game.EnableFastTravel(False)
        RegisterForSingleUpdate(6)
    else
        Game.EnableFastTravel()
        RegisterForSingleUpdate(12)
    endif

EndFunction

 

Link to comment
7 hours ago, Laura 'Lokomootje' said:

It wouldn't be too hard to make, but it'll need a script that periodically disables fast travel because changing cells resets it.

 

EDIT: I also think it'll need an event or something to detect the equipping of a device. The periodic check should only be running while the player is wear restraints.

 

EDIT2: I don't know if another mod can use DD's mod events. :/

But this is what the script could look like:

  Reveal hidden contents

Zadlibs Property libs Auto


Function OnInit()

    CheckFastTravel()

EndFunction


Event OnUpdate()

    CheckFastTravel()

EndEvent


Event OnPlayerLoadGame()

    CheckFastTravel()

EndEvent


Event OnLocationChange(Location akOldLoc, Location akNewLoc)

    CheckFastTravel()

EndEvent


Function CheckFastTravel()

    If Self.IsRunning()

        Return

    EndIf

 

    if libs.playerref.WornHasKeyword(libs.zad_Lockable)
        Game.EnableFastTravel(False)
        RegisterForSingleUpdate(6)
    else
        Game.EnableFastTravel()
        RegisterForSingleUpdate(12)
    endif

EndFunction

 

Thank you for your answer and effort, however I can't really do anything with it as I have no idea how to use that script. :)

Link to comment
15 hours ago, monsta88 said:

Hi there,

 

I'd like to find a lightweight mod which has the option to disable Fast Travel when the main character is wearing DD restraints. If I remember correctly Cursed Loot has a function like that, but I don't want to use that huge mod only for this small feature.

 

Ideally this would be a non-changeable option if the character wears DDs.

 

If there is no such mod, other fast travel disabling options might be acceptable too, like Better Fast Travel.

 

Thanks,

M

First page to the right.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use