Compare commits

..

60 Commits

Author SHA1 Message Date
Slava
bf74c5b8cf Add new file 2023-08-28 20:56:03 +00:00
Slava
2323000732 Update .gitlab-ci.yml file 2023-08-28 20:53:53 +00:00
Slava
97ca6a23c7 Update .gitlab-ci.yml file 2023-08-28 20:53:32 +00:00
Slava
ccfa671f52 Update .gitlab-ci.yml file 2023-08-28 20:46:03 +00:00
Slava
6e6b3aa8a6 Update .gitlab-ci.yml file 2023-08-28 20:05:28 +00:00
Slava
812a652bed Update .gitlab-ci.yml file 2023-08-28 20:04:11 +00:00
Slava
19e0acdf6d Update .gitlab-ci.yml file 2023-08-28 20:02:19 +00:00
Slava
d21c529591 Update .gitlab-ci.yml file 2023-08-28 19:56:23 +00:00
Slava
7d08a6bdfc Update .gitlab-ci.yml file 2023-08-28 19:54:11 +00:00
Slava
83dddbea1e Update .gitlab-ci.yml file 2023-08-28 19:52:59 +00:00
Slava
8c3ff4993b Update .gitlab-ci.yml file 2023-08-28 19:52:33 +00:00
Slava
34d41c4c5b Update .gitlab-ci.yml file 2023-08-28 19:49:30 +00:00
Slava
efce751464 Update .gitlab-ci.yml file 2023-08-28 19:49:01 +00:00
Slava
02a32a81f2 Update .gitlab-ci.yml file 2023-08-28 19:46:01 +00:00
Slava
90c76900e1 Update .gitlab-ci.yml file 2023-08-28 19:44:10 +00:00
Slava
4cb196b579 Update .gitlab-ci.yml file 2023-08-28 19:43:48 +00:00
Slava
30343d47a0 Update .gitlab-ci.yml file 2023-08-28 19:33:58 +00:00
Slava
7410e3f488 Update .gitlab-ci.yml file 2023-08-28 19:25:56 +00:00
Slava
36434648d6 Update .gitlab-ci.yml file 2023-08-28 19:22:19 +00:00
Slava
42c671c3a7 Update .gitlab-ci.yml file 2023-08-28 19:21:27 +00:00
Slava
aa6c42b840 Update .gitlab-ci.yml file 2023-08-28 18:47:34 +00:00
Slava
92e0636354 Update .gitlab-ci.yml file 2023-08-28 18:40:33 +00:00
Slava
f84cc424b1 Update .gitlab-ci.yml file 2023-08-28 18:39:16 +00:00
Slava
1e11687962 Update .gitlab-ci.yml file 2023-08-28 18:31:56 +00:00
Slava
07a05df171 Update .gitlab-ci.yml file 2023-08-28 18:22:08 +00:00
Slava
4c101287bf Update .gitlab-ci.yml file 2023-08-28 18:21:26 +00:00
Slava
a16f0be550 Update .gitlab-ci.yml file 2023-08-28 18:18:42 +00:00
Slava
6915961e99 Update .gitlab-ci.yml file 2023-08-28 18:16:18 +00:00
Slava
1612ba9195 Update .gitlab-ci.yml file 2023-08-28 18:10:57 +00:00
Slava
44fef51edd Update .gitlab-ci.yml file 2023-08-28 18:08:29 +00:00
Slava
946a585ec7 Update .gitlab-ci.yml file 2023-08-28 18:06:37 +00:00
Slava
cd6210888b Update .gitlab-ci.yml file 2023-08-28 18:05:38 +00:00
Slava
ccf5c37ec8 Update .gitlab-ci.yml file 2023-08-28 18:02:50 +00:00
Slava
0edade93c1 Update .gitlab-ci.yml file 2023-08-28 18:00:00 +00:00
Slava
ce80b62b82 Update .gitlab-ci.yml file 2023-08-28 17:56:48 +00:00
Slava
80d1d57d94 Update .gitlab-ci.yml file 2023-08-28 17:55:38 +00:00
Slava
1d21757453 Update .gitlab-ci.yml file 2023-08-28 17:54:10 +00:00
Slava
4644383c73 Update .gitlab-ci.yml file 2023-08-28 17:52:09 +00:00
Slava
a99b373b25 Update .gitlab-ci.yml file 2023-08-28 17:50:52 +00:00
Slava
7cf0b95477 Update .gitlab-ci.yml file 2023-08-28 17:49:32 +00:00
Slava
ae4e872b74 Update .gitlab-ci.yml file 2023-08-28 17:47:04 +00:00
Slava
4e5f0a0f89 Update .gitlab-ci.yml file 2023-08-28 17:45:14 +00:00
Slava
599872b114 Update .gitlab-ci.yml file 2023-08-28 17:42:46 +00:00
Slava
e11ab2dae5 Update .gitlab-ci.yml file 2023-08-28 17:41:46 +00:00
Slava
d46d044e2d Update .gitlab-ci.yml file 2023-08-28 17:40:01 +00:00
Slava
b81d07eb49 Update .gitlab-ci.yml file 2023-08-28 17:39:25 +00:00
Slava
0f744108b0 Update .gitlab-ci.yml file 2023-08-28 17:37:14 +00:00
Slava
e92fa54cac Update .gitlab-ci.yml file 2023-08-28 17:29:00 +00:00
Slava
c4a48cbed4 Update .gitlab-ci.yml file 2023-08-28 17:27:14 +00:00
Slava
cdabe00195 Update .gitlab-ci.yml file 2023-08-28 17:26:59 +00:00
Slava
60c589fb74 Update .gitlab-ci.yml file 2023-08-28 17:26:12 +00:00
Slava
5024ed74d4 Update .gitlab-ci.yml file 2023-08-28 17:26:00 +00:00
Slava
8f1f252601 Update .gitlab-ci.yml file 2023-08-28 17:25:00 +00:00
Slava
927da67587 Update .gitlab-ci.yml file 2023-08-28 17:24:29 +00:00
Slava
ce4627919f Update .gitlab-ci.yml file 2023-08-28 17:20:56 +00:00
Slava
ee48cf94c5 Update .gitlab-ci.yml file 2023-08-28 17:18:37 +00:00
Slava
3f5c906577 Update .gitlab-ci.yml file 2023-08-28 17:16:16 +00:00
Slava
d6450e63c0 Update .gitlab-ci.yml file 2023-08-28 17:15:32 +00:00
Slava
71e17e719b Update .gitlab-ci.yml file 2023-08-28 17:05:46 +00:00
Slava
d5c9874b2b Update .gitlab-ci.yml file 2023-08-28 17:05:33 +00:00
20 changed files with 610 additions and 822 deletions

2
.gitattributes vendored
View File

@@ -4,4 +4,4 @@ CHANGELOG export-ignore
.gitlab-ci.yml export-ignore .gitlab-ci.yml export-ignore
.git export-ignore .git export-ignore
.vs export-ignore .vs export-ignore
.gitignore export-ignore .gitignore exsport-ignore

View File

@@ -1,28 +1,40 @@
stages: # List of stages for jobs, and their order of execution stages:
- prepare # List of stages for jobs, and their order of execution
- release - release
image: python:3.10
release_job:
prepare_job:
stage: prepare
script:
- 'pip install requests'
- 'git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gl.beaconborn.ru/bacon/translation-generator.git'
- 'python3 translation-generator/main.py $CI_PROJECT_DIR/WPE-2/data/'
- 'ls -al'
- cat test.txt
release_job:
needs:
- prepare_job
stage: release # It only runs when *both* jobs in the test stage complete successfully. stage: release # It only runs when *both* jobs in the test stage complete successfully.
image: registry.gitlab.com/gitlab-org/release-cli:latest image: registry.gitlab.com/gitlab-org/release-cli:latest
only: only:
# - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH" # - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
refs: refs:
- main - testing
- ^tags - ^tags
changes: changes:
- ^README.md
- ^CHANGELOG
- ^.gitattribute
- ^.gitignore
- ^.gitlab-ci.yml
- data/**/* - data/**/*
- modinfo.lua - modinfo.lua
- thumb.png - thumb.png
- test.txt
script: script:
- echo "Release WPE 2.0_$CI_COMMIT_SHORT_SHA" - echo "Release WPE 2.0_$CI_COMMIT_SHORT_SHA branch $CI_COMMIT_BRANCH"
release: release:
tag_name: v2.0.$CI_PIPELINE_IID tag_name: v2.0.$CI_PIPELINE_IID

