r/skyrimmods • • Jul 23 '26

Development Vellum v0.2.0 — VS Code support, string interpolation, pattern matching and more

Hey guys, a few months ago I announced the first release of Vellum — a scripting language for Skyrim that compiles to PEX and can be used alongside (or instead of) Papyrus.

v0.2.0 is out. Biggest additions: a VS Code extension, string interpolation, pattern matching, better for loops, array initializer lists, the is operator, and batch compilation.

VS Code support

There's now a VS Code extension with syntax highlighting, diagnostics, completion, go-to-definition, and Vellum: Compile command from the editor.

Download the .vsix from GitHub Releases (vscode-v* tags) and install via Extensions: Install from VSIX…. Windows x64 for now.

Demo (gif)

String interpolation

Papyrus:

Debug.Notification("Hello, " + actor.GetName() + "! Your level is " + actor.GetLevel() as String)

Vellum:

Debug.Notification($"Hello {actor.GetName()}! Your level is {actor.GetLevel()}")

Prefix with $ and put expressions in {...}. Non-strings are cast automatically.

Pattern matching

Papyrus:

If (puzzleStage == 1 || puzzleStage == 2)
    doA()
ElseIf (puzzleStage == 3 )
    doB()
Else
    doOther()
EndIf

Vellum:

match puzzleStage {
    1 | 2 => doA()
    3 => doB()
    else => doOther()
}

Enhanced for loops

Iterate arrays, FormLists, and Int ranges. Bind index optionally.

Papyrus:

Int i = 0
While i < items.GetSize()
    Form item = items.GetAt(i)
    ; ...
    i += 1
EndWhile

Vellum:

for item, i in items {
    // item is Form, i is Int
}

for i in 0..n {
    // 0, 1, ..., n-1
}

Array initializer lists

Papyrus:

Int[] nums = new Int[4]
nums[0] = 1
nums[1] = 2
nums[2] = 3
nums[3] = 4

Vellum:

var nums = [1, 2, 3, 4]

is operator

Type test that returns Bool.

Papyrus:

If (source as Weapon) != None
    ; source is a Weapon
EndIf

Vellum:

if source is Weapon {
    // source is a Weapon
}

Batch compilation

Now you can pass a directory to -f and the compiler builds every .vel under it (recursive by default).

Download

Future plans

  • Support other Creation Kit games (Fallout, Starfield)
  • Linux/MacOS support
  • Debugger for VSCode

If you're a mod author and curious, try dropping a new Vellum script into an existing Papyrus mod. Same PEX runtime, so they interop in-game. Vellum can extend Papyrus scripts and call Papyrus APIs.

Happy to answer questions here and see your feedback and ideas.

44 Upvotes

20 comments sorted by

View all comments

Show parent comment

6

u/ritz_are_the_shitz Falkreath Jul 24 '26

I think he's wrong for that, but also the context is important - he might have some AI assistance, but anything in the linux kernel is heavily hand-reviewed prior to committing. that's the ideal way to use AI, and I have far fewer issues with senior devs using it to write boilerplate and then reviewing the output.

BUT one look at the nexus right now shows that's not how it works most of the time. the comment that started this conversation literally said "my llm writes the scripts". from a user perspective, I just want to know that what I download will mostly work. that's far from the truth right now.

2

u/TheBrownMamba1972 Jul 24 '26

I have no problem with your first paragraph whatsoever. However, you’re assuming that because someone uses an LLM to write their scripts, it instantly means they’re vibe coding and generating AI slop, instead of something akin to what you yourself described in your first paragraph.

The fact that the original commenter even engaged in a scripting language discussion in the first place would suggest that they have some degree of understanding in programming. At the very least, it’s wild that you and/or others immediately engage with the original commenter with immediate hostility without any other indication other than they use AI generated code. I know this sub is heavily anti-AI slop, and I generally agree with anti-AI slop, but this is just ridiculous anti-AI witch hunt.

7

u/ritz_are_the_shitz Falkreath Jul 24 '26

ehhhh. I think the way it was phrased implies vibe coding. I know a fair few devs that use AI fairly responsibly, I write C and Zig for microcontrollers/embedded, and the people using AI safely are not saying it writes scripts for them.

6

u/TheBrownMamba1972 Jul 24 '26

Well how would you phrase it? I think “The AI writes the scripts for me” is not a far gone conclusion towards vibe coding, especially if they’re not a native English speaker. I use LLMs to write JS functions and Python scripts myself as I work on cybersecurity. I tell it how I want my MITM scripts to be written for example, and it writes them for me. I don’t think it’s far fetched to say that the AI wrote them for me.

2

u/Random96503 Jul 24 '26

Who actually writes scripts in 2026? Like, what the fuck. Okay, grandpa.

I’ll go back to walking to school uphill both ways in the snow.

4

u/ritz_are_the_shitz Falkreath Jul 24 '26

It's pretty rare in embedded. I don't trust AI to access memory directly, no thank you

1

u/Random96503 Jul 24 '26

That's fair. You would only want to use it where it has sufficient training data.

The point I was making is that valorizing doing math by hand vs a calculator seems a net loss for the species.