Bezel Mod Loader (Bezel for short) is a modding API for GC:FW.
It is very basic at the moment, created to simplify updating my mods for new game versions, loading them, ensuring compatibility, etc.
Nevertheless, I've aimed to make it flexible and expandable, so even in its current state it is capable of loading arbitrary mods (assuming they follow a certain internal structure, documentation is a WIP). These mods then have access to the entire game's internals.
Check out Gemsmith's source for an example. More documentation will be created later.
https://github.com/gemforce-team/BezelModLoader/blob/master/Changelog.txt
Bezel keeps all its files in the game's Local Store folder. It's located in %AppData%\com.giab.games.gcfw.steam\Local Store\Bezel Mod Loader
and it's generated on first launch. This folder is referred to as storage folder in this readme.
Mods are kept in the game's folder, in a Mods
subfolder. Any .swf
s placed there will be attempted to load into the game.
-
Bezel keeps a log of the last session in its storage folder, in
Bezel_log.log
. -
Mods use a single logger provided by Bezel, so all mods' messages are written to the same log file.
-
Mods are loaded from the
Mods
folder in the game's folder. -
There are a couple events provided by Bezel that mods can subscribe to. You can also subscribe to game objects' events directly.
-
Coremods allow you to inject any changes into the game (such as new hooks or changing hardcoded values), take a look at BezelCoreMod
To install Bezel grab an installer (links for other releases below) for your game version.
There are two ways to restore your original .swf
- Delete "GemCraft Frostborn Wrath.swf" and rename "GemCraft Frostborn Wrath Backup.swf" to "GemCraft Frostborn Wrath.swf"
- Run steam's "Verify integrity of game files" and it'll be redownloaded. This will not remove any files, only restore the game's swf to baseline.
Simply put the installer into your game's folder and launch it. You'll see a message that the installation was successful, then launch the game normally through steam. You'll see Bezel in the bottom right corner of the main menu:
Put the installer in the game folder, then check the exact Proton version used to run the game, say it is Proton A.BB.
Then open a terminal and run:
cd ~/.steam/steam/steamapps/common/GemCraft\ Frostborn\ Wrath # go to the installation dir
WINEPREFIX=~/.steam/steam/steamapps/compatdata/1106530/pfx ../Proton\ A.BB/dist/bin/wine bezel-installer-vx.y.z.exe
At the moment you install mods by dropping their .swf into the Mods
folder. Make sure there are no duplicates there (like two versions of the same mod), they will overwrite each other in alphabetical order (will be fixed later).
You can even do it on the fly, just press Ctrl+Alt+Shift+Home
to reload all mods. This is a development feature, it shouldn't crash but to be sure just restart the game if you add new mods.
Run steam's "Verify integrity of game files".
This will not remove any files, only restore the game's .exe to baseline.
Release history: Releases
At the moment there is only one key combination:
Ctrl+Alt+Shift+Home - reload all mods. This is used for debugging \ development. Does not reapply coremods, but will load additional mods were added to the `Mods` folder after starting the game.
Bezel manages hotkeys for itself, mods, and GCCS and GCFW. These hotkeys can be edited in Bezel's hotkeys.json
(located in the game's Local Store folder)
by using strings like "ctrl+shift+alt+home", "CtRl+numpad_6", "alt+ctrl+k", or "f". Accepted modifiers are ctrl, shift, and alt, and accepted non-modifiers are listed
in the AS3 Keyboard documentation.
Please submit an issue to The issue tracker if you encounter a bug and there isn't already an open issue about it.
You can find me on GemCraft's Discord server: https://discord.gg/ftyaJhx - Hellrage#5076
Building Bezel as a library requires SwcBuild
Building the game you are modding as a library requires SwcBuild and for the game's scripts to be unpacked to GameScripts/scripts. One recommended tool for doing this is JPEXS.
To use a game as a library for type checking in your mod, first build it as described above, then add it as an external library to your FlashDevelop project. This ensures that the game's data is not copied into your mod when built. Note that because mods are loaded before the game, you cannot use any of the game's classes in your BezelMod's interface. This include any accessibility of properties and arguments to functions. They can be used for local variables within bind and other functions called after it.
GemCraft - Frostborn Wrath and GemCraft - Chasing Shadows both have stub SWCs provided for this purpose here.
This is not an official modification.
GemCraft - Frostborn Wrath is developed and owned by gameinabottle
Hellrage - original developer.
Special thanks to:
LA for automating swf patching and .diff generation!
piepie62 for developing Lattice!
12345ieee for figuring out the installation process on Linux!