This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

View file

@ -0,0 +1,42 @@
require "/scripts/versioningutils.lua"
function update(data)
-- 2 to 3
replaceInData(data, "surfaceLiquid", 4, 0)
replaceInData(data, "caveLiquid", 4, 0)
replaceInData(data, "oceanLiquid", 4, 0)
-- 3 to 5
executeWhere(data, "oceanLiquid", nil, function(entry)
entry.encloseLiquids = false
entry.fillMicrodungeons = false
end)
replaceKeyInData(data, "caveLiquidCommonalityFactor", "caveLiquidSeedDensity")
transformInData(data, "caveLiquidSeedDensity", function(density)
if type(density) == "number" and density > 0 then
return density / 4
else
return density
end
end)
-- 5 to 6
executeWhere(data, "layerBaseHeight", nil, function(entry)
entry.dungeonXVariance = 500
end)
-- 6 to 7
replaceInData(data, "dynamicsImages", "/celestial/system/terrestrial/dynamics/<num>.png", "/celestial/system/terrestrial/dynamics/temperate/<num>.png")
transformInData(data, "dynamicsRange", function(dynamicsRange)
if dynamicsRange[1] == 1 and dynamicsRange[2] == 40 then
return {1, 30}
else
return dynamicsRange
end
end)
-- 7 to 8
replaceInData(data, nil, "scifidungeon", "apexresearchlab")
return data
end

View file

@ -0,0 +1,7 @@
require "/scripts/versioningutils.lua"
function update(data)
executeWhere(data, "oceanLiquid", nil, function(data) data.encloseOcean = false end)
return data
end

View file

@ -0,0 +1,18 @@
require "/scripts/versioningutils.lua"
function update(data)
replaceKeyInData(data, "caveLiquidCommonalityFactor", "caveLiquidSeedDensity")
transformInData(data, "caveLiquidSeedDensity", function(density)
if type(density) == "number" and density > 0 then
return density / 4
else
return density
end
end)
replaceKeyInData(data, "encloseOcean", "encloseLiquids")
executeWhere(data, "encloseLiquids", nil, function(entry)
entry.fillMicrodungeons = false
end)
return data
end

View file

@ -0,0 +1,9 @@
require "/scripts/versioningutils.lua"
function update(data)
executeWhere(data, "layerBaseHeight", nil, function(entry)
entry.dungeonXVariance = 500
end)
return data
end

View file

@ -0,0 +1,14 @@
require "/scripts/versioningutils.lua"
function update(data)
replaceInData(data, "dynamicsImages", "/celestial/system/terrestrial/dynamics/<num>.png", "/celestial/system/terrestrial/dynamics/temperate/<num>.png")
transformInData(data, "dynamicsRange", function(dynamicsRange)
if dynamicsRange[1] == 1 and dynamicsRange[2] == 40 then
return {1, 30}
else
return dynamicsRange
end
end)
return data
end

View file

@ -0,0 +1,7 @@
require "/scripts/versioningutils.lua"
function update(data)
replaceInData(data, nil, "scifidungeon", "apexresearchlab")
return data
end

View file

@ -0,0 +1,4 @@
function update(data)
data.returnWarp = nil
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.reviveWarp = nil
return data
end

View file

@ -0,0 +1,18 @@
function update(data)
if data.timeToLive > 0 then
data.mode = "available"
else
data.mode = "dead"
end
data.dropAge = jobject()
data.dropAge.lastEpochTime = nil
data.dropAge.elapsedTime = 0.0
data.ageItemsTimer = jobject()
data.ageItemsTimer.lastEpochTime = nil
data.ageItemsTimer.elapsedTime = 0.0
return data
end

View file

@ -0,0 +1,140 @@
require "/scripts/versioningutils.lua"
armorConversions = {
apextier5head = "apextier5ahead",
apextier6head = "apextier5mhead",
apextier7head = "apextier5shead",
apextier8head = "apextier6shead",
apextier9head = "apextier6ahead",
apextier10head = "apextier6mhead",
aviantier5head = "aviantier6shead",
aviantier6head = "aviantier6ahead",
aviantier7head = "aviantier5ahead",
aviantier8head = "aviantier5mhead",
aviantier9head = "aviantier5shead",
aviantier10head = "aviantier6mhead",
florantier5head = "florantier5mhead",
florantier6head = "florantier5ahead",
florantier7head = "florantier5shead",
florantier8head = "florantier6ahead",
florantier9head = "florantier6mhead",
florantier10head = "florantier6shead",
glitchtier5head = "glitchtier5mhead",
glitchtier6head = "glitchtier5ahead",
glitchtier7head = "glitchtier5shead",
glitchtier8head = "glitchtier6mhead",
glitchtier9head = "glitchtier6ahead",
glitchtier10head = "glitchtier6shead",
humantier5head = "humantier5ahead",
humantier6head = "humantier6ahead",
humantier7head = "humantier6mhead",
humantier8head = "humantier5shead",
humantier9head = "humantier5mhead",
humantier10head = "humantier6shead",
hylotltier5head = "hylotltier5mhead",
hylotltier6head = "hylotltier5ahead",
hylotltier7head = "hylotltier5shead",
hylotltier8head = "hylotltier6ahead",
hylotltier9head = "hylotltier6shead",
hylotltier10head = "hylotltier6mhead",
novatier5head = "novatier5mhead",
novatier6head = "novatier6mhead",
novatier7head = "novatier5ahead",
novatier8head = "novatier6ahead",
novatier9head = "novatier5shead",
novatier10head = "novatier6shead",
apextier5chest = "apextier5achest",
apextier6chest = "apextier5mchest",
apextier7chest = "apextier5schest",
apextier8chest = "apextier6schest",
apextier9chest = "apextier6achest",
apextier10chest = "apextier6mchest",
aviantier5chest = "aviantier6schest",
aviantier6chest = "aviantier6achest",
aviantier7chest = "aviantier5achest",
aviantier8chest = "aviantier5mchest",
aviantier9chest = "aviantier5schest",
aviantier10chest = "aviantier6mchest",
florantier5chest = "florantier5mchest",
florantier6chest = "florantier5achest",
florantier7chest = "florantier5schest",
florantier8chest = "florantier6achest",
florantier9chest = "florantier6mchest",
florantier10chest = "florantier6schest",
glitchtier5chest = "glitchtier5mchest",
glitchtier6chest = "glitchtier5achest",
glitchtier7chest = "glitchtier5schest",
glitchtier8chest = "glitchtier6mchest",
glitchtier9chest = "glitchtier6achest",
glitchtier10chest = "glitchtier6schest",
humantier5chest = "humantier5achest",
humantier6chest = "humantier6achest",
humantier7chest = "humantier6mchest",
humantier8chest = "humantier5schest",
humantier9chest = "humantier5mchest",
humantier10chest = "humantier6schest",
hylotltier5chest = "hylotltier5mchest",
hylotltier6chest = "hylotltier5achest",
hylotltier7chest = "hylotltier5schest",
hylotltier8chest = "hylotltier6achest",
hylotltier9chest = "hylotltier6schest",
hylotltier10chest = "hylotltier6mchest",
novatier5chest = "novatier5mchest",
novatier6chest = "novatier6mchest",
novatier7chest = "novatier5achest",
novatier8chest = "novatier6achest",
novatier9chest = "novatier5schest",
novatier10chest = "novatier6schest",
apextier5pants = "apextier5apants",
apextier6pants = "apextier5mpants",
apextier7pants = "apextier5spants",
apextier8pants = "apextier6spants",
apextier9pants = "apextier6apants",
apextier10pants = "apextier6mpants",
aviantier5pants = "aviantier6spants",
aviantier6pants = "aviantier6apants",
aviantier7pants = "aviantier5apants",
aviantier8pants = "aviantier5mpants",
aviantier9pants = "aviantier5spants",
aviantier10pants = "aviantier6mpants",
florantier5pants = "florantier5mpants",
florantier6pants = "florantier5apants",
florantier7pants = "florantier5spants",
florantier8pants = "florantier6apants",
florantier9pants = "florantier6mpants",
florantier10pants = "florantier6spants",
glitchtier5pants = "glitchtier5mpants",
glitchtier6pants = "glitchtier5apants",
glitchtier7pants = "glitchtier5spants",
glitchtier8pants = "glitchtier6mpants",
glitchtier9pants = "glitchtier6apants",
glitchtier10pants = "glitchtier6spants",
humantier5pants = "humantier5apants",
humantier6pants = "humantier6apants",
humantier7pants = "humantier6mpants",
humantier8pants = "humantier5spants",
humantier9pants = "humantier5mpants",
humantier10pants = "humantier6spants",
hylotltier5pants = "hylotltier5mpants",
hylotltier6pants = "hylotltier5apants",
hylotltier7pants = "hylotltier5spants",
hylotltier8pants = "hylotltier6apants",
hylotltier9pants = "hylotltier6spants",
hylotltier10pants = "hylotltier6mpants",
novatier5pants = "novatier5mpants",
novatier6pants = "novatier6mpants",
novatier7pants = "novatier5apants",
novatier8pants = "novatier6apants",
novatier9pants = "novatier5spants",
novatier10pants = "novatier6spants"
}
function update(data)
if armorConversions[data.name] then
data.name = armorConversions[data.name]
end
return data
end

View file

@ -0,0 +1,140 @@
require "/scripts/versioningutils.lua"
armorConversions = {
apextier5head = "apextier5ahead",
apextier6head = "apextier5mhead",
apextier7head = "apextier5shead",
apextier8head = "apextier6shead",
apextier9head = "apextier6ahead",
apextier10head = "apextier6mhead",
aviantier5head = "aviantier6shead",
aviantier6head = "aviantier6ahead",
aviantier7head = "aviantier5ahead",
aviantier8head = "aviantier5mhead",
aviantier9head = "aviantier5shead",
aviantier10head = "aviantier6mhead",
florantier5head = "florantier5mhead",
florantier6head = "florantier5ahead",
florantier7head = "florantier5shead",
florantier8head = "florantier6ahead",
florantier9head = "florantier6mhead",
florantier10head = "florantier6shead",
glitchtier5head = "glitchtier5mhead",
glitchtier6head = "glitchtier5ahead",
glitchtier7head = "glitchtier5shead",
glitchtier8head = "glitchtier6mhead",
glitchtier9head = "glitchtier6ahead",
glitchtier10head = "glitchtier6shead",
humantier5head = "humantier5ahead",
humantier6head = "humantier6ahead",
humantier7head = "humantier6mhead",
humantier8head = "humantier5shead",
humantier9head = "humantier5mhead",
humantier10head = "humantier6shead",
hylotltier5head = "hylotltier5mhead",
hylotltier6head = "hylotltier5ahead",
hylotltier7head = "hylotltier5shead",
hylotltier8head = "hylotltier6ahead",
hylotltier9head = "hylotltier6shead",
hylotltier10head = "hylotltier6mhead",
novatier5head = "novatier5mhead",
novatier6head = "novatier6mhead",
novatier7head = "novatier5ahead",
novatier8head = "novatier6ahead",
novatier9head = "novatier5shead",
novatier10head = "novatier6shead",
apextier5chest = "apextier5achest",
apextier6chest = "apextier5mchest",
apextier7chest = "apextier5schest",
apextier8chest = "apextier6schest",
apextier9chest = "apextier6achest",
apextier10chest = "apextier6mchest",
aviantier5chest = "aviantier6schest",
aviantier6chest = "aviantier6achest",
aviantier7chest = "aviantier5achest",
aviantier8chest = "aviantier5mchest",
aviantier9chest = "aviantier5schest",
aviantier10chest = "aviantier6mchest",
florantier5chest = "florantier5mchest",
florantier6chest = "florantier5achest",
florantier7chest = "florantier5schest",
florantier8chest = "florantier6achest",
florantier9chest = "florantier6mchest",
florantier10chest = "florantier6schest",
glitchtier5chest = "glitchtier5mchest",
glitchtier6chest = "glitchtier5achest",
glitchtier7chest = "glitchtier5schest",
glitchtier8chest = "glitchtier6mchest",
glitchtier9chest = "glitchtier6achest",
glitchtier10chest = "glitchtier6schest",
humantier5chest = "humantier5achest",
humantier6chest = "humantier6achest",
humantier7chest = "humantier6mchest",
humantier8chest = "humantier5schest",
humantier9chest = "humantier5mchest",
humantier10chest = "humantier6schest",
hylotltier5chest = "hylotltier5mchest",
hylotltier6chest = "hylotltier5achest",
hylotltier7chest = "hylotltier5schest",
hylotltier8chest = "hylotltier6achest",
hylotltier9chest = "hylotltier6schest",
hylotltier10chest = "hylotltier6mchest",
novatier5chest = "novatier5mchest",
novatier6chest = "novatier6mchest",
novatier7chest = "novatier5achest",
novatier8chest = "novatier6achest",
novatier9chest = "novatier5schest",
novatier10chest = "novatier6schest",
apextier5pants = "apextier5apants",
apextier6pants = "apextier5mpants",
apextier7pants = "apextier5spants",
apextier8pants = "apextier6spants",
apextier9pants = "apextier6apants",
apextier10pants = "apextier6mpants",
aviantier5pants = "aviantier6spants",
aviantier6pants = "aviantier6apants",
aviantier7pants = "aviantier5apants",
aviantier8pants = "aviantier5mpants",
aviantier9pants = "aviantier5spants",
aviantier10pants = "aviantier6mpants",
florantier5pants = "florantier5mpants",
florantier6pants = "florantier5apants",
florantier7pants = "florantier5spants",
florantier8pants = "florantier6apants",
florantier9pants = "florantier6mpants",
florantier10pants = "florantier6spants",
glitchtier5pants = "glitchtier5mpants",
glitchtier6pants = "glitchtier5apants",
glitchtier7pants = "glitchtier5spants",
glitchtier8pants = "glitchtier6mpants",
glitchtier9pants = "glitchtier6apants",
glitchtier10pants = "glitchtier6spants",
humantier5pants = "humantier5apants",
humantier6pants = "humantier6apants",
humantier7pants = "humantier6mpants",
humantier8pants = "humantier5spants",
humantier9pants = "humantier5mpants",
humantier10pants = "humantier6spants",
hylotltier5pants = "hylotltier5mpants",
hylotltier6pants = "hylotltier5apants",
hylotltier7pants = "hylotltier5spants",
hylotltier8pants = "hylotltier6apants",
hylotltier9pants = "hylotltier6spants",
hylotltier10pants = "hylotltier6mpants",
novatier5pants = "novatier5mpants",
novatier6pants = "novatier6mpants",
novatier7pants = "novatier5apants",
novatier8pants = "novatier6apants",
novatier9pants = "novatier5spants",
novatier10pants = "novatier6spants"
}
function update(data)
if armorConversions[data.name] then
data.name = armorConversions[data.name]
end
return data
end

