Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BAR-Neb/60b5051685891de93e0d697038ecae94 to your computer and use it in GitHub Desktop.
Save BAR-Neb/60b5051685891de93e0d697038ecae94 to your computer and use it in GitHub Desktop.
Project doc for the next balance pack by Neb, Encyclopedia, and [BONELESS]

Unified Tech Overhaul (Formerly Unofficial Tech Overhaul)


We need to hear about your experience with the current meta and play styles in small-teams and 1v1 matches. Come join the discussion (linked below) even if you don't plan to join the tests.

This project will be lead and maintained by contributors with the goal of supporting a stable patch designed with 1v1/small team's community feedback. After the rework stage (v1.0+), releases will move to weekly patches that focus on competitive balance. This project is unofficial and is not endorsed by the Balance Team nor the Game Design Team.

In the short-term, we want to shake things up and keep things interesting. We saw a handful of strategies lock down the competition during the Season 2 open. Match after match looked eerily, monotonously familiar. The official updates to restore variety succeeded but, as these things go, limited themselves to the smallest changes possible. We want to open up the field of play much further and move forward with a Season 3+ mindset.

This patch's gameplay aims to feel more fluid, natural, dynamic, and most of all, creative.

Goals

We want to enact these changes in the game:

  1. Base security. Players need time to react to small scout leaks and should be able to use counter-raiding units, not only scouts, to do so. Leaking a single scout past a frontline should not destroy a large chunk of mexes (against alert opponents). Base security should be enough that is possible to transition out of scouts and light raiders even under constant raiding pressure.

  2. Expansion security. Players need to guard constructors making non-risky expansions easily. Punishing a risky expansion should require at least skillful micro of a scout or sending a combat unit (against alert opponents).

  3. T1 endurance. Basic economies should be able to scale into T1 spam and to support the most expensive T1 units. Hard-scaling a T1 economy should provide enough resources to produce units from a T2 lab.

  4. T+0.5 units. Players should be able to rush expensive units or economies as a niche strategy and use them to reasonable effect that way. These units should embody the principles of their faction, grounding excesses of design and cost in terms of faction identity.

  5. Unit identity. Near-identical units should not exist. Design convergence is fine when it is more irrational to fight it than not. Identical units with small stat differences must be justified by the faction's identity.

  6. Commander sniping. Sniping the commander must be a risky play showing skill expression or better knowledge of game state or the meta. It must not be the meta itself. Instant commander snipes should be avoided.

  7. Unit compositions. Units should work well in groups and have flexible strategies that work together. Single-unit armies are actually very fun and feel good to control, but we want to make a smarter game than that.

  8. Enhanced teching. - Higher tech levels (advanced, experimental) should support and augment existing T1 compositions, rather than replace them. Progression through phases of the game is less black and white. Instead, compositions will evolve over the course of a game to incorporate higher tech units, but lower tech units will stay relevant in a more significant role than light spam. In general, T1 is faster, T2 provides more utility, support and macro, and T3 is deadly beyond all reason.

  9. More variety in shorter games. - we do not believe that it should take 1000 hours of experience and enduring a 45 minute 1v1/small teams game in order to play with the most interesting units in this gamemode. A wide variety of interesting units should be available at all times. Further more, experimental tech should be acheivable within 20 - 25 minutes for a solo player.

Patch Features

