Adding Extra Blocks To Existing Locations

Talk about the mods you'd like to see in Daggerfall Unity. Give mod creators some ideas!
Post Reply
User avatar
Channel1
Posts: 87
Joined: Mon Sep 18, 2017 9:16 pm

Adding Extra Blocks To Existing Locations

Post by Channel1 »

Excuse my lack of in-depth knowledge about this, but as I understand, in vanilla Daggerfall locations are limited to 8 by 8 blocks, what I'm wondering is if I figured out how use the proper program to edit these (I've never hex edited before :?) would I be able to change the original games files to make a location (e.g. Sentinel) have more blocks than 8 by 8 (e.g. expand it to 16 by 16 blocks), and would it then work in Daggerfall Unity?

I think I remember hearing that changing or maybe adding locations would do weird stuff to quests, assuming this would indeed mess them up, could I just get around this by keeping the same chunks? Or would I also have to keep them in the same location too? (and just tack a bunch to the bottom corner) or would even this mess the quests up...

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

Re: Adding Extra Blocks To Existing Locations

Post by Hazelnut »

I think you might find using override json files easier than hex editing. Currently only a building can be replaced but it would not be too hard to allow an entire block to be overridden - if your serious about re-doing an entire city.

No idea whether the 8x8 block limit is fundamental or not though.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Biboran
Posts: 277
Joined: Thu Jun 25, 2015 8:26 pm

Re: Adding Extra Blocks To Existing Locations

Post by Biboran »

Hazelnut wrote: Sun May 13, 2018 12:41 pm I think you might find using override json files easier than hex editing. Currently only a building can be replaced but it would not be too hard to allow an entire block to be overridden - if your serious about re-doing an entire city.

No idea whether the 8x8 block limit is fundamental or not though.
It be very nice feature to have and it be very nice if someone did mod that replacing blocks. I think that for me main problem with Daggerfall cities is how buildings far from each other and how quadratish overall cities is, sometimes daggerfall cities looks less "city" than tes arena ones :D
Maybe with edition blocks it be possible that someone implement elevation in cities, more dense medical-like districts, pier and dock areas, also expand citied beyond walls like addeding blocks with farms, fields, estates - all that things that surround medival cities, it be very nice

User avatar
Channel1
Posts: 87
Joined: Mon Sep 18, 2017 9:16 pm

Re: Adding Extra Blocks To Existing Locations

Post by Channel1 »

Hazelnut wrote: Sun May 13, 2018 12:41 pm I think you might find using override json files easier than hex editing. Currently only a building can be replaced but it would not be too hard to allow an entire block to be overridden - if your serious about re-doing an entire city.

No idea whether the 8x8 block limit is fundamental or not though.
Sorry if I confused you, but I'm talking about changing files in the vanilla Daggerfall installation to make it so some cities could have extra (vanilla) blocks.

User avatar
Channel1
Posts: 87
Joined: Mon Sep 18, 2017 9:16 pm

Re: Adding Extra Blocks To Existing Locations

Post by Channel1 »

After doing some research I came across this about two thirds of the way down this page of the UESP, it says:
Interpreting the Block Data arrays
The BlockIndex, BlockNumber, and BlockCharacter arrays all have a fixed size of 64 elements, but only the first Width * Height elements are used; the remainder are ignored. All 64 elements must be read just the same. These values are used to load the appropriate records from the BLOCKS.BSA file, which contains the automap data and are in turn used to load the appropriate meshes and models from ARCH3D.BSA to actually display the scene.
(Probably not important part:)
When accessing the block arrays, they should be synchronized. This is to say BlockIndex[ 5 ] should refer to the same Block record as BlockCharacter[ 5 ] and BlockNumber[ 5 ]. If one adds, removes, or reorders any array then one must reorder both of the other arrays to keep them synchronized.

The arrays are stored in west-to-east, south-to-north order. This means index 0 refers to the southwest corner of the location, and index ( Width * Height ) refers to the northeast corner of the location. Locations are not required to be squares (Width is not required to equal Height).

The details of the logic are described in Block Record Indexes.
I presume this means locations can only have up to 64 blocks, so it's impossible to get this to work with location that have 64 blocks already?

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

Re: Adding Extra Blocks To Existing Locations

Post by Hazelnut »

Yes, unless you made a variant file format and adjusted the reader code accordingly.

BTW I wasn't confused before, I was suggesting an alternative approach, albeit one you are not interested in.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Channel1
Posts: 87
Joined: Mon Sep 18, 2017 9:16 pm

Re: Adding Extra Blocks To Existing Locations

Post by Channel1 »

Unfortunately I don't know how to program, so that's probably not going to happen anytime soon. :( It probably wouldn't help though anyway since I have no experience hex editing either which would be required for actually editing the file in the first place...

Post Reply