92
data/localization/ru.po Normal file
View File

@@ -0,0 +1,92 @@
# ========== /mods/WPE2/data/scripts/lib/weapongenerator.lua ==========
#: /mods/WPE2/data/scripts/lib/weapongenerator.lua:
msgctxt "Weapon Name"
msgid "Smart Cannon"
msgstr "Умная пушка"
#: /mods/WPE2/data/scripts/lib/weapongenerator.lua:
msgctxt "Weapon Prefix"
msgid "Smart Cannon"
msgstr "Умная пушка"
#: /mods/WPE2/data/scripts/lib/weapongenerator.lua:
msgctxt "Weapon Name"
msgid "Heavy Cannon"
msgstr "Тяжелая Пушка"
#: /mods/WPE2/data/scripts/lib/weapongenerator.lua:
msgctxt "Weapon Prefix"
msgid "Cumulative Heavy Cannon"
msgstr "Кумулятивная тяжелая пушка"
#: /mods/WPE2/data/scripts/lib/weapongenerator.lua:
msgctxt "Weapon Prefix"
msgid "Heavy Cannon"
msgstr "Тяжелая Пушка"
#: /mods/WPE2/data/scripts/lib/weapongenerator.lua:
msgctxt "Weapon Name"
msgid "Diffuser"
msgstr "Диффузор"
#: /mods/WPE2/data/scripts/lib/weapongenerator.lua:
msgctxt "Weapon Prefix"
msgid "Diffuser"
msgstr "Диффузор"
# ========== /mods/WPE2/data/scripts/lib/weapontype.lua ==========
#: /mods/WPE2/data/scripts/lib/weapontype.lua:
msgctxt "Weapon Type"
msgid "Auto Сannon"
msgstr "Автопушка"
#: /mods/WPE2/data/scripts/lib/weapontype.lua:
msgctxt "Weapon Type"
msgid "Heavy Cannon"
msgstr "Тяжелая Пушка"
#: /mods/WPE2/data/scripts/lib/weapontype.lua:
msgctxt "Weapon Type"
msgid "Diffuser"
msgstr "Диффузор"
# ========== /mods/WPE2/data/scripts/player/ui/encyclopedia/chapters/wpeturrets.lua ==========
#: /mods/WPE2/data/scripts/player/ui/encyclopedia/chapters/wpeturrets.lua:
msgid "WPE Turrets"
msgstr "Расширенный пак оружия"
#: /mods/WPE2/data/scripts/player/ui/encyclopedia/chapters/wpeturrets.lua:
msgid "Intro"
msgstr "Вступление"
#: /mods/WPE2/data/scripts/player/ui/encyclopedia/chapters/wpeturrets.lua:
msgid "In this part of the encyclopedia you will find a description of the turrets from the Weapon Pack Extended mod.\n\nI recommend using turret models from the collection in the workshop."
msgstr "В этой части энциклопедии вы найдете описание турелей из мода Weapon Pack Extended. \n\nЯ рекомендую использовать модели турелей из коллекции в мастерской"
#: /mods/WPE2/data/scripts/player/ui/encyclopedia/chapters/wpeturrets.lua:
msgid "Autocannon"
msgstr "Автопушка"
#: /mods/WPE2/data/scripts/player/ui/encyclopedia/chapters/wpeturrets.lua:
msgid "A lightweight version of the classic cannon.\n\nCompared to conventional cannons:\n+ Increased rate of fire (x2)\n+ Increased projectile speed (x1.5)\n+ A little more damage on the shield (10% - 15%)\n+ Can be equipped with homing missiles.\n- Less damage (x0.75)\n- Shorter damage range (x0.8)"
msgstr "Облегченная версия классической пушки.\n\nПо сравнению с обычными пушками:\n+ Увеличенная скорострельность (x2)\n+ Увеличенная скорость полета снаряда (x1.5)\n+ Немного больший урон по щиту (10% - 15%)\n+ Может оснащаться самонаводящимися ракетами.\n- Меньший урон (x0.75)\n- Меньшая дальность поражения (x0.8)."
#: /mods/WPE2/data/scripts/player/ui/encyclopedia/chapters/wpeturrets.lua:
msgid "Heavy Cannon"
msgstr "Тяжелая Пушка"
#: /mods/WPE2/data/scripts/player/ui/encyclopedia/chapters/wpeturrets.lua:
msgid "The cannon of the main caliber. It shoots with heavy explosive shells, the hit of which can displace the enemy ship.\n\n+ High damage\n+ High projectile speed\n+ When hit, push the opponent\n+ Also can have a penetration\n- Low rate of fire\n- Occupies many slots\n- Big size\n- Requires more crew"
msgstr "Пушка главного калибра. Стреляет тяжелыми разрывными снарядами, попадание которых может смести вражеский корабль.\n\n+ Высокий урон\n+ Высокая скорость снаряда\n+ При попадании в цель толкает противника\n+ Также может иметь пробитие\n- Низкая скорострельность\n- Занимает много слотов\n- Большие размеры\n- Требует больше экипажа"
#: /mods/WPE2/data/scripts/player/ui/encyclopedia/chapters/wpeturrets.lua:
msgid "Energy diffuser"
msgstr "Энегретический диффузор"
#: /mods/WPE2/data/scripts/player/ui/encyclopedia/chapters/wpeturrets.lua:
msgid "Short range combat weapon. Does not cause damage to the hull, but extremely effectively destroys shields. Requires civil slots.\n\nShield Damage x20"
msgstr "Боевое оружие малой дальности. Не наносит повреждений корпусу, но чрезвычайно эффективно разрушает щиты. Требует гражданских слотов.\n\nУрон по щитам x20"

View File

