Jump to content

Disable Fast Travel when wearing DD items


Recommended Posts

Posted

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

Posted

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

 

Posted
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. :)

Posted
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.

Posted
18 hours ago, Swe-DivX said:

First page to the right.

Ah yes, I had a faint memory I saw this feature somewhere. I have a newer version of the mod and it works like charm. Thank you!

Archived

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

  • Recently Browsing   0 members

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