Permalink
Browse files

Begin work on upgraded units

Rerender all buildpics
  • Loading branch information...
1 parent 7143f21 commit 261e514ce564d7ad847e8f329d9afdba72ffe7ca @ForbodingAngel ForbodingAngel committed Feb 14, 2017
Showing with 1,587 additions and 35 deletions.
  1. +63 −22 Gamedata/alldefs_post.lua
  2. +6 −0 Gamedata/configs/damageTypes.lua
  3. +62 −0 Gamedata/explosions/missiletrail.lua
  4. +11 −0 Gamedata/sounds.lua
  5. BIN LuaUI/Images/damagetype/armor.dds
  6. BIN LuaUI/Images/damagetype/light.dds
  7. BIN Objects3D/eheavytank3_upgraded.s3o
  8. BIN Objects3D/eheavytank_t3.s3o
  9. BIN Objects3D/elighttank4.s3o
  10. BIN Objects3D/elighttank4_upgraded.s3o
  11. BIN Objects3D/eriottank3_upgraded.s3o
  12. BIN Objects3D/turret-laser.s3o
  13. BIN Objects3D/turretaddon.s3o
  14. +138 −0 Scripts/ebox.bos
  15. BIN Scripts/ebox.cob
  16. +51 −0 Scripts/ebox_lus.lua
  17. +100 −0 Scripts/eheavytank_t3.lua
  18. +109 −0 Scripts/eheavytank_t3_lus.lua
  19. +109 −0 Scripts/eheavytank_upgraded_lus.lua
  20. +76 −0 Scripts/elighttank3_lus.lua
  21. +109 −0 Scripts/elighttank3_upgraded_lus.lua
  22. +122 −0 Units/ebox.lua
  23. +1 −1 Units/ebuilding/etech1.lua
  24. +2 −0 Units/ecommander.lua
  25. +2 −0 Units/ecommanderbattle.lua
  26. +2 −0 Units/ecommanderbuild.lua
  27. +2 −0 Units/ecommandercloak.lua
  28. +2 −0 Units/ecommanderfactory.lua
  29. +2 −0 Units/ecommandershield.lua
  30. +7 −12 Units/ehover/ebasefactory.lua
  31. +226 −0 Units/ehover/eheavytank_t3.lua
  32. +1 −0 Units/ehover/elighttank3.lua
  33. +192 −0 Units/ehover/upgraded/eheavytank_upgraded.lua
  34. +192 −0 Units/ehover/upgraded/elighttank3_upgraded.lua
  35. BIN sounds/pointdefensefire.wav
  36. BIN unitpics/armflash.png
  37. BIN unitpics/burrow.png
  38. BIN unitpics/eaatank.png
  39. BIN unitpics/eaaturret.png
  40. BIN unitpics/eairengineer.png
  41. BIN unitpics/eairengineer_t2.png
  42. BIN unitpics/eairengineerai.png
  43. BIN unitpics/eairplant.png
  44. BIN unitpics/eairplant_t2.png
  45. BIN unitpics/eairplantai.png
  46. BIN unitpics/eallterraa.png
  47. BIN unitpics/eallterranarchid.png
  48. BIN unitpics/eallterranarchid_t2.png
  49. BIN unitpics/eallterrassault.png
  50. BIN unitpics/eallterrassault_t2.png
  51. BIN unitpics/eallterrengineer.png
  52. BIN unitpics/eallterrengineer_t2.png
  53. BIN unitpics/eallterrengineerai.png
  54. BIN unitpics/eallterrheavy.png
  55. BIN unitpics/eallterrheavy_t2.png
  56. BIN unitpics/eallterrlight.png
  57. BIN unitpics/eallterrlight_t2.png
  58. BIN unitpics/eallterrmed.png
  59. BIN unitpics/eallterrmed_t2.png
  60. BIN unitpics/eallterrriot.png
  61. BIN unitpics/eallterrriot_t2.png
  62. BIN unitpics/eallterrshield.png
  63. BIN unitpics/eallterrshield_t2.png
  64. BIN unitpics/eamphibaa.png
  65. BIN unitpics/eamphibarty.png
  66. BIN unitpics/eamphibarty_t2.png
  67. BIN unitpics/eamphibbuggy.png
  68. BIN unitpics/eamphibbuggy_t2.png
  69. BIN unitpics/eamphibdrone.png
  70. BIN unitpics/eamphibengineer.png
  71. BIN unitpics/eamphibengineer_t2.png
  72. BIN unitpics/eamphibengineerai.png
  73. BIN unitpics/eamphibfac.png
  74. BIN unitpics/eamphibfac_t2.png
  75. BIN unitpics/eamphibfacai.png
  76. BIN unitpics/eamphibleveler.png
  77. BIN unitpics/eamphibleveler_t2.png
  78. BIN unitpics/eamphibmedtank.png
  79. BIN unitpics/eamphibmedtank_t2.png
  80. BIN unitpics/eamphibneedle.png
  81. BIN unitpics/eamphibneedle_t2.png
  82. BIN unitpics/eamphibriot.png
  83. BIN unitpics/eamphibriot_t2.png
  84. BIN unitpics/eamphibrock.png
  85. BIN unitpics/eamphibrock_t2.png
  86. BIN unitpics/eartytank.png
  87. BIN unitpics/eartytank_t2.png
  88. BIN unitpics/eartyturret.png
  89. BIN unitpics/ebarricade.png
  90. BIN unitpics/ebarricade2.png
  91. BIN unitpics/ebasefactory.png
  92. BIN unitpics/ebasefactory_t2.png
  93. BIN unitpics/ebasefactoryai.png
  94. BIN unitpics/ebomb.png
  95. BIN unitpics/ebomber.png
  96. BIN unitpics/ebomber_t2.png
  97. BIN unitpics/ecommander.png
  98. BIN unitpics/ecommanderai.png
  99. BIN unitpics/ecommanderbattle.png
  100. BIN unitpics/ecommanderbuild.png
  101. BIN unitpics/ecommandercloak.png
  102. BIN unitpics/ecommanderfactory.png
  103. BIN unitpics/ecommandershield.png
  104. BIN unitpics/ecommandfactory.png
  105. BIN unitpics/ecruisesilo.png
  106. BIN unitpics/ecruisesiloai.png
  107. BIN unitpics/edrone.png
  108. BIN unitpics/eengineer4.png
  109. BIN unitpics/eengineer5.png
  110. BIN unitpics/eengineer5_t2.png
  111. BIN unitpics/eengineer5ai.png
  112. BIN unitpics/eexkrabgroth.png
  113. BIN unitpics/eexnukearty.png
  114. BIN unitpics/eexperimentalfac.png
  115. BIN unitpics/eextankdestroyer.png
  116. BIN unitpics/efatso2.png
  117. BIN unitpics/efighter.png
  118. BIN unitpics/efighter_t2.png
  119. BIN unitpics/eflametank.png
  120. BIN unitpics/efusion2.png
  121. BIN unitpics/efusion2ai.png
  122. BIN unitpics/egeothermal.png
  123. BIN unitpics/egunship2.png
  124. BIN unitpics/egunship2_t2.png
  125. BIN unitpics/ehbotengineer.png
  126. BIN unitpics/ehbotengineer_turret.png
  127. BIN unitpics/ehbotfac.png
  128. BIN unitpics/ehbotpeewee.png
  129. BIN unitpics/ehbotpeewee_turret.png
  130. BIN unitpics/ehbotrocko.png
  131. BIN unitpics/ehbotrocko_turret.png
  132. BIN unitpics/ehbotsniper.png
  133. BIN unitpics/ehbotsniper_turret.png
  134. BIN unitpics/ehbotthud.png
  135. BIN unitpics/ehbotthud_turret.png
  136. BIN unitpics/eheavytank3.png
  137. BIN unitpics/eheavytank3_t2.png
  138. BIN unitpics/eheavytank3_upgraded.png
  139. BIN unitpics/eheavytank_t3.png
  140. BIN unitpics/eheavyturret2.png
  141. BIN unitpics/eheavyturret2ai.png
  142. BIN unitpics/ejammer2.png
  143. BIN unitpics/ekmar.png
  144. BIN unitpics/elacerator.png
  145. BIN unitpics/elacerator_t2.png
  146. BIN unitpics/elighttank3.png
  147. BIN unitpics/elighttank3_t2.png
  148. BIN unitpics/elighttank3_upgraded.png
  149. BIN unitpics/elightturret2.png
  150. BIN unitpics/elightturret2ai.png
  151. BIN unitpics/elrpc.png
  152. BIN unitpics/emaker.png
  153. BIN unitpics/emediumgen.png
  154. BIN unitpics/emediumgenai.png
  155. BIN unitpics/emediumtank3.png
  156. BIN unitpics/emetalextractor.png
  157. BIN unitpics/emetalextractor2.png
  158. BIN unitpics/emetalextractorai.png
  159. BIN unitpics/emine.png
  160. BIN unitpics/emineai.png
  161. BIN unitpics/eminifac.png
  162. BIN unitpics/eminifac_t2.png
  163. BIN unitpics/eminifacai.png
  164. BIN unitpics/emissiletank.png
  165. BIN unitpics/emissiletank_t2.png
  166. BIN unitpics/engineermarbuk.png
  167. BIN unitpics/eorb.png
  168. BIN unitpics/eorbai.png
  169. BIN unitpics/eradar2.png
  170. BIN unitpics/eriottank2.png
  171. BIN unitpics/eriottank2_t2.png
  172. BIN unitpics/escout.png
  173. BIN unitpics/escout_t2.png
  174. BIN unitpics/eshieldgen.png
  175. BIN unitpics/esilo.png
  176. BIN unitpics/esolar2.png
  177. BIN unitpics/estorage.png
  178. BIN unitpics/estorageai.png
  179. BIN unitpics/esubmarine.png
  180. BIN unitpics/esubplane.png
  181. BIN unitpics/etech1.png
  182. BIN unitpics/etech2.png
  183. BIN unitpics/etech3.png
  184. BIN unitpics/etransport.png
  185. BIN unitpics/etransport_t2.png
  186. BIN unitpics/euwfusion2.png
  187. BIN unitpics/euwmetalextractor.png
  188. BIN unitpics/euwsolar2.png
  189. BIN unitpics/euwstorage.png
  190. BIN unitpics/euwturret.png
  191. BIN unitpics/queen.png
