0 of 0

File information

Last updated

Original upload

Created by

yeahhowaboutnooo

Uploaded by

yeahhowaboutnooo

Virus scan

Some manually verified files

About this mod

Scripts to convert ARMO entries, "wigs", to HDPT entries "hairs".
Also generates required extra nif Files for those HDPT entries.

Permissions and credits
Mirrors
Changelogs
newest version also always available on the github mirror,
as nexusmods seems to automatically tag the included .exe as a virus,
which seems to be an issue with pyinstaller generated files,
see also here.
Or google "pyinstaller virustotal" for people with similar issues.

EDIT: v0.3 will be the last version in which i bundle a executable.
Here's what you need to run the Python script natively:
  • Python 3.7 or lower (pyffi is not compatible with 3.8 or above)
  • pip to install pyffi (pip usually comes bundled with Python on Windows)
  • and pyffi itself (cmd -> "pip install pyffi")


ARMO_2_HDPT_converter consists of two parts:

  • A Python® script utilizing pyffi to split nif files into multiple files, each containing a singular TriShape.
    This is necessary because Skyrim only loads the first TriShape of an HDPT entry.
  • An SSEEdit/xEdit script, which generates a singular actual HDPT entry for each armor
    as well as an extrapart HDPT entry for every .nif file generated by the Python script in step one.Every generated extrapart will have it's editor-id be the same as the mesh-name of the TriShape,because SMP physics uses the EditorID for it's per-vertex-/per-triangle-shape commands for headparts.


How to use:

  • Run SSE Nif Optimizer, deselect all options and optimize the meshes of the mod you want to convert to LE format
    (pyffi only supports NiTriShapes, hence the need to convert to LE Format)
  • copy "convert_nifs_built.exe" into the meshes folder of the mod you want to convert.
    (do NOT copy it into your Skyirm\Data\Meshes directory or it'll run for days)
    By default the program will use all available cores of your CPU.
    Depending on the currently being processed nif File,
    you should expect from 200MB up to ~2GB of RAM usage per running thread.
    (e.g. on a 6-core CPU with SMT -> potential peak of 24GB of RAM usage).
  • run the convert_nifs_built.exe directly OR
    copy the supplied .bat files as well and start one of those,
    in order to limit the thread count and thereby the RAM usage.
  • run SSE Nif Optimizer again, deselect all options and optimize BOTH the original and the newly generated meshes back to SSE format
  • install the modified mod
  • copy the xEdit script "ARMO_2_HDPT_convert.pas" into your SSEEdit/xEdit Edit Scripts directory
  • open SSEEdit/xEdit with the .esp you want to modify
  • mark all the armors you want to modify via shift + left-click
  • right click the marked armor and hit "apply script" 
  • select the ARMO_2_HDPT_convert.pas and click OK

Remarks:
  • Don't optimize the meshes with the "Headparts only" option of Nif Optimizer for now, still investigating if it's feasible to generate BSDynamicTriShapes for NPC support (performance with BSDynamicTriShapes seems to be worse and the game seems to be very prone to crashing)
  • The Python script will generate corresponding "__HDPT_extraParts" directories and files for every nif it finds.
    If you want, you can safely delete "__HDPT_extraParts" files which are not being used by headparts. (e.g. GND/GO files, which are being displayed in the inventory, but have no use for headparts)
  • The xEdit script will generate new esp Headpart entries every time it is run
    -> if you want to rerun the xEdit script, you should delete previously generated headparts or the entire "Head Part" subtree of the .esp you're modifying in xEdit.

If you want to modify and/or just run the Python script natively, you'll need:
  • Python 3.7 or lower (pyffi is not compatible with 3.8 or above)
  • pip to install pyffi (pip usually comes bundled with Python on Windows)
  • and pyffi itself (cmd -> "pip install pyffi")


Useful links:
Collection of xEdit sample scripts by Sharlikran
xEdit scripting functions documentation
pyffi API docs

Supplied binary executable built using pyinstaller
github repo