Skip to content

Manual Installation

Nefaro edited this page Dec 21, 2021 · 1 revision

Installing on Windows

Requirements

Note: About Steam version vs GoG version

There are no differences between the version, except the location. As such, Gnoll does not really care which version you are running, as long as it can find the .exe. The only major difference, that is not directly the game's fault, is that Steam has Workshop and Gnomoria mods. (I do not know how GoG game works in this regards)

First step: Getting the code

You can get the Gnoll code basically in 2 ways:

  • Clone the repository. This assumes you have 'git' installed and can use it
  • The repository (or rather one branch) can also be downloaded as a .zip file.
    • The download option is under the "Code" button, in the repository view, as the last option

Second step: Building the SDK

This step will build the Gnoll SDK. This will generate a modified .dll. This .dll has the obfuscation reversed and has made private methods public, for easier code-wise access. The modloader will use this sdk to do its magic.

  • Open a terminal/command prompt and navigate to the Gnoll source code folder
    • Windows start -> type "cmd" + enter
  • Navigate to Gnoll folder, ie C:\Gnoll
    • cd C:\Gnoll
  • Execute the modkit python script with sdk task
    • py gnomodkit.py sdk

This will build the sdk needed for adding mod capabilities. If everything goes well (without errors), then the result will be a 'sdk' folder (ie C:\Gnoll\sdk) that contains 'GnomoriaSDK.dll' file.

Third step: Building the modloader

This step will build the Gnoll modloader. The modloader is the facility that uses the SDK hooks to get into the game and that manages the loaded mods and allows them to run.

  • Assume that there is a terminal/command prompt open in the Gnoll directory
    • If not, see the Second step how to get there
  • Execute the modkit python script with modloader task
    • py gnomodkit.py modloader

This will use the sdk from previous step, apply a patch from this repository and build a new compiled .exe (GnoMod.exe) and the modloader .dll (GnollModLoader.dll). Both of those files are then copied to the Gnomoria folder, ie C:\Gnomoria\GnoMod.exe, C:\Gnomoria\GnollModLoader.dll. With this step you have the basic infrastructure in place. Additionally, it provides a new SDK .dll (GnomoriaSDK-patched.dll), that contains also the patch.

Note: It should not matter, if you have the Steam version or GoG version of Gnomoria. The building process only needs to know the location of the Gnomoria.exe.

Fourth step: Building the mods

After completing step two and step three, you can already run Gnoll, albeit without any mods. But, you can run the game just to verify, that the mod loader is installed and Gnoll Mod Loader menu item is visible. For running the modded game, take a look at Fifth Step

For building mods:

  • Assume that there is a terminal/command prompt open in the Gnoll directory
    • If not, see the Second Step how to get there
  • Execute the modkit python script with mod:all task
    • py gnomodkit.py mod:all

This will build all existing mods and will copy them into the right location. If you want to build only a handful mods then:

  • To build a single mod, call
    • py gnomodkit.py mod:<mod_name>
    • where <mod_name> is the directory name of the mod, ie 'Challenges' or 'ImportExportTrackedItemsMod' etc, you can stack several mods into one command
    • py gnomodkit.py mod:Challenges mod:ImportExportTrackedItemsMod mod:VeinMiner

Fifth step (Option A): Run modded Gnomoria

To run the modded Gnomoria:

  • Assume that there is a terminal/command prompt open in the Gnoll directory
    • If not, see the Second Step how to get there
  • Execute the modkit python script with mod:all task
    • py gnomodkit.py run
  • Have fun

Fifth step (Option B): Run modded Gnomoria with Steam because of workshop mods

While the previous step showed how to run the modded Gnomoria, it's not quite enough. Namely, the game needs Steam in order to be able to use the workshop mods. To run the modded game as Steam game:

  • Assume that there is a terminal/command prompt open in the Gnoll directory
    • If not, see the Second Step how to get there
  • Execute the modkit python script with steam task
    • py gnomodkit.py steam
  • This will make a backup of the original .exe and installs the modded .exe as the one that Steam will run
  • Run Gnomoria via Steam as always

To get back the original Gnomoria

  • Execute the modkit python script with unsteam task
    • py gnomodkit.py unsteam
  • This will take the backup original .exe and place it back.
  • OR Ask Steam to verify integrity of the game files and get the exe from steam

Installing on not-Windows

I'm sorry, but I don't know if there is any equivalent way to achieve that all on *nix or Mac. If you know and if it works, then I would gladly write it down here.

Troubleshoot

SDK / modloader build fails with hash error

If you see an error like Exception: ERROR: Hash of "Gnomoria.exe" is 4a5b151fac374b1447c832543208eb7e instead of expected c9f6d4b91b40f08953b0cb48e5dc81f4 then this means, that the builder does not recognize your version of the game. Either the Gnomoria version is not latest 1.0 or the .exe has been modified in other ways, maybe it's even the modified .exe from Gnoll itself ? Anyway, for Steam version of the game, ask Steam to verify the files. It will check everything and will download files it deems to be wrong. If that doesn't help, then we have a mystery on our hands.

Gnomoria.exe for Steam is iffy... or does not work ... or trouble

Steam has the capability to verify the local files against those in Steam servers and in case there is some differences, Steam will re-download the files that do not match. For that:

  • Open Steam
  • Right click on your game in the game library
  • "Properties" -> "Local Files" -> "Verify integrity of game files ..."