Adding coastal locations using world data system (difficult)

Discuss modding questions and implementation details.
User avatar
Hazelnut
Posts: 3016
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut »

I've added a brief description of the data structure hierarchy to the intro, could you give it a read please? I hope it's clear enough to give you a bit more context about how the data you're changing works within the game systems.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: Modding Tutorials: World Data Overrides

Post by Yagiza »

BadLuckBurt wrote: Sun Nov 10, 2019 1:02 pm Please attach the files directly to your replies. I went back to the second page of this thread and grabbed it but the location file there uses 207,212 as coordinates? It's directly north of Daggerfall city.

Scratch that, I see the attachment now :o
That was my mistake. I just forgot to attach the file.
Yagiza wrote: Sun Nov 10, 2019 12:42 pm Not yet. I'll try it today.
Yagiza wrote: Sun Nov 10, 2019 12:42 pm By "adding a pixel to a region" I mean declaring a pixel to belong to a different region. I need a way to tell DFU, that pixel at 208,215 belongs to Daggerfall (region id 17) instead of default High Rock sea coast (region id 31).
Could you post a step-by-step of what you're doing? From dumping the original location to creating the new one?
Well... I dumped the location Ripwych Commons, renamed the file according to manual (locationnew-test-31.json), then edited the file according to the same manual:
  1. Changed Name and LocationName fields to "Test".
  2. Changed Latitude to 36352 and Longitude to 26624.
  3. Changed Key and LocationIndex to 0.
  4. Changed both MapID's to 215208.
  5. Then, as you suggested, changed all ExteriorLocationId and LocationId fields to 55771.
  6. Changed RegionIndex to 31 and RegionName to "High Rock sea coast".
Hazelnut probably has a point about not understanding the world data structures. Using the form should make things go smoother too.
Yes, maybe.

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: Modding Tutorials: World Data Overrides

Post by Yagiza »

BadLuckBurt wrote: Sun Nov 10, 2019 11:50 am Also, have you tried using the HTML form in the Github repository I PM-ed you? I get the feeling you're still doing this manually and that way it's very easy to make mistakes and forget certain things. We're still in the process of figuring out what can and can't be done with this stuff so we don't have an answer for everything yet.
I tried it a few minutes ago. It works all right, but dfu-exterior-layout-viewer.html and dfu-terrain-viewer.html failed to read GENRAS02.RMB.json.

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Modding Tutorials: World Data Overrides

Post by BadLuckBurt »

Yagiza wrote: Sun Nov 10, 2019 2:17 pm That was my mistake. I just forgot to attach the file.
No problem, I send mails forgetting the attachments all the time.
Yagiza wrote: Sun Nov 10, 2019 12:42 pm Well... I dumped the location Ripwych Commons, renamed the file according to manual (locationnew-test-31.json), then edited the file according to the same manual:
  1. Changed Name and LocationName fields to "Test".
  2. Changed Latitude to 36352 and Longitude to 26624.
  3. Changed Key and LocationIndex to 0.
  4. Changed both MapID's to 215208.
  5. Then, as you suggested, changed all ExteriorLocationId and LocationId fields to 55771.
  6. Changed RegionIndex to 31 and RegionName to "High Rock sea coast".
If you want your new location to be in a certain region, dump a existing location from the region and base it on that one.

I removed the curly brace and your location does load up but once you're there and open the world map, the 'I'm at' coordinates are severely screw up, it shows me somewhere in the water. I really recommend using the worlddata-editor form to create a location :)
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: Modding Tutorials: World Data Overrides

Post by Yagiza »

Hazelnut wrote: Sun Nov 10, 2019 2:13 pm I've added a brief description of the data structure hierarchy to the intro, could you give it a read please? I hope it's clear enough to give you a bit more context about how the data you're changing works within the game systems.
Thank you! I read it once again, but... I already understood everything described there.
The only thing I didin't understand so far is the question I asked above: how map pixels are mapped to regions and is it possible to override that mapping?
Also, I don't know where world terrain is described?

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Modding Tutorials: World Data Overrides

Post by BadLuckBurt »

