For V67
This project is intended for people who want to start modding for the game Songs of Syx. It contains a random weather eclipse event, which changes the light color. The maven build pipeline will take care of compiling, packaging and installing the mod into the games mod folder.
You will need a Java 1.8 JDK for developing. There are also some tips for developing a mod.
<profiles>
and are default set to:
Game Installation
- Windows:
C:\Program Files (x86)\Steam\steamapps\common\Songs of Syx
- Linux:
~/.steam/steam/steamapps/common/Songs of Syx
Mod Directory
- Windows:
${user.home}/AppData/Roaming/songsofsyx/mods/
- Linux:
~/.local/share/songsofsyx/mods/
- Windows:
${user.home}/AppData/Roaming/songsofsyx/mods-uploader/
- Linux:
~/.local/share/songsofsyx/mods-uploader/
Maven is required to compile, package and install the mod. When using Intellij IDEA, Maven is already bundled within.
1️⃣ Install games jar file as local maven dependency by copying it from the game installation folder.
mvn validate
ℹ️ You only have to run validate
once (or when the games got an update you need)
2️⃣ Compile mod source; prepare mod file structure; copy mod files to game mod directory
mvn install
3️⃣ Run the game, and you should see a Example Mod
mod. Activate it and launch.
There are 3 different "Run Configurations" in the .run
folder:
DEBUG
for running the game with debug capabilities via the little green bug iconMain
for running the game and skipping the launcherMainLaunchLauncher
for running the game with launcher
You may have to edit the game installation paths in these files.
Intellij should automatically recognize these files and add them to your "Run Configuration" selection.
It is usually found in the upper right hand corner. You can select the via the dropdown menu and run them with the play icon.
The green bug icon will run the game with debug capabilities. This will only work with the DEBUG
run configuration though.
See Mod SDK Setup
See make your own mod.
ℹ️ Installs only the games SongsOfSyx.jar
and info/SongsOfSyx-sources.jar
as a dependency, and validate whether it was successful.
mvn validate
ℹ️ Building the mod only into target/out
:
mvn package
The source code of the mod will be copied into e.g. target/out/songs-of-syx-mod-example/V63/script/_src
.
ℹ️ Build and copy the output into the games mods folder (excluding _src
):
mvn install
mvn install -P linux
ℹ️ Deletes the target
directory containing the packaged mod files and removes the mod from the games mod directory.
mvn clean
In the pom.xml
you will find <properties>
where you can change information about the mod.
There you can also change the <game.version.major>
property to your used game version.
The <game.version.minor>
property is only important when your mod really depends on stuff in this version and isn't compatible with lower versions.
Files (e.g. assets) for the mod are located in src/main/java/resources/mod-files
and will be copied in the package
phase.
You can enable Debug Mode and Developer Mode in the game launcher settings. You will get more detailed logs and in-game developer tools for testing.
- Add a new Run Configuration.
- Set the main class name to
init.MainLaunchLauncher
. - In the tab Arguments set the working directory to your game installation folder e.g.
C:/Program Files (x86)/Steam/steamapps/common/Songs of Syx
.
There's JUnit 5 with AssertJ and Mockito 4 for testing your code.
See doc/index.md.
There's a maven profile mods-uploader
you can use to automatically copy and clean your files into the mod uploader.
The directory is configurable via the <game.mod.uploader.directory>
property in the <profiles>
. It's default set to:
- Windows:
${user.home}/AppData/Roaming/songsofsyx/mods-uploader
- Linux:
${user.home}/.local/share/songsofsyx/mods-uploader
Will copy the mod files into the Steam Workshop Uploader directory.
mvn install -P mods-uploader
Will remove the mod files from the mod uploader. For updating the mod files.
mvn clean -P mods-uploader
The source code of the "eclipse" example comes from the game files itself and were written by the game dev Jake de Laval. I've just build the maven tooling around it.