Modding Tutorials: World Data Overrides - discussions

Discuss modding questions and implementation details.
communityus
Posts: 47
Joined: Fri Apr 05, 2019 1:51 am

Re: Modding Tutorials: World Data Overrides

Post by communityus »

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

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut »

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: 47
Joined: Fri Apr 05, 2019 1:51 am

Re: Modding Tutorials: World Data Overrides

Post by communityus »

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

haloterm
Posts: 221
Joined: Sat Feb 16, 2019 5:21 am

Re: Modding Tutorials: World Data Overrides

Post by haloterm »

The Climate part of a json file has two entries I am not sure how to use: GroundArchive and NatureArchive.

The API documentation says: "Texture archive index for ground plane" and "Texture archive index for ground scenery (rocks, trees, etc.)."

So I assume by changing these values I can select the ground textures and stuff around the buildings. Question: Is there a list of these indices? Which are valid values? Or is there a tool where one could preview them?


Edit: Hmm after playing around a bit, I don't think that these parameters are very important, if I base my overrides on the dump of existing locations. I successfully added an inn at a very beautiful location and it all works just fine without fiddling with these two. So disregard my question.

User avatar
joshcamas
Posts: 83
Joined: Mon Sep 21, 2020 7:01 am

Re: Modding Tutorials: World Data Overrides

Post by joshcamas »

Is there a way to name a town building? I'm trying to modify an existing one, and rename it.

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

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut »

Need a lot more info than that because the answer depends on what you're trying to do.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
joshcamas
Posts: 83
Joined: Mon Sep 21, 2020 7:01 am

Re: Modding Tutorials: World Data Overrides

Post by joshcamas »

I'm wanting to add a building to an existing city (Daggerfall). I'm wanting it to be considered a shop (orange in map) and have a name that shows up on the map + when you interact with the house.

I'm okay with modifying an existing shop, or adding my own.

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

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut »

You can do that fairly easily by using the building replacement stuff, however this affects every location the block is used. Also the name is constructed from a seed, providing a custom name may need a bit more work but it's not something I've looked into.

If you want the shop to only be in daggerfall then you'd need to create a new RMB block with your shop and modify daggerfall to use that.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
joshcamas
Posts: 83
Joined: Mon Sep 21, 2020 7:01 am

Re: Modding Tutorials: World Data Overrides

Post by joshcamas »

Ahh gotcha. The issue I'm running into is getting the custom name, it looks like that might not be supported right now, sadly :((

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

Re: Modding Tutorials: World Data Overrides

Post by Hazelnut »

Please note that the example new location, the crypt Newarch Vaults, had incorrect values for some of the coordinate data. This was preventing the location from being found in the travel map properly. Thanks to Kamer for bringing this to my attention.

I've updated the test files zip on the first post and the annotated crypt location example on the second post.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply