[ITEM]
27.02.2020

Staxel Mods

77

June 30, 2006. Gradius collection. P. 117. 'Gradius Galaxies'.

Staxel Modding API

Alloy is an API for developing code-based Staxel mods and plugins.

Caution: Currently nothing more than an experiement, probably won't work on the latest Staxel version as this hasn't been updated in a while. I've been busy with other projects since I started this but maybe it will be useful for someone else!

How to increase the Island size you spawn in. Requires a new world to be generated! Increasing Island Size Modifying the file needed to increase island size The File is located in Steam steamapps common Staxel content worldGen.config. Open it as a text file and you should see.

How does it work?

Alloy doesn't need to use or distribute any code from Staxel. It instead patches Staxel.dll (the bulk of the game's code) on the user's machine to include the mod loader. When Staxel is initialized, the mod loader will load mods which can interact with the game via the injected code in the patched version of Staxel.

The idea currently is to use the minimum amount of IL code injection possible. Everything should be handled by the mod loader/host and not directly through the Staxel assembly (as that is tricky).

Patcher:Injects a few IL intructions as well as a public static field (ModLoader) into Staxel.dll, and initializes the mod loader when the game starts.

Update: After speaking to Chanel again:Chanel was pleased that I didn't turn her in to the Countess. She told me that as a reward, she'd paint a portrait for me, but it'll take three weeks. Lost castle trainer. She seemed disappointed, but I've kept Chanel's honor intact.

Mod Loader:When the game starts, an instance of the mod loader is created, so all code related to mod loading is done through this separate assembly.

The mod loader also has a 'mod host', which will serve as the communicator between the mods and Staxel.

For events (such as OnBlockPlaced), IL will need to be injected (for example, into the block place method), which will invoke an event in the mod host, which mods can subscribe to.

For instructions (such as a mod wanting to add a chat message), we will need to do the opposite. Either by referencing Staxel (easier to code but adds a dependency), or using some reflection stuff to call Staxel methods from the mod host.

Roadmap:

When and if I have more time to work on this:

  1. Identify functions in Staxel that would make sense for method calls to be injected to. (Add IL code to these methods to call the mod loader/host, which will in turn trigger events for the mods to respond to)
  2. Design a proper API and simplified types found in staxel. (For example, design an block class that has a position, size, etc. This will keep Alloy's implementation separate from Staxel, so the only thing that can break is the IL code being injected.)
  3. If this all works out and I really want to develop this, eventually make an installer that will help users patch their DLL, add some update system, etc.
Jan 23, 2018

How to increase the Island size you spawn in. Requires a new world to be generated!

Increasing Island Size


Modifying the file needed to increase island size

The File is located in SteamsteamappscommonStaxelcontentworldGen.config.
Open it as a text file and you should see this.
All you have to do is the modify the 'x': 1000 and 'y': 1000 to your desired size! 1000 is roughly 1 kilometer.Remember that this can impact the performance of the game, so be mindful to what you set this to!
Game updates can revert the changes made to this file, don't be surprised!
You have to generate a new map for this work.
You May Also Like:
  • All Staxel Guides!



[/ITEM]
[/MAIN]
27.02.2020

Staxel Mods

80

June 30, 2006. Gradius collection. P. 117. 'Gradius Galaxies'.

Staxel Modding API

Alloy is an API for developing code-based Staxel mods and plugins.

Caution: Currently nothing more than an experiement, probably won't work on the latest Staxel version as this hasn't been updated in a while. I've been busy with other projects since I started this but maybe it will be useful for someone else!

How to increase the Island size you spawn in. Requires a new world to be generated! Increasing Island Size Modifying the file needed to increase island size The File is located in Steam steamapps common Staxel content worldGen.config. Open it as a text file and you should see.

How does it work?

Alloy doesn't need to use or distribute any code from Staxel. It instead patches Staxel.dll (the bulk of the game's code) on the user's machine to include the mod loader. When Staxel is initialized, the mod loader will load mods which can interact with the game via the injected code in the patched version of Staxel.

The idea currently is to use the minimum amount of IL code injection possible. Everything should be handled by the mod loader/host and not directly through the Staxel assembly (as that is tricky).

Patcher:Injects a few IL intructions as well as a public static field (ModLoader) into Staxel.dll, and initializes the mod loader when the game starts.

Update: After speaking to Chanel again:Chanel was pleased that I didn't turn her in to the Countess. She told me that as a reward, she'd paint a portrait for me, but it'll take three weeks. Lost castle trainer. She seemed disappointed, but I've kept Chanel's honor intact.

Mod Loader:When the game starts, an instance of the mod loader is created, so all code related to mod loading is done through this separate assembly.

The mod loader also has a 'mod host', which will serve as the communicator between the mods and Staxel.

For events (such as OnBlockPlaced), IL will need to be injected (for example, into the block place method), which will invoke an event in the mod host, which mods can subscribe to.

For instructions (such as a mod wanting to add a chat message), we will need to do the opposite. Either by referencing Staxel (easier to code but adds a dependency), or using some reflection stuff to call Staxel methods from the mod host.

Roadmap:

When and if I have more time to work on this:

  1. Identify functions in Staxel that would make sense for method calls to be injected to. (Add IL code to these methods to call the mod loader/host, which will in turn trigger events for the mods to respond to)
  2. Design a proper API and simplified types found in staxel. (For example, design an block class that has a position, size, etc. This will keep Alloy's implementation separate from Staxel, so the only thing that can break is the IL code being injected.)
  3. If this all works out and I really want to develop this, eventually make an installer that will help users patch their DLL, add some update system, etc.
Jan 23, 2018

How to increase the Island size you spawn in. Requires a new world to be generated!

Increasing Island Size


Modifying the file needed to increase island size

The File is located in SteamsteamappscommonStaxelcontentworldGen.config.
Open it as a text file and you should see this.
All you have to do is the modify the 'x': 1000 and 'y': 1000 to your desired size! 1000 is roughly 1 kilometer.Remember that this can impact the performance of the game, so be mindful to what you set this to!
Game updates can revert the changes made to this file, don't be surprised!
You have to generate a new map for this work.
You May Also Like:
  • All Staxel Guides!