GodsAPI

版本 v2.1.5·更新於 2026-01-26

A library for developers to easily add new Gods / NPC Gods to the game without having to dig through files.

模組介紹 作者原文

GodsAPI, a library to create Gods.

This is a very early library made to make it easy for developers to add new Gods/NPC Gods, Keepsakes & Boons w/ custom rarities.

This library does nothing to the game on its own, without outside function calls.

You should only install it if another mod requires it, or if you will be using this library to create Gods/Keepsakes/Boons.

[!IMPORTANT]

Currently, this library only supports adding in Olympian Gods eg. Zeus and NPC-type Gods eg. Hermes - as well as custom Keepsakes.

NPC Type means that they will not be treated as GodLoot - meaning you can have Zeus, Aphrodite, Hera, Hestia and meet Hermes and Your God.

[!NOTE]

If there are any requests, anything I missed, or anything working incorrectly, post an issue, or create a help thread in the Hades Modding Discord.

Developer Documentation

  • Create a dependency in manifest.json (if testing locally) by adding "zannc-GodsAPI-1.0.0" and.toml by adding zannc-GodsAPI = "1.0.0" if publishing the mod by adding to respective files.
  • In main.lua, add:

---@module 'zannc-GodsAPI-auto'

gods = mods['zannc-GodsAPI'].auto() --! IMPORTANT, you must add in.auto() or else the library will not work.

So that it looks like this as an example:

_PLUGIN = _PLUGIN

game = rom.game

---@module 'SGG_Modding-ModUtil'

modutil = mods["SGG_Modding-ModUtil"]

---@module 'SGG_Modding-ReLoad'

reload = mods["SGG_Modding-ReLoad"]

---@module 'SGG_Modding-SJSON'

sjson = mods["SGG_Modding-SJSON"]

---@module 'zannc-GodsAPI-auto'

gods = mods["zannc-GodsAPI"].auto()

For more in-depth examples of how to use these functions, refer to the DEV.md file and the PARAMS.md file.

  • To create a God, you must call gods.InitializeGod(params), and optionally followed by gods.CreateOlympianSJSONData(params) and provide the required paramaters / sjson paramaters.
  • To create a Keepsake, you must call gods.CreateKeepsake(params), and pass in the required fields - as well as any custom functions you need to make the keepsake function.
  • To create a Boon, you must call gods.CreateBoon(params), as well as the optional gods.CreateCustomRarity(params) and pass in the required fields - as well as any custom functions you need to make the boon function.

[!IMPORTANT]

It is important to note that the internal names for Gods/Traits/Keepsakes will always be appended with your _PLUGIN.guid followed by a - and then the internal name.

This also applies for anything that will be handled internally, such as portrait names, among other sets of data.

Planned Features

  • I am looking into the possibility of Hex Gods like Selene, as well as physical 3D NPCs if possible - however to my knowledge, 3D models have not been created yet.
  • I would like to add Spells and proper NPC's such as Dionysus/Athena/Arachne during runs, and Hub NPCS such as Hecate/Hypnos, however, there are a lot of functions that are hard-coded to SpellDrop, and I am unsure about the state of adding 3D models.
  • Ability to add Custom Rarities.

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。 Hades II 使用遊戲自帶的 Mod 匯入功能,解壓後的包按 readme 放入指定目錄即可。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

Hell2Modding-Hell2ModdingSGG_Modding-ModUtilLuaENVY-ENVYSGG_Modding-ChalkSGG_Modding-ReLoadSGG_Modding-SJSON

檔案與校驗

檔案名稱
GodsAPI-2.1.5.zip
檔案大小
189.1 KiB