Skip to content

Commit 5f1adad

Browse files
improve readme
1 parent 9bb424a commit 5f1adad

File tree

2 files changed

+52
-39
lines changed

2 files changed

+52
-39
lines changed

README.md

Lines changed: 52 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,101 @@
11
# SpawnsManager
2-
Modify spawn tables for items, vehicles, zombies, and animals.
2+
A plugin that lets you modify spawn tables for items, vehicles, zombies, and animals in Unturned.
33

4-
## How it works?
5-
When you install the plugin it will generate `SpawnAssets.{MapName}.xml` file in the `SpawnsManager` folder. For example `SpawnAssets.PEI.xml` for PEI map.
6-
You can modify this file to change spawn tables for items, vehicles, zombies, and animals.
7-
The plugin overrides existing SpawnAssets with the same ID and GUID with your configuration.
4+
## How It Works
5+
When installed, SpawnsManager creates a `SpawnAssets.{MapName}.xml` file in the `SpawnsManager` folder (example: `SpawnAssets.PEI.xml` for PEI map).
6+
7+
You can edit this XML file to change what items, vehicles, zombies, and animals spawn in your world. The plugin overrides the game's default spawn settings with your custom configuration.
8+
9+
## Configuration Options
10+
- **Debug** (true/false): Enables detailed logging for troubleshooting.
811

912
## Commands
10-
- `/rocket reload SpawnsManager` - Reloads the plugin. It will apply your changes in the `SpawnAssets.{MapName}.xml` file.
11-
Keep in mind that the plugin doesn't de-spawn naturally spawned items, so if you are testing that you need to restart the server or wait for the items to de-spawn.
13+
- `/rocket reload SpawnsManager` - Reloads the plugin and applies changes from the XML file.
14+
15+
**Note:** Reloading doesn't remove already spawned items. You'll need to restart the server or wait for items to despawn naturally to see changes to existing items.
16+
17+
- `/checkmap` - Shows all spawn tables for the current map (zombies, items, vehicles, animals).
18+
- `/checkspawn <spawnId> [assetType]` - Shows details about a specific spawn, including item chances.
1219

