There are two methods to generate a config. If one doesn't work, try another.

Method 1:
This method requires the tattoo pack to provide .psc file. It may be in Scripts\Source or Source\Scripts.
Save the following content as generateTOSConfigFromPsc.ps1.

$ErrorActionPreference = "Stop"
$psc = $args[0]
$content = Get-Content $psc
function GetTattoos([string]$funcName, [string]$prefix) {
  $tattoos = @()
  $content | ForEach-Object {
    if ($_ -match $funcName + '\s*\(.*,\s*"(.*)"\)') {
      $tattoos += $prefix + "Textures\\" + $matches[1] -replace "\\\\", "\"
    }
  }
  return $tattoos
}
$AnyRace = @()
$AnyRace += GetTattoos "AddBodyPaint"
$AnyRace += GetTattoos "AddHandPaint" "Hands|"
$AnyRace += GetTattoos "AddFeetPaint" "Feet|"
$AnyRace += GetTattoos "AddFacePaint" "Face|"
@{
  Body = @{
    AnySex = @{
      AnyRace = $AnyRace
    }
  }
} | ConvertTo-Json -Depth 10 | New-Item -Force "config.json"

Drag the .psc file onto this PowerShell script. You will get config.json. Then rename the config.json and copy it to SKSE/Plugins/TattoosOfSkyrim.

Method 2:
$ErrorActionPreference = "Stop"
$path = (Get-Location).Path
$index = $path.IndexOf("Texture", [System.StringComparison]::OrdinalIgnoreCase)
if ($index -ge 0) {
    $result = $path.Substring($index)
    $prefix = $result + "\"
} else {
    Write-Output """Texture"" must be presented in path."
    Exit 1
}
$fileList = Get-ChildItem -Path $folderPath -File | ForEach-Object {
    "$prefix$_"
}
@{
  Body = @{
    AnySex = @{
      AnyRace = $fileList
    }
  }
} | ConvertTo-Json -Depth 10 | New-Item -Force "config.json"

Run it where the .dds files are. Then rename the config.json and copy it to SKSE/Plugins/TattoosOfSkyrim.
However, this method can not recognise texture area, you will have to manually change any tattoo that is not a body tattoo to strings like "Hands|none|path".

Article information

Added on

Edited on

Written by

RichardLuo

0 comments