file structure: [Spoiler]
Steam\steamapps\common\Zero-K\games\greed_2.sdz\modinfo.lua
Steam\steamapps\common\Zero-K\games\greed_2.sdz\gamedata\UnitDefs_post.lua
modinfo: [Spoiler]
return {
name = 'greed version 2',
description = 'Tech up with: Constructor -> Athena -> Funnelweb -> Strider Hub.',
shortname = 'greed_2',
version = 'v2.0.0',
mutator = '1',
game = '',
shortGame = '',
modtype = 1,
depend = {
[[rapid://zk:stable]]
},
modoptions = {
equalcom = "off",
energymult = 20,
innateenergy = 5,
terracostmult = 2,
innatemetal = 5,
noelo = 1,
shield_merge = "partial_penetrate",
},
}
UnitDefs_post.lua: [Spoiler]unit tweaks: [Spoiler]
local tweaks = {
staticantinuke = {
metalCost = 6000,
},
cloakbomb = {
speed = 189,
},
turretimpulse = {
health = 3000,
},
turretheavy = {
health = 20000,
},
subtacmissile = {
metalCost = 125,
customParams = {
stockpilecost = [[0]],
},
},
shipcarrier = {
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 60,
customParams = {
stockpilecost = [[0]],
pad_bp = 400,
},
weaponDefs = {
DISARM_ROCKET = {
damage = {
default = 30000,
},
},
},
},
dronefighter = {
health = 800,
idleAutoHeal = 200,
idleTime = 0,
weaponDefs = {
LASER = {
damage = {
default = 330,
},
},
},
},
dronecarry = {
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 60,
},
nebula = {
canManualFire = true,
health = 10000,
metalCost = 25000,
weapons = {
{
def = [[OBLITERATION_BLASTER]],
badTargetCategory = [[FIXEDWING, GUNSHIP]],
onlyTargetCategory = [[SWIM LAND SINK TURRET FLOAT SHIP HOVER FIXEDWING GUNSHIP]],
},
},
weaponDefs = {
OBLITERATION_BLASTER = {
name = [[Obliteration Blaster]],
areaOfEffect = 800,
avoidFeature = false,
avoidFriendly = true,
avoidGround = false,
avoidNeutral = false,
burst = 16,
burstRate = 0.1 + 1/10,
coreThickness = 2.5,
craterBoost = 12,
craterMult = 28,
commandFire = true,
customParams = {
light_radius = 380,
light_color = [[0.5 0.95 0]],
gatherradius = [[192]],
smoothradius = [[128]],
smoothmult = [[0.7]],
smoothexponent = [[0.8]],
smoothheightoffset = [[22]],
},
damage = {
default = 2400.1,
},
duration = 0.05,
edgeEffectiveness = 0.5,
explosionGenerator = [[custom:slam]],
fallOffRate = 0.1,
fireStarter = 10,
impulseFactor = 0,
interceptedByShieldType = 1,
lodDistance = 10000,
range = 3000,
reloadtime = 10,
rgbColor = [[0.6 0 1]],
rgbColor2 = [[0.5 0.1 0.2]],
sprayAngle = 400,
soundHit = [[explosion/mini_nuke]],
soundStart = [[PulseLaser]],
soundTrigger = false,
sweepfire = false,
texture1 = [[largelaser_long]],
texture2 = [[flare]],
texture3 = [[largelaser_long]],
texture4 = [[largelaser_long]],
thickness = 12,
tolerance = 1000,
turret = true,
weaponType = [[LaserCannon]],
weaponVelocity = 3000,
},
CANNON = {
damage = {
default = 400,
},
range = 2000,
},
SHIELD = {
shieldPower = 36000,
shieldPowerRegen = 1000,
shieldRadius = 450,
},
},
},
tacnuke = {
weaponDefs = {
WEAPON = {
areaOfEffect = 768,
customParams = {
light_radius = 1600,
},
},
},
},
napalmmissile = {
weaponDefs = {
WEAPON = {
areaOfEffect = 3048,
customParams = {
area_damage_radius = 2024,
},
},
},
},
missileslow = {
weaponDefs = {
WEAPON = {
customParams = {
light_radius = 3200,
area_damage_radius = 2280,
gui_aoe = 2280,
},
},
},
},
empmissile = {
weaponDefs = {
EMP_WEAPON = {
areaOfEffect = 560,
interceptedByShieldType = 1,
customParams = {
light_radius = 1800,
},
},
},
},
seismic = {
weaponDefs = {
SEISMIC_WEAPON = {
areaOfEffect = 2560,
customParams = {
gatherradius = [[1664]],
smoothradius = [[1280]],
detachmentradius = [[1280]],
},
},
},
},
turretriot = {
heat_per_shot = 0.01,
},
striderarty = {
health = 6280,
autoheal = 60,
canManualFire = true,
explodeAs = [[SLOW_DEATH]],
selfDestructAs = [[SLOW_DEATH]],
weapons = {
{
def = [[ROCKET]],
badTargetCategory = [[GUNSHIP]],
onlyTargetCategory = [[SWIM LAND SINK TURRET FLOAT SHIP HOVER GUNSHIP]],
},
{
def = [[Vortex]],
badTargetCategory = [[GUNSHIP]],
onlyTargetCategory = [[SWIM LAND SINK SUB TURRET FLOAT SHIP HOVER GUNSHIP]],
},
},
weaponDefs = {
SLOW_DEATH = {
areaOfEffect = 2000,
craterBoost = 1,
craterMult = 3.5,
customParams = {
lups_explodespeed = 1.04,
lups_explodelife = 0.88,
timeslow_damagefactor = 400,
timeslow_overslow_frames = 2*30,
nofriendlyfire = 1,
light_color = [[1.88 0.63 2.5]],
light_radius = 320,
},
damage = {
default = 1200.1,
},
edgeEffectiveness = 1,
explosionGenerator = "custom:riotballplus2_purple_limpet",
explosionSpeed = 10,
impulseBoost = 0,
impulseFactor = 0.3,
name = "Slowing Explosion",
soundHit = [[weapon/aoe_aura2]],
soundHitVolume = 4,
},
ROCKET = {
damage = {
default = 440,
planes = 440,
},
},
Vortex = {
size = 200,
name = [[EMP Warp Vortex]],
areaOfEffect = 240,
accuracy = 400,
avoidFeature = false,
avoidFriendly = false,
burst = 2,
burstrate = 0.1 + 1/30,
commandFire = true,
craterBoost = 0,
craterMult = 0,
customParams = {
combatrange = 2800,
light_color = [[0.5 4 0.5]],
light_radius = 120,
reaim_time = 1,
},
damage = {
default = 80000,
},
edgeEffectiveness = 0.5,
explosionGenerator = [[custom:YELLOW_LIGHTNINGPLOSION]],
fireStarter = 100,
flightTime = 8000,
impulseBoost = 0,
impulseFactor = 0,
interceptedByShieldType = 3,
cegTag = [[tachyon_96]],
stages = 1,
texture1 = [[sonic_glow2]],
texture2 = [[null]],
texture3 = [[null]],
noSelfDamage = true,
paralyzer = true,
paralyzeTime = 20,
range = 2800,
reloadtime = 10,
smokeTrail = false,
soundHit = [[weapon/missile/vlaunch_emp_hit]],
soundStart = [[weapon/missile/missile_launch_high]],
soundStartVolume = 14,
startVelocity = 80,
tracks = false,
trajectoryHeight = 1,
tolerance = 10,
turnRate = 8000,
turret = true,
weaponAcceleration = 120,
weaponType = [[MissileLauncher]],
weaponVelocity = 120,
wobble = 15000,
},
},
},
striderscorpion = {
explodeAs = [[cloakbomb_DEATH]],
selfDestructAs = [[cloakbomb_DEATH]],
health = 28000,
autoheal = 180,
weaponDefs = {
cloakbomb_DEATH = {
areaOfEffect = 800,
craterBoost = 0,
craterMult = 0,
edgeEffectiveness = 0.5,
explosionGenerator = "custom:cloakbomb_EXPLOSION",
explosionSpeed = 10,
impulseBoost = 0,
impulseFactor = 0,
name = "EMP Explosion",
paralyzer = true,
paralyzeTime = 8,
soundHit = "weapon/more_lightning",
damage = {
default = 100000,
},
customParams = {
burst = Shared.BURST_UNRELIABLE,
},
},
MULTILIGHTNING = {
reloadtime = 10,
},
},
},
striderdetriment = {
health = 172000,
autoheal = 160,
customParams = {
jump_reload = 20,
},
weaponDefs = {
OBLITERATION_BLASTER = {
reloadtime = 10,
areaOfEffect=424,
},
},
},
striderbantha = {
health = 64000,
autoheal = 80,
weaponDefs = {
EMP_MISSILE = {
reloadtime = 10,
},
},
},
striderantiheavy = {
explodeAs = [[SINGULARITY]],
selfDestructAs = [[SINGULARITY]],
health = 2000,
autoheal = 400,
canManualFire = true,
customParams = {
bait_level_default = 0,
canjump = 1,
jump_range = 400,
jump_speed = 6,
jump_reload = 4,
jump_from_midair = 0,
},
weapons = {
{
def = [[GREEN_STAMPER]],
onlyTargetCategory = [[SWIM LAND SINK TURRET FLOAT SHIP HOVER GUNSHIP]],
},
{
def = [[DISINTEGRATOR]],
badTargetCategory = [[FIXEDWING GUNSHIP]],
onlyTargetCategory = [[FIXEDWING LAND SINK TURRET SHIP SUB SWIM FLOAT GUNSHIP HOVER]],
},
},
weaponDefs = {
SINGULARITY = {
areaOfEffect = 800,
craterMult = 1,
edgeEffectiveness = 0,
explosionGenerator = "custom:black_hole_long",
explosionSpeed = 100000,
impulseBoost = 100,
impulseFactor = -10,
name = "Naked Singularity",
soundHit = "weapon/blackhole_impact",
damage = {
default = 1000,
},
},
DISINTEGRATOR = {
range = 350,
reloadtime = 1,
damage = {
default = 4000.1,
},
},
GREEN_STAMPER = {
commandfire = true,
name = [[Disarm FLatten]],
accuracy = 600,
areaOfEffect = 800,
avoidFeature = false,
avoidGround = false,
craterBoost = 32,
craterMult = 1,
customParams = {
nofriendlyfire = 1,
disarmDamageMult = 1,
disarmDamageOnly = 1,
disarmTimer = 6,
gatherradius = [[800]],
smoothradius = [[800]],
smoothmult = [[0.9]],
smoothexponent = [[0.8]],
movestructures = [[1]],
reaim_time = 1,
},
damage = {
default = 40000,
},
explosionGenerator = [[custom:blobber_goo]],
impulseBoost = 0.7,
impulseFactor = 0.5,
interceptedByShieldType = 8,
myGravity = 0.1,
range = 400,
rgbColor = [[0.1 1 0.1]],
reloadtime = 10,
size = 15,
sizeDecay = 0.03,
soundHit = [[explosion/ex_large4]],
soundStart = [[weapon/cannon/big_begrtha_gun_fire]],
stages = 30,
turret = true,
weaponType = [[Cannon]],
weaponVelocity = 1100,
},
},
},
turretaaclose = {
buildingGroundDecalType = "",
canCloak = 1,
cloakCost = 0,
initCloaked = true,
minCloakDistance = 80,
weaponDefs = {
MISSILE = {
customParams = {
setunitsonfire = "1",
burnchance = "1",
burntime = 2000,
},
damage = {
default = 160.1,
planes = 1600.1,
},
},
},
},
turretaalaser = {
weaponDefs = {
AAGUN = {
customParams = {
timeslow_damagefactor = 1,
timeslow_overslow_frames = 2*30,
},
},
},
},
shieldshield = {
weaponDefs = {
COR_SHIELD_SMALL = {
name = [[Energy Shield]],
damage = {
default = 10,
},
customParams = {
unlinked = true,
},
exteriorShield = true,
shieldAlpha = 0.0001,
shieldBadColor = [[0.02 0.01 0.01 0.02]],
shieldGoodColor = [[0.01 0.01 0.02 0.02]],
shieldInterceptType = 3,
shieldPower = 10000,
shieldPowerRegen = 50,
shieldPowerRegenEnergy = 0,
shieldRadius = 800,
shieldRepulser = false,
shieldStartingPower = 0,
smartShield = true,
visibleShield = false,
visibleShieldRepulse = false,
weaponType = [[Shield]],
},
},
},
staticshield = {
weaponDefs = {
COR_SHIELD_SMALL = {
name = [[Energy Shield]],
damage = {
default = 10,
},
customParams = {
unlinked = true,
},
exteriorShield = true,
shieldAlpha = 0.0001,
shieldBadColor = [[0.02 0.01 0.01 0.02]],
shieldGoodColor = [[0.01 0.01 0.02 0.02]],
shieldInterceptType = 3,
shieldPower = 10000,
shieldPowerRegen = 50,
shieldPowerRegenEnergy = 0,
shieldRadius = 800,
shieldRepulser = false,
shieldStartingPower = 0,
smartShield = true,
visibleShield = false,
visibleShieldRepulse = false,
weaponType = [[Shield]],
},
},
},
turretaaheavy = {
customParams = {
stockpilecost = [[0]],
priority_misc = 0,
},
weaponDefs = {
ADVSAM = {
stockpileTime = 5000,
areaOfEffect = 480,
flightTime = 12,
range = 3000,
customParams = {
nofriendlyfire = 1,
damage_vs_shield = [[4000]],
},
},
},
},
turretantiheavy = {
health = 12000,
weapons = {
{
def = [[ATA]],
badTargetCategory = [[FIXEDWING GUNSHIP]],
onlyTargetCategory = [[SWIM LAND SHIP SINK TURRET FLOAT GUNSHIP FIXEDWING HOVER]],
},
{
def = [[spy]],
badTargetCategory = [[FIXEDWING GUNSHIP]],
onlyTargetCategory = [[SWIM LAND SHIP SINK TURRET FLOAT GUNSHIP FIXEDWING HOVER]],
},
},
weaponDefs = {
spy = {
name = [[Electro-Stunner]],
areaOfEffect = 8,
collideFriendly = false,
craterBoost = 0,
craterMult = 0,
customParams = {
burst = Shared.BURST_RELIABLE,
light_color = [[1.85 1.85 0.45]],
light_radius = 300,
},
damage = {
default = 20000,
},
duration = 8,
explosionGenerator = [[custom:YELLOW_LIGHTNINGPLOSION]],
fireStarter = 0,
heightMod = 10,
impactOnly = true,
impulseBoost = 0,
impulseFactor = 0,
intensity = 12,
interceptedByShieldType = 3,
paralyzer = true,
paralyzeTime = 30,
range = 1200,
reloadtime = 10,
rgbColor = [[1 1 0.25]],
soundStart = [[weapon/LightningBolt]],
soundTrigger = true,
targetborder = 0.9,
texture1 = [[lightning]],
thickness = 10,
tolerance = 10000,
turret = true,
weaponType = [[LightningCannon]],
weaponVelocity = 450,
},
},
},
turretaafar = {
weaponDefs = {
MISSILE = {
reloadtime = 0.2,
},
},
},
staticheavyarty = {
metalCost = 1250,
weaponDefs = {
PLASMA = {
range = 12000,
areaOfEffect = 300,
damage = {
default = 4002.4,
},
},
},
},
staticarty = {
metalCost = 1250,
weaponDefs = {
PLASMA = {
range = 3700,
mygravity = 0.05,
},
},
},
staticheavyradar = {
metalCost = 200,
customParams = {
area_cloak = 1,
area_cloak_upkeep = 0,
area_cloak_radius = 2000,
area_cloak_recloak_rate = 2000,
},
},
turretgauss = {
health = 6000,
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 60,
},
zenith ={
metalCost = 15000,
weapons = {
{
def = [[METEOR]],
badTargetCateogory = [[MOBILE]],
onlyTargetCategory = [[SWIM LAND SINK TURRET FLOAT SHIP HOVER GUNSHIP]],
},
{
def = [[GRAVITY_NEG]],
onlyTargetCategory = [[NONE]],
},
{
def = [[COR_SHIELD_SMALL]],
},
},
weaponDefs = {
COR_SHIELD_SMALL = {
name = [[Energy Shield]],
damage = {
default = 10,
},
customParams = {
unlinked = true,
},
exteriorShield = true,
shieldAlpha = 0.0001,
shieldBadColor = [[0.02 0.01 0.01 0.02]],
shieldGoodColor = [[0.01 0.01 0.02 0.02]],
shieldInterceptType = 3,
shieldPower = 40000,
shieldPowerRegen = 4000,
shieldPowerRegenEnergy = 0,
shieldRadius = 400,
shieldRepulser = false,
shieldStartingPower = 0,
smartShield = true,
visibleShield = false,
visibleShieldRepulse = false,
weaponType = [[Shield]],
},
},
},
raveparty ={
metalCost = 30000,
weaponDefs = {
BLUE_SHOCKER = {
interceptedByShieldType = 3,
},
},
},
mahlazer ={
metalCost = 45000,
weaponDefs = {
RELAYLAZER = {
customParams = {
stats_damage = 36000,
},
damage = {
default = 2600,
},
},
},
},
athena = {
initCloaked = true,
metalCost = 10000,
health = 4000,
workerTime = 50,
resurrectSpeed = 100,
buildoptions = {
[[staticnuke]],
[[striderfunnelweb]],
[[staticantinuke]],
[[cloakcon]],
[[cloakheavyraid]],
[[cloakaa]],
[[cloaksnipe]],
[[cloakbomb]],
[[cloakjammer]],
[[shieldbomb]],
[[jumpbomb]],
[[amphtele]],
[[athena]],
[[striderantiheavy]],
[[gunshipbomb]],
[[spiderantiheavy]],
[[striderscorpion]],
[[striderdante]],
[[energysolar]],
[[staticstorage]],
[[staticmex]],
[[energypylon]],
[[staticcon]],
[[staticrearm]],
[[turretlaser]],
[[turretmissile]],
[[turretriot]],
[[turretemp]],
[[turretgauss]],
[[turretheavylaser]],
[[turretaaclose]],
[[turretaalaser]],
[[turretaaflak]],
[[turretimpulse]],
[[turrettorp]],
[[staticshield]],
[[staticradar]],
[[staticjammer]],
[[factorycloak]],
[[factoryshield]],
[[factoryveh]],
[[factoryhover]],
[[factorygunship]],
[[factoryplane]],
[[factoryspider]],
[[factoryjump]],
[[factorytank]],
[[factoryamph]],
[[factoryship]],
[[plateamph]],
[[platecloak]],
[[plategunship]],
[[platehover]],
[[platejump]],
[[plateplane]],
[[plateshield]],
[[plateship]],
[[platespider]],
[[platetank]],
[[plateveh]],
},
},
staticstorage = {
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 60,
},
striderdante = {
health = 22000,
autoheal = 40,
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 60,
explodeAs = [[DANTE_DEATH]],
selfDestructAs = [[DANTE_DEATH]],
customParams = {
canjump = 1,
jump_range = 600,
jump_speed = 6,
jump_reload = 10,
jump_from_midair = 0,
},
weaponDefs = {
NAPALM_ROCKETS_SALVO = {
burst = 28,
reloadtime = 10,
},
DANTE_DEATH = {
name = [[Napalm Blast]],
areaofeffect = 800,
craterboost = 1,
cratermult = 3.5,
customParams = {
setunitsonfire = "1",
burnchance = "1",
burntime = 60,
area_damage = 1,
area_damage_radius = 400,
area_damage_dps = 400,
area_damage_duration = 20,
},
damage = {
default = 200,
},
edgeeffectiveness = 0.5,
explosionGenerator = [[custom:napalm_missile]],
impulseboost = 0,
impulsefactor = 0,
soundhit = [[explosion/ex_med3]],
},
},
},
amphtele = {
health = 80,
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 80,
customParams = {
teleporter_throughput = 300,
},
},
dynrecon1 = {
workerTime = 9,
energymake = 0,
},
dynstrike1 = {
workerTime = 10,
energymake = 0,
},
dynsupport1 = {
workerTime = 11,
energymake = 0,
},
dynassault1 = {
workerTime = 10,
energymake = 0,
},
striderhub = {
buildoptions = {
[[shipheavyarty]],
[[shipcarrier]],
[[striderfunnelweb]],
[[striderdetriment]],
[[subtacmissile]],
[[striderhub]],
[[staticheavyarty]],
[[zenith]],
[[raveparty]],
[[mahlazer]],
[[turretaaheavy]],
[[turretantiheavy]],
[[energysingu]],
[[staticantinuke]],
[[staticheavyradar]],
[[staticmissilesilo]],
[[athena]],
[[nebula]],
},
customParams = {
pylonrange = 2000,
},
canPatrol = false,
workerTime = 800,
buildDistance = 2000,
metalCost = 160000,
health = 10000,
weapons = {
{
def = [[COR_SHIELD_SMALL]],
},
},
weaponDefs = {
COR_SHIELD_SMALL = {
name = [[Energy Shield]],
damage = {
default = 10,
},
customParams = {
unlinked = true,
},
exteriorShield = true,
shieldAlpha = 0.0001,
shieldBadColor = [[0.02 0.01 0.01 0.02]],
shieldGoodColor = [[0.01 0.01 0.02 0.02]],
shieldInterceptType = 3,
shieldPower = 10000,
shieldPowerRegen = 4000,
shieldPowerRegenEnergy = 0,
shieldRadius = 450,
shieldRepulser = false,
shieldStartingPower = 0,
smartShield = true,
visibleShield = false,
visibleShieldRepulse = false,
weaponType = [[Shield]],
},
},
},
striderfunnelweb = {
workerTime = 200,
buildDistance = 1000,
health = 10000,
metalCost = 40000,
maxwaterdepth = 1000,
buildoptions = {
[[shipheavyarty]],
[[staticnuke]],
[[staticarty]],
[[striderarty]],
[[turretheavy]],
[[striderbantha]],
[[striderfunnelweb]],
[[staticmex]],
[[energywind]],
[[energysolar]],
[[energygeo]],
[[energyfusion]],
[[staticstorage]],
[[energypylon]],
[[staticcon]],
[[staticrearm]],
[[turretlaser]],
[[turretmissile]],
[[turretriot]],
[[turretemp]],
[[turretgauss]],
[[turretheavylaser]],
[[turretaaclose]],
[[turretaalaser]],
[[turretaaflak]],
[[turretaafar]],
[[turretimpulse]],
[[turrettorp]],
[[staticshield]],
[[staticradar]],
[[staticjammer]],
[[factorycloak]],
[[factoryshield]],
[[factoryveh]],
[[factoryhover]],
[[factorygunship]],
[[factoryplane]],
[[factoryspider]],
[[factoryjump]],
[[factorytank]],
[[factoryamph]],
[[factoryship]],
[[striderhub]],
[[athena]],
[[staticantinuke]],
[[plateamph]],
[[platecloak]],
[[plategunship]],
[[platehover]],
[[platejump]],
[[plateplane]],
[[plateshield]],
[[plateship]],
[[platespider]],
[[platetank]],
[[plateveh]],
},
customParams = {
},
weapons = {
{
def = [[SHIELD]],
},
},
weaponDefs = {
SHIELD = {
customParams = {
shield_recharge_delay = 0,
},
shieldAlpha = 0.0001,
shieldBadColor = [[0.02 0.01 0.01 0.02]],
shieldGoodColor = [[0.01 0.01 0.02 0.02]],
shieldPower = 10000,
shieldPowerRegen = 1000,
shieldPowerRegenEnergy = 0,
shieldRadius = 1600,
},
},
},
staticcon = {
workerTime = 5,
metalCost = 90,
buildDistance = 1000,
},
energywind = {
explodeAs = [[NOWEAPON]],
metalCost = 300,
health = 1,
customParams = {
tidal_health = 1,
},
},
energysolar = {
energyMake = 5,
metalCost = 350,
health = 8000,
},
energysingu = {
metalCost = 20000,
energyMake = 612,
health = 8000,
buildingGroundDecalType = [[]],
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 120,
},
energyfusion = {
metalCost = 5000,
energyMake = 112,
health = 4000,
buildingGroundDecalType = [[]],
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 60,
},
energygeo = {
morphtime = 300,
energyMake = 87,
metalCost = 2500,
health = 4000,
buildingGroundDecalType = [[]],
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 60,
},
energyheavygeo = {
morphtime = 300,
metalCost = 7500,
energyMake = 300,
health = 8000,
buildingGroundDecalType = [[]],
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 60,
},
turretaaflak ={
buildingGroundDecalType = [[]],
canCloak = 1,
cloakCost = 0,
cloakCostMoving = 0,
initCloaked = true,
minCloakDistance = 60,
weaponDefs= {
ARMFLAK_GUN = {
areaOfEffect = 256,
},
},
},
staticmex = {
metalCost = 500,
health = 16000,
selfDestructAs = [[AMPHBOMB_DEATH]],
explodeAs = [[AMPHBOMB_DEATH]],
customParams = {
metal_extractor_mult = 2,
},
sfxtypes = {
explosiongenerators = {
[[custom:RAIDMUZZLE]],
[[custom:VINDIBACK]],
[[custom:RIOTBALL]],
},
},
weapons = {
{
def = [[BIGSHIELD]],
},
},
weaponDefs = {
AMPHBOMB_DEATH = {
areaOfEffect = 4000,
craterBoost = 0,
craterMult = 0,
customParams = {
lups_explodespeed = 1,
lups_explodelife = 1,
timeslow_damagefactor = 100,
timeslow_overslow_frames = 2*30,
nofriendlyfire = 1,
light_color = [[1.88 0.63 2.5]],
light_radius = 320,
},
damage = {
default = 200,
},
edgeEffectiveness = 1,
explosionGenerator = "custom:riotballplus2_purple_limpet",
explosionSpeed = 10,
impulseBoost = 20,
impulseFactor = 20,
name = "Slowing Explosion",
soundHit = [[weapon/aoe_aura2]],
soundHitVolume = 4,
},
BIGSHIELD = {
name = [[Big Energy Shield]],
damage = {
default = 10,
},
customParams = {
unlinked = true,
},
exteriorShield = true,
shieldAlpha = 0.0001,
shieldBadColor = [[0.02 0.01 0.01 0.02]],
shieldGoodColor = [[0.01 0.01 0.02 0.02]],
shieldInterceptType = 3,
shieldPower = 10000,
shieldPowerRegen = 100,
shieldPowerRegenEnergy = 0,
shieldRadius = 800,
shieldRepulser = false,
shieldStartingPower = 0,
smartShield = true,
visibleShield = false,
visibleShieldRepulse = false,
weaponType = [[Shield]],
},
},
},
}
Problem code:
local function MergeTable(target, source) end
for unitName, changes in pairs(tweaks) do
local ud = UnitDefs[unitName]
if ud then
MergeTable(ud, changes)
end
end
local exclude = {
dynstrike1 = true,
dynrecon1 = true,
dynassault1 = true,
dynsupport1 = true,
athena = true,
funnelweb = true,
striderhub = true,
staticmex = true,
energywind = true,
}
local include = {
dynstrike1 = true,
dynrecon1 = true,
dynassault1 = true,
dynsupport1 = true,
}
local newBuildOptions = {
"staticantinuke","staticmex","energywind","staticstorage","energypylon",
"staticcon","staticrearm","turretlaser","turretmissile","turretriot",
"turretemp","turretheavylaser","turretaaclose","turretaalaser","turretimpulse",
"turrettorp","staticshield","staticradar","staticjammer","factorycloak",
"factoryshield","factoryveh","factoryhover","factorygunship","factoryplane",
"factoryspider","factoryjump","factorytank","factoryamph","factoryship",
"plateamph","platecloak","plategunship","platehover","platejump","plateplane",
"plateshield","plateship","platespider","platetank","plateveh","athena",
}
for id, ud in pairs(UnitDefs) do
if include[ud.name] then
ud.buildoptions = newBuildOptions
end
if not exclude[ud.name] then
if ud.metalCost and ud.metalCost < 500 then
ud.corpse = nil
ud.featureDefs = nil
end
end
if ud.metalCost then
ud.metalCost = math.floor(ud.metalCost * 0.5)
end
end
local storageUnits = {
"plateamph","platecloak","plategunship","platehover",
"platejump","plateplane","plateshield","plateship",
"platespider","platetank","plateveh",
"factorycloak","factoryshield","factoryveh","factoryhover",
"factorygunship","factoryplane","factoryspider","factoryjump",
"factorytank","factoryamph","factoryship","staticstorage",
}
for _, name in ipairs(storageUnits) do
local u = UnitDefs[name]
if u then
u.energystorage = 8000
u.metalstorage = 8000
end
end
local buildList = {
"staticantinuke","staticmex","energywind","staticstorage","energypylon",
"staticcon","staticrearm","turretlaser","turretmissile","turretriot",
"turretemp","turretheavylaser","turretaaclose","turretaalaser","turretimpulse",
"turrettorp","staticshield","staticradar","staticjammer","factorycloak",
"factoryshield","factoryveh","factoryhover","factorygunship","factoryplane",
"factoryspider","factoryjump","factorytank","factoryamph","factoryship",
"athena","plateamph","platecloak","plategunship","platehover","platejump",
"plateplane","plateshield","plateship","platespider","platetank","plateveh",
}
local function cloneList(src)
local dst = {}
for i = 1, #src do
dst[i] = src[i]
end
return dst
end
local constructors = {
"cloakcon","shieldcon","vehcon","hovercon",
"gunshipcon","planecon","spidercon","jumpcon",
"tankcon","amphcon","shipcon",
"dynrecon1","dynstrike1","dynsupport1","dynassault1",
}
for _, name in ipairs(constructors) do
local u = UnitDefs[name]
if u then
u.buildoptions = cloneList(buildList)
end
end
local cloakers = {
"energyfusion","energygeo","energyheavygeo","energysingu",
}
for _, name in ipairs(cloakers) do
local u = UnitDefs[name]
if u then
u.canCloak = 1
u.cloakCost = 0
u.cloakCostmoving = 0
u.initCloaked = 1
u.minCloakDistance = 200
end
end
error:
Defs-Parser: [pcall] error 2 ("[string "gamedata/defs.lua"]:38: [string "gamedata/defs.lua"]:26: error = 2, gamedata/featureDefs.lua, error = 2, gamedata/featuredefs_post.lua, [string "gamedata/featuredefs_post.lua"]:113: attempt to call global 'CopyTable' (a nil value)
i thought it was something to do with me setting ud.corpse = nil ud.featureDefs = nil but commenting it out does nothing =/ if anyone can help me that would be great
+0 / -0
|