Skip to content

Commit

Permalink
Add T3 Shields "Asylum" and "Sanctuary" (#4104)
Browse files Browse the repository at this point in the history
![image](https://github.com/user-attachments/assets/25a94ff3-18a3-4bff-bf85-79308957fa9a)

Thanks to Protar for his modeling genius

Adds t3 shields Armada "Conservator" and the Cortex "Overlord" to the extra units pack. **Hides modoption to override default shield behavior.**

Sanctuary:
roughly 5 times as powerful and 5 times as costly as a normal cortex shield with +275 range.
blocks/deflects (depending on rework) all weapons except:
- large starburst missiles
- aircraft bombs
- lightening
- (until merge of my other [shield re-rework pr](#4077) ) flames

Asylum:
roughly 4 times as powerful and 4 times as costly as normal armada shield. +160 range.
blocks/deflects (depending on rework) all weapons except:
- large starburst missiles
- aircraft bombs
- flames

Legion is given access to the Conservator until their t2 and t3 shields are complete.

the opacity of the shields is a little stronger than their t2 counterparts. I'd like to change the tint but that isn't supported in the unitdefs and I wasn't able to figure out how to change it in the fx

**testing steps**

- enable extra units pack,
- you should now see build options for the t3 shields
- build them
- test all projectiles, note the above exclusions
- you can spawn them with `corgatet3` and `armgatet3`

*inversely*

- ensure nothing changes in vanilla game when extra units isn't enabled

Q/A
**But WHY?**
The general sentiment is we need fewer modoptions. Removing shield behavior overrides will cause riots without sweetening the deal a bit. This is that sugar, baby.

**Porc bad!**
Extra units is almost exclusively used for PVE games. In PVE, the AI doesn't really care if you're Porc'ing, and weak shields make porc hard in some of the more crazy game modes.

**Why the exceptions to specific projectiles?!**
So the shields aren't without counterplay. Starburst-style missiles and bombing runs are a deliberate choice. Flames/lightening is for faction flavor. Small missiles are blocked because of the catapult and because there exist many general assault rocketbots that would otherwise effortlessly demolish defenses in scavengers gamemode.
  • Loading branch information
SethDGamre authored Jan 4, 2025
1 parent d6aac4d commit 6a40949
Show file tree
Hide file tree
Showing 19 changed files with 729 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gamedata/alldefs_post.lua
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ function UnitDef_Post(name, uDef)
uDef.buildoptions[numBuildoptions + 6] = "armannit3"
uDef.buildoptions[numBuildoptions + 7] = "armnanotct2"
uDef.buildoptions[numBuildoptions + 8] = "armlwall"
uDef.buildoptions[numBuildoptions + 9] = "armgatet3"
elseif name == "coraca" or name == "corack" or name == "coracv" then
local numBuildoptions = #uDef.buildoptions
uDef.buildoptions[numBuildoptions + 1] = "corapt3"
Expand All @@ -588,13 +589,15 @@ function UnitDef_Post(name, uDef)
uDef.buildoptions[numBuildoptions + 6] = "cordoomt3"
uDef.buildoptions[numBuildoptions + 7] = "cornanotct2"
uDef.buildoptions[numBuildoptions + 8] = "cormwall"
uDef.buildoptions[numBuildoptions + 9] = "corgatet3"
elseif name == "legaca" or name == "legack" or name == "legacv" then
local numBuildoptions = #uDef.buildoptions
uDef.buildoptions[numBuildoptions + 1] = "legapt3"
uDef.buildoptions[numBuildoptions + 2] = "legministarfall"
uDef.buildoptions[numBuildoptions + 3] = "legwint2"
uDef.buildoptions[numBuildoptions + 4] = "legnanotct2"
uDef.buildoptions[numBuildoptions + 5] = "legrwall"
uDef.buildoptions[numBuildoptions + 6] = "corgatet3"
elseif name == "armasy" then
local numBuildoptions = #uDef.buildoptions
uDef.buildoptions[numBuildoptions + 1] = "armptt2"
Expand Down Expand Up @@ -1462,6 +1465,11 @@ function WeaponDef_Post(name, wDef)

---- SHIELD CHANGES
local shieldModOption = modOptions.experimentalshields
if wDef.weapontype == "DGun" then
wDef.interceptedbyshieldtype = 512 --make dgun (like behemoth) interceptable by shields, optionally
elseif wDef.weapontype == "StarburstLauncher" and not string.find(name, "raptor") then
wDef.interceptedbyshieldtype = 1024 --separate from combined MissileLauncher, except raptors
end

if shieldModOption == "absorbplasma" then
if wDef.shield and wDef.shield.repulser and wDef.shield.repulser ~= false then
Expand Down
3 changes: 3 additions & 0 deletions gamedata/scavengers/unitdef_post.lua
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ local function scavUnitDef_Post(name, uDef)
uDef.buildoptions[numBuildoptions + 7] = "armnanotct2_scav"
uDef.buildoptions[numBuildoptions + 8] = "armlwall_scav"
uDef.buildoptions[numBuildoptions + 9] = "armshockwave_scav"
uDef.buildoptions[numBuildoptions + 10] = "armgatet3_scav"
elseif name == "coraca_scav" or name == "corack_scav" or name == "coracv_scav" then
local numBuildoptions = #uDef.buildoptions
uDef.buildoptions[numBuildoptions + 1] = "corapt3_scav"
Expand All @@ -331,13 +332,15 @@ local function scavUnitDef_Post(name, uDef)
uDef.buildoptions[numBuildoptions + 6] = "cordoomt3_scav"
uDef.buildoptions[numBuildoptions + 7] = "cornanotct2_scav"
uDef.buildoptions[numBuildoptions + 8] = "cormwall_scav"
uDef.buildoptions[numBuildoptions + 9] = "corgatet3_scav"
elseif name == "legaca_scav" or name == "legack_scav" or name == "legacv_scav" then
local numBuildoptions = #uDef.buildoptions
uDef.buildoptions[numBuildoptions + 1] = "legapt3_scav"
uDef.buildoptions[numBuildoptions + 2] = "legministarfall_scav"
uDef.buildoptions[numBuildoptions + 3] = "legwint2_scav"
uDef.buildoptions[numBuildoptions + 4] = "legnanotct2_scav"
uDef.buildoptions[numBuildoptions + 5] = "legrwall_scav"
uDef.buildoptions[numBuildoptions + 6] = "corgatet3_scav"
elseif name == "armasy_scav" then
local numBuildoptions = #uDef.buildoptions
uDef.buildoptions[numBuildoptions + 1] = "armptt2_scav"
Expand Down
4 changes: 4 additions & 0 deletions language/en/units.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"armfrt": "Naval Nettle",
"armfus": "Fusion Reactor",
"armgate": "Keeper",
"armgatet3": "Asylum",
"armgeo": "Geothermal Powerplant",
"armuwgeo": "Geothermal Powerplant",
"armgmm": "Prude",
Expand Down Expand Up @@ -486,6 +487,7 @@
"corgantuw": "Experimental Gantry",
"corgarp": "Garpike",
"corgate": "Overseer",
"corgatet3": "Sanctuary",
"corgator": "Incisor",
"corgatreap": "Laser Tiger",
"corgeo": "Geothermal Powerplant",
Expand Down Expand Up @@ -985,6 +987,7 @@
"armfrt": "Floating Anti-air Tower",
"armfus": "Produces 1000 Energy",
"armgate": "Plasma Deflector",
"armgatet3": "Intercepts small weaponry energy signatures of familiar types",
"armgeo": "Produces 300 Energy",
"armuwgeo": "Produces 300 Energy",
"armgmm": "Safe Geothermal Powerplant, produces 750 Energy",
Expand Down Expand Up @@ -1343,6 +1346,7 @@
"corgantuw": "Produces Large Amphibious Units",
"corgarp": "Light Amphibious Tank",
"corgate": "Plasma Deflector",
"corgatet3": "Intercepts small weaponry energy signatures of familiar types",
"corgator": "Light Tank",
"corgatreap": "Heavy Assault Tank",
"corgeo": "Produces 300 Energy",
Expand Down
3 changes: 3 additions & 0 deletions luarules/configs/scav_spawn_defs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,9 @@ local Turrets = {
["leggant_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1},
["armshltxuw_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1},
["corgantuw_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1},
--misc
["armgatet3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2},
["corgatet3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2},
},
[7] = {
--Epic Bulwark and Pulsar/rag/cal
Expand Down
26 changes: 26 additions & 0 deletions luaui/Widgets/gfx_lupsgl4_orbs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ local corgateShieldSphere = table.merge(defaults, {
isShield = true,
})

local corgatet3ShieldSphere = table.merge(defaults, {
pos = { 0, 75, -1 },
size = 18,
colormap1 = { { 0.9, 0.9, 1, 0.75 }, { 0.9, 0.9, 1, 1.0 }, { 0.9, 0.9, 1, 1.0 }, { 0.9, 0.9, 1, 0.75 } },
colormap2 = { { 0.2, 0.6, 0.2, 0.4 }, { 0.2, 0.6, 0.2, 0.45 }, { 0.2, 0.6, 0.2, 0.45 }, { 0.2, 0.6, 0.2, 0.4 } },
isShield = true,
})

local armjunoShieldSphere = table.merge(defaults, {
pos = { 0, 72, 0 },
size = 13,
Expand All @@ -107,6 +115,13 @@ local armgateShieldSphere = table.merge(defaults, {
colormap2 = { { 0.2, 0.6, 0.2, 0.4 }, { 0.2, 0.6, 0.2, 0.45 }, { 0.2, 0.6, 0.2, 0.45 }, { 0.2, 0.6, 0.2, 0.4 } },
isShield = true,
})
local armgatet3ShieldSphere = table.merge(defaults, {
pos = { 0, 42, -6 },
size = 20,
colormap1 = { { 0.9, 0.9, 1, 0.75 }, { 0.9, 0.9, 1, 1.0 }, { 0.9, 0.9, 1, 1.0 }, { 0.9, 0.9, 1, 0.75 } },
colormap2 = { { 0.2, 0.6, 0.2, 0.4 }, { 0.2, 0.6, 0.2, 0.45 }, { 0.2, 0.6, 0.2, 0.45 }, { 0.2, 0.6, 0.2, 0.4 } },
isShield = true,
})

local UnitEffects = {
["armjuno"] = {
Expand Down Expand Up @@ -141,6 +156,12 @@ local UnitEffects = {
--{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,42,0.0}, size=555, precision=0, strength= 0.001, repeatEffect=true}},
--{class='ShieldJitter',options={life=math.huge, pos={0,42,0}, size=20, precision=2, repeatEffect=true}},
},
["corgatet3"] = {
{ class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 75, 0 }, size = 18, precision = 22, repeatEffect = true , isShiedl } },
{ class = 'ShieldSphere', options = corgatet3ShieldSphere },
--{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,42,0.0}, size=555, precision=0, strength= 0.001, repeatEffect=true}},
--{class='ShieldJitter',options={life=math.huge, pos={0,42,0}, size=20, precision=2, repeatEffect=true}},
},
["corfgate"] = {
{ class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 42, 0 }, size = 12, precision = 22, repeatEffect = true } },
{ class = 'ShieldSphere', options = corgateShieldSphere },
Expand All @@ -152,6 +173,11 @@ local UnitEffects = {
{ class = 'ShieldSphere', options = armgateShieldSphere },
--{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,23.5,-5}, size=555, precision=0, strength=0.001, repeatEffect=true}},
},
["armgatet3"] = {
{ class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 37, -5 }, size = 21, precision = 22, repeatEffect = true } },
{ class = 'ShieldSphere', options = armgatet3ShieldSphere },
--{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,23.5,-5}, size=555, precision=0, strength=0.001, repeatEffect=true}},
},
["armfgate"] = {
{ class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 25, 0 }, size = 15, precision = 22, repeatEffect = true } },
{ class = 'ShieldSphere', options = table.merge(armgateShieldSphere, { pos = { 0, 25, 0 } }) },
Expand Down
49 changes: 49 additions & 0 deletions luaui/configs/DeferredLightsGL4config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21420,6 +21420,44 @@ local unitLights = {
lifetime = 0, sustain = 0, animtype = 0},
},
},
['armgatet3'] = {
shieldglow = {
lightType = 'point',
pieceName = 'base',
lightConfig = { posx = 0, posy = 66, posz = -5, radius = 68,
color2r = 0.1, color2g = 0.45, color2b = 0.15, colortime = 70,
r = 0.2, g = 0.9, b = 0.3, a = 0.25,
modelfactor = 0.4, specular = 1.0, scattering = 1.3, lensflare = 0,
lifetime = 0, sustain = 0, animtype = 0},
},
bottom1 = {
lightType = 'point',
pieceName = 'base',
lightConfig = { posx = 0, posy = 20, posz = 26, radius = 28,
color2r = 1, color2g = 1, color2b = 0.2, colortime = 0,
r = 1, g = 1, b = 0.2, a = 0.07,
modelfactor = 0.4, specular = 0, scattering = 0.7, lensflare = 0,
lifetime = 0, sustain = 0, animtype = 0},
},
bottom2 = {
lightType = 'point',
pieceName = 'base',
lightConfig = { posx = -6.2, posy = 20, posz = 26, radius = 28,
color2r = 1, color2g = 1, color2b = 0.2, colortime = 0,
r = 1, g = 1, b = 0.2, a = 0.07,
modelfactor = 0.4, specular = 0, scattering = 0.7, lensflare = 0,
lifetime = 0, sustain = 0, animtype = 0},
},
bottom3 = {
lightType = 'point',
pieceName = 'base',
lightConfig = { posx = 6.2, posy = 20, posz = 26, radius = 28,
color2r = 1, color2g = 1, color2b = 0.2, colortime = 0,
r = 1, g = 1, b = 0.2, a = 0.07,
modelfactor = 0.4, specular = 0, scattering = 0.7, lensflare = 0,
lifetime = 0, sustain = 0, animtype = 0},
},
},
['corgate'] = {
shieldglow = {
lightType = 'point',
Expand All @@ -21431,6 +21469,17 @@ local unitLights = {
lifetime = 0, sustain = 0, animtype = 0},
},
},
['corgatet3'] = {
shieldglow = {
lightType = 'point',
pieceName = 'base',
lightConfig = { posx = 0, posy = 42, posz = 0, radius = 55,
color2r = 0.15, color2g = 0.45, color2b = 0.15, colortime = 70,
r = 0.2, g = 0.9, b = 0.3, a = 0.25,
modelfactor = 0.4, specular = 1.0, scattering = 1.3, lensflare = 0,
lifetime = 0, sustain = 0, animtype = 0},
},
},
['legrad'] = {
greenblobA = {
lightType = 'point',
Expand Down
1 change: 1 addition & 0 deletions modoptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1782,6 +1782,7 @@ local options = {
type = "list",
section = "options_cheats",
def = "unchanged",
hidden = true,
items = {
{ key = "unchanged", name = "Unchanged", desc = "Unchanged" },
{ key = "absorbplasma", name = "Absorb Plasma", desc = "Collisions Disabled" },
Expand Down
Binary file added objects3d/Units/armgatet3.s3o
Binary file not shown.
Binary file added objects3d/Units/armgatet3_dead.s3o
Binary file not shown.
Binary file added objects3d/Units/corgatet3.s3o
Binary file not shown.
Binary file added objects3d/Units/corgatet3_dead.s3o
Binary file not shown.
148 changes: 148 additions & 0 deletions scripts/Units/armgatet3.bos
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
#define TA // This is a TA script

#include "sfxtype.h"
#include "exptype.h"

piece base, shield;

static-var Static_Var_1, statechg_DesiredState, statechg_StateChanging;


ShieldOn()
{
Static_Var_1 = 1;
}

ShieldOff()
{
Static_Var_1 = 0;
}

InitState()
{
statechg_DesiredState = TRUE;
statechg_StateChanging = FALSE;
}

RequestState(requestedstate, currentstate)
{
if( statechg_StateChanging )
{
statechg_DesiredState = requestedstate;
return (0);
}
statechg_StateChanging = TRUE;
currentstate = statechg_DesiredState;
statechg_DesiredState = requestedstate;
while( statechg_DesiredState != currentstate )
{
if( statechg_DesiredState == 0 )
{
call-script ShieldOn();
currentstate = 0;
}
if( statechg_DesiredState == 1 )
{
call-script ShieldOff();
currentstate = 1;
}
}
statechg_StateChanging = FALSE;
}

Create()
{
hide shield;

Static_Var_1 = 1;
call-script InitState();
}

#define SMOKEPIECE base
#include "smokeunit_thread_nohit.h"

Activate()
{
start-script RequestState(0);
}

Deactivate()
{
start-script RequestState(1);
}

AimPrimary(heading, pitch)
{
sleep 100;
return (Static_Var_1);
}

FirePrimary()
{
sleep 100;
}

QueryPrimary(piecenum)
{
piecenum = shield;
}

AimFromPrimary(piecenum)
{
piecenum = base;
}

AimSecondary(heading, pitch)
{
sleep 100;
return (Static_Var_1);
}

FireSecondary()
{
sleep 100;
}

QuerySecondary(piecenum)
{
piecenum = base;
}

AimFromSecondary(piecenum)
{
piecenum = base;
}

SweetSpot(piecenum)
{
piecenum = base;
}

Killed(severity, corpsetype)
{
if( severity <= 25 )
{
corpsetype = 1 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode shield type BITMAPONLY | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 50 )
{
corpsetype = 2 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode shield type FIRE | SMOKE | FALL | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 99 )
{
corpsetype = 3 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode shield type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD;
return(corpsetype);
}
corpsetype = 3 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode shield type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
return corpsetype;
}
Binary file added scripts/Units/armgatet3.cob
Binary file not shown.
Loading

0 comments on commit 6a40949

Please sign in to comment.