View file

@ -0,0 +1,118 @@
require "/scripts/versioningutils.lua"
standardMelee = {
["dagger"] = "dagger",
["shortsword"] = "shortsword",
["broadsword"] = "broadsword",
["spear"] = "spear",
["axe"] = "axe",
["hammer"] = "hammer",
["testbroadsword"] = "broadsword"
}
specialMelee = {
["avian sword"] = "aviansword",
["avian spear"] = "avianspear",
["bonesaw"] = "bonesaw",
["bone sword"] = "bonesword",
["candy cane"] = "candycane",
["crystal spear"] = "crystalspear",
["eye axe"] = "eyeaxe",
["floran prod"] = "floranprod",
["frying pan"] = "fryingpan",
["glitch heavy mace"] = "glitchlargemace",
["glitch mace"] = "glitchsmallmace",
["nightstick"] = "nightstick",
["floran spear"] = "npcflorantier1spear",
["rainbow spear"] = "rainbowspear",
["rust sword"] = "rustsword",
["shiv"] = "shiv",
["steel chair"] = "steelchair",
["toxic broadsword"] = "toxicbroadsword",
["fire sword"] = "firesword",
["mushroom sword"] = "mushroomsword",
["water sword"] = "watersword",
["eye sword"] = "eyesword",
["floran mace"] = "floranmace",
["heroic sword"] = "slavesword",
["star cleaver"] = "starcleaversword",
["tesla spear"] = "teslaspear",
["bone axe"] = "boneaxe",
["bone hammer"] = "bonehammer"
}
standardRanged = {
["assault rifle"] = "assaultrifle",
["plasma rifle"] = "assaultrifle",
["burst rifle"] = "assaultrifle",
["grenade launcher"] = "grenadelauncher",
["machine pistol"] = "machinepistol",
["plasma m. pistol"] = "machinepistol",
["pistol"] = "pistol",
["plasma pistol"] = "pistol",
["rocket launcher"] = "rocketlauncher",
["shotgun"] = "shotgun",
["plasma shotgun"] = "shotgun",
["sniper rifle"] = "sniperrifle",
["plasma s.rifle"] = "sniperrifle"
}
specialRanged = {
["avian blaster"] = "avianblaster",
["avian heavy blaster"] = "avianheavyblaster",
["bone rifle"] = "boneassault",
["bone pistol"] = "bonepistol",
["bone shotgun"] = "boneshotgun",
["cellzapper"] = "cellzapper",
["flamethrower"] = "flamethrower",
["floran grenade launcher"] = "florangrenadelauncher",
["needler"] = "floranneedler",
["globe launcher"] = "globelauncher",
["shattergun"] = "shattergun",
["stinger gun"] = "stingergun",
["uzi"] = "uzi"
}
function update(data)
if data.name == "generatedsword" then
local weaponType = string.lower(data.parameters.weaponType)
local generatedType
if standardMelee[weaponType] then
generatedType = string.format("%s%s", string.lower(data.parameters.rarity), standardMelee[weaponType])
elseif specialMelee[weaponType] then
generatedType = specialMelee[weaponType]
else
return data
end
local newData = root.createItem({"generatedsword", 1, {definition=generatedType}}, data.parameters.level)
newData.parameters.shortdescription = data.parameters.shortdescription
return newData
elseif data.name == "generatedgun" then
local weaponType = string.lower(data.parameters.weaponType)
local generatedType
if weaponType == "crossbow" then
if data.parameters.rarity == "uncommon" then
generatedType = "crossbowspecial"
else
generatedType = "crossbow"
end
elseif standardRanged[weaponType] then
local rarity = string.lower(data.parameters.rarity)
if rarity == "legendary" then rarity = "rare" end
generatedType = string.format("%s%s", rarity, standardRanged[weaponType])
elseif specialRanged[weaponType] then
generatedType = specialRanged[weaponType]
else
return data
end
local newData = root.createItem({"generatedgun", 1, {definition=generatedType}}, data.parameters.level)
newData.parameters.shortdescription = data.parameters.shortdescription
return newData
end
return data
end

View file

