If you're using VS Code, follow these steps:
- Create the project as a Class Library (.NET Framework) — not as a regular .NET project.
- Preferably target .NET Framework 4.8.
Install your project under:
C:\Program Files (x86)\Steam\steamapps\common\7 Days To Die\Mods
or
"/home/{user}/.local/share/Steam/steamapps/common/7 Days To Die/Mods"
In the same folder, manually copy the 0_TFP_Harmony mod from:
C:\Program Files (x86)\Steam\steamapps\common\7 Days to Die Dedicated Server\Mods
"/home/{user}/.local/share/Steam/steamapps/common/7 Days to Die Dedicated Server/"
Make sure the C# Dev Kit extension is installed in VS Code.
To build the project, use the following command:
// windows
dotnet msbuild ".\StarterKits.csproj" /p:Configuration=Debug
// linux
dotnet msbuild StarterKits.csproj /restore /p:Configuration=Debug
//or
dotnet build StarterKits.csproj -v minimal
Important Locations:
%APPDATA%\7DaysToDie\logs
C:\Users\rokel\AppData\Roaming\7DaysToDie\Mods
C:\Program Files (x86)\Steam\steamapps\common\7 Days To Die\Mods
C:\Program Files (x86)\Steam\steamapps\common\7 Days to Die Dedicated Server\Mods
--for xml modding doc--
C:\Program Files (x86)\Steam\steamapps\common\7 Days To Die\Data\Config
//linux
/home/erano/.local/share/7DaysToDie/logs/
You have to use dnSPY to view ModAPI documentation like javadoc. Edit -> search assemblies -> Sınıf modul arama için File -> Open -> API neredeyse oyun dosyaları
Assembly-CSharp.dll'i açmak yeterli.
use xml(modlet) -(if not possible)> use GameAPI events -(if not possible)> use harmony patches -(if not possible)> use scripts -(if not possible)> use transpilers
Starter kit selection is persisted per active world/save slot.
Path format:
Mods/StarterKits/Data/saves/<world-name>/<save-name>/db.txt
Examples:
Mods/StarterKits/Data/saves/Navezgane/test/db.txt
Mods/StarterKits/Data/saves/Navezgane/test2/db.txt
Mods/StarterKits/Data/saves/RWG8K02/Survival/db.txt
Mods/StarterKits/Data/saves/RWG10K01/Hardcore/db.txt
Rules:
- A player can select a starter kit only once for that save.
- Rejoin/reconnect does not reopen selection if already chosen.
- This restriction applies regardless of admin status.
- On mod load, the mod scans known worlds/saves and logs them for diagnostics.
- If save path is not ready yet during early load, the selection lock is still kept in memory and flushed when save path becomes available.
if you are developing UI's(XML) you can reload UI without restarting game.
use this To easily test changes in the UI, use f1 and then
xui reload
To quickly see changes you made.
dm -> debugmenu for godmode
--- XUi --- Mantık ve düzen tarafı. Pencerelerin, butonların, label’ların, layout’un tanımlandığı sistem. windows.xml gibi dosyalarda , , yazdığın yer burası. C# tarafında XUiController / XUiC_* sınıflarıyla davranış (event, tıklama, açılma-kapanma) kontrol edilir.
Oyun içinde test için, spawn olduktan sonra konsolda şu komutları dene:
xui openwindow starterKitWindow
xui openwindow starterKitGroup
--- UIAtlases --- Görsel kaynak tarafı. UI’da kullanılan tüm ikonlar, buton görselleri, arka planlar tek bir texture atlas içinde toplanır. Atlas XML’i: “şu görsel atlasın şu koordinatında” bilgisini tutar. XUi içindeki ,
vs. elementler görsel olarak ne kullanacaksa sprite/atlas isimleriyle buraya referans verir.https://7daystodie.fandom.com/wiki/ModAPI https://7daystodie.fandom.com/wiki/XPath_Explained#String_Searches https://7daystodie.fandom.com/wiki/Mod_Structure