From c232b703411053f0b0960824158f88481165d705 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 30 Aug 2023 18:21:10 +0000 Subject: [PATCH] Update 5 files - /data/scripts/lib/inventoryitemprice.lua - /data/scripts/lib/galaxy.lua - /data/scripts/lib/turretingredients.lua - /data/scripts/lib/weapongenerator.lua - /data/scripts/lib/turretgenerator.lua --- data/scripts/lib/galaxy.lua | 8 ++--- data/scripts/lib/inventoryitemprice.lua | 8 ++--- data/scripts/lib/turretgenerator.lua | 45 +++++++++++++++--------- data/scripts/lib/turretingredients.lua | 46 +++++++++++-------------- data/scripts/lib/weapongenerator.lua | 8 ++--- 5 files changed, 62 insertions(+), 53 deletions(-) diff --git a/data/scripts/lib/galaxy.lua b/data/scripts/lib/galaxy.lua index 68fc733..819b862 100644 --- a/data/scripts/lib/galaxy.lua +++ b/data/scripts/lib/galaxy.lua @@ -1,6 +1,6 @@ weaponProbabilities[WeaponType.SmartCannon] = {d = 0.65, p = 2.0} -weaponProbabilities[WeaponType.HeavyCannon] = {d = 0.6, p = 1.0} -weaponProbabilities[WeaponType.Diffuser] = {d = 0.6, p = 1.0} -weaponProbabilities[WeaponType.Hookgun] = {d = 0.6, p = 1.0} -weaponProbabilities[WeaponType.HiveLauncher] = {d = 0.6, p = 1.0} -- TODO Подсмотреть у ванильных ракетниц \ No newline at end of file +weaponProbabilities[WeaponType.HeavyCannon] = {d = 0.65, p = 2.0} +weaponProbabilities[WeaponType.Diffuser] = {d = 0.55, p = 1.0} +weaponProbabilities[WeaponType.Hookgun] = {d = 0.55, p = 1.0} +weaponProbabilities[WeaponType.HiveLauncher] = {d = 0.6, p = 1.0} \ No newline at end of file diff --git a/data/scripts/lib/inventoryitemprice.lua b/data/scripts/lib/inventoryitemprice.lua index bcfac24..ecbe0c3 100644 --- a/data/scripts/lib/inventoryitemprice.lua +++ b/data/scripts/lib/inventoryitemprice.lua @@ -1,6 +1,6 @@ -valueWeights[WeaponType.SmartCannon ] = 2 -valueWeights[WeaponType.HeavyCannon ] = 2.5 -valueWeights[WeaponType.Diffuser ] = 1.7 +valueWeights[WeaponType.SmartCannon ] = 1.5 +valueWeights[WeaponType.HeavyCannon ] = 1.5 +valueWeights[WeaponType.Diffuser ] = 2 valueWeights[WeaponType.Hookgun ] = 1.5 -valueWeights[WeaponType.HiveLauncher] = 2 +valueWeights[WeaponType.HiveLauncher] = 1.5 diff --git a/data/scripts/lib/turretgenerator.lua b/data/scripts/lib/turretgenerator.lua index 59d7303..42b5d58 100644 --- a/data/scripts/lib/turretgenerator.lua +++ b/data/scripts/lib/turretgenerator.lua @@ -7,15 +7,15 @@ scales[WeaponType.SmartCannon] = { {from = 50, to = 52, size = 4.0, usedSlots = 5}, } -scales[WeaponType.HeavyCannon] = { -- TODO уточнить размеры +scales[WeaponType.HeavyCannon] = { {from = 0, to = 28, size = 3.0, usedSlots = 4}, {from = 29, to = 38, size = 4.0, usedSlots = 5}, {from = 39, to = 49, size = 5.0, usedSlots = 6}, --dummy for cooaxial, add 1 to size and level - {from = 50, to = 52, size = 5, usedSlots = 6}, + {from = 50, to = 52, size = 6, usedSlots = 6}, } -scales[WeaponType.Diffuser] = {-- TODO проверить возможность спавна с определенной дистанции, Уточнить размеры +scales[WeaponType.Diffuser] = { {from = 0, to = 46, size = 1.0, usedSlots = 2}, {from = 47, to = 50, size = 2.0, usedSlots = 4}, --dummy for cooaxial, add 1 to size and level @@ -42,8 +42,6 @@ if GameVersion() >= Version(0, 31, 0) then {specialty = Specialty.HighDamage, probability = 0.2}, {specialty = Specialty.HighFireRate, probability = 0.3}, {specialty = Specialty.HighRange, probability = 0.7}, - -- {specialty = Specialty.HighHullDamage, probability = 0.5}, - -- {specialty = Specialty.LessCoolingTime, probability = 0.4}, } else possibleSpecialties[WeaponType.SmartCannon] = { @@ -60,9 +58,6 @@ if GameVersion() >= Version(0, 31, 0) then {specialty = Specialty.HighDamage, probability = 0.2}, {specialty = Specialty.HighRange, probability = 0.35}, {specialty = Specialty.HighFireRate, probability = 0.3}, - -- {specialty = Specialty.HighHullDamage, probability = 0.2}, - -- {specialty = Specialty.HighShieldDamage, probability = 0.2}, - -- {specialty = Specialty.LessCoolingTime, probability = 0.2} } else possibleSpecialties[WeaponType.HeavyCannon] = { @@ -145,12 +140,16 @@ function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, ra result.slotType = TurretSlotType.Armed result:updateStaticStats() - local name = "SmartCannon /* weapon name*/"%_T + local name = "Smart-Cannon /* weapon name*/"%_T - local specType = 1 - if specType > 0 then - name = "Ionized SmartCannon /* weapon name*/"%_T + local specType = rand:getInt(0, 2) + if specType == 1 then + name = "Ionized Smart-Cannon /* weapon name*/"%_T weapon.shieldPenetration = 1 + elseif specType == 2 then + name = "Pierce Smart-Cannon /* weapon name*/"%_T + result.damageType = DamageType.Plasma + weapon.damage = weapon.damage * 0.9 end local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical) @@ -169,7 +168,7 @@ function TurretGenerator.generateHeavyCannonTurret(rand, dps, tech, material, ra -- generate turret local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps) local crew = Crew() - crew:add(requiredCrew*2, CrewMan(CrewProfessionType.Gunner)) + crew:add(requiredCrew, CrewMan(CrewProfessionType.Gunner)) crew:add(requiredCrew, CrewMan(CrewProfessionType.Repair)) result.crew = crew @@ -194,13 +193,22 @@ function TurretGenerator.generateHeavyCannonTurret(rand, dps, tech, material, ra local name = "Heavy Cannon /* weapon name*/"%_T + local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical) + local Pen = rand:getInt(0, rarity.value) if Pen > 0 then weapon.blockPenetration = Pen - name = "Cumulative Heavy Cannon /* weapon name*/"%_T + outerAdjective = "Cumulative "%_T + end + + if result.size >= 4 then + name = "Mons Meg /* weapon name*/"%_T + end + + if result.size >= 5 then + name = "Dulle Griet /* weapon name*/"%_T end - local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical) result.title = Format("%1%%2%%3%%4%%5%%6%%7% /* [outer-adjective][barrel][coax][dmg-adjective][multishot][name][serial] */"%_T, outerAdjective, barrel, coax, dmgAdjective, multishot, name, serial) return result @@ -286,6 +294,8 @@ end generatorFunction[WeaponType.Hookgun] = TurretGenerator.generateHookgunTurret + + function TurretGenerator.generateHiveLauncherTurret(rand, dps, tech, material, rarity) local result = TurretTemplate() @@ -326,7 +336,10 @@ function TurretGenerator.generateHiveLauncherTurret(rand, dps, tech, material, r result.slotType = TurretSlotType.Armed result:updateStaticStats() - local name = "HiveLauncher /* weapon name*/"%_T + local name = "Hive-Launcher /* weapon name*/"%_T + if weapon.shotsFired > 20 then + name = "Swarm-Launcher /* weapon name*/"%_T + end local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical) multishot = ""%_T diff --git a/data/scripts/lib/turretingredients.lua b/data/scripts/lib/turretingredients.lua index 40c91fa..bb57260 100644 --- a/data/scripts/lib/turretingredients.lua +++ b/data/scripts/lib/turretingredients.lua @@ -1,56 +1,52 @@ TurretIngredients[WeaponType.SmartCannon] = { - {name = "Servo", amount = 15, investable = 10, minimum = 5, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, + {name = "Servo", amount = 15, investable = 10, minimum = 5, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, {name = "Warhead", amount = 5, investable = 6, minimum = 1, weaponStat = "damage", }, {name = "High Pressure Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "reach", }, - {name = "Ammunition M", amount = 2, investable = 4, minimum = 1, weaponStat = "damage", investFactor = 0.5,}, - {name = "Targeting Card", amount = 3, investable = 3, minimum = 0, weaponStat = "seeker", investFactor = 1, changeType = StatChanges.Flat}, + {name = "Ammunition M", amount = 2, investable = 4, minimum = 1, weaponStat = "damage", investFactor = 0.5,}, + {name = "Targeting Card", amount = 3, investable = 3, minimum = 0, weaponStat = "seeker", investFactor = 1, changeType = StatChanges.Flat}, {name = "Steel", amount = 8, investable = 10, minimum = 3,}, {name = "Steel Tube", amount = 5, investable = 10, minimum = 3,}, - -- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat}, } TurretIngredients[WeaponType.HeavyCannon] = { - {name = "Servo", amount = 8, investable = 8, minimum = 4, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, + {name = "Servo", amount = 8, investable = 8, minimum = 4, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, {name = "Warhead", amount = 5, investable = 6, minimum = 1, weaponStat = "damage", }, {name = "High Pressure Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "reach", }, - {name = "Ammunition", amount = 5, investable = 10, minimum = 3, weaponStat = "damage", investFactor = 0.2,}, + {name = "Ammunition", amount = 5, investable = 10, minimum = 3, weaponStat = "damage", investFactor = 0.2,}, {name = "Steel", amount = 20, investable = 10, minimum = 20,}, {name = "Metal Plate", amount = 8, investable = 10, minimum = 10,}, - -- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat}, } TurretIngredients[WeaponType.Diffuser] = { - {name = "Plasma Cell", amount = 10, investable = 10, minimum = 10, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, + {name = "Plasma Cell", amount = 10, investable = 10, minimum = 10, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, {name = "High Capacity Lens", amount = 5, investable = 6, minimum = 1, weaponStat = "reach", }, {name = "Energy Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "damage", }, - {name = "Steel", amount = 20, investable = 0, minimum = 20,}, - {name = "Copper", amount = 10, investable = 0, minimum = 10,}, - {name = "Silver", amount = 5, investable = 0, minimum = 5,}, - -- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat}, + {name = "Steel", amount = 20, investable = 0, minimum = 20,}, + {name = "Copper", amount = 10, investable = 0, minimum = 10,}, + {name = "Silver", amount = 5, investable = 0, minimum = 5,}, } -TurretIngredients[WeaponType.Hookgun] = +TurretIngredients[WeaponType.Hookgun] = -- TODO Подумать над составляющими { - {name = "Plasma Cell", amount = 10, investable = 10, minimum = 10, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, + {name = "Plasma Cell", amount = 10, investable = 10, minimum = 10, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, {name = "High Capacity Lens", amount = 5, investable = 6, minimum = 1, weaponStat = "reach", }, {name = "Energy Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "damage", }, - {name = "Steel", amount = 20, investable = 0, minimum = 20,}, - {name = "Copper", amount = 10, investable = 0, minimum = 10,}, - {name = "Silver", amount = 5, investable = 0, minimum = 5,}, - -- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat}, + {name = "Steel", amount = 20, investable = 0, minimum = 20,}, + {name = "Copper", amount = 10, investable = 0, minimum = 10,}, + {name = "Silver", amount = 5, investable = 0, minimum = 5,}, } TurretIngredients[WeaponType.HiveLauncher] = { - {name = "Plasma Cell", amount = 10, investable = 10, minimum = 10, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, - {name = "High Capacity Lens", amount = 5, investable = 6, minimum = 1, weaponStat = "reach", }, - {name = "Energy Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "damage", }, - {name = "Steel", amount = 20, investable = 0, minimum = 20,}, - {name = "Copper", amount = 10, investable = 0, minimum = 10,}, - {name = "Silver", amount = 5, investable = 0, minimum = 5,}, - -- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat}, + {name = "Servo", amount = 15, investable = 10, minimum = 5, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, + {name = "Rocket", amount = 15, investable = 10, minimum = 15, weaponStat = "damage", investFactor = 0.2, changeType = StatChanges.Percentage}, + {name = "High Pressure Tube", amount = 6, investable = 12, minimum = 1, weaponStat = "reach", investFactor = 0.4, changeType = StatChanges.Percentage}, + {name = "Fuel", amount = 6, investable = 12, minimum = 1, weaponStat = "reach", investFactor = 0.5, changeType = StatChanges.Percentage}, + {name = "Targeting Card", amount = 10, investable = 10, minimum = 0, weaponStat = "seeker", investFactor = 1, changeType = StatChanges.Flat}, + {name = "Steel", amount = 8, investable = 10, minimum = 3,}, + {name = "Wire", amount = 5, investable = 10, minimum = 3,}, } diff --git a/data/scripts/lib/weapongenerator.lua b/data/scripts/lib/weapongenerator.lua index 427edff..668d5b8 100644 --- a/data/scripts/lib/weapongenerator.lua +++ b/data/scripts/lib/weapongenerator.lua @@ -15,8 +15,8 @@ function WeaponGenerator.generateSmartCannon(rand, dps, tech, material, rarity) weapon.appearanceSeed = rand:getInt() weapon.seeker = 1 weapon.appearance = WeaponAppearance.Cannon - weapon.name = "SmartCannon /* Weapon Name*/"%_t - weapon.prefix = "SmartCannon /* Weapon Prefix*/"%_t + weapon.name = "Smart-Cannon /* Weapon Name*/"%_t + weapon.prefix = "Smart-Cannon /* Weapon Prefix*/"%_t weapon.icon = "data/textures/icons/smartcannon.png" weapon.sound = "cannon" weapon.accuracy = 0.99 - rand:getFloat(0, 0.03) @@ -212,8 +212,8 @@ function WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity) weapon.appearanceSeed = rand:getInt() weapon.seeker = true weapon.appearance = WeaponAppearance.RocketLauncher - weapon.name = "HiveLauncher /* Weapon Name*/"%_t - weapon.prefix = "HiveLauncher /* Weapon Prefix*/"%_t + weapon.name = "Hive-Launcher /* Weapon Name*/"%_t + weapon.prefix = "Hive-Launcher /* Weapon Prefix*/"%_t weapon.icon = "data/textures/icons/hivelauncher.png" weapon.sound = "cannon" weapon.accuracy = 0.5 - rand:getFloat(0, 0.02)