Skip to content

Commit 452851d

Browse files
committed
Add readme
1 parent f5a385c commit 452851d

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) [year] [fullname]
3+
Copyright (c) 2025 StarMap
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
1-
# StarMap-ExampleMods
1+
# StarMap-ExampleMods
2+
3+
Example mods for the StarMap mod loader for KSA
4+
5+
## How to create mods
6+
7+
- Create a new class library targeting .NET 9
8+
- Add `https://nuget.pkg.github.com/StarMapLoader/index.json` as a nuget source ([For Visual Studio](https://nuget.pkg.github.com/StarMapLoader/index.json))
9+
- Import [StarMap.API](https://github.com/StarMapLoader/StarMap/pkgs/nuget/StarMap.API)
10+
- Create a new class that implements IStarMapMod
11+
- Implement the methods from the interface
12+
- OnImmediatLoad is called immediatly when the mod is finished loading (before Mod.PrepareSystems)
13+
- OnFullyLoaded is called when all Mods are loaded (After ModLibrary.LoadAll)
14+
- ImmediateUnload boolean states if the unload method should be called immediatly after OnImmediatLoad
15+
- Unload is called or immedialty, or when the game unloads
16+
17+
## How to publish and install mods
18+
19+
- Provide a zip or folder that contains the the class library dll as well as any dependencies excluding:
20+
- Any part of KSA
21+
- Harmony
22+
- Provide a mod.toml in the folder that contains the name of the mod 'name = [mod name]` (known in KSA as mod id)
23+
- The mod id needs to match the name of the assembly that contains the IStarMapMod class
24+
- StarMap will search for mods that have a dll like this, and then loads the first class that implements IStarMapMod (if any)
25+
- StarMap mods still work as normal KSA mods (so any textures added to the same folder will work correctly)
26+
- Lastly the mod needs to be added to the manifest.toml in the content folder, the id needs to match the id set above
27+
28+
```
29+
[[mods]]
30+
id = "[mod name]"
31+
enabled = true
32+
```
33+
34+
- When now loading the game via `StarMap.exe` or `StarMapLoader.exe`, the mod should be loaded and run

0 commit comments

Comments
 (0)