Skip to content

Commit 992f257

Browse files
committed
Add higher MSAA settings in options widget
Add t2 flak turret that can be evolved from the laserbattery Change protector name
1 parent 8ef37f4 commit 992f257

File tree

15 files changed

+340
-21
lines changed

15 files changed

+340
-21
lines changed

Gamedata/morph_defs.lua

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ local timeToBuild_eheavyturret2 = energyCost_eheavyturret2 * 0.10
8383
local energyCost_euwturret = 50
8484
local timeToBuild_euwturret = energyCost_euwturret * 0.10
8585

86-
-- energycost = time + rate
86+
local energyCost_eflakturret = 60 * 10
87+
local timeToBuild_eflakturret = energyCost_eflakturret / 10
88+
89+
-- energycost = time * rate
8790
-- time = energycost / rate
8891

8992
local energyCost_emetalextractor_up1 = 60 * 2
@@ -592,6 +595,18 @@ Overseer]],
592595
----------------------------------------------------------
593596
----------------------------------------------------------
594597

598+
elaserbattery = {
599+
{
600+
into = 'eflakturret',
601+
time = timeToBuild_eflakturret,
602+
cmdname = [[Evolve]],
603+
energy = energyCost_eflakturret,
604+
metal = 0,
605+
text = [[Evolve Projectile Based Flak with more Range and AOE Damage]],
606+
require = [[tech2]],
607+
},
608+
},
609+
595610
-- elightturret2 = {
596611
-- {
597612
-- into = 'elightturret2_up1',

LuaUI/Widgets_Evo/gui_options.lua

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ local presets = {
151151
enemyspotter_highlight = false,
152152
},
153153
low = {
154-
msaa = 0,
154+
msaa = 2,
155155
bloom = false,
156156
bloomhighlights = false,
157157
ssao = false,
@@ -178,7 +178,7 @@ local presets = {
178178
enemyspotter_highlight = false,
179179
},
180180
medium = {
181-
msaa = 2,
181+
msaa = 4,
182182
bloom = true,
183183
bloomhighlights = false,
184184
ssao = false,
@@ -196,7 +196,7 @@ local presets = {
196196
timecyclesweathereffects = false,
197197
outline = false,
198198
guishader = false,
199-
shadows = false,
199+
shadows = true,
200200
advmapshading = true,
201201
advmodelshading = true,
202202
decals = 1,
@@ -205,7 +205,7 @@ local presets = {
205205
enemyspotter_highlight = false,
206206
},
207207
high = {
208-
msaa = 4,
208+
msaa = 8,
209209
bloom = true,
210210
bloomhighlights = false,
211211
ssao = true,
@@ -232,7 +232,7 @@ local presets = {
232232
enemyspotter_highlight = false,
233233
},
234234
ultra = {
235-
msaa = 8,
235+
msaa = 16,
236236
bloom = true,
237237
bloomhighlights = true,
238238
ssao = true,
@@ -2218,7 +2218,7 @@ function init()
22182218
{id="borderless", group="gfx", name="Borderless window", type="bool", value=tonumber(Spring.GetConfigInt("WindowBorderless",1) or 1) == 1, description="Changes will be applied next game.\n\n(dont forget to turn off the \'fullscreen\' option next game)"},
22192219
{id="windowpos", group="gfx", widget="Move Window Position", name="Move window position", type="bool", value=GetWidgetToggleValue("Move Window Position"), description='Toggle and move window position with the arrow keys or by dragging'},
22202220
{id="vsync", group="gfx", name="V-sync", type="bool", value=tonumber(Spring.GetConfigInt("VSync",1) or 1) == 1, description=''},
2221-
{id="msaa", group="gfx", name="Anti Aliasing", type="slider", steps={0,1,2,4}, restart=true, value=tonumber(Spring.GetConfigInt("MSAALevel",1) or 2), description='Enables multisample anti-aliasing. NOTE: Can be expensive!\n\nChanges will be applied next game'},
2221+
{id="msaa", group="gfx", name="Anti Aliasing", type="slider", steps={0,1,2,4,8,16}, restart=true, value=tonumber(Spring.GetConfigInt("MSAALevel",1) or 8), description='Enables multisample anti-aliasing. NOTE: Can be expensive!\n\nChanges will be applied next game'},
22222222
{id="advmapshading", group="gfx", name="Advanced map shading", type="bool", value=tonumber(Spring.GetConfigInt("AdvMapShading",1) or 1) == 1, description='When disabled: map shadows aren\'t rendered as well'},
22232223
{id="advmodelshading", group="gfx", name="Advanced model shading", type="bool", value=tonumber(Spring.GetConfigInt("AdvModelShading",1) or 1) == 1},
22242224
{id="advsky", group="gfx", name="Advanced sky", type="bool", restart=true, value=tonumber(Spring.GetConfigInt("AdvSky",1) or 1) == 1, description='Enables high resolution clouds\n\nChanges will be applied next game'},
@@ -2290,7 +2290,7 @@ function init()
22902290

22912291
{id="xrayshader", group="gfx", widget="XrayShader", name="Unit xray shader", type="bool", value=GetWidgetToggleValue("XrayShader"), description='Highlights all units, highlight effect dissolves on close camera range.\n\nFades out and disables at low fps\nWorks less on dark teamcolors'},
22922292
{id="particles", group="gfx", name="Max particles", type="slider", min=5000, max=25000, step=500, value=tonumber(Spring.GetConfigInt("MaxParticles",1) or 10000), description='Particles used for explosions, smoke, fire and missiletrails\n\nSetting a low value will mean that various effects wont show properly'},
2293-
{id="nanoparticles", group="gfx", name="Max nano particles", type="slider", min=500, max=5000, step=100, value=tonumber(Spring.GetConfigInt("MaxNanoParticles",1) or 500), description='NOTE: Nano particles are more expensive regarding the CPU'},
2293+
{id="nanoparticles", group="gfx", name="Max nano particles", type="slider", min=0, max=5000, step=100, value=tonumber(Spring.GetConfigInt("MaxNanoParticles",1) or 500), description='NOTE: Nano particles are more expensive regarding the CPU'},
22942294

22952295
--{id="treeradius", group="gfx", name="Tree render distance", type="slider", restart=true, min=0, max=2000, step=50, value=tonumber(Spring.GetConfigInt("TreeRadius",1) or 1000), description='Applies to SpringRTS engine default trees\n\nChanges will be applied next game'},
22962296

@@ -2509,9 +2509,9 @@ function init()
25092509
if tonumber(Spring.GetConfigInt("FSAALevel",0)) > 0 then
25102510
local fsaa = tonumber(Spring.GetConfigInt("FSAALevel",0))
25112511
if fsaa > 4 then
2512-
fsaa = 4
2512+
fsaa = 8
25132513
end
2514-
Spring.SetConfigInt("MSAALevel", fsaa)
2514+
Spring.SetConfigInt("MSAALevel", 8)
25152515
Spring.SetConfigInt("FSAALevel", 0)
25162516
end
25172517

@@ -2849,10 +2849,6 @@ function widget:Initialize()
28492849
if Spring.GetConfigInt("GrassDetail",0) ~= 0 then
28502850
Spring.SetConfigInt("GrassDetail",0)
28512851
end
2852-
-- limit MSAA
2853-
if Spring.GetConfigInt("MSAALevel",0) > 4 then
2854-
Spring.SetConfigInt("MSAALevel",4)
2855-
end
28562852

28572853
--if Platform ~= nil and Platform.gpuVendor ~= 'Nvidia' then -- because UsePBO displays tiled map texture bug for ATI/AMD cards
28582854
--Spring.SetConfigInt("UsePBO",0)
@@ -2865,7 +2861,7 @@ function widget:Initialize()
28652861
--end
28662862
-- set lowest quality shadows for Intel GPU (they eat fps but dont really show, but without any shadows enables it looks glitchy)
28672863
if Platform ~= nil and Platform.gpuVendor == 'Intel' then
2868-
Spring.SendCommands("Shadows 1 1000")
2864+
Spring.SendCommands("Shadows 1 1024")
28692865
end
28702866

28712867
-- set custom user map sun position

Objects3D/eamphibaaturret.s3o

46.6 KB
Binary file not shown.

Objects3D/eflakturret.s3o

201 KB
Binary file not shown.

Scripts/eflakturret.bos

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
#define TA // This is a TA script
2+
3+
#include "sfxtype.h"
4+
#include "exptype.h"
5+
6+
piece base, beams, turret, barrel1, firepoint1, firepoint2, firepoint3, firepoint4, lilypad; // these are the pieces of the model
7+
8+
static-var shooting_num, terraintype;
9+
10+
// Signal definitions
11+
#define SIG_AIM 2 // this is a aim define <- o_O This is a kill flag
12+
13+
14+
// Custom SFX
15+
#define GDMARTY 1024+0
16+
17+
SmokeUnit()// this is a standard smoke point define
18+
{
19+
var healthpercent, sleeptime, smoketype;
20+
while( TRUE )
21+
{
22+
healthpercent = get HEALTH;
23+
if( healthpercent < 66 )
24+
{
25+
smoketype = SFXTYPE_BLACKSMOKE;
26+
if( Rand( 1, 66 ) < healthpercent )
27+
smoketype = SFXTYPE_WHITESMOKE;
28+
emit-sfx 1026 from turret;
29+
}
30+
sleeptime = healthpercent * 50;
31+
if( sleeptime < 200 )
32+
sleeptime = 200;
33+
sleep sleeptime;
34+
}
35+
}
36+
37+
38+
Create() // tells it what to do on creation
39+
{
40+
shooting_num=1;
41+
start-script SmokeUnit();
42+
}
43+
44+
45+
RestoreAfterDelay() // restore function to turn the turret and so forth back to start
46+
{
47+
sleep 3000;
48+
turn turret to y-axis <0> speed <60>;
49+
turn barrel1 to x-axis <0> speed <30>;
50+
}
51+
52+
AimWeapon1(heading, pitch) // single weapon with 2 fires this tell sit what to do while aiming
53+
{
54+
/*
55+
if ( get IN_WATER(0) == 1 )
56+
{
57+
return (0);
58+
}
59+
*/
60+
signal SIG_AIM;
61+
set-signal-mask SIG_AIM;
62+
turn turret to y-axis heading speed <5000>;
63+
turn barrel1 to x-axis <0> - pitch speed <5000>;
64+
wait-for-turn turret around y-axis;
65+
wait-for-turn barrel1 around x-axis;
66+
start-script RestoreAfterDelay();
67+
return (1);
68+
}
69+
70+
71+
FireWeapon1() // what do while firing, fires 1 barrel then the next , and resets
72+
{
73+
if(shooting_num==1)
74+
{
75+
emit-sfx 1024 from firepoint2;
76+
}
77+
78+
if(shooting_num==2)
79+
{
80+
emit-sfx 1024 from firepoint3;
81+
}
82+
83+
if(shooting_num==3)
84+
{
85+
emit-sfx 1024 from firepoint4;
86+
}
87+
88+
if(shooting_num==4)
89+
{
90+
emit-sfx 1024 from firepoint1;
91+
}
92+
93+
shooting_num=shooting_num+1;
94+
95+
if( shooting_num == 5)
96+
{
97+
shooting_num=1;
98+
}
99+
}
100+
101+
AimFromWeapon1(piecenum) // where it aims the weapon from
102+
{
103+
piecenum = barrel1;
104+
}
105+
106+
QueryWeapon1(piecenum) // where the shot is called from
107+
{
108+
if (shooting_num==1)
109+
{
110+
piecenum=firepoint1;
111+
}
112+
113+
if (shooting_num==2)
114+
{
115+
piecenum=firepoint2;
116+
}
117+
118+
if (shooting_num==3)
119+
{
120+
piecenum=firepoint3;
121+
}
122+
123+
if (shooting_num==4)
124+
{
125+
piecenum=firepoint4;
126+
}
127+
}
128+
/*
129+
TechLost()
130+
{
131+
CanFire=FALSE;
132+
signal SIG_AIM;
133+
stop-spin turret around y-axis decelerate <10>;
134+
stop-spin barrel1 around x-axis decelerate <10>;
135+
}
136+
137+
TechGranted()
138+
{
139+
CanFire=TRUE;
140+
}
141+
*/
142+
Killed(severity, corpsetype) // how it explodes
143+
{
144+
corpsetype = 1;
145+
explode base type EXPLODE_ON_HIT;
146+
explode beams type EXPLODE_ON_HIT;
147+
explode lilypad type EXPLODE_ON_HIT;
148+
}

Scripts/eflakturret.cob

1.41 KB
Binary file not shown.

Scripts/elaserbattery.bos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "sfxtype.h"
44
#include "exptype.h"
55

6-
piece base, beams, firepoint1, lilypad; // these are the pieces of the model
6+
piece base, beams, turret, barrel1, firepoint1, firepoint2, firepoint3, firepoint4, lilypad; // these are the pieces of the model
77

88
static-var shooting_num, terraintype;
99

Units-Configs-Basedefs/basedefs/amphib/eamphibrock_basedef.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ weaponDefs = {
174174
flightTime = 5,
175175
trajectoryHeight = 1.5,
176176
sprayangle = 10000,
177-
weaponVelocity = 1500,
177+
weaponVelocity = 3000,
178178
customparams = {
179179
isupgraded = isUpgraded,
180180
damagetype = "antiarmoredair",

0 commit comments

Comments
 (0)