@ -0,0 +1,73 @@
require "/scripts/versioningutils.lua"
-- In this version: remove old shields, replace with activeitem shields
shieldDefinitionConversions = {
["eyeshield"] = "eyeshield",
["floranbasicshield"] = "floranshield",
["floranstrongshield"] = "floranshield",
["frostshield"] = "frostshield",
["glitchbasicshield"] = "commonsmallshield",
["glitchlordshield"] = "commonlargeshield",
["glitchstrongshield"] = "commonlargeshield",
["hylotlstrongshield"] = "commonlargeshield",
["mossshield"] = "commonsmallshield",
["mushroomshield"] = "mushroomshield",
["riotshield"] = "riotshield",
["seashellshield"] = "seashellshield",
["startershield"] = "startershield",
["tier1shield"] = "commonsmallshield",
["tier1woodshield"] = "commonsmallshield",
["tier2shield"] = "commonlargeshield",
["tier2woodshield"] = "commonlargeshield",
["tierxshield"] = "commonlargeshield"
}
shieldConversions = {
["glitchbasic"] = "commonsmallshield",
["glitchstrong"] = "commonlargeshield",
["glitchlord"] = "commonlargeshield",
["floranbasic"] = "floranshield",
["floranstrong"] = "floranshield",
["hylotlstrong"] = "commonlargeshield",
["riotshield"] = "riotshield",
["frostshield"] = "frostshield",
["moss"] = "commonsmallshield",
["mushroom"] = "mushroomshield",
["seashellshield"] = "seashellshield",
["eyepatch"] = "eyeshield",
["tieredshields/tier1"] = "commonsmallshield",
["tieredshields/tier1wood"] = "commonsmallshield",
["tieredshields/tier2"] = "commonlargeshield",
["tieredshields/tier2wood"] = "commonlargeshield",
["tieredshields/starter"] = "startershield",
["tieredshields/tierx"] = "commonlargeshield"
}
function extractShieldType(parameters)
local imagePath = parameters.drawables[1].image
local _, ia = imagePath:find("/randomgenerated/")
local ib, _ = imagePath:find("/images/")
if ia and ib then
return imagePath:sub(ia + 1, ib - 1)
else
return "unknown"
end
end
function update(data)
if data.name == "generatedshield" then
if data.parameters.definition then
data.name = shieldDefinitionConversions[data.parameters.definition] or "commonsmallshield"
else
local typeName = extractShieldType(data.parameters)
data.name = shieldConversions[typeName] or "commonsmallshield"
end
local level = data.parameters.level
data.parameters = {level = level or 1}
-- sb.logInfo("Found shield of type %s level %s, converting to %s", typeName, level, data.name)
end
return data
end

View file

@ -0,0 +1,159 @@
require "/scripts/versioningutils.lua"
-- This version: replace many types of generated weapons with their activeitem equivalents,
-- rename a few items, and convert .wav to .ogg for remaining generated guns/swords
generalItemConversions = {
meatwine = "meatjuice",
winebottle = "cordialbottle",
wineglass = "cordialglass",
whiskeybottle = "rootpopbottle",
whiskeyflask = "rootpopflask",
beerhead = "bevhead",
ricewine = "ricevinegar",
wartwine = "wartjuice",
weyene = "oculemonade"
}
-- commented out entries are generated weapons to be converted next version
meleeWeaponConversions = {
avianspear = "commonspear",
aviansword = "commonshortsword",
-- boneaxe = "boneaxe",
-- bonehammer = "bonehammer",
-- bonesaw = "bonesaw",
-- bonesword = "bonesword",
-- candycane = "candycane",
commonaxe = "commonaxe",
commonbroadsword = "commonbroadsword",
commondagger = "commondagger",
commonhammer = "commonhammer",
commonshortsword = "commonshortsword",
commonspear = "commonspear",
-- crystalspear = "crystalspear",
-- eyeaxe = "eyeaxe",
-- eyesword = "eyesword",
firesword = "rarebroadsword",
floranmace = "commonhammer",
floranprod = "uncommonspear",
-- fryingpan = "fryingpan",
glitchlargemace = "commonhammer",
glitchsmallmace = "commonshortsword",
mushroomsword = "uncommonshortsword",
nightstick = "commonshortsword",
npcflorantier1spear = "commonspear",
npcmutantminerhammer = "commonhammer",
rainbowspear = "uncommonspear",
rustsword = "uncommonshortsword",
rareaxe = "rareaxe",
rarebroadsword = "rarebroadsword",
raredagger = "raredagger",
rarehammer = "rarehammer",
rareshortsword = "rareshortsword",
rarespear = "rarespear",
shiv = "commondagger",
-- slavesword = "slavesword",
-- starcleaversword = "starcleaversword",
-- steelchair = "steelchair",
teslaspear = "rarespear",
toxicbroadsword = "uncommonbroadsword",
uncommonaxe = "uncommonaxe",
uncommonbroadsword = "uncommonbroadsword",
uncommondagger = "uncommondagger",
uncommonhammer = "uncommonhammer",
uncommonshortsword = "uncommonshortsword",
uncommonspear = "uncommonspear",
wallpainter = "commonbroadsword",
watersword = "rarebroadsword"
}
-- commented out entries are generated weapons to be converted next version
rangedWeaponConversions = {
avianblaster = "uncommonpistol",
avianheavyblaster = "uncommonassaultrifle",
-- boneassault = "boneassault",
-- bonepistol = "bonepistol",
-- boneshotgun = "boneshotgun",
cellzapper = "uncommonsniperrifle",
commonassaultrifle = "commonassaultrifle",
commonburstrifle = "commonassaultrifle",
commongrenadelauncher = "commongrenadelauncher",
commonmachinepistol = "commonmachinepistol",
commonpistol = "commonpistol",
commonpulserifle = "commonassaultrifle",
commonrocketlauncher = "commonrocketlauncher",
commonshotgun = "commonshotgun",
commonsniperrifle = "commonsniperrifle",
-- crossbow = "crossbow",
-- crossbowspecial = "crossbowspecial",
-- crossbowwood = "crossbowwood",
flamethrower = "flamethrower",
florangrenadelauncher = "commongrenadelauncher",
floranneedler = "commonassaultrifle",
globelauncher = "commongrenadelauncher",
lightningcoil = "commonassaultrifle",
pulserifle = "commonassaultrifle",
rareassaultrifle = "rareassaultrifle",
raregrenadelauncher = "raregrenadelauncher",
raremachinepistol = "raremachinepistol",
rarepistol = "rarepistol",
rarerocketlauncher = "rarerocketlauncher",
rareshotgun = "rareshotgun",
raresniperrifle = "raresniperrifle",
revolver = "commonpistol",
stingergun = "commonassaultrifle",
shattergun = "commonshotgun",
uncommonassaultrifle = "uncommonassaultrifle",
uncommongrenadelauncher = "uncommongrenadelauncher",
uncommonmachinepistol = "uncommonmachinepistol",
uncommonpistol = "uncommonpistol",
uncommonpulserifle = "uncommonassaultrifle",
uncommonrocketlauncher = "uncommonrocketlauncher",
uncommonshotgun = "uncommonshotgun",
uncommonsniperrifle = "uncommonsniperrifle",
uzi = "commonmachinepistol"
}
weaponTypeInferences = {
["lightning coil"] = "lightningcoil",
["pulse rifle"] = "pulserifle",
["revolver"] = "revolver"
}
function update(data)
if generalItemConversions[data.name] then
data.name = generalItemConversions[data.name]
elseif data.name == "generatedsword" then
local definitionName = extractDefinitionName(data.parameters)
if definitionName then
if meleeWeaponConversions[definitionName] then
data.name = meleeWeaponConversions[definitionName]
data.parameters = { level = data.parameters.level }
end
end
elseif data.name == "generatedgun" then
local definitionName = extractDefinitionName(data.parameters)
if definitionName then
if rangedWeaponConversions[definitionName] then
data.name = rangedWeaponConversions[definitionName]
data.parameters = { level = data.parameters.level }
end
end
end
if data.name == "generatedgun" or data.name == "generatedsword" then
replacePatternInData(data.parameters, nil, ".wav", ".ogg")
replacePatternInData(data.parameters, nil, "swing_onehanded", "swing_shortsword")
replacePatternInData(data.parameters, nil, "swing_twohanded", "swing_broadsword")
end
return data
end
function extractDefinitionName(parameters)
local definitionName = parameters.definition or parameters.definitionName
if not definitionName and parameters.weaponType and weaponTypeInferences[string.lower(parameters.weaponType)] then
definitionName = weaponTypeInferences[string.lower(parameters.weaponType)]
end
return definitionName
end

