Retailier
Framework for changing certain aspects of the vendor system and ingame interactables. By default, diversifies the vendor lists with miscellaneous items that you can't buy in the vanilla game. Smoking
模組介紹 作者原文
[SPDX] Retailier
Default functionality: adds some items I thought were "missing" from the ingame business menus and extends the functionality of some existing items.
Extended functionality (for modders): lets you add items to vendor lists as long as they're in Toolbox.Instance.objectPresetDictionary, and lets you change (some) properties of InteractablePresets!
Installation
Installation is best done through r2modmanager and. Manual installation is standard for BepInEx plugins:
- Ensure BepInEx is installed and you've run the game once
- Install SODCommon:
- Go to /BepInEx/plugins and extract the folder inside spdx-Retailer.zip into that directory
- Run the game!
Extended Functionality
The mod generates a pair of files, each inside their own folder in the "Savestore" subdirectory on first run, which it then reads from. These files contain InteractablePreset names that are then pulled from the Toolbox's objectPresetDictionary by the code and modified.
menus/
This subdirectory contains all files pertaining to menu modifications. By default, _base.json is generated and placed inside for the mod to read from after its initial run.
Retailier loads JSON files from this directory and assembles them into a dictionary, with string keys and string array values. Each key corresponds to a MenuPreset name, and their values are sets of InteractablePreset names.
You can add more files to this folder as long as they're formatted properly! Please refer to the base file for a reference.
Meta
This section contains version control information and whether or not its changes should completely replace (override) other changes. When set to false, these changes are additive.
Menus
Retailier processes this structure first, populating the corresponding MenuPreset name key with InteractablePreset names.
Combines
Combines are second to be processed, and combine an arbitrary number of Menus into one. The key is the MenuPreset name to be combined into, and the value is an array containing names from Menus.
This now works with existing Menus, so you can create a "base" Menu and add the contents of other Menus to it by setting up a Combine.
Aliases
Aliases are last to be processed now that all the entries are configured. It's a simple copy of the existing dictionary keypairs, just under different keys.
Some businesses, for example the Chinese restaurant, have different names to the MenuPresets they use (ChineseEatery > Chinese). These businesses' sold items are replaced just before the game finalizes city generation, as items sold by businesses seem to be "locked in" to game saves to prevent them from changing. The process I use aims to preserve these values through use of the game's own pseudorandom number generation algorithm.
interactables/
This subdirectory contains all files pertaining to interactable modifications. Like with menus, a _base.json is generated, however it currently has no metadata and changes to existing names across tables may conflict.
Retailier loads files in this directory and compiles them into a list of key-value pairs. Each key is a two-entry array containing the InteractablePreset name and the property you'd like to change, followed by a value of a supported datatype.
Currently supported datatypes:
- RetailItemPresets (for changing consumption stats)
- FirstPersonItems (for changing player interaction behaviour, i.e. eating)
- Booleans (true and false)
- Strings
- Integers
- Floats
- Arrays (start with a string denoting type, wrap numbers in strings):
- Vector2
- Vector3
- Enumerators! (The mod will automatically detect the property type, then parse the name string to the appropriate Enum)
Source
The source code for this mod is available on GitHub:
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。
下面這些內容需要先安裝,否則該模組不會生效: