Modding Tutorials: World Data Overrides - discussions

Discuss modding questions and implementation details.
User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Modding Tutorials: World Data Overrides - discussions

Post by BadLuckBurt »

I could follow most of the annotated example for a dungeon. I just have a few questions :oops:

Exterior > RecordElement > Header
Unknown2 is used to overwrite an existing location when you copy from LocationIndex right?
How do we know what the current max number is for LocationId and how far up is the number allowed to go?

Dungeon > Blocks

Code: Select all

Ex: Privateer's Hold
           B0000012          
 B0000009 @S0000999  B0000003
           B0000006  
The ARCHCH001.RDB file that's in your example would just be one of the B0000012, 03, 06, 09 or @S0000999 (when set as starting block in the above setup right, the position depending on their X-Y coordinate?

I don't understand what the '5 blocks defined but only the center one is used so they can be cut down to just that block' means exactly. Does the ARCHCH001.RDB offer different models but only 1 is usable?
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
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut »

BadLuckBurt wrote: Wed Oct 16, 2019 8:15 pm I could follow most of the annotated example for a dungeon. I just have a few questions :oops:

Exterior > RecordElement > Header
Unknown2 is used to overwrite an existing location when you copy from LocationIndex right?
How do we know what the current max number is for LocationId and how far up is the number allowed to go?
Unknown2 should simply have the value that LocationIndex at the end of the file has. This will be defined and fixed if you're changing an existing location and should be set to 0 for new locations since the value will be auto-assigned. Guess my explanation text was a bit cryptic.

LocationId is a 16 bit unsigned int, but you could find that out from the DFLocation class if you needed to know.

Regarding the single dungeon block, I was just pointing out that a dungeon with 1 block only needs that block in the list, whereas DF data has 4 additional blocks for these cases as you will see when dumping the data for a crypt.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Modding Tutorials: World Data Overrides

Post by BadLuckBurt »

Hazelnut wrote: Wed Oct 16, 2019 8:32 pm Unknown2 should simply have the value that LocationIndex at the end of the file has. This will be defined and fixed if you're changing an existing location and should be set to 0 for new locations since the value will be auto-assigned. Guess my explanation text was a bit cryptic.

LocationId is a 16 bit unsigned int, but you could find that out from the DFLocation class if you needed to know.

Regarding the single dungeon block, I was just pointing out that a dungeon with 1 block only needs that block in the list, whereas DF data has 4 additional blocks for these cases as you will see when dumping the data for a crypt.
Thank you, I should've guessed 0 would make the LocationIndex auto-assigned, makes sense.

I know the LocationId is only used when you specifically target a location in a quest but I was just wondering what would happen when two people pick the same location id for different locations?

Sorry for bugging you with these questions, I'm going to give setting up a new dungeon a shot this Saturday and I like to understand the 'why' of things I'm doing, helps to troubleshoot too.
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
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut »

Have now finished the basic documentation. It's now possible to develop mods with data overrides and variants etc as demo'ed by my two mods using this info. It's not easy, but it is possible. I've done the best I can to make this info accurate to the best of my knowledge but it's really a primer and starting point. Feedback is welcome, as long as it's constructive. It may not look like it but I've spent 15 odd hours doing just the documentation in this thread.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Modding Tutorials: World Data Overrides

Post by pango »

Hazelnut wrote: Wed Dec 04, 2019 8:30 pm It may not look like it but I've spent 15 odd hours doing just the documentation in this thread.
On the contrary, as I was reading this thread it was obvious it took time to write. I know how hard it is to write good documentation.

I don't know if I'll use it directly since I'm not really into writing mods, but I salute the effort.
Actually I salute all the documentation efforts done in those forums, I'm so glad they exist.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

communityus
Posts: 47
Joined: Fri Apr 05, 2019 1:51 am

Re: Modding Tutorials: World Data Overrides

Post by communityus »

This is perfect. I started creating my own visual version of this. But there is a ton in here I didn't even know. Huge time save! Thanks. I'd be happy to contribute to and help establish a wiki of sorts on GitHub or UESP somewhere.

To...um...add?...to the convo. Here is a horrible visual aid (shows some of how I have mapped the engine/framework workflow) - its super polished! :P

Spoiler!
pic 1: -> How MAPS.BSA plays a role. This may not be right but the next one about blockData was getting closer to what I think is going on data flow wise. I will leave this pic here for now so someone can correct me. If anyone can follow it that is.
Image

pic 2: -> blockData -> I think I nailed this.
Image