View file

@ -0,0 +1,15 @@
require "/scripts/versioningutils.lua"
function update(data)
executeWhere(data, "basePercentage", nil, function(statModifier)
statModifier.baseMultiplier = statModifier.basePercentage + 1.0
statModifier.basePercentage = nil
end)
executeWhere(data, "effectivePercentage", nil, function(statModifier)
statModifier.effectiveMultiplier = statModifier.effectivePercentage + 1.0
statModifier.effectivePercentage = nil
end)
return data
end

View file

@ -0,0 +1,15 @@
function update(data)
if type(data.dropPool) == "string" then
if not root.isTreasurePool(data.dropPool) then
data.dropPool = "basicMonsterTreasure"
end
elseif data.dropPool then
for key, value in pairs(data.dropPool) do
if not root.isTreasurePool(value) then
data.dropPool[key] = "basicMonsterTreasure"
end
end
end
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.itemBag = jarray()
return data
end

View file

@ -0,0 +1,6 @@
function update(data)
data.deathParticleBurst = "deathPoof"
data.dropPools = jarray()
return data
end

View file

@ -0,0 +1,27 @@
require "/scripts/versioningutils.lua"
function update(data)
if hasPath(data, {"npcVariant", "level"}) and hasPath(data, {"statusController", "persistentEffectCategories", "innate"}) then
local level = data.npcVariant.level
data.statusController.persistentEffectCategories.innate = {
{
stat = "powerMultiplier",
amount = root.evalFunction("npcLevelPowerMultiplierModifier", level)
},
{
stat = "protection",
baseMultiplier = root.evalFunction("npcLevelProtectionMultiplier", level)
},
{
stat = "maxHealth",
baseMultiplier = root.evalFunction("npcLevelHealthMultiplier", level)
},
{
stat = "maxEnergy",
baseMultiplier = root.evalFunction("npcLevelEnergyMultiplier", level)
}
}
end
return data
end

View file

@ -0,0 +1,17 @@
require "/scripts/versioningutils.lua"
function update(data)
local itemList = data.npcVariant.items
local newItems = {}
for k, v in pairs(data.npcVariant.items) do
newItems[k] = {
__id = "Item",
__version = 5,
__content = v
}
end
data.npcVariant.items = newItems
return data
end

View file

@ -0,0 +1,15 @@
require "/scripts/versioningutils.lua"
function update(data)
executeWhere(data, "basePercentage", nil, function(statModifier)
statModifier.baseMultiplier = statModifier.basePercentage + 1.0
statModifier.basePercentage = nil
end)
executeWhere(data, "effectivePercentage", nil, function(statModifier)
statModifier.effectiveMultiplier = statModifier.effectivePercentage + 1.0
statModifier.effectivePercentage = nil
end)
return data
end

View file

@ -0,0 +1,9 @@
function update(data)
for key, value in pairs(data.dropPools) do
if not root.isTreasurePool(value) then
data.dropPools[key] = "villagertreasure"
end
end
return data
end

View file

@ -0,0 +1,7 @@
function update(data)
local config = root.npcConfig(data.npcVariant.typeName)
local scriptConfig = config.scriptConfig or {}
data.aggressive = scriptConfig.aggressive or false
return data
end

View file

@ -0,0 +1,10 @@
function update(data)
if data.animatorState and data.animatorState.states.doorState then
if data.animatorState.states.doorState == "openRight" or data.animatorState.states.doorState == "openLeft" then
data.animatorState.states.doorState = "open"
elseif data.animatorState.states.doorState == "closeRight" or data.animatorState.states.doorState == "closeLeft" then
data.animatorState.states.doorState = "closed"
end
end
return data
end

View file

@ -0,0 +1,7 @@
require "/scripts/versioningutils.lua"
function update(data)
data.animatorState.transformationGroupData = jobject()
return data
end

View file

@ -0,0 +1,14 @@
require "/scripts/versioningutils.lua"
function update(data)
-- If the object looks like a container but does not have ageItemsTimer
if data.items and data.craftingProgress and not data.ageItemsTimer then
-- Then add it
data.ageItemsTimer = jobject()
data.ageItemsTimer.lastEpochTime = nil
data.ageItemsTimer.elapsedTime = 0.0
end
return data
end

View file

@ -0,0 +1,13 @@
require "/scripts/versioningutils.lua"
function update(data)
data.wireLevels = nil
data.wireState = nil
data.inboundWireNodes = jarray()
data.outboundWireNodes = jarray()
return data
end

View file

@ -0,0 +1,13 @@
require "/scripts/versioningutils.lua"
function update(data)
data.inboundWireNodes = nil
data.outboundWireNodes = nil
data.inputWireNodes = jarray()
data.outputWireNodes = jarray()
return data
end

View file

@ -0,0 +1,7 @@
require "/scripts/versioningutils.lua"
function update(data)
replacePatternInData(data, nil, ".wav", ".ogg")
return data
end

View file

@ -0,0 +1,15 @@
require "/scripts/versioningutils.lua"
function update(data)
executeWhere(data, "basePercentage", nil, function(statModifier)
statModifier.baseMultiplier = statModifier.basePercentage + 1.0
statModifier.basePercentage = nil
end)
executeWhere(data, "effectivePercentage", nil, function(statModifier)
statModifier.effectiveMultiplier = statModifier.effectivePercentage + 1.0
statModifier.effectivePercentage = nil
end)
return data
end

