62 lines
2.0 KiB
Markdown
62 lines
2.0 KiB
Markdown
# Open 7D2D vanilla config files in VS Code
|
|
|
|
## Quick Start
|
|
|
|
Open a specific config file in VS Code:
|
|
```powershell
|
|
.kilo\scripts\open-config.ps1 -Filename "archetypes.xml"
|
|
```
|
|
|
|
Common files to open:
|
|
```powershell
|
|
.kilo\scripts\open-config.ps1 -Filename "archetypes.xml"
|
|
.kilo\scripts\open-config.ps1 -Filename "entityclasses.xml"
|
|
.kilo\scripts\open-config.ps1 -Filename "items.xml"
|
|
.kilo\scripts\open-config.ps1 -Filename "progression.xml"
|
|
.kilo\scripts\open-config.ps1 -Filename "blocks.xml"
|
|
.kilo\scripts\open-config.ps1 -Filename "loot.xml"
|
|
.kilo\scripts\open-config.ps1 -Filename "spawning.xml"
|
|
```
|
|
|
|
Or open the entire config folder in Explorer:
|
|
```powershell
|
|
.kilo\scripts\open-game-config.ps1
|
|
```
|
|
|
|
## ⚠️ IMPORTANT: Do Not Edit Vanilla Files Directly!
|
|
|
|
**Never edit files in `C:\Steam\steamapps\common\7 Days To Die\Data\Config\` directly!**
|
|
|
|
These are the game's base files. Editing them directly will:
|
|
- **Be overwritten** when the game updates via Steam
|
|
- **Not be tracked** by git
|
|
- **Break your mods** when switching between modded and vanilla play
|
|
- **Require manual reverting** if you want to restore original settings
|
|
|
|
### Correct Workflow
|
|
|
|
1. **Review** vanilla config files using `open-config.ps1` to find the settings you want to change
|
|
2. **Note the XPath** or exact values you want to modify
|
|
3. **Create a modlet** in `mods/` that overrides those values
|
|
4. **Enable/sync** the modlet to test
|
|
5. **Commit** the modlet to git
|
|
|
|
### Example: Changing Player Health
|
|
|
|
❌ **Wrong** — Editing `C:\Steam\steamapps\common\7 Days To Die\Data\Config\archetypes.xml` directly
|
|
|
|
✅ **Right** — Creating a modlet in `mods/my_health_modlet/Config/my_health_modlet.xml`:
|
|
```xml
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<configs>
|
|
<set xpath="/player/@maxHealth" value="200" />
|
|
<set xpath="/player/@health" value="200" />
|
|
</configs>
|
|
```
|
|
|
|
Then run `.kilo/scripts/modlet.ps1 -Action enable` to test.
|
|
|
|
## Finding the Right File
|
|
|
|
Use `CONFIG-REFERENCE.md` to identify which XML file contains the setting you want to change, then use `open-config.ps1` to review it in VS Code.
|