pic 3 (similar to pic 1) and 4 (begin to see how one might sort this all out): -> As one plays around with removing all Daggerfall IP from the arena2 files and replacing the content, things break. Here is one..."what happens if". Note the ARCH3D.BSA file size at 463 kb and maps.bsa smaller too. From this we can infer, our BLOCKS.BSA (now 4 MB and stripped down) does not have the right RDB but we can fix that or using this document (above) perhaps fill the slot with random values and override it with JSON to have the work be less tedious when developing.Image
Image
Playing in a iHex for now. With the documention provided above I am beginning to wonder if I can just replace the model data in the RDB/RMB files (etc) with random values and then using the override feature above replace all IP faster with this JSON approach.

Lots to think on. Thanks again for taking the time. I will use it for sure!
Last edited by communityus on Mon Feb 10, 2020 6:16 am, edited 2 times in total.

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

Re: Modding Tutorials: World Data Overrides

Post by BadLuckBurt »

Deleted - Post quoted in this thread: viewtopic.php?p=39827
Last edited by BadLuckBurt on Tue Feb 11, 2020 9:36 pm, edited 1 time in total.
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

.

communityus
Posts: 47
Joined: Fri Apr 05, 2019 1:51 am

Re: Modding Tutorials: World Data Overrides

Post by communityus »

Hazelnut wrote: Mon Oct 14, 2019 2:38 pm Overriding Daggerfall World Data

...
  • SetLocationVariant(int regionIndex, int locationIndex, string variant)
  • SetNewLocationVariant(int regionIndex, string locationName, string variant) - Need a different method for new locations as the index is only allocated at runtime.
  • SetBlockVariant(string blockName, string variant, int locationKey = -8)
  • SetBuildingVariant(string blockName, int recordIndex, string variant, int locationKey = -8)
...
These may of been updated on @TheLacus doc side, but they only point to the top of the page at present. I assume you wanted to point to the exact location in the doc for easy peasy ref.

# About the first one:
SetLocationVariant regardless of how many different ways I try to copy the link always points to
SetNewLocationVariant - but problem is likely in the @TheLacus docs or doc codebase. I might file a bug report there or you can if want. Let me know.
# Here they are updated

So for now I just point that one to #methods (closest that works all the time)
  • SetLocationVariant(int regionIndex, int locationIndex, string variant)
  • SetNewLocationVariant(int regionIndex, string locationName, string variant) - Need a different method for new locations as the index is only allocated at runtime.
  • SetBlockVariant(string blockName, string variant, int locationKey = -8)
  • SetBuildingVariant(string blockName, int recordIndex, string variant, int locationKey = -8)
Isolated the bug for SetLocationVariant pointing to SetNewLocationVariant madness. Turn out it was size of the window related on that one. But rest of the 3 links were relevant fixes. Got lucky honestly sorting that out - made no sense and was driving me insane ;-)
https://github.com/TheLacus/daggerfall- ... -584394733

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

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut »

communityus wrote: Mon Feb 10, 2020 10:11 pm Isolated the bug for SetLocationVariant pointing to SetNewLocationVariant madness. Turn out it was size of the window related on that one. But rest of the 3 links were relevant fixes. Got lucky honestly sorting that out - made no sense and was driving me insane ;-)
https://github.com/TheLacus/daggerfall- ... -584394733
What on earth are you on about? Links work fine for me, so I suspect you have a browser issue. What browser are you using? Either way please keep this thread for discussing world data overrides!
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

communityus
Posts: 47
Joined: Fri Apr 05, 2019 1:51 am

Re: Modding Tutorials: World Data Overrides

Post by communityus »

moved all the slightly off topic stuff, I know BadLuckBurt was hoping a mod would move it. anyway - I moved it manually as it was not my intent to derail anything.

I had thought it was sort of related as hinted at some of the motivation behind doing all the work.

I do plan to have real questions here, so don't want to start off on wrong foot lol. apologies.

As to the bug mentioned here are the details.
Spoiler!
Hazelnut wrote: Tue Feb 11, 2020 1:41 pm
communityus wrote: Mon Feb 10, 2020 10:11 pm Isolated the bug for SetLocationVariant pointing to SetNewLocationVariant madness. Turn out it was size of the window related on that one.
https://github.com/TheLacus/daggerfall- ... -584394733
What on earth are you on about?
At first I thought it was MS Edge related (browser related.) But I also tested on Firefox on my Linux box. I am talking about this.
trying-to-matchup.PNG
trying-to-matchup.PNG (12.64 KiB) Viewed 6060 times
The links have changed.
bugsbugssmashem.PNG
bugsbugssmashem.PNG (91.49 KiB) Viewed 6060 times
On #1 in pic above, that one is related to the browser bug, but the rest have changed since your first post. Was just an FYI.
(only reason spent time tracking it down was as a thank you for doing all the doc work.)

Post Reply