Changes should fit into relatively few, neat groups. Our stated goals produce roughly these changes:

  1. Commanders. Reduced cloak cost, as there is increased pressure on the commanders in t1. The armada commander gets a burst laser with equal DPS to default

  2. Economy health. Increase the health of metal extractors, wind generators, and solar generators. Scouts destroy these units more slowly, so the defending player can hope to catch up with counter-raiding combat units.

  3. Counter-raid units. Banshee gains accuracy to hunt scouts more effectively. Pounders gain move speed to be minimally viable in a cross-role that can maneuver to prevent larger-scale leaks in the first place.

  4. Leveled up units. Rework Centurion, Janus, Lasher, and Thugs into Tier 1.5 units. Chainsaw Eradicator, and Lupara are Tier 1.5 defenses. All Tier 1.5 units are more effective, more expensive (paid at a premium), out-class rather than out-range, and feel strong against T1 and decent against T2. Most T1.5 gain EMP resistance.

  5. Cortex bots. Buff Grunts into a soft counter to Pawns (Armada gains new counters). Rework Bedbugs to occupy the missing unit slot in the Cortex T1 Bot Lab. Bedbugs are slow land scouts with good detection to push into enemy territory or be expended on a desperate defense.

  6. Unique weapons. Armada red and green lasers replaced with blue burst lasers. the Mace to a Gauss weapon, and the Lasher and Aggravator to an RPG-like missile (low start speed, high acceleration, short fuel time, very inaccurate with dance/wobble but with greater damage and AoE).

  7. Lab cost reductions. All labs reduced in cost and increased in buildpower (2.5x for T1, 5x for T2 and T3) Advanced labs are reduced in metal cost significantly to support solo teching, but buildtime is doubled in order to delay their production. Experimental labs are also reduced in cost. This is an unofficial adaptation of Johannes' lab cost rework. Players will now have to expand buildpower more in T1 in order to afford the doubled buildpower of an advanced lab, but doing so will not be as big of a detriment to the player's army value.

  8. T2 changes. Spybot buildtime reduced. Gunslinger and commando cost slightly decreased. Bull and tiger speed nerfed. Tremor converted to direct fire weapon.

Change Summary (OUT OF DATE)

The actual changes in the tweakunits/tweakdefs are listed here.

The reasoning above isn't likely to change often or by much, whereas this section is highly responsive to your feedback. As we refine each change, the changes-to-the-changes will be announced in the discussion channel.

  • Commanders: -30% cloak cost.

  • Construction turrets: +40 metalcost
  • Metal extractors: Double health.
  • Overcharged metal extractor: Metal cost 250 -> 200.
  • Wind generators: +10% health.
  • Advanced Solar generators: Metal cost and energy cost slightly more than 1/5th of fusion, energy produced +75 -> +160 (adjusted for legion)
  • T1 bot constructors: +12% health.

  • Phobos: -33% to costs and health
  • Karkinos: +25% speed
  • Pawn: +8% speed. -15% health.
  • Blitz: +8% speed. -15% health.
  • Banshee: -40% spray angle, +10% weapon velocity. +8% speed.
  • Pounder: -20% to costs, +15% movespeed. Range 315 -> 300. -20% health.
  • Light AA towers: Allow g2g targetting (-90% damage of g2a).
  • Chainsaw and Eradicator: Allow g2g targetting (-90% damage of g2a).

  • Centurion: move speed 45 -> 61, Range 350 -> 280. 33% EMP resist, 30 damage per shot.
  • Janus: +50% to costs, -10% range, +16% health, +15% speed, -20% reload time, +33% emp resist
  • Lasher: +100% to costs. +30% health, burst = 3, burst time = 0.1, reload time 4, +100% damage, increased AoE, less accuracy. 33% EMP resist. Damage per shot 82.
  • Aggravator: +50% to costs.
  • Thug: +60% to costs. health 1100 -> 1450, speed 45 -> 55, +6% turn rate, range 380 -> 330. burst = 2, burst time = 0.2, +25% reload time. +30% emp resist.
  • Twilight: remove cloak. Energy cost 1500 -> 6000. Produces +80 E/s. -25% health. Explodes as a regular economy building explosion but can be self-destructed for EMP.
  • Exploiter: +25% hp. +25% to costs. metal extraction x1.3. -12 E/s.

  • Grunt: -15% to costs. -20% health.
  • Bedbug: -50% to costs. Additional -2000 E, -2000 BP cost. 700 radar range. Can self D for explosive damage, does not explode on death.

  • Centurion: Heavy EMG loadout
  • Mace: Gauss loadout.-50% reload time, +50% impulse factor, -50% damage.
  • Lasher and Aggravator: RPG-like rocket loadout. Rocket starts slow and accelerates to high speed. triple burst.

  • T1 lab costs reduced
  • -1000 metal, +2000 energy, +5000 buildtime.
  • -2000 metal to all T3 gantries
  • All t2 buildtime x1.5, T3 x2
  • Lab buildower: t1 x2.5, t2 x5, t3 x7
  • Lab buildpower efficiency increased significantly across all labs.

