Skip to content

skyrim-platform/console-util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@skyrim-platform/console-util

(Unofficial) TypeScript library for the ConsoleUtil Skyrim modding utility

Getting Started

You can find an example Skyrim Platform plugin with documentation on how to get started using this library: https://github.com/skyrim-platform/example-plugin-using-libraries

Papyrus source code conversion to TypeScript originally generated using Papyrus-2-Typescript

Example

import { on, printConsole } from '@skyrim-platform/skyrim-platform'
import { GetSelectedReference } from '@skyrim-platform/console-util'

// Whenever anything is selected in the ~ Skyrim console, it prints out that object's name in the console
on('update', () => {
    const selectedReference = GetSelectedReference()
    if (selectedReference) {
        let name = selectedReference.getName()
        if (! name) name = selectedReference.getDisplayName()
        if (! name) name = selectedReference.getBaseObject()!.getName()
        printConsole(`Selected reference: ${name}`)
    }
})

About

(Unofficial) TypeScript library for the ConsoleUtil Skyrim modding utility

Topics

Resources

License

Stars

Watchers

Forks

Contributors