Skip to content

Commit

Permalink
Legion T1 Vehicle Lab (#4133)
Browse files Browse the repository at this point in the history
* Legion T1 Vehicle Lab

* Footprint, yardmap changes & colvol adjustment

* Wreck Model & Flattening

Wreck Model added.
Flattening Terrain enabled.

* legvp Fixes

- ColVols Corrected
- Buildpic Added
- Building slightly raised to accomodate for uneven terrain

* Final Changes

* Final Changes

- Hexagonal texture removed on side panel
- updated wreck with "new" texture
- updated buildpic
- fixed smoothing issue

* legvp_dead rotation

- Legion Veh Lab wreck Model was falsely rotated 180°
  • Loading branch information
Protar1458 authored Jan 10, 2025
1 parent 72d6dc3 commit 96d19c3
Show file tree
Hide file tree
Showing 7 changed files with 249 additions and 15 deletions.
56 changes: 56 additions & 0 deletions luaui/configs/DeferredLightsGL4config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7333,6 +7333,62 @@ local unitLights = {
lifetime = 0, sustain = 0, animtype = 0},
},
},
['legvp'] = {
nanolight1 = {
lightType = 'point',
pieceName = 'flare1',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 20,
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 = 20,
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 = 20,
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 = 20,
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},
},
buildlight = { -- this is the lightname
lightType = 'cone',
pieceName = 'cagelight1_emit',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 32,
dirx = 1, diry = 1, dirz = 0, theta = 0.99000001,
r = 1.29999995, g = 0.89999998, b = 0.1, a = 2,
modelfactor = 0.1, specular = 0.2, scattering = 1.5, lensflare = 10,
lifetime = 0, sustain = 0, animtype = 0},
},
buildlight2 = { -- this is the lightname
lightType = 'cone',
pieceName = 'cagelight2_emit',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 32,
dirx = 1, diry = 1, dirz = 0, theta = 0.99000001,
r = 1.29999995, g = 0.89999998, b = 0.1, a = 2,
modelfactor = 0.1, specular = 0.2, scattering = 1.5, lensflare = 10,
lifetime = 0, sustain = 0, animtype = 0},
},
},
['leglab'] = {
nanolight1 = {
lightType = 'point',
Expand Down
Binary file added objects3d/Units/legvp.s3o
Binary file not shown.
Binary file added objects3d/Units/legvp_dead.s3o
Binary file not shown.
165 changes: 165 additions & 0 deletions scripts/Units/legvp.bos
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@

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

piece flare1, flare2, flare3, flare4, pad, base, nanob, nanos, exhaust, ventsmoke, cagelight1, cagelight1_emit, cagelight2, cagelight2_emit;

static-var spray;

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


Create()
{
hide pad;
hide ventsmoke;
hide flare1;
hide flare2;
hide flare3;
hide flare4;
hide cagelight1_emit;
hide cagelight2_emit;
spray = 0;
}

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

QueryNanoPiece(pieceIndex)
{
spray = spray + 1;
if (spray >= 4)
{
spray = 0;
}
pieceIndex = flare1 + spray;
}

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

move exhaust to y-axis [0] speed [8];
}

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

turn nanos to x-axis 0 speed <30>;
turn nanob to z-axis 0 speed <30>;
wait-for-turn nanos around x-axis;

move exhaust to y-axis [-8] speed [8];


FACTORY_CLOSE_BUILD;
}

MoveCranes()
{
while(TRUE)
{
turn nanos to x-axis rand(-3000, 11000) speed <45>;

sleep(400);
emit-sfx 257 from ventsmoke;
sleep(400);
emit-sfx 257 from ventsmoke;

turn nanob to z-axis rand(-11000, 3000) speed <45>;

sleep(400);
emit-sfx 257 from ventsmoke;
sleep(400);
emit-sfx 257 from ventsmoke;
}
}


StartBuilding()
{
show flare1;
show flare2;
show flare3;
show flare4;

show cagelight1_emit;
show cagelight2_emit;
move cagelight1 to x-axis [-1.7] speed [8];
move cagelight2 to x-axis [-1.7] speed [8];
spin cagelight1 around x-axis speed <200> accelerate <1>;
spin cagelight2 around x-axis speed <-200> accelerate <1>;

signal SIGNAL_BUILD;
set-signal-mask SIGNAL_BUILD;
start-script MoveCranes();
}

StopBuilding()
{
hide flare1;
hide flare2;
hide flare3;
hide flare4;

hide cagelight1_emit;
hide cagelight2_emit;
move cagelight1 to x-axis [0] speed [8];
move cagelight2 to x-axis [0] speed [8];
stop-spin cagelight1 around x-axis decelerate <1>;
stop-spin cagelight2 around x-axis decelerate <1>;

signal SIGNAL_BUILD;
}

QueryBuildInfo(pieceIndex)
{
pieceIndex = pad;
}



Killed(severity, corpsetype)
{
if( severity <= 25 )
{
corpsetype = 1 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode exhaust type BITMAPONLY | NOHEATCLOUD;
explode nanos type BITMAPONLY | NOHEATCLOUD;
explode nanob type BITMAPONLY | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 50 )
{
corpsetype = 2 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode exhaust type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nanos type FALL | NOHEATCLOUD;
explode nanob type FIRE | SMOKE | FALL | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 99 )
{
corpsetype = 3 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode exhaust type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD;
explode nanos type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nanob type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD;
return(corpsetype);
}
corpsetype = 3 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode exhaust type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nanos type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
explode nanob type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
return corpsetype;
}
Binary file added scripts/Units/legvp.cob
Binary file not shown.
Binary file modified unitpics/legvp.dds
Binary file not shown.
43 changes: 28 additions & 15 deletions units/Legion/Labs/legvp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ return {
buildpic = "LEGVP.DDS",
buildtime = 7200,
canmove = true,
collisionvolumeoffsets = "0 0 0",
collisionvolumescales = "96 40 96",
collisionvolumeoffsets = "0 19 0",
collisionvolumescales = "101 53 106",
collisionvolumetype = "Box",
corpse = "DEAD",
energystorage = 100,
Expand All @@ -19,20 +19,33 @@ return {
footprintz = 6,
idleautoheal = 5,
idletime = 1800,
levelground = false,
levelground = true,
health = 3000,
maxslope = 15,
maxwaterdepth = 0,
metalstorage = 100,
objectname = "Units/CORVP.s3o",
objectname = "Units/LEGVP.s3o",
radardistance = 50,
script = "Units/CORVP.lua",
script = "Units/LEGVP.cob",
seismicsignature = 0,
selfdestructas = "largeBuildingexplosiongenericSelfd",
sightdistance = 279,
terraformspeed = 500,
workertime = 100,
yardmap = "oooooo oooooo occcco occcco occcco occcco",
yardmap = [[h
oo oo oo oo oo oo
oo oo oo oo oo oo
oo oo oo oo oo oo
oo oo oo oo oo oo
oc cc cc cc oo oo
oc cc cc cc oo oo
oc cc cc cc oo oo
oc cc cc cc oo oo
oc cc cc cc oo oo
oc cc cc cc oo oo
oc cc cc cc oo oo
oc cc cc cc oo oo
]],
buildoptions = {
[1] = "legscout",
[2] = "legcv",
Expand All @@ -47,14 +60,14 @@ return {
},
customparams = {
usebuildinggrounddecal = true,
buildinggrounddecaltype = "decals/corvp_aoplane.dds",
buildinggrounddecaltype = "decals/legvp_aoplane.dds",
buildinggrounddecalsizey = 9,
buildinggrounddecalsizex = 9,
buildinggrounddecaldecayspeed = 30,
unitgroup = 'builder',
model_author = "Mr Bob",
normaltex = "unittextures/cor_normal.dds",
subfolder = "CorBuildings/LandFactories",
model_author = "Protar/Ghoulish",
normaltex = "unittextures/leg_normal.dds",
subfolder = "Legion/Labs",
},
featuredefs = {
dead = {
Expand All @@ -65,19 +78,19 @@ return {
collisionvolumetype = "BOX",
damage = 1590,
featuredead = "HEAP",
footprintx = 7,
footprintz = 7,
footprintx = 6,
footprintz = 6,
height = 20,
metal = 470,
object = "Units/corvp_dead.s3o",
object = "Units/legvp_dead.s3o",
reclaimable = true,
},
heap = {
blocking = false,
category = "heaps",
damage = 795,
footprintx = 7,
footprintz = 7,
footprintx = 6,
footprintz = 6,
height = 4,
metal = 188,
object = "Units/cor7X7B.s3o",
Expand Down

0 comments on commit 96d19c3

Please sign in to comment.