(CURRENT) Tweakdefs Base64 String

bG9jYWwgYSxiLGMsZDtsb2NhbCBlPXsyLDQsNSw4LDEyLDIwLDUwLDEyNSwyNTB9bG9jYWwgZixnPTIwLDMwO2xvY2FsIGZ1bmN0aW9uIGgoaSwuLi4pZm9yIGosayBpbiBpcGFpcnMoey4uLn0pZG8gaVtrXT1kW2tdZW5kIGVuZDtsb2NhbCBmdW5jdGlvbiBsKG0sbilpZiBuIHRoZW4gbT1tL24gZWxzZSBuPTEgZW5kO2lmIG08PTMwIHRoZW4gcmV0dXJuIG1hdGguZmxvb3IobSswLjUpKm4gZW5kO2xvY2FsIG89e31mb3IgaixwIGluIGlwYWlycyhlKWRvIG9bcF09bWF0aC5mbG9vcihtL3ArMC41KSpwIGVuZDtsb2NhbCBxPW9bZVsxXV1sb2NhbCByPXEtbTtyPXIqci9lWzFdZm9yIHM9MiwjZSBkbyBsb2NhbCB0PWVbc11sb2NhbCB1PW9bdF0tbTt1PXUqdS9lW3NdaWYgcj51IHRoZW4gcT1vW3Rdcj11IGVuZCBlbmQ7cmV0dXJuIHEqbiBlbmQ7bG9jYWwgZnVuY3Rpb24gdih3LHgseSx6KWlmIG5vdCB4IHRoZW4geD0wIGVuZDtpZiBub3QgeSB0aGVuIHk9eCooYS5tZXRhbGNvc3QgYW5kIGEubWV0YWxjb3N0PjAgYW5kIGEuZW5lcmd5Y29zdC9hLm1ldGFsY29zdCBvci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hiLnJhbmdlLVEpKjAuOS9iLndlYXBvbnZlbG9jaXR5O2IuZGFuY2U9NjtiLndvYmJsZT02MDA7Yi5zbW9rZXNpemU9Mi4yO0koYikub3ZlcnJhbmdlX2Rpc3RhbmNlPWIucmFuZ2U7Yy5wbGFjZV90YXJnZXRfb25fZ3JvdW5kPXRydWU7Yy5wcm9qZWN0aWxlX2Rlc3RydWN0aW9uX21ldGhvZD0iZGVzY2VuZCJlbmQK

(CURRENT) Tweakdefs code

----UTOv0_9
local unitDef, weaponDef, cparams, ref
local divisors = { 2, 4, 5, 8, 12, 20, 50, 125, 250 }
local m2e, m2b = 20, 30

local function copy(def, ...)
	for _, property in ipairs({ ... }) do
		def[property] = ref[property]
	end
end

local function neat(value, precision)
	if precision then
		value = value / precision
	else
		precision = 1
	end
	if value <= 30 then
		return math.floor(value + 0.5) * precision
	end
	local values = {}
	for _, v in ipairs(divisors) do
		values[v] = math.floor(value / v + 0.5) * v
	end
	local neatest = values[divisors[1]]
	local fitness = neatest - value
	fitness = fitness * fitness / divisors[1]
	for i = 2, #divisors do
		local divisor = divisors[i]
		local fitness2 = values[divisor] - value
		fitness2 = fitness2 * fitness2 / divisors[i]
		if fitness > fitness2 then
			neatest = values[divisor]
			fitness = fitness2
		end
	end
	return neatest * precision
end

local function costs(mult, base_m, base_e, base_b)
	if not base_m then base_m = 0 end
	if not base_e then
		base_e = base_m * (unitDef.metalcost and unitDef.metalcost > 0 and unitDef.energycost / unitDef.metalcost or m2e)
	end
	if not base_b then
		base_b = base_m * (unitDef.metalcost and unitDef.metalcost > 0 and unitDef.buildtime / unitDef.metalcost or m2b)
	end
	local metal = neat(unitDef.metalcost * mult + base_m, 10)
	local ratio = metal / unitDef.metalcost
	unitDef.metalcost = metal
	unitDef.energycost = neat(unitDef.energycost * mult + base_e, 10)
	unitDef.buildtime = neat(unitDef.buildtime * mult + base_b, 10)
	for name, def in pairs(unitDef.featuredefs or {}) do
		def.metal = math.floor(ratio * def.metal + 0.5)
	end