@@ -91,10 +91,8 @@ function UnitDef_Post(name, uDef)
-- turn off unit collision check for planes
--
- for name, ud in pairs(UnitDefs) do
- if (tobool(ud.canfly) and not tobool(ud.istransport)) then
- ud.collide = false
- end
+ if (tobool(uDef.canfly) and not tobool(uDef.istransport)) then
+ uDef.collide = false
end
@@ -105,43 +103,48 @@ function UnitDef_Post(name, uDef)
local sqrt = math.sqrt
- for name, ud in pairs(UnitDefs) do
- if (not ud.mincloakdistance) then
- local fx = ud.footprintx and tonumber(ud.footprintx) or 1
- local fz = ud.footprintz and tonumber(ud.footprintz) or 1
+ if (not uDef.mincloakdistance) then
+ local fx = uDef.footprintx and tonumber(uDef.footprintx) or 1
+ local fz = uDef.footprintz and tonumber(uDef.footprintz) or 1
local radius = 8 * sqrt((fx * fx) + (fz * fz))
- ud.mincloakdistance = (radius + 48)
- end
+ uDef.mincloakdistance = (radius + 48)
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Spring Kludge Removal
--
- for name, ud in pairs(UnitDefs) do
- ud.activateWhenBuilt = true
- end
+ uDef.activateWhenBuilt = true
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--Set reverse velocity automatically
- for id,unitDef in pairs(UnitDefs) do
- if unitDef.maxvelocity then
- unitDef.maxreversevelocity = unitDef.maxvelocity * 0.75
- end
- end
+ if uDef.maxvelocity then
+ uDef.maxreversevelocity = uDef.maxvelocity * 0.75
+ end
--Override groundplate used
- for id,unitDef in pairs(UnitDefs) do
- if unitDef.usegrounddecal == true then
- unitDef.buildinggrounddecaltype = "groundplate.dds"
- end
+ if uDef.usegrounddecal == true then
+ uDef.buildinggrounddecaltype = "groundplate.dds"
+ end
+
+ if uDef.customparams and uDef.customparams.isupgraded == true then
+ uDef.maxdamage = uDef.maxdamage * 1.20
+ end
+
+ --------------------------------------------------------------------------------
+ --------------------------------------------------------------------------------
+ -- Turn off nanospray globally
+ if uDef.shownanospray then
+ uDef.shownanospray = false
end
end
+--------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
-- process weapondef
function WeaponDef_Post(name, wDef)
@@ -171,6 +174,10 @@ function WeaponDef_Post(name, wDef)
for armorClass, armorMultiplier in pairs(damageTypes[damagetypelower]) do
--Spring.Echo(wd.name, armorClass, weapondamage*armorMultiplier )
wDef.damage[armorClass] = weapondamage*armorMultiplier
+ -- Handle upgraded units
+ if wDef.customparams and wDef.customparams.isupgraded == true then
+ wDef.damage[armorClass] = wDef.damage[armorClass] * 1.20
+ end
end
else
Spring.Echo("!!WARNING!! Invalid damagetype: " .. damagetypelower)
@@ -214,6 +221,40 @@ function WeaponDef_Post(name, wDef)
end
wDef.energypershot = energycosttofire
end
+
+ --------------------------------------------------------------------------------
+ --------------------------------------------------------------------------------
+ -- Set up params for Point Defense turrets
+ if wDef.customparams and wDef.customparams.ispointdefenselaser == true then
+ wDef.areaofeffect = 0
+ wDef.avoidfeature = false
+ wDef.avoidfriendly = false
+ wDef.collidefeature = false
+ wDef.collidefriendly = false
+ wDef.corethickness = 0.2
+ wDef.duration = 0.2
+ wDef.explosiongenerator = [[custom:genericshellexplosion-small-sparks-burn]]
+ wDef.falloffrate = 1
+ wDef.impulsefactor = 0
+ wDef.interceptedbyshieldtype = 4
+ wDef.minintensity = 1
+ wDef.name = [[Point Defense Laser]]
+ wDef.range = 650
+ wDef.reloadtime = 0.25
+ wDef.weapontype = [[LaserCannon]]
+ wDef.rgbcolor = [[0 0.5 1]]
+ wDef.rgbcolor2 = [[1 1 1]]
+ wDef.soundtrigger = true
+ wDef.soundstart = [[pointdefensefire.wav]]
+ wDef.texture1 = [[shot]]
+ wDef.texture2 = [[empty]]
+ wDef.thickness = 2
+ wDef.tolerance = 1000
+ wDef.turret = true
+ wDef.weaponvelocity = 1500
+ wDef.customparams.damagetype = [[pdlaser]]
+ wDef.damage.default = 6.25
+ end
end
@@ -9,6 +9,12 @@ local damageClasses = {
LIGHT = 0.1,
BUILDING = 0.1,
},
+
+ pdlaser = {
+ ARMORED = 1,
+ LIGHT = 1,
+ BUILDING = 0.5,
+ },
----------------------------------------------------------------------------
-- Overseers with weapons
ecommanderbattle = {
@@ -216,6 +216,68 @@ return {
},
},
},
+
+ ["missiletrailsabot"] = {
+
+ smokeandfire = {
+ air = true,
+ class = [[CSimpleParticleSystem]],
+ count = 1,
+ ground = true,
+ water = true,
+ properties = {
+ airdrag = 0.70,
+ alwaysvisible = true,
+ colormap = [[0.1 0.1 0.1 0.01 0.5 0.1 0.0 0.05 0.5 0.3 0.0 0.05 0.1 0.1 0.1 0.005 0 0 0 0.01]],
+ directional = true,
+ emitrot = 45,
+ emitrotspread = 90,
+ emitvector = [[0, 1, 0]],
+ gravity = [[0.0, 0.0, 0.0]],
+ numparticles = 5,
+ particlelife = 3,
+ particlelifespread = 2,
+ particlesize = 3,
+ particlesizespread = 5,
+ particlespeed = 4,
+ particlespeedspread = 0,
+ pos = [[0.0, 1, 0.0]],
+ sizegrowth = -0.1,
+ sizemod = 0.9,
+ texture = [[dirt]],
+ useairlos = true,
+ },
+ },
+ smoke = {
+ air = true,
+ class = [[CSimpleParticleSystem]],
+ count = 1,
+ ground = true,
+ water = true,
+ properties = {
+ airdrag = 0.70,
+ alwaysvisible = true,
+ colormap = [[0.1 0.1 0.1 0.01 0.25 0.25 0.25 0.05 0.2 0.2 0.2 0.05 0.1 0.1 0.1 0.005 0 0 0 0.01]],
+ directional = true,
+ emitrot = 45,
+ emitrotspread = 90,
+ emitvector = [[0, 1, 0]],
+ gravity = [[0.0, 0.5, 0.0]],
+ numparticles = 2,
+ particlelife = 8,
+ particlelifespread = 2,
+ particlesize = 2,
+ particlesizespread = 5,
+ particlespeed = 2,
+ particlespeedspread = 0,
+ pos = [[0.0, 1, 0.0]],
+ sizegrowth = 1,
+ sizemod = 1,
+ texture = [[dirt]],
+ useairlos = true,
+ },
+ },
+ },
["missiletrailgunshiplesssmokey"] = {
coreflame = {
View
@@ -25,6 +25,17 @@ local Sounds = {
maxconcurrent = 16,
},
+ pdfire = {
+ --- new since 89.0
+ --- you can overwrite the fallback profile here (used when no corresponding SoundItem is defined for a sound)
+ file = "sounds/pointdefensefire.wav",
+ gainmod = 0.35,
+ pitchmod = 0.05,
+ --pitch = 0.7,
+ in3d = true,
+ maxconcurrent = 8,
+ },
+
nukeartyweaponhit = {
--- new since 89.0
--- you can overwrite the fallback profile here (used when no corresponding SoundItem is defined for a sound)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -0,0 +1,138 @@
+#define TA // This is a TA script
+
+#include "sfxtype.h"
+#include "exptype.h"
+
+piece base, forwarddome, reardome, rearleftwing, frontleftwing, frontrightwing, rearrightwing, dirt;
+
+static-var terraintype, bmoving, moving, shooting_num;
+
+// Signal definitions
+#define SIG_AIM 2
+
+SmokeUnit(healthpercent, sleeptime, smoketype) // this is a standard smoke point define
+{
+while( get BUILD_PERCENT_LEFT )
+{
+sleep 400;
+}
+while( TRUE )
+{
+healthpercent = get HEALTH;
+if( healthpercent < 66 )
+{
+smoketype = 256 | 2;
+if( Rand( 1, 66 ) < healthpercent )
+{
+smoketype = 256 | 1;
+}
+emit-sfx 1026 from forwarddome;
+}
+sleeptime = healthpercent * 50;
+if( sleeptime < 200 )
+{
+sleeptime = 200;
+}
+sleep sleeptime;
+}
+}
+
+EmitWakes()
+{
+ while( TRUE )
+ {
+ if( bMoving )
+ {
+ emit-sfx 2 from base;
+ }
+ sleep 300;
+ }
+}
+
+setSFXoccupy(setSFXoccupy_argument)
+{
+terraintype = setSFXoccupy_argument;
+
+ if(terraintype == 2)
+ {
+ move base to y-axis [-0.85] speed [50];
+ set UPRIGHT to 1;
+ }
+ else
+ {
+ move base to y-axis [0.0] speed [50];
+ set UPRIGHT to 0;
+ }
+ if(terraintype == 4)
+ {
+ move base to y-axis [0] speed [50];
+ set UPRIGHT to 0;
+ }
+ else
+ {
+ move base to y-axis [-0.85] speed [50];
+ set UPRIGHT to 1;
+ }
+}
+
+Thrust()
+{
+ while( TRUE )
+ {
+ if (moving)
+ {
+ emit-sfx 1024 + 0 from dirt;
+ }
+ sleep 400;
+ }
+}
+
+StartMoving()
+{
+ moving=1;
+}
+
+StopMoving()
+{
+ moving=0;
+}
+
+Create() // tells it what to do on creation
+{
+ start-script Thrust();
+ start-script setSFXoccupy();
+ start-script EmitWakes();
+ start-script SmokeUnit();
+}
+
+AimWeapon1(heading, pitch) // single weapon with 2 fires this tell sit what to do while aiming
+{
+signal SIG_AIM;
+set-signal-mask SIG_AIM;
+return (1);
+}
+
+FireWeapon1() // what do while firing, fires 1 barrel then the next , and resets
+{
+}
+
+AimFromWeapon1(piecenum) // where it aims the weapon from
+{
+piecenum = forwarddome;
+}
+
+QueryWeapon1(piecenum) // where the shot is called from
+{
+piecenum = forwarddome;
+}
+
+Killed(severity, corpsetype) // how it explodes
+{
+ corpsetype = 1;
+ explode forwarddome type EXPLODE_ON_HIT;
+ explode reardome type EXPLODE_ON_HIT;
+ explode rearleftwing type EXPLODE_ON_HIT;
+ explode rearrightwing type EXPLODE_ON_HIT;
+ explode frontleftwing type EXPLODE_ON_HIT;
+ explode frontrightwing type EXPLODE_ON_HIT;
+}
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 261e514

Please sign in to comment.