saveupdater 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. # saveupdater
  2. if VersionCheck < 504:
  3. gs 'npcstatic'
  4. pcs_dob = birthyear * 10000
  5. pcs_dob += birthmonth * 100
  6. pcs_dob += birthday
  7. pcs_horny = horny
  8. pcs_stren = stren
  9. pcs_agil = agil
  10. pcs_vital = vital
  11. pcs_intel = intel
  12. pcs_haircol = hcol
  13. Astat_rel[28] = father
  14. Astat_rel[29] = mother
  15. Astat_rel[33] = sister
  16. Astat_rel[34] = brother
  17. pcs_grades = Suspeh
  18. pcs_tan = tan
  19. pcs_vball = volleyboll
  20. pcs_hairlng = hairlength
  21. pcs_haircol = hcol
  22. Astat_nerd[pc] = nerdism
  23. pcs_dom = dom
  24. $Astat_firstname[npctemp] = $name
  25. $Astat_nickname[npctemp] = $nickname
  26. $Astat_lastname[npctemp] = $surname
  27. $Astat_usedname[npctemp] = $nickname
  28. VersionCheck = 5030
  29. Astat_Qstlvl[33] = sisboyQW
  30. Astat_Qstlvl[34] = brotherQW
  31. Astat_Qstlvl[29] = motherQW
  32. Astat_Qstlvl[89] = barmenshameet
  33. Astat_rel[89] = JenyaLC
  34. LCEugenefirst = JenyaLCfirst
  35. killvar 'sisboyQW'
  36. killvar 'brotherQW'
  37. killvar 'motherQW'
  38. killvar 'barmenshameet'
  39. killvar 'JenyaLC'
  40. killvar 'JenyaLCfirst'
  41. killvar 'horny'
  42. killvar 'stren'
  43. killvar 'agil'
  44. killvar 'vital'
  45. killvar 'intel'
  46. killvar 'hcol'
  47. killvar 'father'
  48. killvar 'mother'
  49. killvar 'sister'
  50. killvar 'brother'
  51. killvar 'Suspeh'
  52. killvar 'tan'
  53. killvar 'volleyboll'
  54. killvar 'hairlength'
  55. killvar 'hcol'
  56. killvar 'nerdism'
  57. killvar 'dom'
  58. killvar '$name'
  59. killvar '$nickname'
  60. killvar '$surname'
  61. killvar '$boy'
  62. $boy = 'D0'
  63. !!The following part update the cum related arrays from an old savegame to the new MGX format.
  64. cycletemp = 0
  65. :cumarrupd
  66. if cycletemp < arrsize('$cumarrnam'):
  67. tempnpcid = arrpos('$Astat_usedname', $cumarrnam[cycletemp])
  68. if tempnpcid > 0:
  69. MSG '<br><b><font color="teal">DEBUG: Legacy name in save updated from <<$cumarrnam[cycletemp]>> to A<<tempnpcid>></font></b>'
  70. $cumarrnam[cycletemp] = 'A<<tempnpcid>>'
  71. elseif cumarrkno[cycletemp] > 0:
  72. MSG '<br><b><font color="red">WARNING: Unable to upgrade correctly cum entry <<cycletemp>> with name <<$cumarrnam[cycletemp]>></font></b>'
  73. gs 'npcgeneratec', 0, $cumarrnam[cycletemp], rand(18,60)
  74. $cumarrnam[cycletemp] = $npclastgenerated
  75. else
  76. gs 'npcgeneratec', 0, $cumarrnam[cycletemp], rand(18,60)
  77. $cumarrnam[cycletemp] = $npclastgenerated
  78. end
  79. cycletemp += 1
  80. jump 'cumarrupd'
  81. end
  82. cycletemp = 0
  83. :sparrupd
  84. if cycletemp < arrsize('$sparrnam'):
  85. tempnpcid = arrpos('$Astat_usedname', $sparrnam[cycletemp])
  86. if tempnpcid > 0:
  87. MSG '<br><b><font color="teal">DEBUG: Legacy name in save updated from <<$sparrnam[cycletemp]>> to A<<tempnpcid>></font></b>'
  88. $sparrnam[cycletemp] = 'A<<tempnpcid>>'
  89. elseif sparrkno[cycletemp] > 0:
  90. MSG '<br><b><font color="red">WARNING: Unable to upgrade correctly spatter entry <<cycletemp>> with name <<$sparrnam[cycletemp]>></font></b>'
  91. gs 'npcgeneratec', 0, $sparrnam[cycletemp], rand(18,60)
  92. $sparrnam[cycletemp] = $npclastgenerated
  93. else
  94. gs 'npcgeneratec', 0, $sparrnam[cycletemp], rand(18,60)
  95. $sparrnam[cycletemp] = $npclastgenerated
  96. end
  97. cycletemp +=1
  98. jump 'sparrupd'
  99. end
  100. cycletemp = 0
  101. :cumcbcupd
  102. if cycletemp < arrsize('$ChildFath'):
  103. tempnpcid = arrpos('$Astat_usedname', $ChildFath[cycletemp])
  104. if tempnpcid > 0:
  105. MSG '<br><b><font color="teal">DEBUG: Legacy name in save updated from <<$ChildFath[cycletemp]>> to A<<tempnpcid>></font></b>'
  106. $ChildFath[cycletemp] = 'A<<tempnpcid>>'
  107. else
  108. MSG '<br><b><font color="red">WARNING: Unable to upgrade correctly father entry <<cycletemp>> with name <<$ChildFath[cycletemp]>></font></b>'
  109. gs 'npcgeneratec', 0, $ChildFath[cycletemp], rand(18,60)
  110. $ChildFath[cycletemp] = $npclastgenerated
  111. end
  112. tempnpcid = arrpos('$Astat_usedname', $ChildThFath[cycletemp])
  113. if tempnpcid > 0:
  114. MSG '<br><b><font color="teal">DEBUG: Legacy name in save updated from <<$ChildThFath[cycletemp]>> to A<<tempnpcid>></font></b>'
  115. $ChildThFath[cycletemp] = 'A<<tempnpcid>>'
  116. else
  117. MSG '<br><b><font color="red">WARNING: Unable to upgrade correctly tought father entry <<cycletemp>> with name <<$ChildThFath[cycletemp]>></font></b>'
  118. $ChildThFath[cycletemp] = 'unknown'
  119. end
  120. cycletemp +=1
  121. jump 'cumcbcupd'
  122. end
  123. cycletemp = 0
  124. :wombpotupd
  125. if cycletemp < arrsize('$wombpotfath'):
  126. tempnpcid = arrpos('$Astat_usedname', $wombpotfath[cycletemp])
  127. if tempnpcid > 0:
  128. MSG '<br><b><font color="teal">DEBUG: Legacy name in save updated from <<$wombpotfath[cycletemp]>> to A<<tempnpcid>></font></b>'
  129. $wombpotfath[cycletemp] = 'A<<tempnpcid>>'
  130. elseif $wombpotfath[cycletemp] = 'Unknown':
  131. $wombpotfath[cycletemp] = 'unknown'
  132. else
  133. MSG '<br><b><font color="red">WARNING: Unable to upgrade correctly father entry <<cycletemp>> with name <<$wombpotfath[cycletemp]>></font></b>'
  134. gs 'npcgeneratec', 0, $wombpotfath[cycletemp], rand(18,60)
  135. $wombpotfath[cycletemp] = $npclastgenerated
  136. end
  137. cycletemp +=1
  138. jump 'wombpotupd'
  139. end
  140. cycletemp = 0
  141. :cumfthupd
  142. if cycletemp < arrsize('$cumfthname'):
  143. tempnpcid = arrpos('$Astat_usedname', $cumfthname[cycletemp])
  144. if tempnpcid > 0:
  145. MSG '<br><b><font color="teal">DEBUG: Legacy name in save updated from <<$cumfthname[cycletemp]>> to A<<tempnpcid>></font></b>'
  146. $cumfthname[cycletemp] = 'A<<tempnpcid>>'
  147. else
  148. MSG '<br><b><font color="red">WARNING: Unable to upgrade correctly father entry <<cycletemp>> with name <<$cumfthname[cycletemp]>></font></b>'
  149. gs 'npcgeneratec', 0, $cumfthname[cycletemp], rand(18,60)
  150. $cumfthname[cycletemp] = $npclastgenerated
  151. end
  152. cycletemp +=1
  153. jump 'cumfthupd'
  154. end
  155. end
  156. --- saveupdater ---------------------------------