end

local function damages(mult, base)
	if not base then base = 0 end
	for armor, value in pairs(weaponDef.damage) do
		weaponDef.damage[armor] = neat(value * mult + base)
	end
end

local function unit(name)
	unitDef = UnitDefs[name]
	return unitDef
end

local function weapon(name)
	weaponDef = unitDef.weapondefs[name]
	return weaponDef
end

local function custom(def)
	cparams = def.customparams or {}
	def.customparams = cparams
	return cparams
end

--------------------------------------------------------------------------------
-- Commanders ------------------------------------------------------------------

-- More dangerous Tech 1 units often will force Commanders onto the defensive.
-- Ideally all commanders would have Legion's AA and torpedo weapons, as well.

for _, name in ipairs { "armcom", "corcom", "legcom" } do
	unit(name)
	unitDef.airsightdistance = neat(unitDef.sightdistance * 1.5)
	unitDef.cloakcost = neat(unitDef.cloakcost * 0.7)
	unitDef.cloakcostmoving = neat(unitDef.cloakcostmoving * 0.7)
end

--------------------------------------------------------------------------------
-- Tech level changes ----------------------------------------------------------

-- There are two types of changes, so it is just easier to summarize them first.

local techUp = {
	"armwar", "armjanus", "armroy", "armcir", "armamex",
	"corthud", "cormist", "corroy", "corerad", "corexp",
}

