Skip to content

Please add support for Fallout 4/76 Nif Files #405

@bizzclaw

Description

@bizzclaw

Is your feature request related to a problem? Please describe.
Whenever you try to import a Nif file from Fallout 4 or 76, you get an error like this

Fallout 4 Nif Import Error

niftools:INFO:Dev: Sys variable not set
niftools:INFO:Executing - Niftools : Blender Niftools Addon v0.0.3(running on Blender 2.83.0, PyFFI 2.2.4.dev3)
niftools:INFO:Importing B:\Fallout_4_Extracted\Data\Meshes\Actors\MirelurkQueen\CharacterAssets\MirelurkQueen.nif
niftools:INFO:NIF file version: 14020007
niftools:INFO:Reading file
Traceback (most recent call last):
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\operators\nif_import_op.py", line 121, in execute
    return NifImport(self, context).execute()
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\nif_import.py", line 74, in execute
    self.load_files()  # needs to be first to provide version info.
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\nif_import.py", line 144, in load_files
    NifData.init(NifFile.load_nif(NifOp.props.filepath))
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\file_io\nif.py", line 64, in load_nif
    data.read(nif_stream)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\formats\nif\__init__.py", line 1297, in read
    self.header.read(stream, data=self)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\object_models\xml\struct_.py", line 373, in read
    attr_value.read(stream, data)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\object_models\xml\array.py", line 303, in read
    elem.read(stream, data)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\object_models\common.py", line 668, in read
    % (length, stream.tell()))
ValueError: string too long (0x465F5C3A at 0x00000044)

location: <unknown location>:-1

location: <unknown location>:-1

Fallout 76 Nif Import Error

niftools:INFO:Dev: Sys variable not set
niftools:INFO:Executing - Niftools : Blender Niftools Addon v0.0.3(running on Blender 2.83.0, PyFFI 2.2.4.dev3)
niftools:INFO:Importing B:\Fallout_76_Extracted\meshes\actors\mirelurkqueen\characterassets\mirelurkqueen.nif
niftools:INFO:NIF file version: 14020007
niftools:INFO:Reading file
Traceback (most recent call last):
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\operators\nif_import_op.py", line 121, in execute
    return NifImport(self, context).execute()
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\nif_import.py", line 74, in execute
    self.load_files()  # needs to be first to provide version info.
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\nif_import.py", line 144, in load_files
    NifData.init(NifFile.load_nif(NifOp.props.filepath))
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\file_io\nif.py", line 64, in load_nif
    data.read(nif_stream)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\formats\nif\__init__.py", line 1297, in read
    self.header.read(stream, data=self)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\object_models\xml\struct_.py", line 373, in read
    attr_value.read(stream, data)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\object_models\xml\array.py", line 293, in read
    raise ValueError('array too long (%i)' % len1)
ValueError: array too long (1275068416)

location: <unknown location>:-1

location: <unknown location>:-1

the issue seems to be with the length of arrays/strings so I'm not sure if that's something that can be overcome. Maybe it has something to do with Fallout 4/76 being 64bit? I know that nifskope is able to fully open Fallout 4 and 76 Nif Files, and the nif files when viewed in the editor have their rigging and materials preserved, there is just no way to export them to any format other than OBJ, meaning rigging data is lost.

Describe the solution you'd like
When Importing a nif file From Fallout 4 or 76, it should import and work just like something from Skyrim or Fallout 3.

Describe alternatives you've considered
The only alternative is to use 3DS Max, a proprietary program that, while you used to acquire a student license to create mods with, can no longer do so without being part of an officially recognized school program.

Additional context
If Fallout 76 ever gets true modding support like what we've been promised, being able to import nif files to edit them is going to be essential. As for Fallout 4, people have been using 3DS Max up until now. However, it is no longer easily possible to acquire a student license for 3DS Max, making it impossible to work with Fallout 4 nif files unless you already managed to get a license, but these will expire soon. This will make it impossible for modders to import and modify Fallout 4 nif files for mods without paying excessive prices for 3DS Max.

The truth is, Blender is just better to work with. It has more community support, and the existence of plugins allowing people to use it with Fallout 4 will finally allow people to move away from 3DS Max finally. This tool is still being updated, and I think the Fallout 4 modding community will be greatly boosted if blender was able to be used with its file format. I can only imagine that since the nif files for Fallout 76 aren't that much different, having a head start on support before we get full modding support will allow the modding scene to flourish quickly.

From what I've seen based on PRs related to this issue from a couple of years ago, there need to be certain changes with other dependencies to allow this to be possible. I'm not sure what specifically needs to be done and If these changes still have yet to be made, but if it is now possible, it would be amazing if this issue could be looked at again. Either way, thank you very much for continuing to support this plugin regardless of compatibility with future versions of nif.

Metadata

Metadata

Assignees

Labels

ImprovementThe issue improves on existing functionalityNew FeatureA new feature not currently implemented

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions