---
title: Your first X4 mod
summary: A minimal extension with folders, content.xml, a Mission Director script and a verification plan.
section: start
kind: guide
status: example
updated: 2026-10-27
tags: ["X4","modding","first","extension"]
sources: ["https://wiki.egosoft.com/X4%20Foundations%20Wiki/Modding%20Support/"]
---
## What you will build
The small `hello_x4` extension writes a message to the log. XML and Mission Director are enough. This is a new learning example, not a completed in-game acceptance scenario. Full files are available in `wiki/examples/hello_x4`.
## Create the folders
Place the extension under the game's `extensions` directory. X4 must find `content.xml` directly under `hello_x4`, without an extra nested folder. Use one installation and test profile, and avoid duplicate installed extension IDs.
```text
hello_x4/
├── content.xml
└── md/
└── HelloX4.xml
```
## Describe the extension
Set your own author and unique ID in the manifest. The version dependency shown below targets X4 9.00. Add third-party dependencies only when your extension actually needs their APIs or resources.
```xml
```
## Add game logic
Create `md/HelloX4.xml`. `mdscript` and `cue` are XML element names; `HelloX4` and `Hello` are your identifiers. The inner quotes in `text` are needed because the attribute contains an MD expression with a string literal.
```xml
```
## Verify startup
Enable the extension and restart X4 when needed. Use a test save or a new game, enable [logging](wiki:debugging), find `Hello, X4!` and check for import errors. A completed cue retains its state in a save; loading an existing save does not necessarily repeat the message. See [persistence](wiki:md-persistence).
## Next step
Read [content.xml, IDs and dependencies](wiki:extension-manifest). Use the [topic map](wiki:official-guide-map) to choose a further task.
Read [cue lifecycle](wiki:md-cues), then [Lua ↔ MD events](wiki:md-lua-bridge). Use [XML diff patches](wiki:xml-patches) to change existing game data.