Back to List
Maintained by SmokeDragon
Last updated 4 months ago
Created 5 months ago
download JSON metadata of explode_cost
explode cost
PLAY THIS MOD
Maintained by SmokeDragon
Last updated 4 months ago
Created 5 months ago
download JSON metadata of explode_cost
major breakthrough.. this is the tech i needed and will lead to the compleation of shield health, explode cost, train factory, and countless new mods soon to come
[Spoiler]
[Spoiler]
local invalidunitnames = { ["Slicer"] = true, } local weapondefstoadd = { metalboom = { areaOfEffect = 384, craterBoost = 1, craterMult = 3.5, edgeEffectiveness = 0.4, explosionGenerator = "custom:ROACHPLOSION", explosionSpeed = 10000, impulseBoost = 0, impulseFactor = 0.3, name = "Explosion", scarIndices = Shared.SCAR_SET.MEDIUM_AOE, soundHit = "explosion/mini_nuke", damage = { default = 1200.8, }, customParams = { burst = Shared.BURST_UNRELIABLE, }, }, } local function mergeweapondefs(weapondefs1, weapondefs2) local mergeddefs = {} for k, v in pairs(weapondefs1) do mergeddefs[k] = v end for k, v in pairs(weapondefs2) do if not mergeddefs[k] then mergeddefs[k] = v end end return mergeddefs end for name, ud in pairs(UnitDefs) do if not invalidunitnames[ud.name] then if ud.metalcost > 0 then Spring.Echo("Processing unit: " .. name) Spring.Echo("Updating unit: " .. ud.name) Spring.Echo("Existing weapondefs:") if ud.weapondefs then for k, v in pairs(ud.weapondefs) do Spring.Echo("- " .. k) end else Spring.Echo("- None") end Spring.Echo("metalcost".. ud.metalcost) local areaofeffectbuff = math.floor(ud.metalcost * 1) weapondefstoadd.metalboom.areaofeffect = areaofeffectbuff local damagebuff = math.floor(ud.metalcost * 0.5) weapondefstoadd.metalboom.damage.default = damagebuff ud.weapondefs = mergeweapondefs(ud.weapondefs or {}, weapondefstoadd) Spring.Echo("Updated weapondefs:") if ud.weapondefs then for k, v in pairs(ud.weapondefs) do Spring.Echo("- " .. k) end else Spring.Echo("- None") end ud.explodeas = "metalboom" ud.selfdestructas = "metalboom" Spring.Echo("explodeas for unit " .. ud.name .. ": " .. ud.explodeas) Spring.Echo("selfdestructas for unit " .. ud.name .. ": " .. ud.selfdestructas) Spring.Echo("damage".. ud.weapondefs.metalboom.damage.default) Spring.Echo("aoe".. ud.weapondefs.metalboom.areaofeffect) end end end
Zero-K is a free real time strategy (RTS), that aims to be the
best open source multi-platform strategy game available :-)