diff --git a/_metadata b/_metadata index 68d9a69d..f4614d35 100644 --- a/_metadata +++ b/_metadata @@ -7,5 +7,5 @@ "name": "XRC_BETA_STARBOUND", "steamContentId": "2010607826", "tags": "Crafting and Building|Miscellaneous|Planets and Environments|Musical Instruments and Songs|NPCs and Creatures|Weapons|Quests|Dungeons|Ships|User Interface|Furniture and Objects|Character Improvements|Food and Farming|In-Game Tools|Mechanics|Vehicles and Mounts|Armor and Clothes", - "version": "0.12" + "version": "0.12b" } diff --git a/items/buildscripts/starbound/buildabilitymod.lua b/items/buildscripts/starbound/buildabilitymod.lua index 4064ff99..3230a9e7 100644 --- a/items/buildscripts/starbound/buildabilitymod.lua +++ b/items/buildscripts/starbound/buildabilitymod.lua @@ -29,7 +29,7 @@ function build(directory, config, parameters) end config.acceptedElements = acceptedElements end - config.shortdescription = string.gsub((config.rarity ~= "common" and "^yellow;" or "")..(not config.weaponTypes and "^green;" or "")..abilityData.name.."^reset;", "", config.elementalNameDescription) + config.shortdescription = string.gsub((config.rarity ~= "common" and "^yellow;" or "")..abilityData.name.."^reset;", "", config.elementalNameDescription) config.description = string.format(config.description, config[(config.slot and "primary" or "alt").."Description"]) config.tooltipFields = parameters.tooltipFields or config.tooltipFields or {} diff --git a/npcs/merchant.npctype.patch b/npcs/merchant.npctype.patch new file mode 100644 index 00000000..4d5db922 --- /dev/null +++ b/npcs/merchant.npctype.patch @@ -0,0 +1,4 @@ +[ +[{"op":"test","path":"/scripts/0","value":"/npcs/bmain.lua"}, +{"op":"add","path":"/scripts/-","value":"/npcs/sb_outpostcivilian.lua"}] +] \ No newline at end of file diff --git a/npcs/sb_outpostcivilian.lua b/npcs/sb_outpostcivilian.lua index 881832d9..fb5b1204 100644 --- a/npcs/sb_outpostcivilian.lua +++ b/npcs/sb_outpostcivilian.lua @@ -7,6 +7,12 @@ function init() ini() local quests = {config.getParameter("sb_offeredQuests"),config.getParameter("sb_turnInQuests")} if quests[1] then npc.setOfferedQuests(sb_mergeQuests(quests[1],config.getParameter("offeredQuests",{}))) end if quests[2] then npc.setTurnInQuests(sb_mergeQuests(quests[2],config.getParameter("turnInQuests",{}))) end --though it'd be cool to just use [1] if [2] is a number, that'd screw over people trying to add quests since it wouldn't add ours + + sb_beamIn = config.getParameter("sb_beamIn") and not status.statusProperty("sb_beamedIn") + if sb_beamIn then + status.setStatusProperty("sb_beamedIn", 1) + status.addEphemeralEffect("beamin") + end end function update(...) updat(...) diff --git a/objects/spawner/spawners/sb_spawner.lua b/objects/spawner/spawners/sb_spawner.lua index 086f2aa1..c101ef3e 100644 --- a/objects/spawner/spawners/sb_spawner.lua +++ b/objects/spawner/spawners/sb_spawner.lua @@ -1,14 +1,30 @@ local ini = init or function() end -local onInteractio = onInteraction or function() end +local sb_onInteraction = onInteraction or function() end function init() ini() script.setUpdateDelta(0) object.setInteractive(true) - smas = object.smash - toAbsolutePositio = object.toAbsolutePosition - object.smash = function() smas(true) end - object.toAbsolutePosition = function(z) return toAbsolutePositio{z[1],z[2]+1} end + sb_scriptConfig = config.getParameter("spawner.sb_scriptConfig") + + sb_smash = object.smash + object.smash = function() sb_smash(true) end + + sb_toAbsolutePosition = object.toAbsolutePosition + object.toAbsolutePosition = function(z) return sb_toAbsolutePosition{z[1],z[2]+1} end + world.isVisibleToPlayer = function() return false end + + sb_spawnNpc = world.spawnNpc + world.spawnNpc = function(position, species, npcType, level, seed, parameters) + if parameters and sb_scriptConfig then + parameters.scriptConfig = sb.jsonMerge(sb_scriptConfig, parameters.scriptConfig) + end + parameters.scriptConfig.sb_beamIn = true + return sb_spawnNpc(position, species, npcType, level, seed, parameters) + end end -function onInteraction(args) onInteractio(args) update() end \ No newline at end of file +function onInteraction(args) + sb_onInteraction(args) + update() +end \ No newline at end of file diff --git a/sb_abilitymods.config b/sb_abilitymods.config index f9658503..bf29a26c 100644 --- a/sb_abilitymods.config +++ b/sb_abilitymods.config @@ -1,25 +1,4 @@ -/* -836238594 - club - greataxe - greatsword - greatmace - quarterstaff - spellbook -1632807184 - katana - -1967748482 - stolte_smg - stolte_pulserifle - stolte_machinegun - stolte_leveractionrifle - stolte_handcannon - grenadeLauncher - stolte_autoshotgun - stolte_bullpup -*/ { "weaponNames": { "assaultrifle": "A. Rifle", @@ -31,223 +10,172 @@ "abilities": { //Melee "bladecharge": { - "weaponTypes": ["broadsword", "longsword", "club", "greatsword"], "weaponName": "sword" }, "downstab": { - "weaponTypes": ["broadsword", "longsword", "katana", "club", "greatsword"], "weaponName": "sword" }, "parry": { - "weaponTypes": ["broadsword", "longsword", "club", "greatsword"], "weaponName": "sword" }, "risingslash": { - "weaponTypes": ["broadsword", "longsword", "club", "greatsword"], "weaponName": "sword" }, "spinslash": { - "weaponTypes": ["broadsword", "longsword", "katana", "club", "greatsword"], "weaponName": "sword" }, "superspinslash": { "icon": "spinslash.png", - "weaponTypes": ["broadsword", "longsword", "katana", "club", "greatsword"], "weaponName": "sword" }, "giantsword": { - "weaponTypes": ["broadsword", "longsword", "katana", "club", "greatsword"], "weaponName": "sword" }, "travelingslash": { - "weaponTypes": ["broadsword", "longsword", "katana", "club", "greatsword"], "weaponName": "sword" }, "blinkexplosion": { - "weaponTypes": ["broadsword", "hammer", "spear", "longsword", "quarterstaff", "greataxe", "club", "greatsword", "greatmace"], "weaponName": "melee" }, "blinkslash": { - "weaponTypes": ["broadsword", "longsword", "club", "greatsword"], "weaponName": "sword" }, "traildash": { - "weaponTypes": ["broadsword", "longsword", "club", "greatsword"], "weaponName": "sword" }, "uppercut": { - "weaponTypes": ["hammer", "quarterstaff", "greataxe", "greatmace"], "weaponName": "hammer" }, "physicalshockwave": { - "weaponTypes": ["hammer", "quarterstaff", "greataxe", "greatmace"], "acceptedElements": ["physical"], //this ability only works on physical weapons "weaponName": "hammer" }, "shockwave": { - "weaponTypes": ["hammer", "quarterstaff", "greataxe", "greatmace"], "weaponName": "hammer" }, "groundslam": { - "weaponTypes": ["hammer", "quarterstaff", "greataxe", "greatmace"], "weaponName": "hammer" }, "elementalaura": { - "weaponTypes": ["hammer", "quarterstaff", "greataxe", "greatmace"], "weaponName": "hammer" }, "elementalpillar": { - "weaponTypes": ["hammer", "quarterstaff", "greataxe", "greatmace"], "weaponName": "hammer" }, "flurry": { - "weaponTypes": ["spear", "quarterstaff"], "weaponName": "spear" }, "spearspin": { - "weaponTypes": ["spear", "quarterstaff"], "weaponName": "spear" }, "elementalspin": { - "weaponTypes": ["spear", "quarterstaff"], "weaponName": "spear" }, "barrier": { - "weaponTypes": ["spear", "quarterstaff"], "weaponName": "spear" }, "rocketspear": { - "weaponTypes": ["spear", "quarterstaff"], "weaponName": "spear" }, //Guns "explosiveshot": { - "weaponTypes": ["assaultrifle", "battlerifle", "sniperrifle", "stolte_smg", "stolte_pulserifle", "stolte_machinegun", "stolte_leveractionrifle", "stolte_bullpup"], "weaponName": "rifle" }, "bouncingshot": { - "weaponTypes": ["assaultrifle", "battlerifle", "sniperrifle", "stolte_smg", "stolte_leveractionrifle", "stolte_handcannon", "stolte_autoshotgun", "stolte_bullpup"], "weaponName": "rifle" }, "flashlight": { - "weaponTypes": ["assaultrifle", "shotgun", "sniperrifle", "battlerifle", "stolte_smg", "stolte_pulserifle", "stolte_handcannon", "stolte_bullpup"], "weaponName": "firearm" }, "grenadelauncher": { - "weaponTypes": ["assaultrifle", "shotgun", "sniperrifle", "battlerifle", "stolte_pulserifle", "stolte_autoshotgun", "stolte_bullpup"], "weaponName": "firearm" }, "spray": { - "weaponTypes": ["assaultrifle", "battlerifle", "stolte_smg", "stolte_pulserifle", "stolte_bullpup"], "icon": "sb_spring.png", "weaponName": "assaultrifle" }, "sb_physicallance": { - "weaponTypes": ["assaultrifle", "battlerifle", "stolte_pulserifle", "stolte_machinegun", "stolte_leveractionrifle", "stolte_handcannon", "stolte_autoshotgun", "stolte_bullpup"], "acceptedElements": ["physical"], //this ability only works on physical weapons "weaponName": "assaultrifle" }, "lance": { - "weaponTypes": ["assaultrifle", "battlerifle", "stolte_pulserifle", "stolte_machinegun", "stolte_leveractionrifle", "stolte_handcannon", "stolte_autoshotgun", "stolte_bullpup"], "weaponName": "assaultrifle" }, "explosiveburst": { - "weaponTypes": ["assaultrifle", "stolte_pulserifle", "stolte_machinegun", "stolte_handcannon", "grenadeLauncher", "stolte_autoshotgun", "stolte_bullpup"], "weaponName": "assaultrifle" }, "homingrocket": { - "weaponTypes": ["rocketlauncher"], "icon": "/items/active/weapons/ranged/abilities/markedshot/targetoverlay.png", "weaponName": "rocketlauncher" }, "guidedrocket": { - "weaponTypes": ["rocketlauncher"], "weaponName": "rocketlauncher" }, "rocketburst": { - "weaponTypes": ["rocketlauncher"], "weaponName": "rocketlauncher" }, "shrapnelbomb": { - "weaponTypes": ["shotgun", "grenadeLauncher"], "weaponName": "shotgun" }, "burstshot": { - "weaponTypes": ["shotgun", "stolte_pulserifle", "stolte_handcannon", "stolte_autoshotgun"], "weaponName": "shotgun" }, "stickyshot": { - "weaponTypes": ["shotgun", "grenadeLauncher"], "weaponName": "shotgun" }, "piercingshot": { - "weaponTypes": ["sniperrifle", "stolte_pulserifle", "stolte_machinegun", "stolte_leveractionrifle", "stolte_handcannon", "stolte_bullpup"], "weaponName": "sniperrifle" }, "markedshot": { - "weaponTypes": ["sniperrifle", "stolte_leveractionrifle"], "icon": "/items/active/weapons/ranged/abilities/markedshot/targetoverlay.png", "weaponName": "sniperrifle" }, "deathbomb": { - "weaponTypes": ["sniperrifle"], "weaponName": "sniperrifle" }, //staves "elementbouncer": { - "weaponTypes": ["staff", "wand", "spellbook"], "slot": "primary", "weaponName": "wand" }, "elementorb": { - "weaponTypes": ["staff", "wand", "spellbook"], "slot": "primary", "weaponName": "wand" }, "elementportal": { - "weaponTypes": ["staff", "wand", "spellbook"], "slot": "primary", "weaponName": "wand" }, "elementrain": { - "weaponTypes": ["staff", "wand", "spellbook"], "slot": "primary", "icon": "/interface/cockpit/weather/rain.png", "weaponName": "wand" }, "elementswarm": { - "weaponTypes": ["staff", "wand", "spellbook"], "slot": "primary", "weaponName": "wand" }, "energyzone": { - "weaponTypes": ["staff", "spellbook"], "weaponName": "staff" }, "forcecage": { - "weaponTypes": ["staff", "spellbook"], "weaponName": "staff" }, "healingzone": { - "weaponTypes": ["staff", "spellbook"], "weaponName": "staff" }, "lowgravzone": { - "weaponTypes": ["staff", "spellbook"], "weaponName": "staff" }, "pullzone": { - "weaponTypes": ["staff", "spellbook"], "weaponName": "staff" }, "pushzone": { - "weaponTypes": ["staff", "spellbook"], "weaponName": "staff" }, "slowzone": { - "weaponTypes": ["staff", "spellbook"], "weaponName": "staff" } } diff --git a/scripts/augments/sb_ability.lua b/scripts/augments/sb_ability.lua index 2f1025cc..928c9f3b 100644 --- a/scripts/augments/sb_ability.lua +++ b/scripts/augments/sb_ability.lua @@ -7,18 +7,23 @@ function apply(input) or string.find(output:instanceValue("tooltipKind", "base"), "sup") --Supper's Combat Overhaul weapons tend to just eat the ability items. Possibly for the same reason as the Thorny Needler...? then return output:descriptor(), 0 end local slot = config.getParameter("slot", "alt").."AbilityType" - local newAbility = config.getParameter("ability", "0") local currentAbility = output:instanceValue(slot, "1") - local valid = false - local category = string.gsub(output:instanceValue("category",""):lower(), " ", "") + newAbility = config.getParameter("ability", "0") + valid = false - local weaponTypes = config.getParameter("weaponTypes", {category}) - for i = 1, #weaponTypes do - --if string.find(name, weaponTypes[i]) or category == weaponTypes[i] then - if string.find(category, weaponTypes[i]) then - valid = true + local rarities = {"common", "uncommon", "rare", "legendary", "essential"} + local itemName = output:instanceValue("itemName") + for i = 1, #rarities do + if itemName:find(rarities[i]) then + currentRarity = i + end + end + + for i = 1, currentRarity and #rarities or 1 do + if valid then break end + checkPossibleAbilities(currentRarity and itemName:gsub(rarities[currentRarity], rarities[i]) or itemName) end local acceptedElements = config.getParameter("acceptedElements") @@ -41,4 +46,22 @@ function apply(input) -- end return output:descriptor(), 1 end +end + +function checkPossibleAbilities(itemName) + local builderConfig = root.itemConfig(itemName) + builderConfig = builderConfig and builderConfig.config.builderConfig or nil + if builderConfig then + for i = 1, #builderConfig do + local possibleAbilities = builderConfig[i].altAbilities + if possibleAbilities then + for j = 1, #possibleAbilities do + if possibleAbilities[j] == newAbility then + valid = true + break + end + end + end + end + end end \ No newline at end of file diff --git a/xrc/deployment/versioning/0018z.lua b/xrc/deployment/versioning/0018z.lua index 09154f21..5e2c2e07 100644 --- a/xrc/deployment/versioning/0018z.lua +++ b/xrc/deployment/versioning/0018z.lua @@ -1,10 +1,11 @@ local ini = init or function() end function init() ini() - local currentVersion = 29 + local currentVersion = 30 if player.introComplete() then if status.statusProperty("xrc_0018z") == nil then status.setStatusProperty("xrc_0018z",0) end local yv = status.statusProperty("xrc_0018z") if yv < currentVersion then + sb.logInfo(string.format("[Betabound] Updating this character from %s to %s!", yv, currentVersion)) require("/xrc/deployment/versioning/0018z_2.lua") status.setStatusProperty("xrc_0018z",currentVersion) xrc0018z_2(currentVersion,yv) diff --git a/xrc/deployment/versioning/0018z_2.lua b/xrc/deployment/versioning/0018z_2.lua index f851b6d5..547374e5 100644 --- a/xrc/deployment/versioning/0018z_2.lua +++ b/xrc/deployment/versioning/0018z_2.lua @@ -13,12 +13,8 @@ local function updateNote(a) end xrc0018[1]=function() local b = root.assetJson("/betabound.config:defaultItems") for i = 1, #b do player.giveItem(b[i]) end end -xrc0018[2]=function() end -xrc0018[3]=function() end xrc0018[4]=function() quest("sb_kelpquest.gearup","refinery") end xrc0018[5]=function() quest("sb_kelpquest.gearup","sb_techconsole") end -xrc0018[6]=function() end -xrc0018[7]=function() end xrc0018[8]=function() local a = status.statusProperty("sb_bioimplants") local b = root.assetJson("/items/buildscripts/starbound/tech.config") @@ -41,9 +37,6 @@ xrc0018[8]=function() end --xrc0018[9]=function() if status.statusProperty("xrc_0018z",0) >= 5 then player.giveItem(root.assetJson("/xrc/deployment/versioning/0018z-9.json")) end end xrc0018[9]=function() if not player.hasCompletedQuest("destroyruin") then player.startQuest("sb_destroyruin") end end -xrc0018[10]=function() end -xrc0018[11]=function() end -xrc0018[12]=function() end xrc0018[13]=function() if player.blueprintKnown("sb_frostshield") then player.giveItem("sb_frostshield-recipe") player.addCurrency("money",5000) end end xrc0018[14]=function() status.clearPersistentEffects("sb_entity") @@ -53,7 +46,6 @@ xrc0018[14]=function() if type(player.getProperty(p[2])) ~= "string" then player.setProperty(p[2],nil) end end xrc0018[15]=function() quest("destroyruin","sb_beamaxe2") end -xrc0018[16]=function() end xrc0018[17]=function() player.setProperty("sb_availableBioimplants",{}) if player.getProperty("sb_bioimplant","") == "sb_noprotection" then player.setProperty("sb_bioimplant") end end xrc0018[18]=function() local a, b, e, f = player.getProperty("sb_bioimplants"), root.assetJson("/items/buildscripts/starbound/tech.config"), {}, player.getProperty("sb_availableBioimplants") @@ -209,13 +201,17 @@ xrc0018[28]=function() player.giveItem({"sb_musicsheet",1,{music="impact-event"}}) end end -xrc0018[29]=function() - if not player.getProperty("sb_bioimplants") then +xrc0018[30]=function() + if type(player.getProperty("sb_bioimplants")) ~= "table" then player.setProperty("sb_bioimplants", {}) end end function xrc0018z_2(cv,yv) newPlayer = yv == 0 - for i = yv, cv-1 do xrc0018[i+1]() end + for i = yv, cv-1 do + if xrc0018[i+1] then + xrc0018[i+1]() + end + end end \ No newline at end of file