Utilities/Update-ItemData.ps1

<#
Notes:
    -ashashtable seems required due to format of this JSON
    This makes all the keys case sensitive, so I regenerate the hashtable with case insensitive keys
    I also convert the data so we have full part names and ducat/vault status
Original Hash table sample data:
    $originalData["Ash Prime"]
    Name Value
    ---- -----
    IsVaulted True
    Parts {[Chass.......
 
    $originalData["Ash Prime"].Parts
    Name Value
    ---- -----
    Chassis Blueprint {[DucatValue, 15], [Drops, System.Management.Automation.OrderedHashtable]}
    Blueprint {[DucatValue, 45], [Drops, System.Management.Automation.OrderedHashtable]}
    Systems Blueprint {[DucatValue, 65], [Drops, System.Management.Automation.OrderedHashtable]}
    Neuroptics Blueprint {[DucatValue, 45], [Drops, System.Management.Automation.OrderedHashtable]}
#>

$originalData = &$PSScriptRoot\Get-ItemDataJSON.ps1 | ConvertFrom-Json -AsHashtable

$itemHashTable = @{}

# This generates a new hashtable for full item names and vault/ducat values
# remember case sensitivity matters for the originaldata hashtable and we fix it by making the new one
foreach ($set in $originalData.Keys) 
{
    foreach($part in $originalData[$set].Parts.keys) 
    {
        $partData = $originalData[$set].Parts[$part]
        $PartName = "$set $part"

        $partObj = [PSCustomObject]@{
            PartName   = $PartName
            DucatValue = $partData.DucatValue
            Vaulted    = $originalData["$set"].IsVaulted
        }

        $itemHashTable[$PartName] = $PartObj
    }
}

$path = ($PSScriptRoot | Split-Path) + "\Data\ItemData.xml"
$itemHashTable | Export-Clixml -Path $path -Depth 100