Modding

GHub Platform · Гайд · 0 ответов · 15 просмотров

Modding Guide - Server Admin Simulator Welcome to the official modding guide for Server Admin Simulator ! This guide covers everything you need to create, test, and publish your own mods. Mods are .NET DLL assemblies that implement the IServerAdminMod interface. The game's mod loader scans for DLLs at startup, discovers your mod class via reflection, and injects your content into the game systems. You can find the ModSDK also on GitHub: https://github.com/TitanEch0/ServerAdminSimulator-ModSDK Requirements A C# IDE (Visual Studio, Rider, or VS Code with C# extension) .NET Framework 4.7.2 or .NET Standard 2.1 compatible project A copy of Assembly-CSharp.dll from the game installation Project Setup Create a new Class Library project in your IDE targeting .NET Framework 4.7.2 or .NET Standard 2.1 . Add a reference to Assembly-CSharp.dll from the game's Managed folder. Set Copy Local = false so the game's own assembly is used at runtime. Optionally add a reference to UnityEngine.CoreModule.dll from the same folder if you need Unity types (e.g. Debug.Log). This is only needed for advanced hooks. Name your output DLL something descriptive, e.g. MyAwesomeMod.dll . Where to find Assembly-CSharp.dll: <Game Install Directory>/Server Admin Simulator_Data/Managed/Assembly-CSharp.dll Your First Mod Create a class that implements IServerAdminMod . Every Get*() method may return null or an empty collection — the loader handles both gracefully. Override only what your mod provides. Minimal Example using System.Collections.Generic; public class MyFirstMod : IServerAdminMod { public ModManifest GetManifest() => new ModManifest { Name = "My First Mod", Version = "1.0.0", Author = "YourName", Description = "Adds a custom CPU component.", Tags = new[] { "hardware" } }; public IEnumerable<ModComponentData> GetComponents() { yield return new ModComponentData { AssetName = "MyMod_QuantumCPU", DisplayName = "Quantum Processor", ComponentType = "CPU", Value = 128, PowerCostPerTick = 0.15f, UpgradeCost = 25000f, UpgradesFromAssetName = null }; } // Return null for everything else public IEnumerable<ModContractData> GetContracts() => null; public IEnumerable<ModRackData> GetRacks() => null; public IEnumerable<ModServerData> GetServers() => null; public IEnumerable<ModSoftwareData> GetSoftware() => null; public IEnumerable<ModStaffData> GetStaff() => null; public IEnumerable<ModAchievementData> GetAchievements() => null; public IEnumerable<ModChallengeData> GetChallenges() => null; public IEnumerable<ModRandomEventData> GetRandomEvents() => null; public IEnumerable<ModRivalData> GetRivals() => null; public IEnumerable<ModLoanOfferData> GetLoanOffers() => null; public IEnumerable<ModInsurancePolicyData> GetInsurancePolicies() => null; public IEnumerable<ModSeasonalEventData> GetSeasonalEvents() => null; public IEnumerable<ModTerminalCommandData> GetTerminalCommands() => null; public IEnumerable<ModNewsEntryData> GetNewsEntries() => null; public IEnumerable<ModZeroDayData> GetZeroDayExploits() => null; public IEnumerable<ModLocalizationEntry> GetLocalization(string language) => null; public ModGameHooks GetHooks() => null; } Installation Build your project and place the resulting DLL into the Mods/ folder: <Game Install Directory>/Mods/ The game creates this folder automatically on first launch. Start the game and your mod will appear in the mod list on the main menu. The Mod Manifest The ModManifest tells the game about your mod. Return it from GetManifest() . Fields Field Type Required Description Content: Hardware Components (CPU, RAM, Network) Hardware components that can be installed in servers. Three types exist: CPU (cores), RAM (GB), and Network (Mbps). new ModComponentData { AssetName = "MyMod_SuperRAM", // unique ID DisplayName = "HyperRAM DDR6", ComponentType = "RAM", // "CPU", "RAM", or "Network" Value = 64, // cores / GB / Mbps PowerCostPerTick = 0.08f, UpgradeCost = 8000f, UpgradesFromAssetName = "MyMod_BasicRAM" // null = root tier } Upgrade Chains: Set UpgradesFromAssetName to the AssetName of the previous tier. The game builds upgrade paths automatically. You can reference base-game or other mod asset names. Racks Server racks that hold servers. Affect cooling and power efficiency. new ModRackData { AssetName = "MyMod_CryoRack", RackType = "Cryo-Cooled Rack", Description = "Liquid nitrogen cooling for extreme workloads.", MaxSlots = 8, PurchaseCost = 15000f, CoolingMultiplier = 0.5f, // < 1.0 = better cooling PowerEfficiency = 0.9f // < 1.0 = lower power costs } Servers Server chassis that fit into rack slots and hold components. new ModServerData { AssetName = "MyMod_BladeChassis", ServerType = "Blade Server X9", Description = "Ultra-dense blade server.", FormFactor = 1, // rack units consumed PurchaseCost = 12000f, BasePowerCostPerTick = 0.12f, MaxTemperature = 75, // degrees before throttling MaxCpuCores = 64, // 0 = no cap MaxRamGB = 256, MaxBandwidthMbps = 10000, DefaultCpuAssetName = "CPU_T1", // pre-installed component DefaultRamAssetName = "RAM_T1", DefaultNetworkAssetName = "Net_T1" } Default component asset names can reference base-game components or components from your own mod. Content: Contracts & Staff Contracts Client contracts that generate income. The player must have enough server resources to accept them. new ModContractData { AssetName = "MyMod_AIStartup", ClientName = "NeuralForge Inc.", Description = "AI training workloads requiring massive compute.", IncomePerTick = 5.5f, RequiredCpuCores = 32, RequiredRamGB = 64, RequiredBandwidthMbps = 500, DurationTicks = 240, MinRepScore = 15f, // Optional v2 fields Category = "AITraining", Personality = "Tough", IsLoyal = false, IsVolatile = true, SlaMinUptime = 0.99f } Category values: "General", "AITraining", "CryptoMining", "VideoStreaming", "Government" Personality values: "Standard", "Tough", "Friendly", "Strict", "Desperate" SlaMinUptime: 0 = no SLA, 0.95 = 95% uptime required, 0.99 = 99% uptime required Software Software packages that provide passive effects. new ModSoftwareData { AssetName = "MyMod_FirewallPro", SoftwareName = "Firewall Pro", Description = "Military-grade firewall.", LineId = "firewall_line", Category = "ServerSoftware", Effect = "ProbeDetectReduce", EffectValue = 0.15f, PurchaseCost = 3000f, UpgradeCost = 5000f, UpgradesFromAssetName = null } Category: "ServerSoftware" or "HackingTool" Effect values: ContractIncome — bonus income per tick TemperatureReduce — lower server temperatures HackSuccess — increase hack success rate ProbeDetectReduce — reduce probe detection chance TraceGainReduce — reduce trace accumulation DDoSMultiplier — increase DDoS damage Staff Hirable staff members with passive effects based on their role. new ModStaffData { AssetName = "MyMod_EliteSysAdmin", StaffName = "Elite SysAdmin", Description = "Top-tier administrator.", LineId = "sysadmin_line", Tier = 3, Role = "SystemAdmin", HireCost = 10000f, SalaryPerTick = 0.25f, EffectValue = 0.30f, MaxHireable = 1, UpgradesFromAssetName = "MyMod_SeniorSysAdmin" } Role values: SystemAdmin — general server management SecurityExpert — security & hacking defense NetworkEngineer — bandwidth & network optimization CoolingEngineer — temperature management Content: Achievements, Challenges & Events Achievemen

Источник

GHub Platform · автор04.09.2026, 16:28:17

Modding Guide - Server Admin Simulator Welcome to the official modding guide for Server Admin Simulator ! This guide covers everything you need to create, test, and publish your own mods. Mods are .NET DLL assemblies that implement the IServerAdminMod interface. The game's mod lo…

Войдите, чтобы писать в группе