# A course on WEIDU

By DavidW - V1.1 12/14/2023

- Introduction
- Chapter 1 (Introductory WEIDU)
- Chapter 2 (Programming in WEIDU)
- Chapter 3 (Specific WEIDU commands)
- Chapter 4 (More advanced topics)
- Appendix (the WEIDU readme)

## 0 Introduction

WEIDU is the standard tool used by the Infinity Engine (IE) modding community to build and install mods. It has a notoriously steep learning curve and (imho) there are no very good introductions to it: most people learn it by reverse-engineering existing mods, which is a great way to learn the practice but also leads to confusion, and can leave you ignorant of large parts of WEIDU’s capabilities (90% of mods use only 10% of WEIDU’s capabilities).

I intend this document as a course in basic-to-intermediate WEIDU. The level is somewhat uneven: Chapter 1 explains the basics of WEIDU without assuming any prior modding or programming experience, and I hope should be helpful to new modders. Chapter 2 is a more sophisticated and in-depth discussion, focussing on using WEIDU as a programming language (and de-prioritizing specific applications to IE games); I hope intermediate WEIDU users will find it a good way to get to the next step, and even advanced users might learn something. Chapter 3 discusses some specific programming tasks relevant to IE games; Chapter 4 discusses a few advanced techniques. The rest of this introduction provides a bit more context for the course, but you can skip straight to Chapter 1 if you like.

### 0.1 What you will need

- WEIDU itself, obviously: see chapter 1 for how to get it.
- The WEIDU readme. The readme is not a great introduction to WEIDU, but it is the official reference, and you’ll end up consulting it a lot once you have the basics. See the appendix for more details on its contents.
- A good text editor. WEIDU is written in plain text documents: you can use Notepad if you like, but most people want something more sophisticated. (I use Notepad++.) It can be very helpful to use a highlighter: one for Notepad++ is available here, and others exist for other text editors.
- Near Infinity, the standard tool for reading and editing Infinity Engine files. You can find the latest version here.
- The "Infinity Engine Structure Description Project" (IESDP), the (technically un-)official documentation for Infinity Engine files. It’s online here and you can download a local copy if you want.

### 0.2 What this guide is not

"WEIDU" is actually three tools packaged together: a tool for writing IE dialog files, a command-line tool for editing IE files, and a general-purpose modding tool. Historically the first of these was how WEIDU started out (officially ‘WEIDU’ stands for Weimer Dialog Utilities, named for its creator Wesley Weimer). This course is only a course in WEIDU as a general-purpose modding tool: it doesn’t cover command-line or dialog functionality. (Both are covered quite well by WEIDU’s readme.)

In addition, this is not a general course in Infinity Engine modding. I will assume at least some rudimentary familiarity with how IE games are structured: if you haven’t already, you should spend some time poking around BG2 in Near Infinity before reading on.

Finally, although both the IE games and WEIDU work on OSX, this guide assumes Windows.

### 0.3 About me

I’m DavidW, a member of the Gibberlings Three modding community. I wrote, and maintain, the popular BG/BG2 mod Sword Coast Stratagems, and was design consultant on Icewind Dale: Enhanced Edition. I didn’t write WEIDU and don’t maintain it, but I have very extensive experience coding in it.