You are viewing a potentially older version of this package.
View all versions.
ItemSpawnSync
A plugin that allows to save and load item spawning data.
| Date uploaded | 3 days ago |
| Version | 0.9.4 |
| Download link | Flonou-ItemSpawnSync-0.9.4.zip |
| Downloads | 249 |
| Dependency string | Flonou-ItemSpawnSync-0.9.4 |
This mod requires the following mods to function
BepInEx-BepInExPack_PEAK
BepInEx pack for PEAK. Preconfigured and ready to use.
Preferred version: 5.4.2403README
ItemSpawnSync - Standalone Plugin
A BepInEx plugin for synchronizing item spawns across clients in multiplayer games.
Installation
- Copy
ItemSpawnSync.dlltoBepInEx/plugins/ - Launch game
Configuration
After a first launch of the game with the mod installed, a configuration file will be create at: BepInEx\config\ItemSpawnSync.cfg
Usage
Standalone Usage (default keys)
- (optional) Disabling spawning in the configuration file. This will prevent items to spawn automatically before saving and avoid confusion about what is saved and what isn't
- Press CTRL+F4 - Triggers all spawners and record the spawn data
- Press CTRL+F5 - Saves current spawn data to a file
- Press CTRL+F6 - Loads spawn data from the file defined in the configuration and trigger spawners that should spawn on start
- Press CTRL+F7 - Export loot spawn weights to file
- Press CTRL+F8 - Import loot spawn weights to file
Files saved to: BepInEx/config/ItemSpawnSync/MapName_spawn_data_date_time.json
Default loaded file path: BepInEx/config/ItemSpawnSync/spawn_data.json
Spawn file exported to / imported from: BepInEx\config\ItemSpawnSync\LootData.json
Usage through other mods
See IntegrationExample.cs
Data Structure
{
"Spawners": [
{
"SpawnerTypeName": "Luggage",
"SpawnerInstanceID": 1,
"SpawnerPosition": {"x": 10, "y": 0, "z": 5},
"SpawnedItems": [
{
"SpawnSpotIndex": 0,
"ItemPrefabName": "Flashlight",
"Position": {"x": 10.1, "y": 0.5, "z": 5.2},
"Rotation": {"x": 0, "y": 0, "z": 0, "w": 1},
"PhotonViewID": 1001
}
]
}
]
}
License
MIT
CHANGELOG
Changelog
[0.9.4]
- Fixed some spawners not spawning data due to SpawnHistory messing with the plugin
- Added OnSpawnDataSaved, OnSpawnersTriggered, OnSpawnDataSpawnedInLevel, OnSpawnDataLoaded actions
[0.9.3]
- Fixed Spawners not loaded yet when the spawn data is loaded were not be correctly found if they were inactive
- Fixed Items were sometimes spawned twice
- Fixed Some spawners do not return the spawned items (namely RespawnChest). Fixed by patch (Removed since Peak 1.16.a)
- Fixed Errors in SpawnAndTrackFromItemHistory from the new update (1.16.a)
- Added OnItemsSpawned in SpawnerSpawnItemsPatch when items that were loaded from spwaning data are spawned
[0.9.2]
- Added KeyPressed options to export and import all spawn data into an external file. This allows to change the spawnable items and their spawn weights
- Changed key bindings to handle modifiers. Default keybindings now include the left contol key modifier
[0.9.1]
Added
- ViewID of original item in SpawnedItemData
- OriginalIdToItemMap in SpawnerSyncManager to get the item spwaned by the plugin from its original viewID
Changed
- Renamed Plugin.LoadSpawnData into Plugin.LoadSpawnDataInCurrentLevel
- Renamed SpawnerSyncManager.LoadMapSpawnerData into SpawnerSyncManager.LoadMapSpawnerDataInCurrentLevel
- Calling Plugin.LoadSpawnDataFromFile or Plugin.LoadSpawnDataFromJson no longer loads the spawner data in the current level. Call Plugin.LoadSpawnDataInCurrentLevel separately
[0.9.0]
Initial version