View file

@ -0,0 +1,81 @@
require "/scripts/util.lua"
function alreadyVersioned(v)
return v.__version or v.version
end
function updateItem(item)
if alreadyVersioned(item) then return item end
return {
id = "Item",
version = 7,
content = item
}
end
function updateQuestParameter(paramValue)
if paramValue.type == "item" then
paramValue.item = updateItem(paramValue.item)
elseif paramValue.type == "itemList" then
paramValue.items = util.map(paramValue.items, updateItem, jarray())
end
return paramValue
end
function updateQuestParameters(parameters)
for paramName, paramValue in pairs(parameters) do
parameters[paramName] = updateQuestParameter(paramValue)
end
return parameters
end
function updateQuestDescriptor(questDescriptor)
if alreadyVersioned(questDescriptor) then return questDescriptor end
questDescriptor.parameters = updateQuestParameters(questDescriptor.parameters)
return {
id = "QuestDescriptor",
version = 1,
content = questDescriptor
}
end
function updateQuestArcDescriptor(questArcDescriptor)
if alreadyVersioned(questArcDescriptor) then return questArcDescriptor end
for i,questDescriptor in pairs(questArcDescriptor.quests) do
questArcDescriptor.quests[i] = updateQuestDescriptor(questDescriptor)
end
return {
id = "QuestArcDescriptor",
version = 1,
content = questArcDescriptor
}
end
function updateQuest(quest)
if alreadyVersioned(quest) then return quest end
quest.parameters = updateQuestParameters(quest.parameters)
quest.rewards = util.map(quest.rewards, updateItem, jarray())
quest.arc = updateQuestArcDescriptor(quest.arc)
return {
id = "Quest",
version = 1,
content = quest
}
end
function update(data)
local questMaps = { "activeQuests", "ephemeralInactiveQuests", "completedQuests", "failedQuests" }
if data.quests then
for _,questMapName in pairs(questMaps) do
local questMap = data.quests[questMapName]
if questMap then
for questId, quest in pairs(questMap) do
questMap[questId] = updateQuest(quest)
end
end
end
end
return data
end

View file

@ -0,0 +1,6 @@
function update(data)
data.log.radiomessage = data.log.aimessage
data.scannedObjects = jarray()
return data
end

View file

@ -0,0 +1,13 @@
function update(data)
local newLog = {
playTime = data.playTime,
deathCount = data.log.statistic.deathCount or 0,
scannedObjects = data.scannedObjects,
radioMessages = jarray()
}
data.log = newLog
data.playTime = nil
data.scannedObjects = nil
return data
end

View file

@ -0,0 +1,7 @@
function update(data)
if data.modeType == "normal" then
data.modeType = "survival"
end
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.log.cinematics = jarray()
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.log.introComplete = true
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.companions = data.pets
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.shipUpgrades.crewSize = 2 * math.max(data.shipUpgrades.shipLevel - 2, 1)
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.inventory.reagentBag = jarray()
jresize(data.inventory.reagentBag, 40)
return data
end

View file

@ -0,0 +1,38 @@
require "/scripts/util.lua"
function addQuests(questManagerMap, quests)
for questId, quest in pairs(quests) do
questManagerMap[questId] = quest
end
end
function updateQuest(quest, state)
quest.state = state
return quest
end
function updateQuests(quests, state)
return util.map(quests, function (quest)
local quest = root.loadVersionedJson(quest, "Quest")
quest = updateQuest(quest, state)
return root.makeCurrentVersionedJson("Quest", quest)
end, jobject())
end
function update(data)
local quests = data.quests
quests.quests = jobject()
addQuests(quests.quests, updateQuests(quests.activeQuests or jarray(), "Active"))
addQuests(quests.quests, updateQuests(quests.completedQuests or jarray(), "Complete"))
addQuests(quests.quests, updateQuests(quests.failedQuests or jarray(), "Failed"))
addQuests(quests.quests, updateQuests(quests.newQuests or jarray(), "Offer"))
jremove(quests, "activeQuests")
jremove(quests, "completedQuests")
jremove(quests, "failedQuests")
jremove(quests, "newQuests")
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.inventory.foodBag = jarray()
jresize(data.inventory.foodBag, 40)
return data
end

View file

@ -0,0 +1,46 @@
function update(data)
data.techs = {
availableTechs = jarray(),
enabledTechs = jarray(),
equippedTechs = jobject()
}
newInventory = jobject()
newInventory.mainBag = data.inventory.bag
newInventory.materialBag = data.inventory.tileBag
newInventory.objectBag = data.inventory.objectBag
newInventory.reagentBag = data.inventory.reagentBag
newInventory.foodBag = data.inventory.foodBag
newInventory.swapSlot = nil
newInventory.trashSlot = nil
newInventory.money = data.inventory.money
newInventory.customBarGroup = 0
newInventory.customBar = jarray()
for i = 1, 2 do
newInventory.customBar[i] = jarray()
for j = 1, 6 do
newInventory.customBar[i][j] = jarray()
for k = 1, 2 do
newInventory.customBar[i][j][k] = nil
end
end
end
newInventory.selectedActionBar = 0
newInventory.beamAxe = data.inventory.essentialBar[1]
newInventory.wireTool = data.inventory.essentialBar[2]
newInventory.paintTool = data.inventory.essentialBar[3]
newInventory.headSlot = data.inventory.equipment[1]
newInventory.chestSlot = data.inventory.equipment[2]
newInventory.legsSlot = data.inventory.equipment[3]
newInventory.backSlot = data.inventory.equipment[4]
newInventory.headCosmeticSlot = data.inventory.equipment[5]
newInventory.chestCosmeticSlot = data.inventory.equipment[6]
newInventory.legsCosmeticSlot = data.inventory.equipment[7]
newInventory.backCosmeticSlot = data.inventory.equipment[8]
data.inventory = newInventory
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.inventory.inspectionTool = {content = {name = "scanmode", parameters = {}, count = 1}, id = "Item", version = 7}
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.codexes = jobject()
return data
end

View file

@ -0,0 +1,7 @@
function update(data)
if (not data.bookmarks) then
data.bookmarks = jarray()
end
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.bookmarks = jarray()
return data
end

View file

@ -0,0 +1,9 @@
function update(data)
data.log = {
aimessage = jobject(),
questtrigger = jobject(),
statistic = jobject()
}
return data
end

View file

