-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hired Escorts reimplemented as Hireable Vagabonds with mini-personalities #2152
Open
ThrosturX
wants to merge
67
commits into
naev:main
Choose a base branch
from
ThrosturX:ThrosturX-escorts
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
e03d599
Add files via upload
ThrosturX 9bbf3c0
Update scavenger_event.lua
ThrosturX ff7be69
Update faction.xml
ThrosturX 9af6b90
Add files via upload
ThrosturX 34e7e08
Add files via upload
ThrosturX bda543a
Add files via upload
ThrosturX 46cd412
Add files via upload
ThrosturX e6aefbb
Update scavenger_event.lua
ThrosturX 4cc214b
Add files via upload
ThrosturX ada96e4
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX eaa6548
Update wrapper.lua
ThrosturX 0a5243b
Update escort.lua
ThrosturX 419d1a8
Update escort.lua
ThrosturX 47d789e
Update scavenger_event.lua
ThrosturX 88dc772
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX 9f638f3
Add files via upload
ThrosturX bc6aa8a
Add files via upload
ThrosturX fc12498
Add files via upload
ThrosturX ca79441
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX 7eddc56
Add files via upload
ThrosturX 373d9b7
Add files via upload
ThrosturX 3ec765a
Add files via upload
ThrosturX b77cf6d
Delete escort.lua
ThrosturX 0f1196f
Add files via upload
ThrosturX fdf688f
Add files via upload
ThrosturX ea6bb81
Add files via upload
ThrosturX 8cd1beb
Update wrapper.lua
ThrosturX ebb7973
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX 5918050
Add files via upload
ThrosturX ac8ccb2
Add files via upload
ThrosturX 3f8b957
Add files via upload
ThrosturX e2c7b9c
Create placeholder.png
ThrosturX 06b65bb
Add files via upload
ThrosturX f1fc17d
Delete dat/gui/gfx/portraits/neutral/unique directory
ThrosturX 322e22e
Create placeholder.png
ThrosturX 79bf216
Add files via upload
ThrosturX 0c76dd4
Add files via upload
ThrosturX 02b0e34
Create escort_menu.png
ThrosturX 5776c85
Add files via upload
ThrosturX 9a08cba
Add files via upload
ThrosturX f0df05c
Add files via upload
ThrosturX 43ab692
hopefully all the changes
ThrosturX d9f8735
Merge branch 'main' into ThrosturX-escorts
ThrosturX 9319b62
Merge pull request #1 from naev/main
ThrosturX 02507e6
typos mostly
ThrosturX 0878b2c
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX b5bfa4d
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX 4a513fc
mem.autoleader
ThrosturX d42d046
various fixes and improvements
ThrosturX 659a2ab
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX 3c00ab1
fix wrong portrait bug
ThrosturX dc1691f
Merge branch 'ThrosturX-escorts' of https://github.com/ThrosturX/naev…
ThrosturX 6012bb9
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX 3021826
minor fixes
ThrosturX e066129
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX 122774d
Update human.lua
ThrosturX dd7e4a7
Update artwork
ThrosturX a53b188
Merge branch 'ThrosturX-escorts' of https://github.com/ThrosturX/naev…
ThrosturX ebaf737
fix some luacheck errors
ThrosturX dfc2b38
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX 3a09aa1
more luacheck stuff
ThrosturX 7ebdbfd
Merge branch 'ThrosturX-escorts' of https://github.com/ThrosturX/naev…
ThrosturX 8d6f66e
Update scavenger_event.lua
ThrosturX c8ffdc1
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX b41e1fa
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX 3a0b521
outfits -> outfitsList
ThrosturX d0ebe6e
Merge branch 'naev:main' into ThrosturX-escorts
ThrosturX File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
local equipopt = require 'equipopt' | ||
--[[ | ||
-- @brief Does Escort pilot equipping | ||
-- | ||
-- @param p Pilot to equip | ||
--]] | ||
function equip( p ) | ||
return equipopt.escort( p ) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<outfit name="Integrated Shielding"> | ||
<general> | ||
<slot>intrinsic</slot> | ||
<mass>0</mass> | ||
<price>1000000</price> | ||
<description>The "Integrated Shielding" service provides a full retweak and overhaul of the systems shielding circuitry. The optimizations are able to greatly increase the power with only a slight drawback to the electronics and weapons systems. Due to the nature of the service, only one can be applied to each ship.</description> | ||
<gfx_store>placeholder.webp</gfx_store> | ||
<rarity>6</rarity> | ||
</general> | ||
<specific type="modification"> | ||
<armour_regen>3</armour_regen> | ||
<armour_mod>20</armour_mod> | ||
<shield_mod>20</shield_mod> | ||
<shield_regen_mod>20</shield_regen_mod> | ||
<energy_mod>30</energy_mod> | ||
<energy_regen_mod>20</energy_regen_mod> | ||
<fwd_firerate>-20</fwd_firerate> | ||
<tur_firerate>-20</tur_firerate> | ||
<launch_rate>-20</launch_rate> | ||
<stress_dissipation>-20.000000</stress_dissipation> | ||
</specific> | ||
</outfit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
local optimize = require 'equipopt.optimize' | ||
local ecores = require 'equipopt.cores' | ||
local eoutfits = require 'equipopt.outfits' | ||
local eparams = require 'equipopt.params' | ||
|
||
local function choose_one( t ) return t[ rnd.rnd(1,#t) ] end | ||
|
||
local escort_outfits = eoutfits.merge{{ | ||
-- Heavy Weapons | ||
"Lancelot Bay", | ||
"Hyena Dock", | ||
"Pirate Hyena Bay", | ||
"Turbolaser", "Heavy Ripper Turret", "Railgun Turret", "Ragnarok Beam", | ||
"Railgun", "Heavy Laser Turret", "Grave Beam", "Heavy Ion Turret", | ||
"Heavy Laser Turret", | ||
-- Medium Weapons | ||
"Heavy Ripper Cannon", | ||
"Enygma Systems Turreted Fury Launcher", | ||
"Enygma Systems Turreted Headhunter Launcher", | ||
"Laser Turret MK2", "Razor Turret MK2", "Turreted Vulcan Gun", | ||
"Plasma Turret MK2", "Orion Beam", "EMP Grenade Launcher", | ||
"TeraCom Headhunter Launcher", | ||
"TeraCom Medusa Launcher", "TeraCom Vengeance Launcher", | ||
"Enygma Systems Spearhead Launcher", "Unicorp Caesar IV Launcher", | ||
"TeraCom Fury Launcher", "TeraCom Headhunter Launcher", | ||
"TeraCom Medusa Launcher", "TeraCom Vengeance Launcher", | ||
"TeraCom Imperator Launcher", | ||
"Laser Cannon MK2", "Razor MK2", "Vulcan Gun", "Plasma Blaster MK2", | ||
"Grave Lance", "Orion Lance", "Ion Cannon", | ||
-- Small Weapons | ||
"Laser Cannon MK1", "Razor MK1", "Gauss Gun", "Plasma Blaster MK1", | ||
"Laser Turret MK1", "Razor Turret MK1", "Turreted Gauss Gun", | ||
"Plasma Turret MK1", "Particle Beam", "Particle Lance", | ||
"TeraCom Mace Launcher", "TeraCom Banshee Launcher", | ||
"TeraCom Banshee Launcher", | ||
-- Utility | ||
"Unicorp Scrambler", "Unicorp Light Afterburner", | ||
"Sensor Array", "Hellburner", "Emergency Shield Booster", | ||
"Unicorp Medium Afterburner", "Droid Repair Crew", | ||
"Scanning Combat AI", "Hunting Combat AI", | ||
"Photo-Voltaic Nanobot Coating", | ||
"Adaptive Stealth Plating", | ||
"Blink Drive", | ||
"Milspec Scrambler", | ||
"Targeting Array", "Agility Combat AI", | ||
"Milspec Jammer", "Weapons Ionizer", | ||
"Faraday Tempest Coating", "Hive Combat AI", | ||
-- Heavy Structural | ||
"Biometal Armour", | ||
"Battery IV", "Large Fuel Pod", | ||
"Battery III", "Shield Capacitor III", "Shield Capacitor IV", | ||
"Reactor Class III", | ||
"Large Shield Booster", | ||
-- Medium Structural | ||
"Battery II", "Shield Capacitor II", "Reactor Class II", | ||
"Active Plating", "Medium Shield Booster", | ||
-- Small Structural | ||
"Battery I", "Shield Capacitor I", "Reactor Class I", | ||
"Small Shield Booster", | ||
}} | ||
|
||
local escort_class = { "standard", "elite" } | ||
|
||
local escort_params = { | ||
["Kestrel"] = function () return { | ||
type_range = { | ||
["Launcher"] = { max = 2 }, | ||
}, | ||
} end, | ||
["Pirate Kestrel"] = function () return { | ||
prefer = { | ||
[ "Enygma Systems Spearhead Launcher"] = 7, ["TeraCom Headhunter Launcher"] = 4, | ||
["TeraCom Medusa Launcher"] = 3, ["Enygma Systems Turreted Fury Launcher"] = 2 | ||
}, | ||
type_range = { | ||
["Launcher"] = { max = 4 }, | ||
}, | ||
} end, | ||
["Mule"] = function() return { | ||
fighterbay = 1.2, | ||
disable = 1.1, | ||
move = 0.5, | ||
prefer = { ["Blink Drive"] = 30, ["Milspec Jammer"] = 40, ["Droid Repair Crew"] = 2 }, | ||
type_range = { | ||
[ "Launcher" ] = { max=1 }, | ||
[ "Beam Weapon" ] = { min=1, max=2 } | ||
}, | ||
} end, | ||
} | ||
|
||
local escort_cores = { | ||
["Pirate Kestrel"] = function (p) | ||
local c = ecores.get( p, { systems=escort_class, hulls=escort_class, heavy=false } ) | ||
table.insert( c, choose_one{ "Nexus Bolt 3500 Engine", "Krain Remige Engine", "Tricon Typhoon Engine", } ) | ||
return c | ||
end, | ||
["Kestrel"] = function () return { | ||
choose_one{ "Unicorp PT-2200 Core System", "Milspec Orion 8601 Core System", "Milspec Thalos 9802 Core System", "Milspec Orion 9901 Core System" }, | ||
choose_one{ "Nexus Bolt 3500 Engine", "Krain Remige Engine", "Tricon Typhoon Engine", }, | ||
choose_one{ "Unicorp D-48 Heavy Plating", "S&K Heavy Combat Plating" }, | ||
|
||
} end, | ||
["Starbridge"] = function (p) | ||
local c = ecores.get( p, { systems=escort_class, hulls=escort_class, heavy=false } ) | ||
table.insert( c, choose_one{ "Unicorp Falcon 1300 Engine", "Krain Patagium Engine", "Tricon Cyclone Engine"} ) | ||
return c | ||
end, | ||
["Shark"] = function () return { | ||
choose_one{ "Milspec Orion 2301 Core System", "Milspec Thalos 2202 Core System" }, | ||
"Tricon Zephyr Engine", | ||
choose_one{ "Nexus Light Stealth Plating", "S&K Ultralight Combat Plating" }, | ||
} end, | ||
["Empire Shark"] = function () return { | ||
choose_one{ "Milspec Orion 2301 Core System", "Milspec Thalos 2202 Core System" }, | ||
"Tricon Zephyr Engine", | ||
choose_one{ "Nexus Light Stealth Plating", "S&K Ultralight Combat Plating" }, | ||
} end, | ||
["Mule"] = function() return { | ||
choose_one{ "Milspec Orion 5501 Core System", "Milspec Thalos 5402 Core System", "Unicorp PT-310 Core System" }, | ||
"Melendez Buffalo XL Engine", | ||
choose_one{"S&K Medium Combat Plating", "Unicorp D-24 Medium Plating", "S&K Medium-Heavy Combat Plating", "Patchwork Medium Plating" }, | ||
} end, | ||
} | ||
|
||
local escort_params_overwrite = { | ||
weap = 1.5, -- Focus on weapons | ||
disable = 2.4, -- prefer disablers | ||
-- some nice preferable escort outfits | ||
prefer = { | ||
[ "TeraCom Medusa Launcher"] = 6 , ["TeraCom Medusa Launcher"] = 2, | ||
[ "Enygma Systems Spearhead Launcher"] = 4, ["TeraCom Headhunter Launcher"] = 10, ["Large Shield Booster"] = 2, | ||
[ "Shield Capacitor IV"] = 2 | ||
}, | ||
|
||
|
||
-- not too much diversity, but some | ||
max_same_stru = 2, | ||
max_same_util = 1, | ||
cargo = 0.0, | ||
constant = 4, | ||
rnd = 0.3, | ||
} | ||
|
||
--[[ | ||
-- @brief Does Escort pilot equipping | ||
-- | ||
-- @param p Pilot to equip | ||
--]] | ||
local function equip_escort( p, opt_params ) | ||
opt_params = opt_params or {} | ||
local ps = p:ship() | ||
local sname = ps:nameRaw() | ||
|
||
-- Choose parameters and make Pirateish | ||
local params = eparams.choose( p, escort_params_overwrite ) | ||
params.rnd = params.rnd * 1.5 | ||
if ps:size() < 3 then | ||
params.max_same_weap = 2 | ||
else | ||
params.max_same_weap = 3 | ||
end | ||
params.max_mass = 0.95 + 1.2*rnd.rnd() | ||
-- Per ship tweaks | ||
local sp = escort_params[ sname ] | ||
if sp then | ||
params = tmerge_r( params, sp() ) | ||
end | ||
params = tmerge_r( params, opt_params ) | ||
|
||
-- See cores | ||
local cores | ||
local esccor = escort_cores[ sname ] | ||
if esccor then | ||
cores = esccor( p ) | ||
else | ||
cores = ecores.get( p, { all=escort_class } ) | ||
end | ||
|
||
local mem = p:memory() | ||
mem.equip = { type="scavenger", level="standard" } | ||
|
||
-- Try to equip | ||
return optimize.optimize( p, cores, escort_outfits, params ) | ||
end | ||
|
||
return equip_escort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ equipopt.cores = require 'equipopt.cores' | |
|
||
-- Main equipment functions | ||
equipopt.generic = require 'equipopt.templates.generic' | ||
equipopt.escort = require 'equipopt.templates.escort' | ||
equipopt.empire = require 'equipopt.templates.empire' | ||
equipopt.zalek = require 'equipopt.templates.zalek' | ||
equipopt.dvaered = require 'equipopt.templates.dvaered' | ||
|
@@ -13,4 +14,5 @@ equipopt.soromid = require 'equipopt.templates.soromid' | |
equipopt.pirate = require 'equipopt.templates.pirate' | ||
equipopt.thurion = require 'equipopt.templates.thurion' | ||
equipopt.proteron = require 'equipopt.templates.proteron' | ||
equipopt.scavenger = require 'equipopt.templates.scavenger' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think you committed the scavenger template. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't be needed, artifact from my other modding activity... |
||
return equipopt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
local pilotname = {} | ||
|
||
pilotname.generic = require 'pilotname.generic' | ||
pilotname.human = require 'pilotname.human' | ||
pilotname.pirate = require 'pilotname.pirate' | ||
|
||
return pilotname |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're defining "TeraCom Medusa Launcher" twice.