@@ -1,138 +0,0 @@
# ========== \data\scripts\lib\turretgenerator.lua ==========
#: \data\scripts\lib\turretgenerator.lua:
msgctxt "weapon name"
msgid "SmartCannon"
msgstr ""
#: \data\scripts\lib\turretgenerator.lua:
msgctxt "weapon name"
msgid "Ionized SmartCannon"
msgstr ""
#: \data\scripts\lib\turretgenerator.lua:
msgctxt "weapon name"
msgid "Heavy Cannon"
msgstr ""
#: \data\scripts\lib\turretgenerator.lua:
msgctxt "weapon name"
msgid "Cumulative Heavy Cannon"
msgstr ""
#: \data\scripts\lib\turretgenerator.lua:
msgctxt "weapon name"
msgid "Diffuser"
msgstr ""
#: \data\scripts\lib\turretgenerator.lua:
msgctxt "weapon name"
msgid "Hookgun"
msgstr ""
#: \data\scripts\lib\turretgenerator.lua:
msgctxt "weapon name"
msgid "HiveLauncher"
msgstr ""
# ========== \data\scripts\lib\weapongenerator.lua ==========
#: \data\scripts\lib\weapongenerator.lua:
msgctxt "Weapon Name"
msgid "SmartCannon"
msgstr ""
#: \data\scripts\lib\weapongenerator.lua:
msgctxt "Weapon Prefix"
msgid "SmartCannon"
msgstr ""
#: \data\scripts\lib\weapongenerator.lua:
msgctxt "Weapon Name"
msgid "Heavy Cannon"
msgstr ""
#: \data\scripts\lib\weapongenerator.lua:
msgctxt "Weapon Name"
msgid "Diffuser"
msgstr ""
#: \data\scripts\lib\weapongenerator.lua:
msgctxt "Weapon Prefix"
msgid "Diffuser"
msgstr ""
#: \data\scripts\lib\weapongenerator.lua:
msgctxt "Weapon Name"
msgid "Hookgun"
msgstr ""
#: \data\scripts\lib\weapongenerator.lua:
msgctxt "Weapon Prefix"
msgid "Hookgun"
msgstr ""
#: \data\scripts\lib\weapongenerator.lua:
msgctxt "Weapon Name"
msgid "HiveLauncher"
msgstr ""
#: \data\scripts\lib\weapongenerator.lua:
msgctxt "Weapon Prefix"
msgid "HiveLauncher"
msgstr ""
# ========== \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua ==========
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "WPE Turrets"
msgstr ""
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "Intro"
msgstr ""
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "In this part of the encyclopedia you will find a description of the turrets from the Weapon Pack Extended mod.\n\nI recommend using turret models from the collection in the workshop."
msgstr ""
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "SmartCannon"
msgstr ""
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "A lightweight version of the classic cannon.\n\nCompared to conventional cannons:\n+ Increased rate of fire (x2)\n+ Increased projectile speed (x1.5)\n+ A little more damage on the shield (10% - 15%)\n+ Can be equipped with homing missiles.\n- Less damage (x0.75)\n- Shorter damage range (x0.8)"
msgstr ""
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "Heavy Cannon"
msgstr ""
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "The cannon of the main caliber. It shoots with heavy explosive shells, the hit of which can displace the enemy ship.\n\n+ High damage\n+ High projectile speed\n+ When hit, push the opponent\n+ Also can have a penetration\n- Low rate of fire\n- Occupies many slots\n- Big size\n- Requires more crew"
msgstr ""
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "Energy diffuser"
msgstr ""
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "Short range combat weapon. Does not cause damage to the hull, but extremely effectively destroys shields. Requires civil slots.\n\nShield Damage x20"
msgstr ""
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "Hookgun"
msgstr ""
#: \data\scripts\player\ui\encyclopedia\chapters\wpeturrets.lua:
msgctxt ""
msgid "Short range combat weapon. Does not cause damage to the shield, but extremely effectively to attrac. Requires 2 gunners slots.\n May have penetration\n"
msgstr ""

View File

@@ -1,6 +1,5 @@
weaponProbabilities[WeaponType.SmartCannon] = {d = 0.65, p = 2.0} weaponProbabilities[WeaponType.Hookgun] = {d = 0.65, p = 2.0}
weaponProbabilities[WeaponType.HeavyCannon] = {d = 0.65, p = 2.0} weaponProbabilities[WeaponType.HeavyCannon] = {d = 0.6, p = 1.0}
weaponProbabilities[WeaponType.Diffuser] = {d = 0.55, p = 1.0} weaponProbabilities[WeaponType.Diffuser] = {d = 0.6, p = 1.0}
weaponProbabilities[WeaponType.Hookgun] = {d = 0.55, p = 1.0} weaponProbabilities[WeaponType.Harpoon] = {d = 0.6, p = 1.0}
weaponProbabilities[WeaponType.HiveLauncher] = {d = 0.6, p = 1.0}

View File

@@ -1,6 +1,5 @@
valueWeights[WeaponType.SmartCannon ] = 1.5 valueWeights[WeaponType.SmartCannon ] = 2
valueWeights[WeaponType.HeavyCannon ] = 1.5 valueWeights[WeaponType.HeavyCannon ] = 1.7
valueWeights[WeaponType.Diffuser ] = 2 valueWeights[WeaponType.Diffuser ] = 2.1
valueWeights[WeaponType.Hookgun ] = 1.5 valueWeights[WeaponType.Hookgun ] = 2.1
valueWeights[WeaponType.HiveLauncher] = 1.5

View File

