Add open-config script, VS Code tasks, and vanilla file warnings

This commit is contained in:
2026-08-20 16:35:58 -04:00
parent 358941379c
commit b76a724945
5 changed files with 139 additions and 52 deletions
+45 -47
View File
@@ -1,63 +1,61 @@
# Modlet Management Scripts
# Open 7D2D vanilla config files in VS Code
## Quick Start
Enable all modlets for testing in vanilla 7 Days to Die:
Open a specific config file in VS Code:
```powershell
.kilo\scripts\modlet.ps1 -Action enable
.kilo\scripts\open-config.ps1 -Filename "archetypes.xml"
```
Disable all modlets:
Common files to open:
```powershell
.kilo\scripts\modlet.ps1 -Action disable
.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"
```
Sync changes from repo to Steam (for modlets already enabled):
Or open the entire config folder in Explorer:
```powershell
.kilo\scripts\modlet.ps1 -Action sync
.kilo\scripts\open-game-config.ps1
```
Check which modlets are currently enabled:
```powershell
.kilo\scripts\modlet.ps1 -Action status
## ⚠️ 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>
```
## How It Works
Then run `.kilo/scripts/modlet.ps1 -Action enable` to test.
This script copies modlets from `mods/` into the Steam `Mods` folder. This means:
- Edit modlets in `mods/` and run `sync` to update
- Enable/disable with a single command
- No junctions or special filesystem features required
- Works without admin privileges
## Finding the Right File
## Manual Shortcuts
You can also create shortcuts on the desktop for quick access:
### Enable Modlets
```powershell
powershell.exe -ExecutionPolicy Bypass -File "C:\Users\lynda\Git\lyndas_mod\.kilo\scripts\modlet.ps1" -Action enable
```
### Disable Modlets
```powershell
powershell.exe -ExecutionPolicy Bypass -File "C:\Users\lynda\Git\lyndas_mod\.kilo\scripts\modlet.ps1" -Action disable
```
### Sync Modlets
```powershell
powershell.exe -ExecutionPolicy Bypass -File "C:\Users\lynda\Git\lyndas_mod\.kilo\scripts\modlet.ps1" -Action sync
```
## Adding New Modlets
1. Create a new folder in `mods/`
2. Add `ModInfo.xml` and `Config/` files
3. Run the enable script to test
## Troubleshooting
If copies fail:
- Ensure 7 Days to Die is not running
- Check that the Steam `Mods` folder exists
- Run PowerShell as Administrator if needed
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.