...
| Code Block | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
# This is an awful way of doing things but hey, whatever
# Make duplicates of the PNG files
# Find all files
$source = Get-ChildItem "in\*m.png" -Recurse
$itemcount = $source.count
$itempercent = $source.count*100
$progress = 0
foreach ($sourcefile in $source)
{
# Progress bar
$progress++
Write-Progress -Activity "Copying _m files to the other sizes. Current item: $sourcefile" -Status "Progress: $progress of $itemcount" -PercentComplete (100 * $progress/$itemcount)
# Get the source filename - needs a space at the start too
$filename = Split-Path -Path $sourcefile -Leaf
# Take off last letter
$filename_short = $filename.substring(0, $filename.length - 5)
$s_file = "in\" + $filename_short + "s.png"
$t_file = "in\" + $filename_short + "t.png"
# Copy to the other names
If(!(Test-Path "$s_file")) { Copy-Item $sourcefile -Destination "$s_file" }
If(!(Test-Path "$t_file")) { Copy-Item $sourcefile -Destination "$t_file" }
}
Write-Output "Generating _m DDS"
.\nwn_crunch.exe -file -i "in\*m.png" -outdir "out" -fileformat dds -DXT1 -yflip -quiet -rescale 256 512
Write-Output "Generating _s DDS"
.\nwn_crunch.exe -file -i "in\*s.png" -outdir "out" -fileformat dds -DXT1 -yflip -quiet -rescale 128 256
Write-Output "Generating _t DDS"
.\nwn_crunch.exe -file -i "in\*t.png" -outdir "out" -fileformat dds -DXT1 -yflip -quiet -rescale 64 128
Write-Output "Done" |
Creatures
We want just rescale H down to upscale the Huge portrait which is highest quality option available to be the new Huge. Then we cut this one in half for the Large.
Then we reuse H, L and M for M, S, T.
the other sizes as above.
| Portrait Size | Use | Original Size | TGA Size | 4x Size | File Used | 4x DDS Size | Notes |
|---|---|---|---|---|---|---|---|
| Huge (h) | Chargen only really | 256x512 | 385KB | 1024x2048 | H upscaled | 1.33MB | |
| Large (l) | Character sheet | 128x256 | 97KB | 512x1024Upscaled | H rescaled341 KB | Sizeable increase in quality | |
| Medium (m) | Top left portrait | 64x128 | 25KB | 256x512Upscaled H rescaled | 85.4 KB | 4x the original size so should be good (and not too large) | |
| Small (s) | Sidebar portrait, conversations | 32x64 | 7KB | 128x256Upscaled H rescaled | 21.4 KB | 4x the original size so should be good (and not too large) | |
| Tiny (t) | Tab "see names" portrait | 16x32 | 2KB | 64x128Upscaled H rescaled | 5.47 KB | 4x the original size so should be good (and not too large) |
...
| Portrait Size | Original Size | 4x Size | 4x Size | 4x DDS Size | Option to do |
|---|---|---|---|---|---|
| Medium (m) | 64x128 canvas; upper 64x100 used | 256x512 | 25KB | 85.4 KB | M upscaled |
| Small (s) | 32x64 canvas; upper 32x50 used | 128x256 | 7KB | 21.4 KB | M upscaled and rescaled |
| Tiny (t) | 16x32 canvas, upper 16x25 used | 64x128 | 2KB | 5.47 KB | M upscaled and rescaled |
Oddities for the different options below:
- po_plc_rainbw_h - Placeable but has h and l versions
- po_plc_bbl_sm_m - This one has ONLY the medium one for some reason
- po_msc_ - several placeable ones not marked "po_plc_" for some reason
- po_levelup - only file, used in the top right for levelup (Equivalent I think to "m")
- po_gi_x0horse_m - I think a placeable one, has only m/s/t
- po_door01_m - placeable or door but not named po_plc_ so has only m/s/t
- po_pause - solo file like levelup that has just the "m" sized variant
- po_timestop - solo file like levelup that just has the "m" sized variant
- po_unknownpc - Special solo fileNot sure if used...?
- There's also a few default portrait files not prefixed po_ likely used in some cases
...
Naming convention would be: po_op_XXX_t.dds (where T would be the appropriate size ID) if a generic "thing" else follow race conventions for Dwarfs, Elves etc.. XXX can be 9 characters long. This is because of portraits.2da limitations (you are forced to use po_ as a prefix!)
...