Asset Expansion Pak
Expand the game's asset memory system.
模組介紹 作者原文
BK Recomp Asset Expansion Pak
Experimental mod that rewrites the asset management system of the game to allow direct asset in-memory replacements by other mods.
It also extends the game's asset system to use a much bigger allocation heap, freeing up a significant amount of the game's own memory heap in the process.
This mod is essential to resolve crashes for other mods that unlock the game's limits such as turning off draw distance or similar enhancements.
Exports
The following exports are available to other mods to register in-memory replacements of assets. Any time the game tries to retrieve an asset using the asset cache, the data passed to the function will be returned instead. The lifetime of this memory is entirely up to the caller of the API, as this data will not be copied to the asset cache's heap.
If another mod tries to register the same replacement, no conflict resolution is provided: it'll be up entirely to the order the mods call the API to determine who gets to replace the asset.
The size version of the function is provided for mods that need to replace assets retrieved with the function that copies the asset into a destination pointer. On the regular version of the game, this is only used by two types of assets:
- The furnace fun questions (ASSET_*_FF_QUIZ_QUESTION).
- SPRITE_BOLD_FONT_NUMBERS_ALPHAMASK and SPRITE_BOLD_FONT_LETTERS_ALPHAMASK.
The size is necessary to know how many bytes to copy from the asset into the destination pointer safely.
RECOMP_EXPORT void bk_recomp_aep_register_replacement(enum asset_e asset_id, void *asset_data);
RECOMP_EXPORT void bk_recomp_aep_register_replacement_with_size(enum asset_e asset_id, void *asset_data, u32 asset_size);
RECOMP_EXPORT void bk_recomp_aep_unregister_replacement(enum asset_e asset_id);
Libraries
o1heap: - Copyright (c) 2020 Pavel Kirienko
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。