@ -0,0 +1,8 @@
require "/scripts/versioningutils.lua"
function update(data)
replacePatternInData(data, nil, "UniqueWorld", "InstanceWorld")
replacePatternInData(data, nil, "MissionWorld", "InstanceWorld")
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.inventory.objectBag = jarray()
jresize(data.inventory.objectBag, 40)
return data
end

View file

@ -0,0 +1,15 @@
require "/scripts/versioningutils.lua"
function update(data)
local defaultSettings = root.assetJson("/player.config:statusControllerSettings")
transformInData(data, "statusController", function(statusStorage)
removeFromData(statusStorage, "shieldHealth")
statusStorage.statusProperties.slows = nil
for k,v in pairs(defaultSettings.statusProperties) do
statusStorage.statusProperties[k] = v
end
return statusStorage
end)
return data
end

View file

@ -0,0 +1,14 @@
function update(data)
local oldMetadata = versioning.loadVersionedJson("player/" .. data.uuid .. ".metadata")
if oldMetadata then
if not data.aiState then
data.aiState = oldMetadata.ai
end
if not data.shipUpgrades then
data.shipUpgrades = oldMetadata.shipUpgrades
end
end
return data
end

View file

@ -0,0 +1,44 @@
function update(data)
if data.quests then
for questName, quest in pairs(data.quests) do
-- remove unused and deprecated entries
quest.planet = nil
quest.triggerPrefix = nil
quest.triggersReceived = nil
-- update conditions
for i, condition in ipairs(quest.conditions) do
if condition.kind == "gather" then
condition.count = condition.item.count
condition.item = condition.item.name
elseif condition.kind == "gatherTrigger" then
condition.kind = "gather"
condition.tag, condition.trigger = condition.trigger, nil
elseif condition.kind == "trigger" then
if condition.trigger == "ai.repairthrusters" then
condition.kind = "shiplevel"
condition.level = 2
elseif condition.trigger == "ai.repairftl" then
condition.kind = "shiplevel"
condition.level = 3
else
sb.logInfo("Unknown quest trigger '%s'", condition.trigger)
end
else
sb.logInfo("Unknown quest condition kind '%s'", condition.kind)
end
condition.type, condition.kind = condition.kind, nil
end
quest.completionConditions, quest.conditions = quest.conditions, nil
-- check for weirdness
if quest.status == "pending" then
quest.status = "active"
sb.logInfo("Quest '%s' has unknown status Pending; setting to Active")
end
end
end
return data
end

View file

@ -0,0 +1,13 @@
require "/scripts/poly.lua"
function update(data)
if type(data) == "string" then return data end
for _,paramValue in pairs(data.parameters) do
if paramValue.type == "location" then
paramValue.region = poly.boundBox(paramValue.location)
paramValue.location = nil
end
end
return data
end

View file

@ -0,0 +1,14 @@
function updateQuestParameters(parameters)
local namedIndicators = root.assetJson("/quests/quests.config:indicators")
for _,paramValue in pairs(parameters) do
if paramValue.indicator and namedIndicators[paramValue.indicator] then
paramValue.indicator = namedIndicators[paramValue.indicator].image
end
end
end
function update(data)
if type(data) == "string" then return data end
updateQuestParameters(data.parameters)
return data
end

View file

@ -0,0 +1,7 @@
require "/scripts/versioningutils.lua"
function update(data)
replacePatternInData(data, nil, ".gearup", "")
return data
end

View file

@ -0,0 +1,6 @@
require "/versioning/QuestDescriptor_2_3.lua"
function update(data)
updateQuestParameters(data.parameters)
return data
end

View file

@ -0,0 +1,31 @@
function updatePlugins(plugins)
for questId, questPlugin in pairs(plugins) do
plugins[questId] = jarray()
table.insert(plugins[questId], questPlugin)
end
return plugins
end
function updatePluginStorage(pluginStorage)
for questId, pluginData in pairs(pluginStorage) do
pluginStorage[questId] = jarray()
table.insert(pluginStorage[questId], pluginData)
end
return pluginStorage
end
function updateScriptStorage(storage)
if storage.quest and storage.quest.pluginStorage then
storage.quest.pluginStorage = updatePluginStorage(storage.quest.pluginStorage)
end
return storage
end
function update(data)
if data.type == "questmanager" then
data.plugins = data.plugins and updatePlugins(data.plugins)
data.scriptStorage = data.scriptStorage and updateScriptStorage(data.scriptStorage)
end
return data
end

View file

@ -0,0 +1,21 @@
require "/scripts/versioningutils.lua"
function update(data)
local stats = data.stats or {}
data.stats = stats
local prefix = "tenants.type."
local badKeys = {}
for key, stat in pairs(stats) do
if key:sub(1, prefix:len()) == prefix then
table.insert(badKeys, key)
end
end
for _,key in pairs(badKeys) do
jremove(stats, key)
end
return data
end

View file

@ -0,0 +1,4 @@
function update(data)
data.uuid = sb.makeUuid()
return data
end

View file

@ -0,0 +1,4 @@
function update(data)
data.flags = {}
return data
end

View file

@ -0,0 +1,5 @@
function update(data)
data.time = data.clock.elapsed / 1000.0
return data
end

View file

@ -0,0 +1,7 @@
require "/scripts/versioningutils.lua"
function update(data)
executeWhere(data, "oceanLiquid", nil, function(data) data.encloseOcean = false end)
return data
end

View file

@ -0,0 +1,29 @@
require "/scripts/versioningutils.lua"
function update(data)
replaceKeyInData(data, "caveLiquidCommonalityFactor", "caveLiquidSeedDensity")
transformInData(data, "caveLiquidSeedDensity", function(density)
if type(density) == "number" and density > 0 then
return density / 4
else
return density
end
end)
replaceKeyInData(data, "encloseOcean", "encloseLiquids")
executeWhere(data, "encloseLiquids", nil, function(entry)
entry.fillMicrodungeons = false
end)
-- extra versioning for previous sky parameters change
if data.worldTemplate.skyParameters then
transformInData(data.worldTemplate.skyParameters, "scale", function(scale)
if type(scale) == "table" then
return scale[1]
end
end)
replaceKeyInData(data.worldTemplate.skyParameters, "drawables", "layers")
end
return data
end

View file

@ -0,0 +1,11 @@
require "/scripts/versioningutils.lua"
function update(data)
executeWhere(data, nil, "microDungeon", function(entry)
if type(entry[2]) == "string" then
entry[2] = {entry[2]}
end
end)
return data
end

View file

@ -0,0 +1,9 @@
require "/scripts/versioningutils.lua"
function update(data)
executeWhere(data, "layerBaseHeight", nil, function(entry)
entry.dungeonXVariance = 500
end)
return data
end

