Skip to content

Instantly share code, notes, and snippets.

View mrowrpurr's full-sized avatar

Mrowr Purr mrowrpurr

View GitHub Profile
@mrowrpurr
mrowrpurr / plugin.cpp
Last active March 23, 2022 13:27
CommonLib SKSE Hello World
#include <SKSE/SKSE.h>
#include <RE/C/ConsoleLog.h>
extern "C" __declspec(dllexport) bool SKSEAPI SKSEPlugin_Load(const SKSE::LoadInterface* skse) {
SKSE::Init(skse);
SKSE::GetMessagingInterface()->RegisterListener([](SKSE::MessagingInterface::Message* event){
if (event->type == SKSE::MessagingInterface::kDataLoaded) {
RE::ConsoleLog::GetSingleton()->Print("Hello from mod.");
}
});
@mrowrpurr
mrowrpurr / SKSE: Bind a script to an object at runtime.cpp
Created March 25, 2022 18:57
SKSE: Bind a script to an object at runtime
void BindObjectToScript() {
ConsoleLog::GetSingleton()->Print("Binding the BindMe script...");
auto* character = PlayerCharacter::GetSingleton();
auto* vm = VirtualMachine::GetSingleton();
auto* handlePolicy = vm->GetObjectHandlePolicy();
auto* bindPolicy = vm->GetObjectBindPolicy();
// Force load the BindMe script
vm->linker.Process(BSFixedString("BindMe"));
@mrowrpurr
mrowrpurr / NewBindings.txt.py
Last active April 22, 2022 03:19
NewBindings
ScriptName [Properties...]
FunctionName [Arguments...]
ScriptName *Selector*
EventName [Event Conditions] FunctionName [Arguments...]
ActionName [Argments...]
... AND WICKED BADASS PAPYRUS FUNCTIONS
# -------------------------------
@mrowrpurr
mrowrpurr / Latest Skyrim.ppj
Created April 28, 2022 23:09
Latest Skyrim .ppj
<?xml version='1.0'?>
<PapyrusProject xmlns="PapyrusProject.xsd"
Flags="TESV_Papyrus_Flags.flg"
Game="sse"
Output="Scripts"
Anonymize="false"
Optimize="false"
Release="false"
Zip="false"
Package="false"
@mrowrpurr
mrowrpurr / Papyrus for Programmers.md
Last active May 3, 2025 23:34
Papyrus for Programmers

Papyrus for Programmers

Notes for Skyrim Scripting episode

How does Scripting work in Skyrim and Creation Kit?

Example Scripts:

  • KillerItem (Object Reference)
  • Magic
GREEN="#18C418"
PINK="#bf1fba"
TOLERANCE="27%"
for FRM in *.FRM
do
BASENAME="${FRM/.FRM}"
# Turn the .frm into 6 .gif (one for each isometric direction)
frm2gif -p color.pal "$FRM"
@mrowrpurr
mrowrpurr / gl_mymod.ssl
Last active June 25, 2022 22:21
Not working :(
#include "../headers/define.h"
#define NAME "gl_mymod"
#include "../headers/command.h"
procedure start;
procedure start begin
if (game_loaded) then begin
variable file;
file := fs_copy("art\\critters\\MY_IDLE.frm", "art\\critters\\HFPRIMAA.frm");
{
"workbench.colorTheme": "SynthWave '84",
"vim.handleKeys": {
"<C-k>": false,
"<C-w>": false,
"<C-pageup>": false,
"<C-pagedown>": false
},
"vim.normalModeKeyBindingsNonRecursive": [
{
New-Item -ItemType SymbolicLink -Path "C:\GOG\Games\Fallout 2\data\SAVEGAME" -Target "C:\Users\mrowr\Documents\My Games\Fallout 2\SAVEGAME"