Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#657488 04/12/19 07:58 AM
Joined: May 2010
Location: Oxford
vometia Offline OP
Duchess of Gorgombert
OP Offline
Duchess of Gorgombert
Joined: May 2010
Location: Oxford
Dunno if there's much interest in this, nor have I quite obtained clearance from tptb that it's 100% okay to discuss all of it in detail as there's one particular thing I need to clarify; but apart from that potentially gnarly issue the rest of it is fairly uncontroversial stuff.

Obligatory warning: MODDING IS AT THE USER'S OWN RISK! Your game could become unstable and your saves corrupted and smelly Gorgombert might gush out of your PC's USB ports. You have been warned.

Anyway, that aside, it does have some potential for modding even though apart from my own general meddling there doesn't seem to be much if any of it about.

Part of the problem is that the game doesn't load loose files nor additional DV2 archives, at least not without some incantation that I'm unaware of. And the contents therein are pretty much entirely stored in NIF format, which is a potential headache as it's a binary format, or rather it's a whole family of binary formats which vary from one game to the next and whose proprietary nature often means that the only understanding of their internal format is someone with a hex editor, a lot of time ant patients and probably as much trial and error.

From my perspective that means that modding is currently limited to modelling and retextures. Of the two, modelling has been the more straightforward as Blender 2.49 can read its NIFs directly, and can write them after a fashion, at least once I'd mangled the export script (which I shall upload somewhere, though it would probably be at least polite to check with the original author first). Getting the exported NIF into a format the game is happy with is easy enough and I'll explain in detail in a later post.

Textures are more fiddly, which seems surprising as retexes are the usual basic modding you do when nothing else is really accessible. The reason they're fiddly is that "everything is a NIF" approach, which seemed pretty bloody-minded to me but having finally developed a basic understanding of DDS files and exactly what the NIF contains I now understand why it's a thing: to be used effectively and efficiently, the DDS needs a fair bit of meta-data that the DDS itself doesn't include. The NIF is a nice handy way of storing it consistently. Provided you have something that can read and write its particular format, that is. Until recently I've been creating "FrankenNIFs" by sellotaping file fragments together but have finally written a script to do it properly. That can be made ready for public consumption without too much effort, the only minor snag being that I don't really "do" Windows, I'm a Unix hacker, so it requires Cygwin or a handy Unix/Linux box to run.

If I'm feeling adventurous I may attempt to analyse how the config files work, which are a sort of XML-in-NIF-format thing, though tbh I am not very optimistic: I'm not sure I have the ability, patience nor fortitude, but we'll see.

Anyway, I shall describe the various things I know are possible in more detail a little later.


J'aime le fromage.
vometia #657791 17/12/19 02:13 PM
Joined: May 2010
Location: Oxford
vometia Offline OP
Duchess of Gorgombert
OP Offline
Duchess of Gorgombert
Joined: May 2010
Location: Oxford
A rather tardy update but my DV2 utility is available here if anybody is interested.

To reiterate the previous point, its use is strictly at your own risk! This is something I've written for my own convenience and thought I'd share, but it will be only randomly supported by me and is nothing to do with nor endorsed in any way by Larian. Sorry to be pedantic, but I figured it's important that nobody is under any illusions.

Talking of which, it is not immediately ready to run: it's source code only and needs to be compiled. For that you'll need a Posix environment so either a FreeBSD/Linux box or Cygwin for Windows as both a development and runtime environment. In the latter regard, you will need either gcc or clang as well as zlib-devel.

The source code is also the product of someone with chronic insomnia so it tends to meander about rather than being the product of a clear and definite design specification and good project management. If you do use it, back up your stuff first and it's at your own risk. It hasn't eaten my files but God knows what curious design ideas have gone through my head at 3am because I certainly don't.


J'aime le fromage.
vometia #657844 20/12/19 04:19 AM
Joined: May 2010
Location: Oxford
vometia Offline OP
Duchess of Gorgombert
OP Offline
Duchess of Gorgombert
Joined: May 2010
Location: Oxford
A few updates to my DV2 program. Mostly some debugging and other stuff of little consequence but the main addition is a new flag to list the contents of a DV2 without going through the rigmarole of either unpacking or testing the contents of everything it contains.

I have also included a few other bits and pieces:
  • A reworked export script for Blender 2.49 so it will actually write NIFs now (it didn't when I first tried to do so). It still needs some work after the file has been written in order for it to work in DKS. I have included a brief explanation in the associated readme.txt file but more comprehensive documentation will follow soon.
  • The relevant part of nif.xml required for recent versions of NifSkope to open DKS NIFs. Somebody had already updated this to read DKS as well as the older ED NIFs but at some point afterwards there was a major revision of its NiGeometryData definition which broke it again. I have included the older version (but not the complete nif.xml).
  • A Bash script that takes DDS files and packs them into NIFs, which is the format DKS requires. It's rather slow and embarrassing but it may be useful to others. As with the DV2 source code, it requires Cygwin to run, as well as a functional file command that correctly identifies DDS files.


J'aime le fromage.
vometia #812760 01/04/22 09:52 PM
Joined: Mar 2021
X
stranger
Offline
stranger
X
Joined: Mar 2021
Hi i hope i'm not late.I extracted game files dialogs,books,sounds,3 models,GUI,textures and a lot more.I'm using NifSkope to load .NIF files and when i try to add textures they path are already written and it's end with .TGA.But in texture folder every single texture is ending with .NIF.So the question is next:Is it possible to take DDS or TGA from that NIF texture or no?.I really want to use those 3D model somewhere else ex.Unity or UE4 and i did but without textures.I do some research and it's possible to extract it let's say in .FBX and more other format with textures.The only problem is converting them into .DDS or .TGA.

vometia #936486 20/02/24 06:41 AM
Joined: Jan 2024
Location: Canada
member
Offline
member
Joined: Jan 2024
Location: Canada
DV2 is now lost media the link posted no longer loads. I have taken the liberty of reuploading it to moddb so it does not ever go lost again.


Moderated by  Bvs, ForkTong, Larian_QA, Lar_q, Lynn, Macbeth, Raze 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5