for name, def in pairs(UnitDefs) do
	if custom(def).techlevel == 1.5 then
		techUp[#techUp + 1] = name
	end
end

for _, name in ipairs(techUp) do
	custom(unit(name)).techlevel = 1.5
	cparams.paralyzemultiplier = 0.7
end

custom(unit("corroach")).techlevel = 1

--------------------------------------------------------------------------------
-- Basic economy ---------------------------------------------------------------

-- Scout leaks are not high-APM gameplay but high-attention gameplay.
-- We want you to act strategically early on until you are warmed up.

for name, def in ipairs(UnitDefs) do
	if (custom(def).techlevel or 1) < 1.5 then
		if def.extractsmetal and def.extractsmetal > 0 then
			def.health = neat(unit(name).health * 2, 25)
		elseif def.windgenerator and def.windgenerator > 0 then
			def.health = neat(unit(name).health * 1.1, 25)
		elseif cparams.solar and (def.energyupkeep and def.energyupkeep < -50) or (def.energymake and def.energymake > 50) then
			def.health = neat(unit(name).health * 1.125, 25)
			def.energystorage = neat((def.energystorage or 0) * 1.125)
		elseif next(def.buildoptions) and string.find(def.movementclass or "", "BOT") then
			def.health = neat(unit(name).health * 1.12, 25)
		end
	end
end

unit("armmex")
unitDef.health = 400

unit("cormex")
unitDef.health = 400

unit("legmex")
unitDef.health = 400

--------------------------------------------------------------------------------
-- Raiding and counter-raiding -------------------------------------------------

-- Sturdier economy buildings allow you to chase down leaks using combat units.
-- More combat units being built, in general, acts as its own scout deterrence.

unit("armpw")
costs(1, 0, 0, 132)
unitDef.speed = neat(unitDef.speed * 1.08)
unitDef.health = 323

unit("armflash")
unitDef.speed = neat(unitDef.speed * 1.08)
unitDef.health = 638

unit("armkam")
weapon("emg")
weaponDef.sprayangle = neat(weaponDef.sprayangle * 0.6)
weaponDef.weaponvelocity = neat(weaponDef.weaponvelocity * 1.1)
weaponDef.firetolerance = 3600

unit("corlevlr")
costs(0.8)
unitDef.health = neat(unitDef.health * 0.8, 25)
unitDef.speed = neat(unitDef.speed * 1.25)
weapon("corlevlr_weapon")
weaponDef.range = neat(weaponDef.range * 0.95)

unit("legcen")
costs(0.66)
unitDef.health = neat(unitDef.health * 0.66, 25)

unit("legkark")
unitDef.speed = neat(unitDef.speed * 1.10)

-- This gives ground-to-ground capabilities to AA weapons (though pitifully weak).
-- The true intent is to add a short-range point defense as a swapped weapon load.

-- Air units are the best raiders in the game and often its best counter-raiders.
-- With more ground AA, air, especially air scouts, can be balanced for survival.

--------------------------------------------------------------------------------
-- Factory costs test patch ----------------------------------------------------

-- 1. Expensive build power except through factories, which are more efficient.
-- 2. Factories become prohibitively expensive the higher you progress in tech.

for _, name in ipairs { "armmoho", "cormoho", "cormexp", "legmoho", "legmoho", "legmohobp", "legmohocon" } do
	unit(name)
	costs(1, 100, 2000, 900)
end
for name, def in pairs(UnitDefs) do
	if custom(def).techlevel == 2 then
		def.buildtime = neat(unit(name).buildtime * 1.5)
	elseif cparams.techlevel == 3 then
		def.buildtime = neat(unit(name).buildtime * 2)
	end
end
for _, name in ipairs { "armageo", "corageo", "legageo" } do
	unit(name)
	costs(1, 100, 4000, 0)
end

for _, faction in ipairs { "arm", "cor", "leg" } do
	for _, factory in ipairs { "lab", "vp", "ap", "sy" } do
		if unit(faction .. factory) then
			costs(0.5, 300, 900, 4000)
			unitDef.workertime = neat(unitDef.workertime * 2.5, 50)
		end
	end
	for _, factory in ipairs { "plat", "amsub", "amphlab" } do
		if unit(faction .. factory) then
			unitDef.workertime = neat(unitDef.workertime * 3 + 100, 50)
		end
	end
	for _, factory in ipairs { "alab", "avp", "aap", "asy" } do
		if unit(faction .. factory) then
			costs(1, -1000, 2000, 5000)
			unitDef.workertime = neat(unitDef.workertime * 5)
		end
	end
	for _, factory in ipairs { "gant", "gantuw", "shltx", "shltxuw" } do
		if unit(faction .. factory) then
			costs(1.5, -3000, 0, 0)
			unitDef.workertime = neat(unitDef.workertime * 7.5, 500)
		end
	end

	-- NB: Construction turrets can't be too expensive or cons replace them.
	for _, turret in ipairs { "nanotc", "nanotcplat" } do
		if unit(faction .. turret) then
			costs(1, 50, 500, 1000)
			-- We need ways to justify the expense, then:
			unitDef.metalstorage = 50
			unitDef.energystorage = 50
			if faction == "cor" then
				unitDef.health = neat(unitDef.health * 1.125, 25)
			end
		end
	end
end

--------------------------------------------------------------------------------
-- Tech 1.5 --------------------------------------------------------------------

-- T1.5 is not a reified game mechanic but a classification schema for units.
-- They are more expensive, more powerful, and have better resistance to EMP.

for name, wname in pairs { armcir = "arm_cir", corerad = "cor_erad", legrhapsis = "burst_aa_missile" } do
	unit(name)
	unitDef.weapons[1].fastautoretargeting = true
	unitDef.weapons[1].onlytargetcategory = "NOTSUB"
	weapon(wname)
	weaponDef.damage.default = neat(0.1 * weaponDef.damage.vtol)
end


unit("legadvsol")
unitDef.health = 1300
unitDef.energycost = 5000
unitDef.metalcost = 1180
unitDef.energymake = 215
unitDef.buildtime = 30000

unit("armadvsol")
unitDef.buildtime = 22800
unitDef.health = 1130
unitDef.energycost = 5950
unitDef.metalcost = 860
unitDef.energymake = 160

unit("coradvsol")
unitDef.health = 1200
unitDef.buildtime = 24000
unitDef.energycost = 4760
unitDef.metalcost = 910
unitDef.energymake = 175

unit("armwar")
costs(1.2, 0, 0, 300)
unitDef.speed = 61
weapon("armwar_laser")
weaponDef.range = 280
damages(2)

unit("armjanus")
costs(1.5, 0, 500, 0)
unitDef.health = neat(unitDef.health * 1.1667, 25)
unitDef.speed = neat(unitDef.speed * 1.15)
weapon("janus_rocket")
weaponDef.reloadtime = weaponDef.reloadtime * 0.8
weaponDef.range = neat(weaponDef.range * 0.9, 1)


unit("armamex")
unitDef.buildtime = 3600
unitDef.energycost = 3000
unitDef.energyupkeep = 0
unitDef.cancloak = false
unitDef.health = neat(unitDef.health * 1.25, 25)
unitDef.explodeas = "mediumBuildingExplosionGeneric"
unitDef.energymake = 80

unit("corthud")
costs(1.6)
unitDef.health = 1450
unitDef.speed = neat(unitDef.speed * 1.222)
unitDef.turnrate = 1200
unitDef.turninplacespeedlimit = 1.8
unitDef.sightdistance = 420
weapon("arm_ham")
weaponDef.areaofeffect = neat(weaponDef.areaofeffect * 1.1667)
weaponDef.burst = 2
weaponDef.burstrate = 0.2
weaponDef.reloadtime = weaponDef.reloadtime * 1.25
weaponDef.range = 340

unit("cormist")
costs(2)
unitDef.health = neat(unitDef.health * 1.3333, 25)
for _, wname in ipairs { "cortruck_aa", "cortruck_missile" } do
	weapon(wname)
	weaponDef.areaofeffect = UnitDefs.corstorm.weapondefs.cor_bot_rocket.areaofeffect + 2
	weaponDef.edgeeffectiveness = 0.8
	weaponDef.burst = 3
	weaponDef.burstrate = 0.375
	weaponDef.reloadtime = 4
end

unit("corexp")
costs(1.2)
unitDef.health = neat(unitDef.health * 1.15, 25)
unitDef.idleautoheal = 10
unitDef.sightdistance = neat(unitDef.sightdistance * 1.5)
unitDef.extractsmetal = 0.0013
weaponDef = unitDef.weapondefs.hllt_bottom
weaponDef.range = neat(weaponDef.range + 50)
damages(1.125)

unit("legmext15")
unitDef.metalcost = 220

--------------------------------------------------------------------------------
-- Cortex bots -----------------------------------------------------------------

unit("corak")
costs(0.85)
unitDef.health = neat(unitDef.health * 0.8, 25)
weaponDef = unitDef.weapondefs.gator_laser

unit("corroach")
costs(0.5, 0, -2000, -2000)
unitDef.maxwaterdepth = 16
unitDef.movementclass = "BOT1"
unitDef.radardistance = UnitDefs.armflea.sightdistance + 100
unitDef.radaremitheight = 18
unitDef.speed = neat(unitDef.speed * 1.3333)
unitDef.explodeas = "mediumExplosionGenericSelfd"
unitDef.selfdestructas = "fb_blastsml"
unitDef.customparams.techlevel = nil
for name, def in ipairs(UnitDefs) do
	if def.builder and type(def.buildoptions) == "table" then
		for i, bo in pairs(def.buildoptions) do
			if bo == "corroach" then
				unit(name)
				table.remove(def.buildoptions, i)
			end
		end
	end
end
unit("corlab")
unitDef.buildoptions[#unitDef.buildoptions + 1] = "corroach"

unit("corstorm")
weapon("cor_bot_rocket")
weaponDef.burst = 3
weaponDef.burstrate = 0.05
damages(0.30)
costs(1.5, 0, 0, 0)

--------------------------------------------------------------------------------
-- Spybots -----------------------------------------------------------------

unit("armspy")
unitDef.buildtime = 12800

unit("corspy")
unitDef.buildtime = 12800

--------------------------------------------------------------------------------
-- T2 Bots -----------------------------------------------------------------

unit("armmav")
unitDef.energycost = 9000

unit("cormando")
unitDef.metalcost = 1000

--------------------------------------------------------------------------------
-- T2 Vehicles -----------------------------------------------------------------

unit("cortrem")
unitDef.energycost = 25000
unitDef.metalcost = 1800
unitDef.buildtime = 31100
weapon("tremor_spread_fire")
weaponDef.accuracy = 1200
weaponDef.range = 1275
weaponDef.mygravity = 0.267
weaponDef.proximitypriority = 1
weaponDef.weaponvelocity = 600
weaponDef.hightrajectory = 0
custom(weaponDef).speceffect = "sector_fire"
custom(weaponDef).when = "always"
custom(weaponDef).max_range_reduction = "0.01"
custom(weaponDef).spread_angle = "1"

unit("armbull")
unitDef.speed = 58

unit("correap")
unitDef.speed = 64

--------------------------------------------------------------------------------
-- Weapon conversions ----------------------------------------------------------

-- These are total conversions that otherwise preserve the stats of the weapon.
-- Overall stat changes (eg total burst size) should be done in other sections.

-- Red laser -> bursty blue laser
for name, wname in pairs { 
    armwar = "armwar_laser",
    armhlt = "arm_laserh1",
    armamph = "armamph_weapon1",
    armllt = "arm_lightlaser",
    armcom = "armcomlaser" } do 
    unit(name)
    weapon(wname).name = "Light g2g Burst Laser"
    copy(weaponDef, "reloadtime")
    weapondef.reloadtime = weaponDef.reloadtime * 1.5
    weaponDef.thickness = 3
    weaponDef.beamburst = true
    weaponDef.beamtime = 0.04
    weaponDef.burst = 3
    weaponDef.burstrate = 0.175
    weaponDef.rgbcolor = "0.2 0.1 1.0"
    weaponDef.soundstart = "lasrlit3"
    weaponDef.soundtrigger = false
    damages(0.5)
end

unit("armhlt")
weapon("arm_laserh1")
weaponDef.name = "Heavy g2g Burst Laser"
weaponDef.thickness = 4
weaponDef.energypershot = 25

unit("armllt")
weapon("arm_lightlaser")
weaponDef.energypershot = 10

unit("armraz")
weapon("mech_rapidlaser")
weaponDef.name = "Rapid-fire g2g Burst Laser"
beamtime = 0.05
explosiongenerator = "custom:laserhit-medium-blue"
rgbcolor = "0.2 0.1 1.0"
rgbcolor2 = "0.6 0.6 0.9"

-- Gauss
ref = UnitDefs.armmav.weapondefs.armmav_weapon
for name, wname in pairs { armham = "arm_ham" } do
	unit(name)
	weapon(wname).name = "Gauss Plasma Cannon"
	copy(weaponDef, 'impulsefactor', 'weaponvelocity')
	weaponDef.reloadtime = neat(weaponDef.reloadtime / 2, 0.01)
	damages(0.5)
end

-- LSFR
for name, wname in pairs { cormist = "cortruck_missile", corstorm = "cor_bot_rocket" } do
	unit(name)
	weapon(wname).name = "Light Solid-Fuel Rocket"
	weaponDef.model = "legsmallrocket.s3o"
	weaponDef.burnblow = false
	weaponDef.mygravity = 0
	weaponDef.tracks = false
	weaponDef.trajectoryheight = 0.25
	weaponDef.turnrate = 8000
	weaponDef.startvelocity = unitDef.speed + 1
	weaponDef.weaponvelocity = neat(weaponDef.weaponvelocity * 1.5)
	weaponDef.weaponacceleration = weaponDef.weaponvelocity - weaponDef.startvelocity
	local accelTime = (weaponDef.weaponvelocity - weaponDef.startvelocity) / weaponDef.weaponacceleration
	local accelDistance = math.min(weaponDef.range,
		accelTime * (weaponDef.startvelocity + weaponDef.weaponvelocity) * 0.5)
	weaponDef.flighttime = accelTime + (weaponDef.range - accelDistance) * 0.9 / weaponDef.weaponvelocity
	weaponDef.dance = 6
	weaponDef.wobble = 600
	weaponDef.smokesize = 2.2
	custom(weaponDef).overrange_distance = weaponDef.range
	cparams.place_target_on_ground = true
	cparams.projectile_destruction_method = "descend"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment