Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
314e65c4bc | ||
|
|
577378ae36 | ||
|
|
59c5f2cb36 | ||
|
|
138f510ea2 | ||
|
|
d6ea8f534e | ||
|
|
85889377c9 | ||
|
|
f37108304e | ||
|
|
d72a2b701e | ||
|
|
c0b7a4ef83 | ||
|
|
8e63f249a7 | ||
|
|
9a56e21c2a |
@@ -1,6 +1,9 @@
|
||||
[](http://gl.beaconborn.ru/bacon/weapon-project-extended/-/commits/main) [](http://gl.beaconborn.ru/bacon/weapon-project-extended/-/releases)
|
||||
# weapon project extended 2.0
|
||||
|
||||

|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
That mod for Avorion original writed [Alive!](https://steamcommunity.com/id/CasKepler2/) for 0.32 and updated by me with him
|
||||
|
||||
@@ -120,6 +120,7 @@ function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, ra
|
||||
local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps)
|
||||
local crew = Crew()
|
||||
crew:add(requiredCrew, CrewMan(CrewProfessionType.Gunner))
|
||||
crew:add(requiredCrew, CrewMan(CrewProfessionType.Pilot))
|
||||
result.crew = crew
|
||||
|
||||
-- generate weapons
|
||||
@@ -131,9 +132,15 @@ function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, ra
|
||||
local specType = rand:getInt(0, 2)
|
||||
if specType == 1 then
|
||||
weapon.shieldPenetration = 1
|
||||
if rand:getInt(0, 1) then
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(180, 210), 0.8, 0.8)
|
||||
else
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(260, 290), 0.8, 0.8)
|
||||
end
|
||||
elseif specType == 2 then
|
||||
weapon.damageType = DamageType.Plasma
|
||||
weapon.damage = weapon.damage * 0.9
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(90, 120), 0.7, 1)
|
||||
end
|
||||
|
||||
-- attach weapons to turret
|
||||
@@ -150,12 +157,11 @@ function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, ra
|
||||
result:updateStaticStats()
|
||||
|
||||
local name = "Smart-Cannon /* weapon name*/"%_T
|
||||
|
||||
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
|
||||
|
||||
if specType == 1 then
|
||||
outerAdjective = "Ionized "%_T
|
||||
elseif specType == 2 then
|
||||
outerAdjective = "Plasmed "%_T
|
||||
weapon.damage = weapon.damage * 0.9
|
||||
end
|
||||
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)
|
||||
|
||||
@@ -188,6 +194,20 @@ function TurretGenerator.generateHeavyCannonTurret(rand, dps, tech, material, ra
|
||||
outerAdjective = "Cumulative "%_T
|
||||
end
|
||||
|
||||
if result.size >= 4 then
|
||||
weapon.psize = weapon.psize * 1.5
|
||||
weapon.speed = weapon.speed * 2
|
||||
weapon.reach = weapon.reach * 1.2
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 45), 0.7, 0.7)
|
||||
end
|
||||
|
||||
if result.size >= 5 then
|
||||
weapon.psize = weapon.psize * 1.5
|
||||
weapon.speed = weapon.speed * 2
|
||||
weapon.reach = weapon.reach * 1.5
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 45), 0.7, 0.9)
|
||||
end
|
||||
|
||||
-- attach weapons to turret
|
||||
TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
|
||||
|
||||
@@ -207,14 +227,10 @@ function TurretGenerator.generateHeavyCannonTurret(rand, dps, tech, material, ra
|
||||
|
||||
if result.size >= 4 then
|
||||
name = "Mass Driver /* weapon name*/"%_T
|
||||
weapom.speed = weapon.speed * 2
|
||||
weapon.reach = weapon.reach * 1.2
|
||||
end
|
||||
|
||||
if result.size >= 5 then
|
||||
name = "Mass Warper /* weapon name*/"%_T
|
||||
weapom.speed = weapon.speed * 2
|
||||
weapon.reach = weapon.reach * 1.5
|
||||
end
|
||||
|
||||
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)
|
||||
@@ -282,7 +298,7 @@ function TurretGenerator.generateHookgunTurret(rand, dps, tech, material, rarity
|
||||
local weapon = WeaponGenerator.generateHookgun(rand, dps, tech, material, rarity)
|
||||
weapon.damage = weapon.damage / numWeapons
|
||||
|
||||
local spec = rand(0.5)
|
||||
local spec = rand:getInt(0, 1)
|
||||
|
||||
if spec then
|
||||
weapon.holdingForce = weapon.otherForce * 2
|
||||
|
||||
@@ -4,7 +4,7 @@ function WeaponGenerator.generateSmartCannon(rand, dps, tech, material, rarity)
|
||||
weapon:setProjectile()
|
||||
|
||||
dps = dps * 0.9
|
||||
local fireDelay = rand:getFloat(1.5, 2.5)*0.5
|
||||
local fireDelay = rand:getFloat(0.6, 1)
|
||||
local reach = rand:getFloat(1100, 1500)*0.7
|
||||
local damage = dps * fireDelay
|
||||
local speed = rand:getFloat(300, 400)*4
|
||||
@@ -32,7 +32,7 @@ function WeaponGenerator.generateSmartCannon(rand, dps, tech, material, rarity)
|
||||
weapon.psize = rand:getFloat(0.2, 0.5)
|
||||
weapon.pmaximumTime = existingTime
|
||||
weapon.pvelocity = speed
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1)
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(20, 45), 0.7, 1)
|
||||
|
||||
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
|
||||
|
||||
@@ -75,10 +75,10 @@ function WeaponGenerator.generateHeavyCannon(rand, dps, tech, material, rarity)
|
||||
weapon.otherForce = dps*math.max(1, rarity.value)*89*5
|
||||
|
||||
|
||||
weapon.psize = rand:getFloat(0.2, 0.5)
|
||||
weapon.psize = rand:getFloat(1.2, 1.5)
|
||||
weapon.pmaximumTime = existingTime
|
||||
weapon.pvelocity = speed
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1)
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 45), 0.7, 0.4)
|
||||
|
||||
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
|
||||
|
||||
@@ -183,13 +183,11 @@ function WeaponGenerator.generateHookgun(rand, dps, tech, material, rarity)
|
||||
weapon.banimationAcceleration = 0
|
||||
weapon.bshapeSize = 13
|
||||
|
||||
-- shades of blue
|
||||
weapon.bouterColor = ColorHSV(0, 0, rand:getFloat(0.35, 0.65))
|
||||
weapon.binnerColor = ColorHSV(1, 1, rand:getFloat(0.35, 0.65))
|
||||
weapon.bouterColor = ColorHSV(rand:getInt(255, 260), 0,75, rand:getFloat(0.2, 0.25))
|
||||
weapon.binnerColor = ColorHSV(rand:getInt(255, 260), 0,75, rand:getFloat(0.2, 0.25)) -- TODO
|
||||
|
||||
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
|
||||
|
||||
|
||||
return weapon
|
||||
end
|
||||
|
||||
@@ -204,7 +202,7 @@ function WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
|
||||
local fireDelay = rand:getFloat(2.2, 3)
|
||||
local reach = rand:getFloat(1300, 1800)
|
||||
local damage = dps * fireDelay
|
||||
local speed = rand:getFloat(150, 200)
|
||||
local speed = rand:getFloat(200, 250)
|
||||
local existingTime = reach / speed
|
||||
|
||||
weapon.fireDelay = fireDelay
|
||||
@@ -227,7 +225,7 @@ function WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
|
||||
weapon.psize = rand:getFloat(0.2, 0.4)
|
||||
weapon.pmaximumTime = existingTime
|
||||
weapon.pvelocity = speed
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1)
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.8, rand:getFloat(0.25, 0.75))
|
||||
weapon.pshape = ProjectileShape.Rocket
|
||||
|
||||
if rand:test(1) then
|
||||
|
||||
Reference in New Issue
Block a user