Hunt locationsTable: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
| No edit summary | No edit summary | ||
| Line 8: | Line 8: | ||
| Today only X and Y coordinates are randomized, the vertical coordinate stays as specified in the database entry. (this should be CHANGED to collide on the ground) | Today only X and Y coordinates are randomized, the vertical coordinate stays as specified in the database entry. (this should be CHANGED to collide on the ground) | ||
| {| class="wikitable" | |||
| {|  | |+ | ||
| !  | !UE | ||
| !  | !Field | ||
| !  | !Type | ||
| !  | !Key Type | ||
| !Default | |||
| !Extra | |||
| !Description | |||
| |- | |- | ||
| | | | | ||
| |id | |||
| |int(8) unsigned | |||
| |PRI | |||
| | | | | ||
| |auto_increment | |||
| |  | |||
| |- | |- | ||
| | x | |DIF | ||
| | double(10,2) | |x | ||
| |double(10,2) | |||
| | | | | ||
| | coordinate on the map | |0 | ||
| | | |||
| |coordinate on the map   Type used to be 'double' in PSLegacy. Default used to be '' in PSLegacy. | |||
| |- | |- | ||
| | y | |DIF | ||
| | double(10,2) | |y | ||
| |double(10,2) | |||
| | | | | ||
| | coordinate on the map | |0 | ||
| | | |||
| |coordinate on the map   Type used to be 'double' in PSLegacy. Default used to be '' in PSLegacy. | |||
| |- | |- | ||
| | z | |DIF | ||
| | double(10,2) | |z | ||
| |double(10,2) | |||
| | | | | ||
| | coordinate on the map | |0 | ||
| | | |||
| |coordinate on the map   Type used to be 'double' in PSLegacy. Default used to be '' in PSLegacy. | |||
| |- | |- | ||
| | | | | ||
| | item to spawn taken from item_stats table | |itemid | ||
| |int(10) | |||
| | | |||
| |0 | |||
| | | |||
| |item to spawn taken from item_stats table   | |||
| |- | |- | ||
| | | | | ||
| | time to respawn a new item in seconds | |interval | ||
| |int(11) | |||
| | | |||
| |0 | |||
| | | |||
| |time to respawn a new item in seconds   | |||
| |- | |- | ||
| | | | | ||
| | random time between 0 and given value added to interval value above | |max_random | ||
| |int(11) | |||
| | | |||
| |0 | |||
| | | |||
| |random time between 0 and given value added to interval value above   | |||
| |- | |- | ||
| | sector | |DIF | ||
| | int(10) | |sector | ||
| |int(10) unsigned | |||
| | | | | ||
| | | | | ||
| | | |||
| |  Type used to be 'varchar(30)' in PSLegacy. Default used to be '' in PSLegacy. | |||
| |- | |- | ||
| | | | | ||
| | Number of items to spawn in the area | |amount | ||
| |int(10) unsigned | |||
| | | |||
| |1 | |||
| | | |||
| |Number of items to spawn in the area   | |||
| |- | |- | ||
| | range | |DIF | ||
| | double(10,2) | |range | ||
| |double(10,2) unsigned | |||
| | | |||
| |0 | |||
| | | | | ||
| | radius in  | |radius in centimetres Type used to be 'double unsigned' in PSLegacy. Default used to be '' in PSLegacy. | ||
| |- | |- | ||
| | lock_str | |ADD | ||
| | int(5) | |lock_str | ||
| |int(5) | |||
| | | |||
| |0 | |||
| | | | | ||
| | The lock strength of the generated item. | |The lock strength of the generated item.   | ||
| |- | |- | ||
| | lock_skill | |ADD | ||
| | int(2) | |lock_skill | ||
| |int(2) | |||
| | | |||
| | -1 | |||
| | | | | ||
| | The lock skill used to open the item. | |The lock skill used to open the item.   | ||
| |- | |- | ||
| | flags | |ADD | ||
| | varchar(200) | |flags | ||
| |varchar(200) | |||
| | | |||
| | | |||
| | | | | ||
| | The flags to apply to the item. | |The flags to apply to the item.   | ||
| |} | |} | ||
| [[Category:Engine documents]] | [[Category:Engine documents]] | ||
Revision as of 12:19, 11 January 2022
This table is loaded by SpawnManager::LoadHuntLocations()
At server startup we spawn into the world an "amount" of "itemid" for each line in the given "range".
When one of these items is picked up, we generate a UpsItemSpawnEvent() which will create a new item after "interval"+random("max_random")
Today only X and Y coordinates are randomized, the vertical coordinate stays as specified in the database entry. (this should be CHANGED to collide on the ground)
| UE | Field | Type | Key Type | Default | Extra | Description | 
|---|---|---|---|---|---|---|
| id | int(8) unsigned | PRI | auto_increment | |||
| DIF | x | double(10,2) | 0 | coordinate on the map Type used to be 'double' in PSLegacy. Default used to be in PSLegacy. | ||
| DIF | y | double(10,2) | 0 | coordinate on the map Type used to be 'double' in PSLegacy. Default used to be in PSLegacy. | ||
| DIF | z | double(10,2) | 0 | coordinate on the map Type used to be 'double' in PSLegacy. Default used to be in PSLegacy. | ||
| itemid | int(10) | 0 | item to spawn taken from item_stats table | |||
| interval | int(11) | 0 | time to respawn a new item in seconds | |||
| max_random | int(11) | 0 | random time between 0 and given value added to interval value above | |||
| DIF | sector | int(10) unsigned | Type used to be 'varchar(30)' in PSLegacy. Default used to be in PSLegacy. | |||
| amount | int(10) unsigned | 1 | Number of items to spawn in the area | |||
| DIF | range | double(10,2) unsigned | 0 | radius in centimetres Type used to be 'double unsigned' in PSLegacy. Default used to be in PSLegacy. | ||
| ADD | lock_str | int(5) | 0 | The lock strength of the generated item. | ||
| ADD | lock_skill | int(2) | -1 | The lock skill used to open the item. | ||
| ADD | flags | varchar(200) | The flags to apply to the item. |