|
1 | 1 | # 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. |
3 | 3 |
|
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. |
8 | 11 |
|
9 | 12 | ## 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. |
12 | 19 |
|
13 | 20 | ## 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 | + |
17 | 25 | ```xml |
18 | 26 | <SpawnAsset Id="93" Name="PEI_Police" Description="Zombie_Police, Item_Police"> |
19 | 27 | <GUID>ced03c91-16f2-4969-8e4f-a5d504df4f9d</GUID> |
20 | 28 | <Tables> |
21 | 29 | <Table AssetId="100" Weight="10" Name="Cobra Magazine" /> |
22 | 30 | <Table AssetId="44" Weight="10" Name="Low Caliber Civilian Ammunition Box" /> |
23 | 31 | <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 --> |
35 | 35 | <Table AssetId="4" Weight="10" Name="Eaglefire" /> |
36 | 36 | <Table AssetId="6" Weight="10" Name="Military Magazine" /> |
37 | 37 | </Tables> |
38 | 38 | </SpawnAsset> |
39 | 39 | ``` |
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 | + |
42 | 44 | ```xml |
43 | 45 | <SpawnAsset Id="306" Name="PEI_Military_Canada" Description="Vehicle_Military_Canada"> |
44 | 46 | <GUID>b389bd2e-3e68-48c2-8a73-2111c405c987</GUID> |
45 | 47 | <Tables> |
| 48 | + <!-- Default forest vehicles --> |
46 | 49 | <Table AssetId="87" Weight="10" Name="Jeep_Forest" /> |
47 | 50 | <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 --> |
51 | 53 | <Table AssetId="88" Weight="10" Name="Jeep_Desert" /> |
52 | 54 | <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" /> |
55 | 55 | </Tables> |
56 | 56 | </SpawnAsset> |
57 | 57 | ``` |
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 | + |
60 | 62 | ```xml |
61 | 63 | <SpawnAsset Id="329" Name="PEI_Wild" Description="Animal_Wild"> |
62 | 64 | <GUID>95835e9b-a3bc-4a92-aa4d-79c13c24b4c8</GUID> |
63 | 65 | <Tables> |
64 | 66 | <Table AssetId="1" Weight="10" Name="Deer" /> |
65 | 67 | <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 --> |
68 | 70 | <Table AssetId="3" Weight="10" Name="Wolf" /> |
69 | 71 | <Table AssetId="5" Weight="10" Name="Bear" /> |
70 | 72 | </Tables> |
71 | 73 | </SpawnAsset> |
72 | 74 | ``` |
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 | + |
75 | 79 | ```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"> |
77 | 81 | <GUID>2ba46713-4777-4334-919a-cae49acca78d</GUID> |
78 | 82 | <Tables> |
79 | 83 | <Table AssetId="41" Weight="60" Name="Pine Log" /> |
80 | 84 | <Table AssetId="42" Weight="40" Name="Pine Stick" /> |
81 | | - <!-- Added Beehive and Queen Bee from More Farming Mod --> |
| 85 | + |
| 86 | + <!-- Added mod items --> |
82 | 87 | <Table AssetId="42187" Weight="10" Name="Beehive" /> |
83 | 88 | <Table AssetId="42193" Weight="10" Name="Queen Bee" /> |
84 | 89 | </Tables> |
85 | 90 | </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). |
0 commit comments