Skip to content

{!BIND} - Easier Papyrus Development

License

Notifications You must be signed in to change notification settings

SkyrimScripting/Bind

Repository files navigation

Bind

Download Bind

Bind Papyrus Scripts On Game Load

Bind

Papyrus Development

This is a Developer Tool: for testing Papyrus scripts!

Usage

  1. Install Bind (it's an SKSE .dll compatible with SE/AE/GOG/VR)
  2. Create a Papyrus script

    if you want it to extend a Quest or ObjectReference, specify an extends

  3. Create a file Data\Scripts\Bindings\<your mod name>.txt
  4. Put the name of each of your scripts in the file, one line per script
    MyScriptOne
    MyScriptTwo
    
  5. Run the game!

    Each of your scripts will automatically be bound to a game object
    and the event OnInit() of each script will run

Specifying what to bind the script to.

If you create scriptName Whatever extends Quest, it will bind to an generated quest.

If you create scriptName Whatever extends ObjectRefenrence, it will bind to a generated object.

If you create scriptName Whatever extends Actor, it will bind to the Player.

If you want to extend a specific object, see the v1 details below for this release.

SomeScript 0x123
SomeScript AnEditorID

Logs

ℹ ️ If you run into any problems, check the SkyrimScripting.Bind.log in your
My Games\Skyrim Special Edition\SKSE\ folder.

v1

The goal for v1 is to be as minimal as possible:

  • Bindings are defined in Scripts\Bindings\
  • Each file should contain 1 line per desired "binding" (attach script to something)
  • Support for binding to objects by Form ID
    NameOfScript 0x14
    
  • Support for binding to objects by Editor ID
    NameOfScript dlc1serana
    
  • Support for binding to the Player (as an Actor Form, not a ReferenceAlias)
    NameOfScript $Player
    
  • Support for binding to an anonymous/generated Quest
    NameOfScript $Quest
    
  • Support for binding to an anonymous/generated Quest with a provided editor ID
    NameOfScript $Quest(MyCoolQuest)
    
  • Support for binding to an anonymous/generated ObjectReference
    NameOfScript $Object
    

    Objects are ALWAYS placed in the WEMerchantChests cell. This is not configurable.

  • Support for binding to a generated ObjectReference of a specified base Form ID
    NameOfScript $Object(0x7)
    
  • Support for binding to a generated ObjectReference of a specified base Editor ID
    NameOfScript $Object(FoodSweetroll)
    
  • Support for determining what to bind to automatically based on script extends
    NameOfScript
    
    scriptName NameOfScript extends Quest ; Anonymous Quest
    scriptName NameOfScript extends Actor ; Player
    scriptName NameOfScript extends ObjectReference ; Anonymous Object
    scriptName NameOfScript extends CustomType ; CustomType parent(s) checked
  • Binding to objects from mods (if you don't know the full Form ID) is not supported in v1
  • Nothing is configurable
Future Planned Version Features

v1.1 Champollion support (Planned)

This has not yet been implemented but is planned for the next release.

  • Read every .pex (file mtime support)
  • Auto register any including this comment:
    scriptName Whatever
    {
      BIND: Player
      BIND: $NewQuest$
    }
  • Or Simply
    scriptName Whatever
    {BIND}