# saveupdater
if VersionCheck < 504:
gs 'npcstatic'
pcs_dob = birthyear * 10000
pcs_dob += birthmonth * 100
pcs_dob += birthday
pcs_horny = horny
pcs_stren = stren
pcs_agil = agil
pcs_vital = vital
pcs_intel = intel
pcs_haircol = hcol
Astat_rel[28] = father
Astat_rel[29] = mother
Astat_rel[33] = sister
Astat_rel[34] = brother
pcs_grades = Suspeh
pcs_tan = tan
pcs_vball = volleyboll
pcs_hairlng = hairlength
pcs_haircol = hcol
Astat_nerd[pc] = nerdism
pcs_dom = dom
$Astat_firstname[npctemp] = $name
$Astat_nickname[npctemp] = $nickname
$Astat_lastname[npctemp] = $surname
$Astat_usedname[npctemp] = $nickname
VersionCheck = 5030
Astat_Qstlvl[33] = sisboyQW
Astat_Qstlvl[34] = brotherQW
Astat_Qstlvl[29] = motherQW
Astat_Qstlvl[89] = barmenshameet
Astat_rel[89] = JenyaLC
LCEugenefirst = JenyaLCfirst
killvar 'sisboyQW'
killvar 'brotherQW'
killvar 'motherQW'
killvar 'barmenshameet'
killvar 'JenyaLC'
killvar 'JenyaLCfirst'
killvar 'horny'
killvar 'stren'
killvar 'agil'
killvar 'vital'
killvar 'intel'
killvar 'hcol'
killvar 'father'
killvar 'mother'
killvar 'sister'
killvar 'brother'
killvar 'Suspeh'
killvar 'tan'
killvar 'volleyboll'
killvar 'hairlength'
killvar 'hcol'
killvar 'nerdism'
killvar 'dom'
killvar '$name'
killvar '$nickname'
killvar '$surname'
killvar '$boy'
$boy = 'D0'
!!The following part update the cum related arrays from an old savegame to the new MGX format.
cycletemp = 0
:cumarrupd
if cycletemp < arrsize('$cumarrnam'):
tempnpcid = arrpos('$Astat_usedname', $cumarrnam[cycletemp])
if tempnpcid > 0:
MSG '
DEBUG: Legacy name in save updated from <<$cumarrnam[cycletemp]>> to A<>'
$cumarrnam[cycletemp] = 'A<>'
elseif cumarrkno[cycletemp] > 0:
MSG '
WARNING: Unable to upgrade correctly cum entry <> with name <<$cumarrnam[cycletemp]>>'
gs 'npcgeneratec', 0, $cumarrnam[cycletemp], rand(18,60)
$cumarrnam[cycletemp] = $npclastgenerated
else
gs 'npcgeneratec', 0, $cumarrnam[cycletemp], rand(18,60)
$cumarrnam[cycletemp] = $npclastgenerated
end
cycletemp += 1
jump 'cumarrupd'
end
cycletemp = 0
:sparrupd
if cycletemp < arrsize('$sparrnam'):
tempnpcid = arrpos('$Astat_usedname', $sparrnam[cycletemp])
if tempnpcid > 0:
MSG '
DEBUG: Legacy name in save updated from <<$sparrnam[cycletemp]>> to A<>'
$sparrnam[cycletemp] = 'A<>'
elseif sparrkno[cycletemp] > 0:
MSG '
WARNING: Unable to upgrade correctly spatter entry <> with name <<$sparrnam[cycletemp]>>'
gs 'npcgeneratec', 0, $sparrnam[cycletemp], rand(18,60)
$sparrnam[cycletemp] = $npclastgenerated
else
gs 'npcgeneratec', 0, $sparrnam[cycletemp], rand(18,60)
$sparrnam[cycletemp] = $npclastgenerated
end
cycletemp +=1
jump 'sparrupd'
end
cycletemp = 0
:cumcbcupd
if cycletemp < arrsize('$ChildFath'):
tempnpcid = arrpos('$Astat_usedname', $ChildFath[cycletemp])
if tempnpcid > 0:
MSG '
DEBUG: Legacy name in save updated from <<$ChildFath[cycletemp]>> to A<>'
$ChildFath[cycletemp] = 'A<>'
else
MSG '
WARNING: Unable to upgrade correctly father entry <> with name <<$ChildFath[cycletemp]>>'
gs 'npcgeneratec', 0, $ChildFath[cycletemp], rand(18,60)
$ChildFath[cycletemp] = $npclastgenerated
end
tempnpcid = arrpos('$Astat_usedname', $ChildThFath[cycletemp])
if tempnpcid > 0:
MSG '
DEBUG: Legacy name in save updated from <<$ChildThFath[cycletemp]>> to A<>'
$ChildThFath[cycletemp] = 'A<>'
else
MSG '
WARNING: Unable to upgrade correctly tought father entry <> with name <<$ChildThFath[cycletemp]>>'
$ChildThFath[cycletemp] = 'unknown'
end
cycletemp +=1
jump 'cumcbcupd'
end
cycletemp = 0
:wombpotupd
if cycletemp < arrsize('$wombpotfath'):
tempnpcid = arrpos('$Astat_usedname', $wombpotfath[cycletemp])
if tempnpcid > 0:
MSG '
DEBUG: Legacy name in save updated from <<$wombpotfath[cycletemp]>> to A<>'
$wombpotfath[cycletemp] = 'A<>'
elseif $wombpotfath[cycletemp] = 'Unknown':
$wombpotfath[cycletemp] = 'unknown'
else
MSG '
WARNING: Unable to upgrade correctly father entry <> with name <<$wombpotfath[cycletemp]>>'
gs 'npcgeneratec', 0, $wombpotfath[cycletemp], rand(18,60)
$wombpotfath[cycletemp] = $npclastgenerated
end
cycletemp +=1
jump 'wombpotupd'
end
cycletemp = 0
:cumfthupd
if cycletemp < arrsize('$cumfthname'):
tempnpcid = arrpos('$Astat_usedname', $cumfthname[cycletemp])
if tempnpcid > 0:
MSG '
DEBUG: Legacy name in save updated from <<$cumfthname[cycletemp]>> to A<>'
$cumfthname[cycletemp] = 'A<>'
else
MSG '
WARNING: Unable to upgrade correctly father entry <> with name <<$cumfthname[cycletemp]>>'
gs 'npcgeneratec', 0, $cumfthname[cycletemp], rand(18,60)
$cumfthname[cycletemp] = $npclastgenerated
end
cycletemp +=1
jump 'cumfthupd'
end
end
--- saveupdater ---------------------------------