How to figure out permanent location format from location data

For all talk about quest development - creation, testing, and quest system.
Post Reply
adamatom
Posts: 31
Joined: Sun May 07, 2023 10:16 am

How to figure out permanent location format from location data

Post by adamatom »

I had a script made for adding places as permanent locations, specifically Hazelnut helped me to get a few dungeons set to permanent. I'm attempting to add another dungeon to the script myself as it seems relatively easy to do. I'm just missing one piece of info to make the script work. What does this number correspond to in terms of location data? Is it hex data for the coordinates or something? How do I figure it out?

Example in Quest-Places.txt :

AlcaireCoven, 0xc35a, 0x0001, -1

Example in Hazelnut's script for a dungeon exterior :

"Stonekeep_Ext, 0xC3BA, 1, -1",

Example in Hazelnut's script for a dungeon interior :

"Stonekeep, 0xC3BB, 1, -1",

The dungeon I need this kind of number for is The Prison of Tristynak in Glenpoint. I need the interior as I am planning to teleport the player inside the dungeon in a quest. How do I find it?

//edit//

I think it's called a location key as described in Quest-Places.txt

"-- Location classes for the Places section of a Qbn file.
-- The cataloguer joins #2 and #3 to create a unique internal code,
-- as does the game engine to create a unique location key. The
-- last byte of the sequence (01, 02, 03, 04, etc) indicates a
-- site transfered to by the teleport cheat."
Last edited by adamatom on Fri Dec 08, 2023 11:49 am, edited 3 times in total.

adamatom
Posts: 31
Joined: Sun May 07, 2023 10:16 am

Re: How to figure out Quest-Places.txt code/number (maybe it's called a location key?)

Post by adamatom »

Upon further research, I've found the location data via the dumplocation command, I'm just unsure how to end up with the 0x0000 format.

"Loaded": true,
"Name": "The Prison of Tristynak",
"RegionName": "Glenpoint",
"HasDungeon": true,
"MapTableData": {
"MapId": 149001963,
"Latitude": 50600,
"Longitude": 21928,
"LocationType": "DungeonLabyrinth",
"DungeonType": "Prison",
"Discovered": false,
"Key": 0
},
"Exterior": {
"RecordElement": {
"Header": {
"X": 5617664,
"Y": 12957697,
"IsExterior": 32768,
"Unknown2": 142,
"LocationId": 16088,
"IsInterior": 0,
"ExteriorLocationId": 0,
"LocationName": "The Prison of Tristynak"
}
},
"BuildingCount": 0,
"Buildings": [],
"ExteriorData": {
"AnotherName": "The Prison of Tristynak",
"MapId": 104171,
"LocationId": 0,
"Width": 1,
"Height": 1,
"PortTownAndUnknown": 0,
"BlockNames": [
"CASTAA25.RMB"
]
}
},
"Dungeon": {
"RecordElement": {
"Header": {
"X": 5617664,
"Y": 12957697,
"IsExterior": 0,
"Unknown2": 43,
"LocationId": 16089,
"IsInterior": 1,
"ExteriorLocationId": 16088,
"LocationName": "The Prison of Tristynak"
}
},
"Header": {
"BlockCount": 10
},
"Blocks": [
{
"X": 0,
"Z": 0,
"IsStartingBlock": true,
"BlockName": "W0000006.RDB",
"WaterLevel": -496,
"CastleBlock": false
},
{
"X": 0,
"Z": -1,
"IsStartingBlock": false,
"BlockName": "B0000001.RDB",
"WaterLevel": 10000,
"CastleBlock": false
},
{
"X": -1,
"Z": 0,
"IsStartingBlock": false,
"BlockName": "B0000001.RDB",
"WaterLevel": 10000,
"CastleBlock": false
},
{
"X": 1,
"Z": 0,
"IsStartingBlock": false,
"BlockName": "B0000009.RDB",
"WaterLevel": 10000,
"CastleBlock": false
},
{
"X": 0,
"Z": 1,
"IsStartingBlock": false,
"BlockName": "B0000001.RDB",
"WaterLevel": 10000,
"CastleBlock": false
}
]
},
"Climate": {
"WorldClimate": 230,
"ClimateType": "Temperate",
"NatureSet": "Nature_WoodlandHills",
"GroundArchive": 102,
"NatureArchive": 506,
"SkyBase": 16,
"People": "Breton",
"Names": "Nord"
},
"Politic": 146,
"RegionIndex": 18,
"LocationIndex": 142
}

adamatom
Posts: 31
Joined: Sun May 07, 2023 10:16 am

Re: How to figure out permanent location format from location data

Post by adamatom »

I figured it out finally. Will leave here in case anyone a bit new to this wants to do the same. Providing you can do the appropriate coding the format is like this:

Use one of the dump commands in the console to get location data for a dungeon

Take the LocationID of the dungeon. In my case it was - 16089

Convert to hex - 3ED9

And add 0x as a prefix

0x3ED9

It was as simple as that.

Post Reply