@@ -1,353 +1,230 @@
scales[WeaponType.SmartCannon] = { scales[WeaponType.SmartCannon] = {
{from = 0, to = 28, size = 1.0, usedSlots = 2}, {from = 0, to = 28, size = 1.0, usedSlots = 2},
{from = 29, to = 38, size = 1,5, usedSlots = 3}, {from = 29, to = 38, size = 2.0, usedSlots = 3},
{from = 39, to = 49, size = 2.0, usedSlots = 4}, {from = 39, to = 49, size = 3.0, usedSlots = 4},
--dummy for cooaxial, add 1 to size and level --dummy for cooaxial, add 1 to size and level
{from = 50, to = 52, size = 4.0, usedSlots = 5}, {from = 50, to = 52, size = 4.0, usedSlots = 5},
} }
scales[WeaponType.HeavyCannon] = { scales[WeaponType.HeavyCannon] = {
{from = 0, to = 28, size = 3.0, usedSlots = 4}, {from = 0, to = 28, size = 3.0, usedSlots = 4},
{from = 29, to = 38, size = 4.0, usedSlots = 5}, {from = 29, to = 38, size = 4.0, usedSlots = 5},
{from = 39, to = 49, size = 5.0, usedSlots = 6}, {from = 39, to = 49, size = 5.0, usedSlots = 6},
--dummy for cooaxial, add 1 to size and level --dummy for cooaxial, add 1 to size and level
{from = 50, to = 52, size = 6, usedSlots = 6}, {from = 50, to = 52, size = 5, usedSlots = 6},
} }
scales[WeaponType.Diffuser] = { scales[WeaponType.Diffuser] = {
{from = 0, to = 46, size = 1.0, usedSlots = 2}, {from = 0, to = 46, size = 1.0, usedSlots = 2},
{from = 47, to = 50, size = 2.0, usedSlots = 4}, {from = 47, to = 50, size = 2.0, usedSlots = 4},
--dummy for cooaxial, add 1 to size and level --dummy for cooaxial, add 1 to size and level
{from = 51, to = 52, size = 3.0, usedSlots = 6}, {from = 51, to = 52, size = 3.0, usedSlots = 6},
} }
scales[WeaponType.Hookgun] = { scales[WeaponType.Hookgun] = {
{from = 0, to = 46, size = 1.0, usedSlots = 2}, {from = 0, to = 46, size = 1.0, usedSlots = 2},
{from = 47, to = 50, size = 2.0, usedSlots = 4}, {from = 47, to = 50, size = 2.0, usedSlots = 4},
--dummy for cooaxial, add 1 to size and level --dummy for cooaxial, add 1 to size and level
{from = 51, to = 52, size = 4.0, usedSlots = 6}, {from = 51, to = 52, size = 3.0, usedSlots = 6},
} }
scales[WeaponType.HiveLauncher] = { if GameVersion() >= Version(0, 31, 0) then
{from = 0, to = 32, size = 1.0, usedSlots = 2}, possibleSpecialties[WeaponType.SmartCannon] = {
{from = 33, to = 40, size = 1.5, usedSlots = 3}, {specialty = Specialty.HighDamage, probability = 0.2},
{from = 41, to = 50, size = 2.0, usedSlots = 4}, {specialty = Specialty.HighFireRate, probability = 0.3},
--dummy for cooaxial, add 1 to size and level {specialty = Specialty.HighRange, probability = 0.7},
{from = 51, to = 52, size = 3.0, usedSlots = 6}, -- {specialty = Specialty.HighHullDamage, probability = 0.5},
} -- {specialty = Specialty.LessCoolingTime, probability = 0.4},
}
if GameVersion() >= Version(0, 31, 0) then else
possibleSpecialties[WeaponType.SmartCannon] = { possibleSpecialties[WeaponType.SmartCannon] = {
{specialty = Specialty.HighDamage, probability = 0.2}, Specialty.HighDamage,
{specialty = Specialty.HighFireRate, probability = 0.3}, Specialty.HighFireRate,
{specialty = Specialty.HighRange, probability = 0.7}, Specialty.HighRange,
} Specialty.HighHullDamage,
else Specialty.LessCoolingTime,
possibleSpecialties[WeaponType.SmartCannon] = { }
Specialty.HighDamage, end
Specialty.HighFireRate,
Specialty.HighRange, if GameVersion() >= Version(0, 31, 0) then
Specialty.HighHullDamage, possibleSpecialties[WeaponType.HeavyCannon] = {
Specialty.LessCoolingTime, {specialty = Specialty.HighDamage, probability = 0.2},
} {specialty = Specialty.HighRange, probability = 0.35},
end {specialty = Specialty.HighFireRate, probability = 0.3},
-- {specialty = Specialty.HighHullDamage, probability = 0.2},
if GameVersion() >= Version(0, 31, 0) then -- {specialty = Specialty.HighShieldDamage, probability = 0.2},
possibleSpecialties[WeaponType.HeavyCannon] = { -- {specialty = Specialty.LessCoolingTime, probability = 0.2}
{specialty = Specialty.HighDamage, probability = 0.2}, }
{specialty = Specialty.HighRange, probability = 0.35}, else
{specialty = Specialty.HighFireRate, probability = 0.3}, possibleSpecialties[WeaponType.HeavyCannon] = {
} Specialty.HighDamage,
else Specialty.HighFireRate,
possibleSpecialties[WeaponType.HeavyCannon] = { Specialty.HighRange,
Specialty.HighDamage, Specialty.HighHullDamage,
Specialty.HighFireRate, Specialty.HighShieldDamage,
Specialty.HighRange, Specialty.LessCoolingTime,
Specialty.HighHullDamage, }
Specialty.HighShieldDamage, end
Specialty.LessCoolingTime,
} if GameVersion() >= Version(0, 31, 0) then
end possibleSpecialties[WeaponType.Diffuser] = {
{specialty = Specialty.HighDamage, probability = 0.3},
if GameVersion() >= Version(0, 31, 0) then {specialty = Specialty.HighRange, probability = 0.3},
possibleSpecialties[WeaponType.Diffuser] = { -- {specialty = Specialty.FasterRechargeTime, probability = 0.6},
{specialty = Specialty.HighDamage, probability = 0.3}, }
{specialty = Specialty.HighRange, probability = 0.3}, else
} possibleSpecialties[WeaponType.Diffuser] = {
else Specialty.HighDamage,
possibleSpecialties[WeaponType.Diffuser] = { Specialty.HighRange,
Specialty.HighDamage, Specialty.FasterRechargeTime,
Specialty.HighRange, }
Specialty.FasterRechargeTime, end
}
end if GameVersion() >= Version(0, 31, 0) then
possibleSpecialties[WeaponType.Hookgun] = {
if GameVersion() >= Version(0, 31, 0) then {specialty = Specialty.HighDamage, probability = 0.3},
possibleSpecialties[WeaponType.Hookgun] = { {specialty = Specialty.HighRange, probability = 0.3},
{specialty = Specialty.HighDamage, probability = 0.3}, -- {specialty = Specialty.FasterRechargeTime, probability = 0.6},
{specialty = Specialty.HighRange, probability = 0.3}, }
} else
else possibleSpecialties[WeaponType.Hookgun] = {
possibleSpecialties[WeaponType.Hookgun] = { Specialty.HighDamage,
Specialty.HighDamage, Specialty.HighRange,
Specialty.HighRange, Specialty.FasterRechargeTime,
Specialty.FasterRechargeTime, }
} end
end
function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, rarity)
if GameVersion() >= Version(0, 31, 0) then local result = TurretTemplate()
possibleSpecialties[WeaponType.HiveLauncher] = {
{specialty = Specialty.HighShootingTime, probability = 0.2}, -- generate turret
{specialty = Specialty.HighDamage, probability = 0.15}, local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps)
{specialty = Specialty.HighFireRate, probability = 0.15}, local crew = Crew()
{specialty = Specialty.HighRange, probability = 0.25}, crew:add(requiredCrew, CrewMan(CrewProfessionType.Gunner))
{specialty = Specialty.BurstFire, probability = 0.1}, result.crew = crew
}
else -- generate weapons
possibleSpecialties[WeaponType.HiveLauncher] = { local numWeapons = rand:getInt(1, 4)
Specialty.HighDamage,
Specialty.HighRange, local weapon = WeaponGenerator.generateSmartCannon(rand, dps, tech, material, rarity)
Specialty.FasterRechargeTime, weapon.fireDelay = weapon.fireDelay * numWeapons
}
end -- attach weapons to turret
TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, rarity)
local result = TurretTemplate() local shootingTime = 25 * rand:getFloat(0.8, 1.2)
local coolingTime = 15 * rand:getFloat(0.8, 1.2)
-- generate turret TurretGenerator.createStandardCooling(result, coolingTime, shootingTime)
local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps)
local crew = Crew() TurretGenerator.scale(rand, result, WeaponType.SmartCannon, tech, 0.6)
crew:add(requiredCrew, CrewMan(CrewProfessionType.Gunner)) TurretGenerator.addSpecialties(rand, result, WeaponType.SmartCannon)
result.crew = crew
result:updateStaticStats()
-- generate weapons
local numWeapons = rand:getInt(1, 4) return result
end
local weapon = WeaponGenerator.generateSmartCannon(rand, dps, tech, material, rarity)
weapon.fireDelay = weapon.fireDelay * numWeapons generatorFunction[WeaponType.SmartCannon] = TurretGenerator.generateSmartCannonTurret
local name = "Smart-Cannon /* weapon name*/"%_T
function TurretGenerator.generateHeavyCannonTurret(rand, dps, tech, material, rarity)
local specType = rand:getInt(0, 2) local result = TurretTemplate()
if specType == 1 then
name = "Ionized Smart-Cannon /* weapon name*/"%_T -- generate turret
weapon.shieldPenetration = 1 local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps)
elseif specType == 2 then local crew = Crew()
name = "Plasmed Smart-Cannon /* weapon name*/"%_T crew:add(requiredCrew*2, CrewMan(CrewProfessionType.Gunner))
weapon.damageType = DamageType.Plasma crew:add(requiredCrew, CrewMan(CrewProfessionType.Repair))
weapon.damage = weapon.damage * 0.9 result.crew = crew
end
-- generate weapons
-- attach weapons to turret local numWeapons = rand:getInt(1, 4)
TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
local weapon = WeaponGenerator.generateHeavyCannon(rand, dps, tech, material, rarity)
local shootingTime = 25 * rand:getFloat(0.8, 1.2) weapon.fireDelay = weapon.fireDelay * numWeapons
local coolingTime = 15 * rand:getFloat(0.8, 1.2)
TurretGenerator.createStandardCooling(result, coolingTime, shootingTime) -- attach weapons to turret
TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
TurretGenerator.scale(rand, result, WeaponType.SmartCannon, tech, 0.6)
local specialties = TurretGenerator.addSpecialties(rand, result, WeaponType.SmartCannon) local shootingTime = 25 * rand:getFloat(0.8, 1.2)
local coolingTime = 20 * rand:getFloat(0.8, 1.2)
result.slotType = TurretSlotType.Armed TurretGenerator.createStandardCooling(result, coolingTime, shootingTime)
result:updateStaticStats()
TurretGenerator.scale(rand, result, WeaponType.HeavyCannon, tech, 0.6)
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical) TurretGenerator.addSpecialties(rand, result, WeaponType.HeavyCannon)
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) result:updateStaticStats()
return result return result
end end
generatorFunction[WeaponType.SmartCannon] = TurretGenerator.generateSmartCannonTurret generatorFunction[WeaponType.HeavyCannon] = TurretGenerator.generateHeavyCannonTurret
function TurretGenerator.generateHeavyCannonTurret(rand, dps, tech, material, rarity) function TurretGenerator.generateDiffuserTurret(rand, dps, tech, material, rarity)
local result = TurretTemplate() local result = TurretTemplate()
-- generate turret -- generate turret
local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps) local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps)
local crew = Crew() local crew = Crew()
crew:add(requiredCrew * 3, CrewMan(CrewProfessionType.Gunner)) crew:add(requiredCrew, CrewMan(CrewProfessionType.Gunner))
crew:add(requiredCrew, CrewMan(CrewProfessionType.Repair)) result.crew = crew
result.crew = crew
-- generate weapons
-- generate weapons local numWeapons = rand:getInt(1, 2)
local numWeapons = rand:getInt(1, 4)
local weapon = WeaponGenerator.generateDiffuser(rand, dps, tech, material, rarity)
local weapon = WeaponGenerator.generateHeavyCannon(rand, dps, tech, material, rarity) weapon.damage = weapon.damage / numWeapons
weapon.fireDelay = weapon.fireDelay * numWeapons
-- attach weapons to turret
local Pen = rand:getInt(0, rarity.value) TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
if Pen > 0 then
weapon.blockPenetration = Pen local rechargeTime = 20 * rand:getFloat(0.8, 1.2)
outerAdjective = "Cumulative "%_T local shootingTime = 15 * rand:getFloat(0.8, 1.2)
end TurretGenerator.createBatteryChargeCooling(result, rechargeTime, shootingTime)
-- attach weapons to turret
TurretGenerator.attachWeapons(rand, result, weapon, numWeapons) TurretGenerator.scale(rand, result, WeaponType.Diffuser, tech, 0.75)
TurretGenerator.addSpecialties(rand, result, WeaponType.Diffuser)
local shootingTime = 25 * rand:getFloat(0.8, 1.2)
local coolingTime = 20 * rand:getFloat(0.8, 1.2) result:updateStaticStats()
TurretGenerator.createStandardCooling(result, coolingTime, shootingTime)
return result
TurretGenerator.scale(rand, result, WeaponType.HeavyCannon, tech, 0.6) end
local specialties = TurretGenerator.addSpecialties(rand, result, WeaponType.HeavyCannon)
generatorFunction[WeaponType.Diffuser] = TurretGenerator.generateDiffuserTurret
result.slotType = TurretSlotType.Armed
result:updateStaticStats()
function TurretGenerator.generateHookgunTurret(rand, dps, tech, material, rarity)
local name = "Heavy Cannon /* weapon name*/"%_T local result = TurretTemplate()
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical) -- generate turret
local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps)
if result.size >= 4 then local crew = Crew()
name = "Mons Meg /* weapon name*/"%_T crew:add(requiredCrew*2, CrewMan(CrewProfessionType.Gunner))
end result.crew = crew
if result.size >= 5 then -- generate weapons
name = "Dulle Griet /* weapon name*/"%_T local numWeapons = rand:getInt(1, 2)
end
local weapon = WeaponGenerator.generateHookgun(rand, dps, tech, material, rarity)
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) weapon.damage = weapon.damage / numWeapons
return result -- attach weapons to turret
end TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
generatorFunction[WeaponType.HeavyCannon] = TurretGenerator.generateHeavyCannonTurret local rechargeTime = 4 * rand:getFloat(0.8, 1.2)
local shootingTime = 2 * rand:getFloat(0.8, 1.2)
TurretGenerator.createBatteryChargeCooling(result, rechargeTime, shootingTime)
function TurretGenerator.generateDiffuserTurret(rand, dps, tech, material, rarity)
local result = TurretTemplate()
TurretGenerator.scale(rand, result, WeaponType.Hookgun, tech, 0.75)
-- generate turret TurretGenerator.addSpecialties(rand, result, WeaponType.Hookgun)
local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps)
local crew = Crew() result:updateStaticStats()
crew:add(requiredCrew, CrewMan(CrewProfessionType.Gunner))
result.crew = crew return result
end
-- generate weapons
local numWeapons = rand:getInt(1, 2) generatorFunction[WeaponType.Hookgun] = TurretGenerator.generateHookgunTurret
local weapon = WeaponGenerator.generateDiffuser(rand, dps, tech, material, rarity)
weapon.damage = weapon.damage / numWeapons
-- attach weapons to turret
TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
local rechargeTime = 20 * rand:getFloat(0.8, 1.2)
local shootingTime = 15 * rand:getFloat(0.8, 1.2)
TurretGenerator.createBatteryChargeCooling(result, rechargeTime, shootingTime)
TurretGenerator.scale(rand, result, WeaponType.Diffuser, tech, 0.75)
local specialties = TurretGenerator.addSpecialties(rand, result, WeaponType.Diffuser)
result.slotType = TurretSlotType.Armed
result:updateStaticStats()
local name = "Diffuser /* weapon name*/"%_T
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Energy)
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)
return result
end
generatorFunction[WeaponType.Diffuser] = TurretGenerator.generateDiffuserTurret
function TurretGenerator.generateHookgunTurret(rand, dps, tech, material, rarity)
local result = TurretTemplate()
-- generate turret
local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps)
local crew = Crew()
crew:add(requiredCrew*2, CrewMan(CrewProfessionType.Gunner))
result.crew = crew
-- generate weapons
local numWeapons = rand:getInt(1, 2)
local weapon = WeaponGenerator.generateHookgun(rand, dps, tech, material, rarity)
weapon.damage = weapon.damage / numWeapons
-- attach weapons to turret
TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
local rechargeTime = 4 * rand:getFloat(0.8, 1.2)
local shootingTime = 2 * rand:getFloat(0.8, 1.2)
TurretGenerator.createBatteryChargeCooling(result, rechargeTime, shootingTime)
TurretGenerator.scale(rand, result, WeaponType.Hookgun, tech, 0.75)
local specialties = TurretGenerator.addSpecialties(rand, result, WeaponType.Hookgun)
result.slotType = TurretSlotType.Armed
result:updateStaticStats()
local name = "Hookgun /* weapon name*/"%_T
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
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)
return result
end
generatorFunction[WeaponType.Hookgun] = TurretGenerator.generateHookgunTurret
function TurretGenerator.generateHiveLauncherTurret(rand, dps, tech, material, rarity)
local result = TurretTemplate()
-- generate turret
local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps)
local crew = Crew()
crew:add(requiredCrew*2, CrewMan(CrewProfessionType.Gunner))
result.crew = crew
-- generate weapons
local numWeapons = rand:getInt(1, 2)
local weapon = WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
weapon.damage = weapon.damage / numWeapons
-- attach weapons to turret
local positions = {}
if rand:getBool() then
table.insert(positions, vec3(0, 0.3, 0))
else
table.insert(positions, vec3(0.4, 0.3, 0))
table.insert(positions, vec3(-0.4, 0.3, 0))
end
-- attach
for _, position in pairs(positions) do
weapon.localPosition = position * result.size
result:addWeapon(weapon)
end
local shootingTime = 20 * rand:getFloat(0.8, 1.2)
local coolingTime = 15 * rand:getFloat(0.8, 1.2)
TurretGenerator.createStandardCooling(result, coolingTime, shootingTime)
TurretGenerator.scale(rand, result, WeaponType.RocketLauncher, tech, 0.6, coaxialAllowed)
local specialties = TurretGenerator.addSpecialties(rand, result, WeaponType.RocketLauncher)
result.slotType = TurretSlotType.Armed
result:updateStaticStats()
local name = "Hive-Launcher /* weapon name*/"%_T
if weapon.shotsFired > 20 then
name = "Swarm-Launcher /* weapon name*/"%_T
end
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
multishot = ""%_T
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)
return result
end
generatorFunction[WeaponType.HiveLauncher] = TurretGenerator.generateHiveLauncherTurret

