c9706de622
docs: removed redundant docs deps: updated dependencies to be implemented. feat: started implementation of new GridBuild Feature
2.2 KiB
2.2 KiB
title, description, slug
| title | description | slug |
|---|---|---|
| Getting Started (Modding) | Einstieg in gregCore mit klarer Trennung zwischen MelonLoader-Plugins und Script-Mods. | /getting-started |
Voraussetzungen
- Visual Studio 2022
- .NET 6 SDK
- MelonLoader
gregCore.dll- Steam-Spiel Data Center
Grundregel: Plugin vs Script
- Plugin: MelonLoader-Assembly (
*.dll) im Mods-Plugin-Kontext. - Script: Datei in
Mods/Scripts(*.lua,*.py,*.rs,*.rmod,*.js,*.ts,*.cs).
Erstes C#-Plugin (kompilierbar)
using MelonLoader;
[assembly: MelonInfo(typeof(HelloPlugin), "HelloPlugin", "1.0.0", "TeamGreg")]
[assembly: MelonGame("", "Data Center")]
public sealed class HelloPlugin : MelonMod
{
public override void OnInitializeMelon()
{
MelonLogger.Msg("[HelloPlugin] loaded");
}
}
Erstes Lua-Script (funktional)
-- Datei: Mods/Scripts/hello.lua
greg.log_info("Hello from lua script")
greg.show_notification("Lua script is running")
Framework-Guard-Pattern (REGEL 10)
public static class Guard
{
public static bool Ensure(bool condition, string message)
{
if (!condition)
{
MelonLoader.MelonLogger.Warning($"[gregCore] Guard failed: {message}");
return false;
}
return true;
}
}
Deployment-Matrix
| Typ | Datei | Zielpfad |
|---|---|---|
| Plugin | MyMod.dll |
Data Center/Mods |
| Lua Script | *.lua |
Data Center/Mods/Scripts |
| Python Script | *.py |
Data Center/Mods/Scripts |
| Rust Script/Mod Trigger | *.rs, *.rmod |
Data Center/Mods/Scripts |
| JS/TS Script | *.js, *.ts |
Data Center/Mods/Scripts |
| C# Script | *.cs |
Data Center/Mods/Scripts |
Häufige Fehler (Top 5)
Python.Runtimefehlt → Python-Host wird übersprungen.- Script liegt im falschen Ordner (
PluginsstattMods/Scripts). - TypeScript ohne Transpiler abgelegt.
- C# Script ohne Roslyn-Runtime.
- Lua-Fehler im Script stoppt das jeweilige Script (Framework bleibt aktiv).