1320
## Examples
14-
### PEI Police
15-
This is example spawn asset for PEI Police.
16-
The description indicates that this spawn asset is used for Zombies and natural items spawn in police locations.
21+
22+
### Police Zone Spawns
23+
This example adds Eaglefire rifles and Military Magazines to police locations:
24+
1725
```xml
1826
<SpawnAsset Id="93" Name="PEI_Police" Description="Zombie_Police, Item_Police">
1927
<GUID>ced03c91-16f2-4969-8e4f-a5d504df4f9d</GUID>
2028
<Tables>
2129
<Table AssetId="100" Weight="10" Name="Cobra Magazine" />
2230
<Table AssetId="44" Weight="10" Name="Low Caliber Civilian Ammunition Box" />
2331
<Table AssetId="224" Weight="10" Name="Police Bottom" />
24-
<Table AssetId="225" Weight="10" Name="Police Cap" />
25-
<Table AssetId="223" Weight="10" Name="Police Top" />
26-
<Table AssetId="99" Weight="10" Name="Cobra" />
27-
<Table AssetId="1023" Weight="10" Name="Baton" />
28-
<Table AssetId="1006" Weight="10" Name="Cobra Box" />
29-
<Table AssetId="10" Weight="10" Name="Police Vest" />
30-
<Table AssetId="1195" Weight="10" Name="Handcuffs" />
31-
<Table AssetId="1196" Weight="10" Name="Handcuffs Key" />
32-
<Table AssetId="1445" Weight="10" Name="Walkie Talkie " />
33-
<Table AssetId="1044" Weight="10" Name="Civilian Nightvision" />
34-
<!-- Added Eaglefire and Military Magazine -->
32+
<!-- Other default police items... -->
33+
34+
<!-- Added military weapons -->
3535
<Table AssetId="4" Weight="10" Name="Eaglefire" />
3636
<Table AssetId="6" Weight="10" Name="Military Magazine" />
3737
</Tables>
3838
</SpawnAsset>
3939
```
40-
### PEI Military Canada
41-
This is spawn asset for vehicles. You can modify it, for example add desert military vehicles.
40+
41+
### Military Vehicle Spawns
42+
This example adds desert military vehicles to a map that normally only has forest vehicles:
43+
4244
```xml
4345
<SpawnAsset Id="306" Name="PEI_Military_Canada" Description="Vehicle_Military_Canada">
4446
<GUID>b389bd2e-3e68-48c2-8a73-2111c405c987</GUID>
4547
<Tables>
48+
<!-- Default forest vehicles -->
4649
<Table AssetId="87" Weight="10" Name="Jeep_Forest" />
4750
<Table AssetId="52" Weight="10" Name="Humvee_Forest" />
48-
<Table AssetId="51" Weight="10" Name="Ural_Forest" />
49-
<Table AssetId="53" Weight="10" Name="APC_Forest" />
50-
<!-- Added military vehicles from Washington map -->
51+
52+
<!-- Added desert vehicles -->
5153
<Table AssetId="88" Weight="10" Name="Jeep_Desert" />
5254
<Table AssetId="56" Weight="10" Name="Humvee_Desert" />
53-
<Table AssetId="55" Weight="10" Name="Ural_Desert" />
54-
<Table AssetId="57" Weight="10" Name="APC_Desert" />
5555
</Tables>
5656
</SpawnAsset>
5757
```
58-
### PEI Wild
59-
This is spawn asset for animals. You can modify it, for example add wolf or bear.
58+
59+
### Wildlife Spawns
60+
Add dangerous animals to wilderness areas:
61+
6062
```xml
6163
<SpawnAsset Id="329" Name="PEI_Wild" Description="Animal_Wild">
6264
<GUID>95835e9b-a3bc-4a92-aa4d-79c13c24b4c8</GUID>
6365
<Tables>
6466
<Table AssetId="1" Weight="10" Name="Deer" />
6567
<Table AssetId="4" Weight="10" Name="Pig" />
66-
<Table AssetId="6" Weight="10" Name="Cow" />
67-
<!-- Added Wolf and Bear -->
68+
69+
<!-- Added dangerous animals -->
6870
<Table AssetId="3" Weight="10" Name="Wolf" />
6971
<Table AssetId="5" Weight="10" Name="Bear" />
7072
</Tables>
7173
</SpawnAsset>
7274
```
73-
### Resource Pine
74-
This is spawn asset for pine tree. You can for example add Beehive or Queen Bee from More Farming mod.
75+
76+
### Tree Resource Drops
77+
Add modded items to tree harvesting:
78+
7579
```xml
76-
<SpawnAsset Id="517" Name="Resource_Pine" Description="Resource_Pine #1, Resource_Pine #2, Resource_Ornament #1 [XMAS]">
80+
<SpawnAsset Id="517" Name="Resource_Pine" Description="Resource_Pine">
7781
<GUID>2ba46713-4777-4334-919a-cae49acca78d</GUID>
7882
<Tables>
7983
<Table AssetId="41" Weight="60" Name="Pine Log" />
8084
<Table AssetId="42" Weight="40" Name="Pine Stick" />
81-
<!-- Added Beehive and Queen Bee from More Farming Mod -->
85+
86+
<!-- Added mod items -->
8287
<Table AssetId="42187" Weight="10" Name="Beehive" />
8388
<Table AssetId="42193" Weight="10" Name="Queen Bee" />
8489
</Tables>
8590
</SpawnAsset>
86-
```
91+
```
92+
93+
## Understanding the XML Format
94+
- **Id**: The spawn table ID number used by the game to identify the spawn table.
95+
- **Name**: Name of the spawn table (doesn't affect functionality, just for readability).
96+
- **Description**: Shows where this spawn table is used (doesn't affect functionality, just for information).
97+
- **GUID**: Unique identifier that has higher priority than ID - the game first checks GUID, then falls back to ID if needed. Don't change this unless you know what you're doing.
98+
- **Tables**: List of items in the spawn table
99+
- **AssetId**: The item/vehicle/animal ID from the game or mods.
100+
- **Weight**: Higher numbers mean more common spawns. For example, an item with weight 20 is twice as likely to spawn as an item with weight 10.
101+
- **Name**: Friendly name (for readability only, doesn't affect functionality).

SpawnsManager/SpawnsManagerConfiguration.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ namespace RestoreMonarchy.SpawnsManager
55
public class SpawnsManagerConfiguration : IRocketPluginConfiguration
66
{
77
public bool Debug { get; set; }
8-
public bool DespawnVehicles { get; set; }
98

109
public void LoadDefaults()
1110
{
1211
Debug = false;
13-
DespawnVehicles = true;
1412
}
1513
}
1614
}

0 commit comments

Comments
 (0)