Closed afritz1 closed 5 years ago
Internally, the game separates cities, interiors, wilderness, dungeons and main quest dungeons.
Made good progress in commit e886b3c02632444bd3ae36e6633547c6c101dc93. I'm able to go between interiors and exteriors in cities consistently.
Transitions for palace gates, city gates, and wilderness interiors don't work yet.
No idea if the variants for city interiors are correct yet, but they seem to be random enough in any case.
Nice progress.
No idea if the variants for city interiors are correct yet
I've been testing and they are not the same as original Arena.
On a somewhat related note I've been testing Arena and the variants for equipment stores (probably all interiors) seem to be the same each play, or at least when loading and testing between 2 unrelated player characters.
Tested:
The names of the stores also seem to match between plays.
So the interior variants and store names in the original game are probably constants that can be used for reference.
Here's a comparison of 3 equipment stores in the upper-left section of the Imperial City as the layouts appear in Arena and in OpenTESArena. The top row of the 2 rows of interior layouts is from Arena, the bottom row is from OpenTESArena. "Elite Armaments" matches, but the two others differ.
Name | Coordinates | Offset | Xform | Variance |
---|---|---|---|---|
The Practical Equipment | 68, 20 | 0x1488 |
0x95c0 |
0 |
Rare Provisions | 88, 33 | 0x21b0 |
0x23ab |
3 |
Oops, I've made a typo in wiki. Corrected!
I added @Carmina16's fix in commit 60d3daa8e99da4f4dfbf07fb52fa1c78aad7a4ab and they're all correct now. I still need to implement wilderness interiors, and we won't be able to verify correctness until the wilderness itself is more fully implemented.
And @Allofich, regarding your observation about the persistence of store variants, it's because it's a function of the block's XY coordinate. The offset value that @Carmina16 fixed is what helps determine the variant ID of a menu block.
Wilderness interiors can now be entered in commit a47819f69a9e96cb7a10cea8abc82d348fdae4dc, but like I said above, they can't be checked until the wilderness is fully working.
The wilderness is working well enough now that I think we can close this.
Currently the player can only move between interior levels and not between buildings or the wilderness. This will require redesigning the world data a little bit to support different types of worlds (interior and exterior).
The active location ID tells what kind of location the player is in, and therefore what kind of world data is needed to represent that location. Some locations on the world map are purely interiors (like main quest dungeons and named dungeons). The world data storage variable should probably be a virtual class (base
WorldData
, derivedExteriorWorldData
andInteriorWorldData
).An exterior location should be able to store a nullable interior member for when the player is inside a building at that location. It should also store the entrance position and orientation so the engine knows where to put the player when they leave the building.
Exterior locations might need to be split up between cities and wilderness; that'll have to be investigated.