Yagiza wrote: Sun Nov 10, 2019 2:22 pm
BadLuckBurt wrote: Sun Nov 10, 2019 11:50 am Also, have you tried using the HTML form in the Github repository I PM-ed you? I get the feeling you're still doing this manually and that way it's very easy to make mistakes and forget certain things. We're still in the process of figuring out what can and can't be done with this stuff so we don't have an answer for everything yet.
I tried it a few minutes ago. It works all right, but dfu-exterior-layout-viewer.html and dfu-terrain-viewer.html failed to read GENRAS02.RMB.json.
Yeah, I think there's a problem with the JSON exporter. Open the GENRAS02.RMB.json and go to line 6896

Change

Code: Select all

                "T2.HS2\02.HS2",
to

Code: Select all

                "T2.HS202.HS2",
It should load up after that.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Modding Tutorials: World Data Overrides

Post by BadLuckBurt »

Yagiza wrote: Sun Nov 10, 2019 2:33 pm Thank you! I read it once again, but... I already understood everything described there.
The only thing I didin't understand so far is the question I asked above: how map pixels are mapped to regions and is it possible to override that mapping?
Also, I don't know where world terrain is described?
Map pixels are mapped to regions by their region ID and map coordinates. As for the terrain data, that's read from Daggerfall's files. If you go to the Hacking section on the UESP page, you can read about how that works: https://en.uesp.net/wiki/Daggerfall:Hacking_Guide
By "adding a pixel to a region" I mean declaring a pixel to belong to a different region. I need a way to tell DFU, that pixel at 208,215 belongs to Daggerfall (region id 17) instead of default High Rock sea coast (region id 31).
Dump a location from the Daggerfall region and use that as a base for your new location. That should be all you need to do.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: Modding Tutorials: World Data Overrides

Post by Yagiza »

BadLuckBurt wrote: Sun Nov 10, 2019 2:31 pm If you want your new location to be in a certain region, dump a existing location from the region and base it on that one.
There are only 3 locations in High Rock sea coast (region id 31). And all of them are special locations, so I can't use them for my purpose.
I removed the curly brace and your location does load up but once you're there and open the world map, the 'I'm at' coordinates are severely screw up, it shows me somewhere in the water. I really recommend using the worlddata-editor form to create a location :)
That's all right. It's a DFU bug and it is not related to the case. In DFU when you reach coastline, you're not in the region you were before, but in High Rock sea coast (region id 31). And when you're in that region, world map just displays crossed lines in the middle of the Iliac Bay instead your real position. Once you select a region, where you are, it will display your correct position.
You may easily reproduce the bug in any version of DFU without any additional locations. Just travel to a location near coastline, then walk to the coastline and open the world map.

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: Modding Tutorials: World Data Overrides

Post by Yagiza »

BadLuckBurt wrote: Sun Nov 10, 2019 2:44 pm Map pixels are mapped to regions by their region ID and map coordinates.
Well... That's absolutely not what I asked about. That's obvious that map pixels are mapped to regions by their region ID and map coordinates. But how? In which file (or files) that information is stored?
As for the terrain data, that's read from Daggerfall's files. If you go to the Hacking section on the UESP page, you can read about how that works: https://en.uesp.net/wiki/Daggerfall:Hacking_Guide
Yes, I examined that page, but found no information about terrain data.
By "adding a pixel to a region" I mean declaring a pixel to belong to a different region. I need a way to tell DFU, that pixel at 208,215 belongs to Daggerfall (region id 17) instead of default High Rock sea coast (region id 31).
Dump a location from the Daggerfall region and use that as a base for your new location. That should be all you need to do.
But how can this help me to move pixel to a different region (or, in other words, change association between pixel and region)?

User avatar
Hazelnut
Posts: 3016
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut »

Yagiza wrote: Sun Nov 10, 2019 3:01 pm Well... That's absolutely not what I asked about. That's obvious that map pixels are mapped to regions by their region ID and map coordinates. But how? In which file (or files) that information is stored?

But how can this help me to move pixel to a different region (or, in other words, change association between pixel and region)?
I didn't know, and had to look at the code to find out. Seems that info comes from Politic PAK file, and you can't override that with the system. That would require a lot of corresponding changes in the other data files I suspect, so I'm not going to be adding it either.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply