Skip to content

Commit

Permalink
Legion Hovercraft Plant Remodel (#4169)
Browse files Browse the repository at this point in the history
* Legion Hovercraft Plant Remodel

* leghp update

Co-Authored-By: Protar <[email protected]>

* Update leghp.lua

Co-Authored-By: Protar <[email protected]>

* attempt at fixing buildpic issue

Co-Authored-By: Protar <[email protected]>

* colvol

Co-Authored-By: Protar <[email protected]>

* Update leghp.dds

* Corrected footprints

* heap colvol

Co-Authored-By: Protar <[email protected]>

---------

Co-authored-by: Zephyr Skies <[email protected]>
Co-authored-by: Protar <[email protected]>
  • Loading branch information
3 people authored Jan 13, 2025
1 parent c26a2bd commit e924c94
Show file tree
Hide file tree
Showing 11 changed files with 368 additions and 21 deletions.
4 changes: 2 additions & 2 deletions language/en/units.json
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@
"legvenator": "Venator",
"legvision": "Vision",
"legvelite": "Velite",
"legvp": "Legion Vehicle Lab",
"legvp": "Legion Vehicle Plant",
"legwhisper": "Whisper",
"legwin": "Wind Turbine",
"legwint2": "Tech 2 Wind Turbine",
Expand Down Expand Up @@ -1668,7 +1668,7 @@
"legvenator": "Fast High Damage Interceptor",
"legvision": "Provides Temporary Vision",
"legvelite": "Light Corvette",
"legvp": "Vehicle Lab",
"legvp": "Produces Tech 1 Vehicles",
"legwhisper": "Radar / Sonar Plane",
"legwin": "Produces Energy. Depends on wind strength.",
"legwint2": "Produces Energy. Depends on wind strength.",
Expand Down
75 changes: 75 additions & 0 deletions luaui/configs/DeferredLightsGL4config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7577,6 +7577,81 @@ local unitLights = {
},

},
['leghp'] = {
buildlight1 = {
lightType = 'cone',
pieceName = 'buildlight1Point',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 18,
dirx = 0, diry = 0, dirz = 1, theta = 0.99000001,
r = 1.29999995, g = 0.89999998, b = 0.1, a = 2,
modelfactor = 0.1, specular = 0.2, scattering = 1.5, lensflare = 8,
lifetime = 0, sustain = 0, animtype = 0},
},
buildlight2 = {
lightType = 'cone',
pieceName = 'buildlight2Point',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 18,
dirx = 0, diry = 0, dirz = 1, theta = 0.99000001,
r = 1.29999995, g = 0.89999998, b = 0.1, a = 2,
modelfactor = 0.1, specular = 0.2, scattering = 1.5, lensflare = 8,
lifetime = 0, sustain = 0, animtype = 0},
},
buildlight3 = {
lightType = 'cone',
pieceName = 'buildlight3Point',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 18,
dirx = 0, diry = 0, dirz = -1, theta = 0.99000001,
r = 1.29999995, g = 0.89999998, b = 0.1, a = 2,
modelfactor = 0.1, specular = 0.2, scattering = 1.5, lensflare = 8,
lifetime = 0, sustain = 0, animtype = 0},
},
buildlight4 = {
lightType = 'cone',
pieceName = 'buildlight4Point',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 18,
dirx = 0, diry = 0, dirz = -1, theta = 0.99000001,
r = 1.29999995, g = 0.89999998, b = 0.1, a = 2,
modelfactor = 0.1, specular = 0.2, scattering = 1.5, lensflare = 8,
lifetime = 0, sustain = 0, animtype = 0},
},

nanolight1 = {
lightType = 'point',
pieceName = 'flare1',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 15,
color2r = 0, color2g = 0, color2b = 0, colortime = 0,
r = -1, g = 1, b = 1, a = 0.3,
modelfactor = 0.5, specular = 0.5, scattering = 1, lensflare = 10,
lifetime = 0, sustain = 0, animtype = 0},
},
nanolight2 = {
lightType = 'point',
pieceName = 'flare2',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 15,
color2r = 0, color2g = 0, color2b = 0, colortime = 0,
r = -1, g = 1, b = 1, a = 0.3,
modelfactor = 0.5, specular = 0.5, scattering = 1, lensflare = 10,
lifetime = 0, sustain = 0, animtype = 0},
},
nanolight3 = {
lightType = 'point',
pieceName = 'flare3',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 15,
color2r = 0, color2g = 0, color2b = 0, colortime = 0,
r = -1, g = 1, b = 1, a = 0.3,
modelfactor = 0.5, specular = 0.5, scattering = 1, lensflare = 10,
lifetime = 0, sustain = 0, animtype = 0},
},
nanolight4 = {
lightType = 'point',
pieceName = 'flare4',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 15,
color2r = 0, color2g = 0, color2b = 0, colortime = 0,
r = -1, g = 1, b = 1, a = 0.3,
modelfactor = 0.5, specular = 0.5, scattering = 1, lensflare = 10,
lifetime = 0, sustain = 0, animtype = 0},
},
},
['legavrad'] ={
greenbloba = {
lightType = 'point',
Expand Down
Binary file added objects3d/Units/leghp.s3o
Binary file not shown.
Binary file added objects3d/Units/leghp_dead.s3o
Binary file not shown.
269 changes: 269 additions & 0 deletions scripts/Units/leghp.bos
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@

#include "../recoil_common_includes.h"
#include "../factories_common.h"

piece base, pad, nano1, nano2, nano3, nano4, cyl1, cyl2, cyl3, cyl4, cov1_big, cov2_big, cov3_big, cov4_big,
cov1_small, cov2_small, cov3_small, cov4_small, cover_big1, cover_big2, cover_small1, cover_small2, flare1, flare2, flare3, flare4,
fan1, fan2, buildlight1, buildlight3, buildlight2, buildlight4, buildlight1Point, buildlight2Point, buildlight3Point, buildlight4Point;

static-var buildAnimPiece;

// Signal definitions
#define SIGNAL_BUILD 2
#define SIGNAL_TURNON 4


Create()
{
hide flare1;
hide flare2;
hide flare3;
hide flare4;
hide buildlight1Point;
hide buildlight2Point;
hide buildlight3Point;
hide buildlight4Point;
hide pad;
buildAnimPiece = 0;
}

#define BASEPIECE base
#define MAXTILT 0
#include "../unit_hitbyweaponid_and_smoke.h"

QueryNanoPiece(pieceIndex)
{
buildAnimPiece = (buildAnimPiece + 1) % 4;
pieceIndex = flare1 + buildAnimPiece;
}

Activate()
{
signal SIGNAL_TURNON;
set-signal-mask SIGNAL_TURNON;


move cover_big1 to z-axis [8.5] speed [8.5];
move cover_small1 to z-axis [-6] speed [6];
move cover_big2 to z-axis [-8.5] speed [8.5];
move cover_small2 to z-axis [6] speed [6];

move cov1_small to x-axis [3] speed [10];
move cov2_small to x-axis [-3] speed [10];
move cov3_small to x-axis [3] speed [10];
move cov4_small to x-axis [-3] speed [10];
sleep(250);
move cov1_small to z-axis [9] speed [10];
move cov2_small to z-axis [9] speed [10];
move cov3_small to z-axis [-9] speed [10];
move cov4_small to z-axis [-9] speed [10];
sleep(100);
move cov1_big to z-axis [-4.5] speed [10];
move cov2_big to z-axis [-4.5] speed [10];
move cov3_big to z-axis [4.5] speed [10];
move cov4_big to z-axis [4.5] speed [10];
sleep(50);
turn cyl1 to x-axis <-45> speed <45>;
turn cyl2 to x-axis <-45> speed <45>;
turn cyl3 to x-axis <45> speed <45>;
turn cyl4 to x-axis <45> speed <45>;
wait-for-turn cyl1 around x-axis;
move nano1 to z-axis [5.5] speed [10];
move nano2 to z-axis [5.5] speed [10];
move nano3 to z-axis [-5.5] speed [10];
move nano4 to z-axis [-5.5] speed [10];
wait-for-move nano1 along z-axis;

FACTORY_OPEN_BUILD;
}

Deactivate()
{
signal SIGNAL_TURNON;
set-signal-mask SIGNAL_TURNON;

move nano1 to z-axis [5.5] speed [10];
move nano2 to z-axis [5.5] speed [10];
move nano3 to z-axis [-5.5] speed [10];
move nano4 to z-axis [-5.5] speed [10];
turn nano1 to z-axis <0> speed <100>;
turn nano2 to z-axis <0> speed <100>;
turn nano3 to z-axis <0> speed <100>;
turn nano4 to z-axis <0> speed <100>;

sleep 5000;


move nano1 to z-axis [0] speed [10];
move nano2 to z-axis [0] speed [10];
move nano3 to z-axis [0] speed [10];
move nano4 to z-axis [0] speed [10];
wait-for-move nano1 along z-axis;
turn cyl1 to x-axis <0> speed <35>;
turn cyl2 to x-axis <0> speed <35>;
turn cyl3 to x-axis <0> speed <35>;
turn cyl4 to x-axis <0> speed <35>;
wait-for-turn cyl1 around x-axis;
move cov1_small to x-axis [0] speed [10];
move cov2_small to x-axis [0] speed [10];
move cov3_small to x-axis [0] speed [10];
move cov4_small to x-axis [0] speed [10];
sleep(350);
move cov1_small to z-axis [0] speed [10];
move cov2_small to z-axis [0] speed [10];
move cov3_small to z-axis [0] speed [10];
move cov4_small to z-axis [0] speed [10];
sleep(150);
move cov1_big to z-axis [0] speed [10];
move cov2_big to z-axis [0] speed [10];
move cov3_big to z-axis [0] speed [10];
move cov4_big to z-axis [0] speed [10];

move cover_big1 to z-axis [0] speed [8.5];
move cover_small1 to z-axis [0] speed [6];
move cover_big2 to z-axis [0] speed [8.5];
move cover_small2 to z-axis [0] speed [6];


FACTORY_CLOSE_BUILD;
}
MoveCranes()
{
while(TRUE)
{
turn nano1 to z-axis rand(-6500, -4500) speed <100>;
move nano1 to z-axis rand([0], [5]) speed [10];

turn nano2 to z-axis rand(2500, 4500) speed <100>;
move nano2 to z-axis rand([0], [5]) speed [10];

turn nano3 to z-axis rand(-6500, -4500) speed <100>;
move nano3 to z-axis rand([-5], [0]) speed [10];

turn nano4 to z-axis rand(2500, 4500) speed <100>;
move nano4 to z-axis rand([-5], [0]) speed [10];
sleep(1000);
}
}
StartBuilding()
{
show flare1;
show flare2;
show flare3;
show flare4;
show buildlight1Point;
show buildlight2Point;
show buildlight3Point;
show buildlight4Point;
signal SIGNAL_BUILD;
set-signal-mask SIGNAL_BUILD;
spin fan1 around y-axis speed <500> accelerate <1>;
spin fan2 around y-axis speed <500> accelerate <1>;
start-script MoveCranes();
move buildlight1 to x-axis [1] speed [0.5];
move buildlight3 to x-axis [1] speed [0.5];
move buildlight2 to x-axis [-1] speed [0.5];
move buildlight4 to x-axis [-1] speed [0.5];
wait-for-move buildlight4 along x-axis;
spin buildlight1 around x-axis speed <-200> accelerate <1>;
spin buildlight3 around x-axis speed <-200> accelerate <1>;
spin buildlight2 around x-axis speed <200> accelerate <1>;
spin buildlight4 around x-axis speed <200> accelerate <1>;

}

StopBuilding()
{
hide flare1;
hide flare2;
hide flare3;
hide flare4;
hide buildlight1Point;
hide buildlight2Point;
hide buildlight3Point;
hide buildlight4Point;
stop-spin fan1 around y-axis decelerate <2>;
stop-spin fan2 around y-axis decelerate <2>;
stop-spin buildlight1 around x-axis decelerate <1>;
stop-spin buildlight3 around x-axis decelerate <1>;
stop-spin buildlight2 around x-axis decelerate <1>;
stop-spin buildlight4 around x-axis decelerate <1>;
signal SIGNAL_BUILD;
wait-for-turn buildlight4 around x-axis;
move buildlight1 to x-axis [0] speed [0.5];
move buildlight3 to x-axis [0] speed [0.5];
move buildlight2 to x-axis [0] speed [0.5];
move buildlight4 to x-axis [0] speed [0.5];


// hide cagelight_emit1;
// hide cagelight_emit2;
// stop-spin cagelight1 around y-axis decelerate <1>;
// stop-spin cagelight2 around y-axis decelerate <1>;
}

QueryBuildInfo(pieceIndex)
{
pieceIndex = pad;
}

Killed(severity, corpsetype)
{
if( severity <= 25 )
{
corpsetype = 1 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode cyl2 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano2 type BITMAPONLY | NOHEATCLOUD;
explode cyl3 type BITMAPONLY | NOHEATCLOUD;
explode nano3 type BITMAPONLY | NOHEATCLOUD;
explode cyl4 type BITMAPONLY | NOHEATCLOUD;
explode nano4 type BITMAPONLY | NOHEATCLOUD;
explode cyl1 type BITMAPONLY | NOHEATCLOUD;
explode nano1 type BITMAPONLY | NOHEATCLOUD;
explode pad type BITMAPONLY | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 50 )
{
corpsetype = 2 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode cyl2 type FALL | NOHEATCLOUD;
explode nano2 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode cyl3 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano3 type FALL | NOHEATCLOUD;
explode cyl4 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano4 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode cyl1 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano1 type FALL | NOHEATCLOUD;
explode pad type FALL | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 99 )
{
corpsetype = 3 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode cyl2 type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD;
explode nano2 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode cyl3 type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD;
explode nano3 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode cyl4 type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD;
explode nano4 type SMOKE | FALL | NOHEATCLOUD;
explode cyl1 type SMOKE | FALL | NOHEATCLOUD;
explode nano1 type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD;
explode pad type SMOKE | FALL | NOHEATCLOUD;
return(corpsetype);
}
corpsetype = 3 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode cyl2 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano2 type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
explode cyl3 type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
explode nano3 type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
explode cyl4 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano4 type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
explode cyl1 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano1 type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
explode pad type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
return corpsetype;
}
Binary file added scripts/Units/leghp.cob
Binary file not shown.
Binary file modified unitpics/leghp.dds
Binary file not shown.
2 changes: 1 addition & 1 deletion units/Legion/Hovercraft/legah.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return {
maxdec = 0.06316,
energycost = 4300,
metalcost = 210,
buildpic = "legah.DDS",
buildpic = "LEGAH.DDS",
buildtime = 3300,
canmove = true,
collisionvolumeoffsets = "0 -3 0",
Expand Down
2 changes: 1 addition & 1 deletion units/Legion/Hovercraft/legmh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return {
maxdec = 0.04415,
energycost = 3100,
metalcost = 190,
buildpic = "legmh.DDS",
buildpic = "LEGMH.DDS",
buildtime = 3300,
canmove = true,
collisionvolumeoffsets = "0 1 0",
Expand Down
Loading

0 comments on commit e924c94

Please sign in to comment.