View file

@ -0,0 +1,11 @@
require "/scripts/versioningutils.lua"
function update(data)
transformInData(data, "image", function(imagePath)
local newPath = string.gsub(imagePath, "/celestial/system/terrestrial/dynamics/%d%d?", "/celestial/system/terrestrial/dynamics/temperate/" .. math.random(1,30))
newPath = string.gsub(newPath, "/celestial/system/gas_giant/gas_giant_clouds.png", "/celestial/system/gas_giant/gas_giant_clouds_0.png")
return newPath
end)
return data
end

View file

@ -0,0 +1,7 @@
require "/scripts/versioningutils.lua"
function update(data)
replaceInData(data, nil, "scifidungeon", "apexresearchlab")
return data
end

View file

@ -0,0 +1,19 @@
require "/scripts/versioningutils.lua"
function update(data)
transformInData(data, "biomes", function(biomeList)
local seed = math.random(1, 4000000000) -- just use any old seed, doesn't really matter
for _, biome in pairs(biomeList) do
seed = seed + 13 -- it's more magical when you iterate by magical numbers
if biome.baseName then
local newBiome = root.createBiome(biome.baseName, seed, 0, 1)
if newBiome then
biome.spawnProfile = newBiome.spawnProfile
end
end
end
return biomeList
end)
return data
end

View file

@ -0,0 +1,21 @@
require "/scripts/versioningutils.lua"
function update(data)
transformInData(data, "biomes", function(biomeList)
local seed = math.random(1, 4000000000) -- just use any old seed, doesn't really matter
for _, biome in pairs(biomeList) do
seed = seed + 13 -- it's more magical when you iterate by magical numbers
if biome.baseName then
local newBiome = root.createBiome(biome.baseName, seed, 0, 1)
if newBiome then
biome.surfacePlaceables = newBiome.surfacePlaceables
biome.undergroundPlaceables = newBiome.undergroundPlaceables
biome.spawnProfile = newBiome.spawnProfile
end
end
end
return biomeList
end)
return data
end

View file

@ -0,0 +1,20 @@
require "/scripts/versioningutils.lua"
function update(data)
transformInData(data, "biomes", function(biomeList)
local seed = math.random(1, 4000000000) -- just use any old seed, doesn't really matter
for _, biome in pairs(biomeList) do
seed = seed + 13 -- it's more magical when you iterate by magical numbers
if biome.baseName then
local newBiome = root.createBiome(biome.baseName, seed, 0, 1)
if newBiome then
biome.surfacePlaceables = newBiome.surfacePlaceables
biome.undergroundPlaceables = newBiome.undergroundPlaceables
end
end
end
return biomeList
end)
return data
end

View file

@ -0,0 +1,7 @@
function update(data)
if data.respawnInWorld == nil then
data.respawnInWorld = false
end
return data
end

View file

@ -0,0 +1,12 @@
require "/scripts/versioningutils.lua"
function update(data)
executeWhere(data, "playerStartSearchRegion", nil, function(innerData)
local regions = jarray()
table.insert(regions, innerData.playerStartSearchRegion)
innerData.playerStartSearchRegions = regions
innerData.playerStartSearchRegion = nil
end)
return data
end

View file

@ -0,0 +1,4 @@
function update(data)
data.spawningEnabled = true
return data
end

View file

@ -0,0 +1,19 @@
function update(data)
if not data.worldTemplate or not data.worldTemplate.regionData or not data.worldTemplate.regionData.biomes then
return data
end
local biomes = data.worldTemplate.regionData.biomes
for _, biome in ipairs(biomes) do
if biome.surfacePlaceables then
biome.surfacePlaceables.ceilingGrassMod = biome.surfacePlaceables.ceilingGrassMod or 0
biome.surfacePlaceables.ceilingGrassModDensity = biome.surfacePlaceables.ceilingGrassModDensity or 0
end
if biome.undergroundPlaceables then
biome.undergroundPlaceables.ceilingGrassMod = biome.undergroundPlaceables.ceilingGrassMod or 0
biome.undergroundPlaceables.ceilingGrassModDensity = biome.undergroundPlaceables.ceilingGrassModDensity or 0
end
end
return data
end

View file

@ -0,0 +1,59 @@
require "/scripts/versioningutils.lua"
function update(data)
-- 8 to 9
replaceInData(data, "surfaceLiquid", 4, 0)
replaceInData(data, "caveLiquid", 4, 0)
replaceInData(data, "oceanLiquid", 4, 0)
-- 9 to 10
replaceKeyInData(data, "radius", "sectorRadius")
transformInData(data, "wormSizeRange", function(oldsize) return { oldsize[1] * 2, oldsize[2] * 2 } end)
-- 10 to 12
executeWhere(data, "oceanLiquid", nil, function(entry)
entry.encloseLiquids = false
entry.fillMicrodungeons = false
end)
replaceKeyInData(data, "caveLiquidCommonalityFactor", "caveLiquidSeedDensity")
transformInData(data, "caveLiquidSeedDensity", function(density)
if type(density) == "number" and density > 0 then
return density / 4
else
return density
end
end)
-- 12 to 13
executeWhere(data, nil, "microDungeon", function(entry)
if type(entry[2]) == "string" then
entry[2] = {entry[2]}
end
end)
-- 13 to 14
executeWhere(data, "layerBaseHeight", nil, function(entry)
entry.dungeonXVariance = 500
end)
-- 14 to 15 (sky parameters stuff)
transformInData(data, "image", function(imagePath)
local newPath = string.gsub(imagePath, "/celestial/system/terrestrial/dynamics/%d%d?", "/celestial/system/terrestrial/dynamics/temperate/" .. math.random(1,30))
newPath = string.gsub(newPath, "/celestial/system/gas_giant/gas_giant_clouds.png", "/celestial/system/gas_giant/gas_giant_clouds_0.png")
return newPath
end)
if data.worldTemplate.skyParameters then
transformInData(data.worldTemplate.skyParameters, "scale", function(scale)
if type(scale) == "table" then
return scale[1]
end
end)
replaceKeyInData(data.worldTemplate.skyParameters, "drawables", "layers")
end
-- 15 to 16
replaceInData(data, nil, "scifidungeon", "apexresearchlab")
return data
end

View file

@ -0,0 +1,8 @@
require "/scripts/versioningutils.lua"
function update(data)
replaceKeyInData(data, "radius", "sectorRadius")
transformInData(data, "wormSizeRange", function(oldsize) return { oldsize[1] * 2, oldsize[2] * 2 } end)
return data
end