Skip to content

Commit

Permalink
Change default decloak time when a unit is damaged
Browse files Browse the repository at this point in the history
Change the volume of cloak and decloak sounds
Change size of the mine
Change sightdistance of the kite to match the other raiders
Add modoptions that allow players to set the cost of mexes in the lobby
Change battle commander weapon to be similar to hbot sniper. Same damage as original, but bonus damage to light and armored, and instead of firign 10 times a second, only once per second
Add new sound for battlecom weapon
  • Loading branch information
ForbodingAngel committed Jun 21, 2021
1 parent ab6a34f commit 2625042
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 11 deletions.
8 changes: 4 additions & 4 deletions LuaRules/Gadgets/lups_cloak_fx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,21 @@ local CloakedHitEffect = { class='UnitJitter',options={ life=50, pos={0,0,0}, en
local CloakEffect = {
{ class='UnitCloaker',options={ life=50 } },
{ class='UnitJitter',options={ delay=24, life=math.huge } },
{ class='Sound',options={ file="sounds/miscfx/cloak.wav",volume=0.9 } },
{ class='Sound',options={ file="sounds/miscfx/cloak.wav",volume=0.25 } },
}
local EnemyCloakEffect = {
{ class='UnitCloaker',options={ life=20 } },
{ class='Sound',options={ file="sounds/miscfx/cloak.wav",volume=0.9 } },
{ class='Sound',options={ file="sounds/miscfx/cloak.wav",volume=0.25 } },
}

local DecloakEffect = {
{ class='UnitCloaker',options={ inverse=true, life=50 } },
{ class='UnitJitter',options={ life=24 } },
{ class='Sound',options={ file="sounds/miscfx/cloak.wav",volume=0.9 } },
{ class='Sound',options={ file="sounds/miscfx/cloak.wav",volume=0.25 } },
}
local EnemyDecloakEffect = {
{ class='UnitCloaker',options={ inverse=true, life=60 } },
{ class='Sound',options={ file="sounds/miscfx/cloak.wav",volume=0.9 } },
{ class='Sound',options={ file="sounds/miscfx/cloak.wav",volume=0.25 } },
}

--[[ Units are actually decloaked when damaged so this part is not required
Expand Down
2 changes: 1 addition & 1 deletion LuaRules/Gadgets/unit_decloak_damaged.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ for i = 1, #WeaponDefs do
end
end

local DEFAULT_DECLOAK_TIME = 100
local DEFAULT_DECLOAK_TIME = 60
local UPDATE_FREQUENCY = 10
local CLOAK_MOVE_THRESHOLD = math.sqrt(0.2)

Expand Down
31 changes: 31 additions & 0 deletions ModOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,37 @@ local options= {
-- (step <= 0) means that there is no quantization
},

{
key = 'mexcost',
name = 'Metal Extractor Costs',
desc = 'Allows you to set the cost of Metal Extractors',
type = 'section',
},
{
key = 'metalextractorcostateran',
name = 'Ateran Metal Extractor Cost',
desc = 'How much metal does an Ateran Metal Extractor cost?',
type = 'number',
section= 'mexcost',
def = 50,
min = 1,
max = 500,
step = 1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'metalextractorcostzaal',
name = 'Zaal Metal Extractor Cost',
desc = 'How much metal does an Zaal Metal Extractor cost?',
type = 'number',
section= 'mexcost',
def = 65,
min = 1,
max = 500,
step = 1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},

-- Gameplay Options
{
key = 'gameplayoptions',
Expand Down
Binary file modified Objects3D/emine.s3o
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ unitDef = {

weaponDefs = {
sniper = {

AreaOfEffect = 10,
avoidFeature = false,
avoidFriendly = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ unitDef = {
repairable = false,
selfDestructAs = "smallExplosionGenericBlue",
side = "CORE",
sightDistance = 725,
sightDistance = 650,
smoothAnim = true,
stealth = true,
seismicSignature = 2,
Expand Down
4 changes: 3 additions & 1 deletion Units/ebuilding/emetalextractor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ unitName = [[emetalextractor]]

--------------------------------------------------------------------------------

ateranMexCost = Spring.GetModOptions().metalextractorcostateran or 50

metalMultiplier = 1

buildCostMetal = 50
buildCostMetal = ateranMexCost
energyUse = 0

primaryCEG = "custom:fusionreactionnuclear-1color"
Expand Down
2 changes: 1 addition & 1 deletion Units/ebuilding/emine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ local unitDef = {
cloakCost = 0,
cloakCostMoving = 0,
minCloakDistance = 0,
decloakOnFire = false,
decloakOnFire = true,
decloakSpherical = true,
initCloaked = true,

Expand Down
43 changes: 42 additions & 1 deletion Units/ecommanderbattle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ local unitDef = {
-- def = "riottankempweapon",
-- },
[1] = {
def = "machinegun",
def = "sniper",
badTargetCategory = "BUILDING ARMORED WALL",
},
},
Expand Down Expand Up @@ -328,6 +328,47 @@ local weaponDefs = {
default = weapon2Damage,
},
},
sniper = {
AreaOfEffect = 25,
avoidFeature = false,
avoidFriendly = false,
beamTime = 0.1,

collideFeature = false,
collideFriendly = false,
coreThickness = 0.6,
-- cegTag = "mediumcannonweapon3",
duration = 0.2,
energypershot = 0,
explosionGenerator = "custom:genericshellexplosion-medium-purple",
fallOffRate = 0,
fireStarter = 100,
impulseFactor = 0,
interceptedByShieldType = 4,

minintensity = "1",
name = "Laser",
range = 650,
reloadtime = 1,
WeaponType = "LaserCannon",
rgbColor = "0 0.5 1",
rgbColor2 = "1 1 1",
soundTrigger = true,
soundstart = "weapons/Sci Fi Blaster 4.wav",
soundHit = "explosions/explode5.wav",
texture1 = "shot",
texture2 = "empty",
thickness = 5,
tolerance = 1000,
turret = true,
weaponVelocity = 3000,
customparams = {
damagetype = "antilightarmored",
},
damage = {
default = 750,
},
},
}
unitDef.weaponDefs = weaponDefs
--------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion Units/zaal/buildings/zmex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ unitName = [[zmex]]

--------------------------------------------------------------------------------

zaalMexCost = Spring.GetModOptions().metalextractorcostzaal or 65

metalMultiplier = 1

energyUse = 0

buildCostMetal = 65
buildCostMetal = zaalMexCost

yardMap = [[oooooooo oooooooo oooooooo oooooooo oooooooo oooooooo oooooooo oooooooo]]

Expand Down
Binary file added sounds/weapons/Sci Fi Blaster 4.wav
Binary file not shown.

0 comments on commit 2625042

Please sign in to comment.