Modding Tutorials: World Data Overrides

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

Re: Modding Tutorials: World Data Overrides

Post by BadLuckBurt » Mon Feb 10, 2020 5:56 am

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.

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

Re: Modding Tutorials: World Data Overrides

Post by communityus » Mon Feb 10, 2020 10:11 pm

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: 2132
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut » 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. 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: 41
Joined: Fri Apr 05, 2019 1:51 am

Re: Modding Tutorials: World Data Overrides

Post by communityus » Tue Feb 11, 2020 9:15 pm

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 292 times
The links have changed.
bugsbugssmashem.PNG
bugsbugssmashem.PNG (91.49 KiB) Viewed 292 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.)

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

Re: Modding Tutorials: World Data Overrides

Post by communityus » Thu Feb 13, 2020 7:29 am

Spoiler!
Image
BadLuckBurt wrote:
Wed Oct 16, 2019 9:02 pm
Hazelnut wrote:
Wed Oct 16, 2019 8:32 pm
...
...
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?
...
This was also my first question I was coming to the forums with. But I think I solved it for us.
Hazelnut wrote:
Mon Oct 14, 2019 2:39 pm
Locations
New locations should be named 'locationnew-LOCNAME-RR.json' where RR is the region index the new location will be in, and LOCNAME is your file name for this location. e.g. 'locationnew-archcrypt1-17.json' … A unique location index will be assigned internally when loaded in the game, and this could be different each time depending on other mods, so you cannot rely on it being a particular value and should set the corresponding data elements to zero as shown below.
...
So for quest actions...
It may be best practice then to only use LocationIndex (NOTE: not LocationId or unknown2) when dealing with DF default locations.

Code: Select all

worldupdate location at <locationIndex> in region <regionIndex> variant <variant>
When dealing with a new or altered location use "locationnew" in the quest. I believe this is right.

Code: Select all

worldupdate locationnew named <locationName> in region <regionIndex> variant <variant>
Take the example, the default data name was "Gaerhart Vaults" in the .json changed to "The Newarch Vaults"
So I assume any quest would use this name The Newarch Vaults also:

Image

LocationIndex.txt tells us "17, 1260: The Gaerhart Vaults" so...

Code: Select all

worldupdate location at 1260 in region 17 variant <variant>
Or at the building level:

Code: Select all

worldupdate building ARCH001.RMB 1 at 1260 in region 17 variant <variant>
<variant> e.g. "_master" - however - if we all used "_master" then might have a problem.

Then if it was a new location...

Code: Select all

worldupdate locationnew named The Newarch Vaults in region 17 variant <variant>
Image

Perhaps having all the new locations at index 0, still helps narrow down the list. Almost like 0 lets us know it is most likely a new location - so we will be looking at region and variant string to get the right place unless using worldupdate locationnew named {index 0 for new blocks since it is auto assigned.} it would seem at the quest building level, the variant string and well region id are what matter. "at LocationIndex" would only be used if default DF location.

This is what I can sort out thus far.

I wonder if we can have two "ins:" (New Location names; "The Times We Live In" or "Where to begin")

Code: Select all

worldupdate locationnew named The Times We Live In in region 17 variant <variant>
or

Code: Select all

worldupdate locationnew named Where to begin in region 17 variant <variant>
Does it always take the last "in"?

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

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut » Thu Feb 13, 2020 10:02 am

It should but I have not explicitly tested that. That was a rather long winded lead up to that question, not sure I followed whether there were any other questions there or if you were working though your understanding?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Modding Tutorials: World Data Overrides

Post by communityus » Thu Feb 13, 2020 8:38 pm

was guessing at the answer for BadLuckBurt while giving context - if at your glance it seemed right then all is well

Post Reply