View File

@@ -1,52 +1,45 @@
TurretIngredients[WeaponType.SmartCannon] = TurretIngredients[WeaponType.SmartCannon] =
{ {
{name = "Servo", amount = 15, investable = 10, minimum = 5, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, {name = "Servo", amount = 15, investable = 10, minimum = 5, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage},
{name = "Warhead", amount = 5, investable = 6, minimum = 1, weaponStat = "damage", }, {name = "Warhead", amount = 5, investable = 6, minimum = 1, weaponStat = "damage", },
{name = "High Pressure Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "reach", }, {name = "High Pressure Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "reach", },
{name = "Ammunition M", amount = 2, investable = 4, minimum = 1, weaponStat = "damage", investFactor = 0.5,}, {name = "Ammunition M", amount = 2, investable = 4, minimum = 1, weaponStat = "damage", investFactor = 0.5,},
{name = "Targeting Card", amount = 3, investable = 3, minimum = 0, weaponStat = "seeker", investFactor = 1, changeType = StatChanges.Flat}, {name = "Targeting Card", amount = 3, investable = 3, minimum = 0, weaponStat = "seeker", investFactor = 1, changeType = StatChanges.Flat},
{name = "Steel", amount = 8, investable = 10, minimum = 3,}, {name = "Steel", amount = 8, investable = 10, minimum = 3,},
{name = "Steel Tube", amount = 5, investable = 10, minimum = 3,}, {name = "Steel Tube", amount = 5, investable = 10, minimum = 3,},
} -- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat},
}
TurretIngredients[WeaponType.HeavyCannon] =
{ TurretIngredients[WeaponType.SmartCannon] =
{name = "Servo", amount = 8, investable = 8, minimum = 4, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, {
{name = "Warhead", amount = 5, investable = 6, minimum = 1, weaponStat = "damage", }, {name = "Servo", amount = 8, investable = 8, minimum = 4, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage},
{name = "High Pressure Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "reach", }, {name = "Warhead", amount = 5, investable = 6, minimum = 1, weaponStat = "damage", },
{name = "Ammunition", amount = 5, investable = 10, minimum = 3, weaponStat = "damage", investFactor = 0.2,}, {name = "High Pressure Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "reach", },
{name = "Steel", amount = 20, investable = 10, minimum = 20,}, {name = "Ammunition", amount = 5, investable = 10, minimum = 3, weaponStat = "damage", investFactor = 0.2,},
{name = "Metal Plate", amount = 8, investable = 10, minimum = 10,}, {name = "Steel", amount = 20, investable = 10, minimum = 20,},
} {name = "Metal Plate", amount = 8, investable = 10, minimum = 10,},
-- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat},
TurretIngredients[WeaponType.Diffuser] = }
{
{name = "Plasma Cell", amount = 10, investable = 10, minimum = 10, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, TurretIngredients[WeaponType.Diffuser] =
{name = "High Capacity Lens", amount = 5, investable = 6, minimum = 1, weaponStat = "reach", }, {
{name = "Energy Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "damage", }, {name = "Plasma Cell", amount = 10, investable = 10, minimum = 10, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage},
{name = "Steel", amount = 20, investable = 0, minimum = 20,}, {name = "High Capacity Lens", amount = 5, investable = 6, minimum = 1, weaponStat = "reach", },
{name = "Copper", amount = 10, investable = 0, minimum = 10,}, {name = "Energy Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "damage", },
{name = "Silver", amount = 5, investable = 0, minimum = 5,}, {name = "Steel", amount = 20, investable = 0, minimum = 20,},
} {name = "Copper", amount = 10, investable = 0, minimum = 10,},
{name = "Silver", amount = 5, investable = 0, minimum = 5,},
TurretIngredients[WeaponType.Hookgun] = -- TODO Подумать над составляющими -- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat},
{ }
{name = "Plasma Cell", amount = 10, investable = 10, minimum = 10, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage},
{name = "High Capacity Lens", amount = 5, investable = 6, minimum = 1, weaponStat = "reach", }, TurretIngredients[WeaponType.Hookgun] =
{name = "Energy Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "damage", }, {
{name = "Steel", amount = 20, investable = 0, minimum = 20,}, {name = "Plasma Cell", amount = 10, investable = 10, minimum = 10, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage},
{name = "Copper", amount = 10, investable = 0, minimum = 10,}, {name = "High Capacity Lens", amount = 5, investable = 6, minimum = 1, weaponStat = "reach", },
{name = "Silver", amount = 5, investable = 0, minimum = 5,}, {name = "Energy Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "damage", },
} {name = "Steel", amount = 20, investable = 0, minimum = 20,},
{name = "Copper", amount = 10, investable = 0, minimum = 10,},
TurretIngredients[WeaponType.HiveLauncher] = {name = "Silver", amount = 5, investable = 0, minimum = 5,},
{ -- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat},
{name = "Servo", amount = 15, investable = 10, minimum = 5, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, }
{name = "Rocket", amount = 15, investable = 10, minimum = 15, weaponStat = "damage", investFactor = 0.2, changeType = StatChanges.Percentage},
{name = "High Pressure Tube", amount = 6, investable = 12, minimum = 1, weaponStat = "reach", investFactor = 0.4, changeType = StatChanges.Percentage},
{name = "Fuel", amount = 6, investable = 12, minimum = 1, weaponStat = "reach", investFactor = 0.5, changeType = StatChanges.Percentage},
{name = "Targeting Card", amount = 10, investable = 10, minimum = 0, weaponStat = "seeker", investFactor = 1, changeType = StatChanges.Flat},
{name = "Steel", amount = 8, investable = 10, minimum = 3,},
{name = "Wire", amount = 5, investable = 10, minimum = 3,},
}

View File

@@ -1,247 +1,201 @@
function WeaponGenerator.generateSmartCannon(rand, dps, tech, material, rarity) function WeaponGenerator.generateSmartCannon(rand, dps, tech, material, rarity)
local weapon = Weapon() local weapon = Weapon()
weapon:setProjectile() weapon:setProjectile()
dps = dps * 0.9 dps = dps * 0.75
local fireDelay = rand:getFloat(1.5, 2.5)*0.5 local fireDelay = rand:getFloat(1.5, 2.5)*0.5
local reach = rand:getFloat(1100, 1500)*0.7 local reach = rand:getFloat(1100, 1500)*0.7
local damage = dps * fireDelay local damage = dps * fireDelay
local speed = rand:getFloat(300, 400)*4 local speed = rand:getFloat(300, 400)*2
local existingTime = (reach / speed)*1.2 local existingTime = (reach / speed)*1.2
weapon.fireDelay = fireDelay weapon.fireDelay = fireDelay
weapon.reach = reach weapon.reach = reach
weapon.appearanceSeed = rand:getInt() weapon.appearanceSeed = rand:getInt()
weapon.seeker = 1 weapon.seeker = rand:test(1 / 2)
weapon.appearance = WeaponAppearance.Cannon weapon.appearance = WeaponAppearance.Cannon
weapon.name = "Smart-Cannon /* Weapon Name*/"%_t weapon.name = "Smart Cannon /* Weapon Name*/"%_t
weapon.prefix = "Smart-Cannon /* Weapon Prefix*/"%_t weapon.prefix = "Smart Cannon /* Weapon Prefix*/"%_t
weapon.icon = "data/textures/icons/smartcannon.png" weapon.icon = "data/textures/icons/autocannon.png"
weapon.sound = "cannon" weapon.sound = "cannon"
weapon.accuracy = 0.99 - rand:getFloat(0, 0.03) weapon.accuracy = 0.99 - rand:getFloat(0, 0.03)
weapon.damage = damage weapon.damage = damage
weapon.damageType = DamageType.Physical weapon.damageType = DamageType.Physical
weapon.impactParticles = ImpactParticles.Explosion weapon.impactParticles = ImpactParticles.Explosion
weapon.shieldDamageMultiplicator=1.1 + rarity.value * 0.1 weapon.shieldDamageMultiplicator=1.1 + rarity.value * 0.1
weapon.impactSound = 1 weapon.impactSound = 1
weapon.impactExplosion = true weapon.impactExplosion = true
weapon.psize = rand:getFloat(0.2, 0.5)
weapon.psize = rand:getFloat(0.2, 0.5) weapon.pmaximumTime = existingTime
weapon.pmaximumTime = existingTime weapon.pvelocity = speed
weapon.pvelocity = speed weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1)
weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1)
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
-- these have to be assigned after the weapon was adjusted since the damage might be changed
-- these have to be assigned after the weapon was adjusted since the damage might be changed weapon.recoil = weapon.damage * 20 * 0.75
weapon.recoil = weapon.damage * 20 * 0.75 weapon.explosionRadius = math.sqrt(weapon.damage * 6)
weapon.explosionRadius = math.sqrt(weapon.damage * 6)
return weapon
return weapon end
end
generatorFunction[WeaponType.SmartCannon] = WeaponGenerator.generateSmartCannon
generatorFunction[WeaponType.SmartCannon] = WeaponGenerator.generateSmartCannon
function WeaponGenerator.generateHeavyCannon(rand, dps, tech, material, rarity)
local weapon = Weapon()
weapon:setProjectile()
function WeaponGenerator.generateHeavyCannon(rand, dps, tech, material, rarity)
local weapon = Weapon() dps = dps * 1.85
weapon:setProjectile() local fireDelay = rand:getFloat(1.5, 2.0)*1.7
local reach = rand:getFloat(1100, 1500)*1.2
dps = dps * 1.85 local damage = dps * fireDelay
local fireDelay = rand:getFloat(1.5, 2.0)*1.7 local speed = rand:getFloat(600, 1000)*1.4
local reach = rand:getFloat(1100, 1500)*1.2 local existingTime = (reach / speed)*1.1
local damage = dps * fireDelay
local speed = rand:getFloat(600, 1000)*1.4 weapon.fireDelay = fireDelay
local existingTime = (reach / speed)*1.1 weapon.reach = reach
weapon.appearanceSeed = rand:getInt()
weapon.fireDelay = fireDelay weapon.appearance = WeaponAppearance.Bolter
weapon.reach = reach weapon.name = "Heavy Cannon /* Weapon Name*/"%_t
weapon.appearanceSeed = rand:getInt() weapon.icon = "data/textures/icons/heavycannon.png"
weapon.appearance = WeaponAppearance.Bolter weapon.sound = "cannon"
weapon.name = "Heavy Cannon /* Weapon Name*/"%_t weapon.accuracy = 0.95 - rand:getFloat(0, 0.02)
weapon.icon = "data/textures/icons/heavycannon.png"
weapon.sound = "cannon" weapon.damage = damage
weapon.accuracy = 0.95 - rand:getFloat(0, 0.02) weapon.damageType = DamageType.Physical
weapon.impactParticles = ImpactParticles.Explosion
weapon.damage = damage weapon.impactSound = 1
weapon.damageType = DamageType.Physical weapon.impactExplosion = true
weapon.impactParticles = ImpactParticles.Explosion weapon.otherForce = dps*math.max(1, rarity.value)*89*5
weapon.impactSound = 1
weapon.impactExplosion = true
weapon.otherForce = dps*math.max(1, rarity.value)*89*5 weapon.psize = rand:getFloat(0.2, 0.5)
weapon.pmaximumTime = existingTime
weapon.pvelocity = speed
weapon.psize = rand:getFloat(0.2, 0.5) weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1)
weapon.pmaximumTime = existingTime
weapon.pvelocity = speed local Pen = rand:getInt(0, rarity.value)
weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1) if Pen > 0 then
weapon.blockPenetration = Pen
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity) weapon.prefix = "Cumulative Heavy Cannon /* Weapon Prefix*/"%_t
else
-- these have to be assigned after the weapon was adjusted since the damage might be changed weapon.prefix = "Heavy Cannon /* Weapon Prefix*/"%_t
weapon.recoil = weapon.damage * 50 end
weapon.explosionRadius = math.sqrt(weapon.damage * 7)
return weapon WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
end
-- these have to be assigned after the weapon was adjusted since the damage might be changed
generatorFunction[WeaponType.HeavyCannon] = WeaponGenerator.generateHeavyCannon weapon.recoil = weapon.damage * 50
weapon.explosionRadius = math.sqrt(weapon.damage * 7)
return weapon
function WeaponGenerator.generateDiffuser(rand, dps, tech, material, rarity) end
local weapon = Weapon()
weapon:setBeam() generatorFunction[WeaponType.HeavyCannon] = WeaponGenerator.generateHeavyCannon
local fireDelay = rand:getFloat(1, 2.5)*0.5
local reach = rand:getFloat(950, 1400) function WeaponGenerator.generateDiffuser(rand, dps, tech, material, rarity)
local damage = dps * fireDelay local weapon = Weapon()
weapon:setBeam()
weapon.fireDelay = fireDelay
weapon.appearanceSeed = rand:getInt() local fireDelay = rand:getFloat(1, 2.5)*0.5
weapon.reach = reach local reach = rand:getFloat(950, 1400)
weapon.continuousBeam = false local damage = dps * fireDelay
weapon.appearance = WeaponAppearance.Tesla
weapon.name = "Diffuser /* Weapon Name*/"%_t weapon.fireDelay = fireDelay
weapon.prefix = "Diffuser /* Weapon Prefix*/"%_t weapon.appearanceSeed = rand:getInt()
weapon.icon = "data/textures/icons/diffuser.png" weapon.reach = reach
weapon.sound = "railgun" weapon.continuousBeam = false
weapon.accuracy = 0.99 - rand:getFloat(0, 0.02) weapon.appearance = WeaponAppearance.Tesla
weapon.name = "Diffuser /* Weapon Name*/"%_t
weapon.damage = damage weapon.prefix = "Diffuser /* Weapon Prefix*/"%_t
weapon.damageType = DamageType.Energy weapon.icon = "data/textures/icons/diffuser.png"
weapon.impactParticles = ImpactParticles.Energy weapon.sound = "railgun"
weapon.shieldDamageMultiplicator = 20 + rand:getFloat(0, 4) + rarity.value * 3 weapon.accuracy = 0.99 - rand:getFloat(0, 0.02)
weapon.stoneDamageMultiplicator = 0
weapon.hullDamageMultiplicator = 0 weapon.damage = damage
weapon.impactSound = 1 weapon.damageType = DamageType.Energy
weapon.impactParticles = ImpactParticles.Energy
weapon.blength = weapon.reach weapon.shieldDamageMultiplicator = 20 + rand:getFloat(0, 4) + rarity.value * 3
weapon.bshape = BeamShape.Lightning weapon.stoneDamageMultiplicator = 0
weapon.bwidth = 0.5 weapon.hullDamageMultiplicator = 0
weapon.bauraWidth = 3 weapon.impactSound = 1
weapon.banimationSpeed = 0
weapon.banimationAcceleration = 0 weapon.blength = weapon.reach
weapon.bshapeSize = 13 weapon.bshape = BeamShape.Lightning
weapon.bwidth = 0.5
-- shades of blue weapon.bauraWidth = 3
weapon.bouterColor = ColorHSV(rand:getFloat(180, 260), rand:getFloat(0.5, 1), rand:getFloat(0.1, 0.5)) weapon.banimationSpeed = 0
weapon.binnerColor = ColorHSV(rand:getFloat(180, 260), rand:getFloat(0.1, 0.5), 1) weapon.banimationAcceleration = 0
weapon.bshapeSize = 13
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
-- shades of blue
weapon.recoil = weapon.damage * 5 weapon.bouterColor = ColorHSV(rand:getFloat(180, 260), rand:getFloat(0.5, 1), rand:getFloat(0.1, 0.5))
weapon.binnerColor = ColorHSV(rand:getFloat(180, 260), rand:getFloat(0.1, 0.5), 1)
return weapon
end WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
generatorFunction[WeaponType.Diffuser] = WeaponGenerator.generateDiffuser weapon.recoil = weapon.damage * 5
return weapon
end
function WeaponGenerator.generateHookgun(rand, dps, tech, material, rarity)
local weapon = Weapon() generatorFunction[WeaponType.Diffuser] = WeaponGenerator.generateDiffuser
weapon:setBeam()
local fireDelay = rand:getFloat(0.2, 0.5)
local reach = rand:getFloat(500, 900) function WeaponGenerator.generateHookgun(rand, dps, tech, material, rarity)
local damage = dps * fireDelay local weapon = Weapon()
weapon:setBeam()
weapon.fireDelay = fireDelay
weapon.appearanceSeed = rand:getInt() local fireDelay = rand:getFloat(0.2, 0.5)
weapon.reach = reach local reach = rand:getFloat(500, 900)
weapon.continuousBeam = true local damage = dps * fireDelay
weapon.appearance = WeaponAppearance.Cannon
weapon.name = "Hookgun /* Weapon Name*/"%_t weapon.fireDelay = fireDelay
weapon.prefix = "Hookgun /* Weapon Prefix*/"%_t weapon.appearanceSeed = rand:getInt()
weapon.icon = "data/textures/icons/hookgun.png" weapon.reach = reach
weapon.sound = "cannon" weapon.continuousBeam = true
weapon.accuracy = 0.99 - rand:getFloat(0, 0.02) weapon.appearance = WeaponAppearance.Cannon
weapon.name = "Hookgun /* Weapon Name*/"%_t
weapon.blockPenetration = rand:getInt(0, rarity.value) + 2 weapon.prefix = "Hookgun /* Weapon Prefix*/"%_t
weapon.icon = "data/textures/icons/harpoon.png"
weapon.sound = "cannon"
weapon.otherForce = -500 * dps * rarity.value weapon.accuracy = 0.99 - rand:getFloat(0, 0.02)
weapon.damage = damage weapon.blockPenetration = rand:getInt(0, rarity.value) + 2
weapon.damageType = DamageType.Physical
weapon.impactParticles = ImpactParticles.Physical
weapon.shieldDamageMultiplicator = 0.75 weapon.otherForce = -500 * dps * rarity.value
weapon.stoneDamageMultiplicator = 1.2
weapon.hullDamageMultiplicator = 1 weapon.damage = damage
weapon.impactSound = 1 weapon.damageType = DamageType.Physical
weapon.impactParticles = ImpactParticles.Physical
weapon.blength = weapon.reach weapon.shieldDamageMultiplicator = 0.75
weapon.bshape = BeamShape.Swirly weapon.stoneDamageMultiplicator = 1.2
weapon.bwidth = 0.5 weapon.hullDamageMultiplicator = 1
weapon.bauraWidth = 3 weapon.impactSound = 1
weapon.banimationSpeed = 0
weapon.banimationAcceleration = 0 weapon.blength = weapon.reach
weapon.bshapeSize = 13 weapon.bshape = BeamShape.Swirly
weapon.bwidth = 0.5
-- shades of blue weapon.bauraWidth = 3
weapon.bouterColor = ColorHSV(0, 0, rand:getFloat(0.35, 0.65)) weapon.banimationSpeed = 0
weapon.binnerColor = ColorHSV(1, 1, rand:getFloat(0.35, 0.65)) weapon.banimationAcceleration = 0
weapon.bshapeSize = 13
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
-- shades of blue
weapon.bouterColor = ColorHSV(0, 0, rand:getFloat(0.35, 0.65))
return weapon weapon.binnerColor = ColorHSV(1, 1, rand:getFloat(0.35, 0.65))
end
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
generatorFunction[WeaponType.Hookgun] = WeaponGenerator.generateHookgun
return weapon
end
function WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
local weapon = Weapon() generatorFunction[WeaponType.Hookgun] = WeaponGenerator.generateHookgun
weapon:setProjectile()
local fireDelay = rand:getFloat(2.2, 3)
local reach = rand:getFloat(1300, 1800)
local damage = dps * fireDelay
local speed = rand:getFloat(150, 200)
local existingTime = reach / speed
weapon.fireDelay = fireDelay
weapon.reach = reach
weapon.appearanceSeed = rand:getInt()
weapon.seeker = true
weapon.appearance = WeaponAppearance.RocketLauncher
weapon.name = "Hive-Launcher /* Weapon Name*/"%_t
weapon.prefix = "Hive-Launcher /* Weapon Prefix*/"%_t
weapon.icon = "data/textures/icons/hivelauncher.png"
weapon.sound = "cannon"
weapon.accuracy = 0.5 - rand:getFloat(0, 0.02)
weapon.damage = damage
weapon.damageType = DamageType.Physical
weapon.impactParticles = ImpactParticles.Explosion
weapon.impactSound = 1
weapon.impactExplosion = true
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.pshape = ProjectileShape.Rocket
if rand:test(1) then
local shots = {6, 10, 14, 18, 22, 26, 30}
weapon.shotsFired = shots[rand:getInt(1, #shots)]
weapon.damage = (weapon.damage * 1.5) / weapon.shotsFired
end
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
weapon.recoil = weapon.damage * 2
weapon.explosionRadius = math.sqrt(weapon.damage * 5)
return weapon
end
generatorFunction[WeaponType.HiveLauncher] = WeaponGenerator.generateHiveLauncher

View File

@@ -1,6 +1,5 @@
WeaponTypes.addType("SmartCannon", "Smart Сannon /* Weapon Type */"%_t, armed) WeaponTypes.addType("SmartCannon", "Smart Сannon /* Weapon Type */"%_t, armed)
WeaponTypes.addType("HeavyCannon", "Heavy Cannon /* Weapon Type */"%_t, armed) WeaponTypes.addType("HeavyCannon", "Heavy Cannon /* Weapon Type */"%_t, armed)
WeaponTypes.addType("Diffuser", "Diffuser /* Weapon Type */"%_t, armed) WeaponTypes.addType("Diffuser", "Diffuser /* Weapon Type */"%_t, armed)
WeaponTypes.addType("Hookgun", "Hookgun /* Weapon Type */"%_t, armed) WeaponTypes.addType("Hookgun", "Hookgun /* Weapon Type */"%_t, armed)
WeaponTypes.addType("HiveLauncher", "HiveLauncher /* Weapon Type */"%_t, armed)

View File

@@ -14,7 +14,7 @@ category.chapters =
}, },
{ {
title = "Smartcannon"%_t, title = "Autocannon"%_t,
picture = "data/textures/slide/3.png", picture = "data/textures/slide/3.png",
text = "A lightweight version of the classic cannon.\n\nCompared to conventional cannons:\n+ Increased rate of fire (x2)\n+ Increased projectile speed (x1.5)\n+ A little more damage on the shield (10% - 15%)\n+ Can be equipped with homing missiles.\n- Less damage (x0.75)\n- Shorter damage range (x0.8)"%_t, text = "A lightweight version of the classic cannon.\n\nCompared to conventional cannons:\n+ Increased rate of fire (x2)\n+ Increased projectile speed (x1.5)\n+ A little more damage on the shield (10% - 15%)\n+ Can be equipped with homing missiles.\n- Less damage (x0.75)\n- Shorter damage range (x0.8)"%_t,
}, },

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -10,13 +10,13 @@ meta =
name = "Weapon_Pack_Extended2", name = "Weapon_Pack_Extended2",
-- Title of your mod that will be displayed to players -- Title of your mod that will be displayed to players
title = "Weapon Pack Extended - Reloaded", title = "Weapon Pack Extended2",
-- Description of your mod that will be displayed to players -- Description of your mod that will be displayed to players
description = "Adds some new weapon to the game.", description = "Adds some new weapon to the game.",
-- Insert all authors into this list -- Insert all authors into this list
authors = {"Casimir Kepler, Baconborn, OmenOs"}, authors = {"Alive!"},
-- Version of your mod, should be in format 1.0.0 (major.minor.patch) or 1.0 (major.minor) -- Version of your mod, should be in format 1.0.0 (major.minor.patch) or 1.0 (major.minor)
-- This will be used to check for unmet dependencies or incompatibilities -- This will be used to check for unmet dependencies or incompatibilities
@@ -52,5 +52,5 @@ meta =
saveGameAltering = false, saveGameAltering = false,
-- Contact info for other users to reach you in case they have questions -- Contact info for other users to reach you in case they have questions
contact = "https://steamcommunity.com/id/CasKepler2/", "https://steamcommunity.com/id/baconborn/", contact = "https://steamcommunity.com/id/CasKepler2/",
} }

1
test.txt Normal file
View File

@@ -0,0 +1 @@