Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 3bdb15b

Browse files
committed
(Very) minor effect tweaks
1 parent 578ef18 commit 3bdb15b

File tree

7 files changed

+26
-69
lines changed

7 files changed

+26
-69
lines changed

Base.rte/Effects.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ AddEffect = MOPixel
329329
Mass = 1.25
330330
LifeTime = 50
331331
Sharpness = 0.3
332+
AirResistance = 0.1
332333
HitsMOs = 1
333334
GetsHitByMOs = 0
334335
Color = Color
@@ -350,6 +351,7 @@ AddEffect = MOPixel
350351
Mass = 1.25
351352
LifeTime = 75
352353
Sharpness = 0.3
354+
AirResistance = 0.1
353355
HitsMOs = 1
354356
GetsHitByMOs = 0
355357
Color = Color

Base.rte/Effects/Casings.ini

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ AddAmmo = AEmitter
116116
FilePath = Base.rte/Effects/Casings/Shell000.bmp
117117
FrameCount = 1
118118
SpriteOffset = Vector
119-
X = -3
120-
Y = -1
119+
X = -2
120+
Y = -2
121121
AtomGroup = AtomGroup
122122
AutoGenerate = 1
123123
Material = Material
@@ -133,14 +133,14 @@ AddAmmo = AEmitter
133133
DeepCheck = 0
134134
AngularVel = 6
135135
EmissionOffset = Vector
136-
X = -3
136+
X = 0
137137
Y = 0
138138
AddEmission = Emission
139139
EmittedParticle = MOSParticle
140140
CopyOf = Tiny Smoke Ball 1
141141
ParticlesPerMinute = 2000
142+
LifeVariation = 0.30
142143
StopTimeMS = 300
143-
BurstSize = 1
144144
Spread = 3.1
145145
MaxVelocity = 1
146146
MinVelocity = 0
@@ -149,15 +149,16 @@ AddAmmo = AEmitter
149149
EmittedParticle = MOSParticle
150150
CopyOf = Tiny Smoke Ball 1
151151
ParticlesPerMinute = 500
152+
LifeVariation = 0.30
152153
StartTimeMS = 300
153154
StopTimeMS = 600
154-
BurstSize = 1
155155
Spread = 3.1
156156
MaxVelocity = 1
157157
MinVelocity = 0
158158
PushesEmitter = 0
159159
EmissionEnabled = 1
160160
EmissionsIgnoreThis = 1
161+
BurstSize = 1
161162

162163

163164
AddAmmo = MOSRotating
486 Bytes
Binary file not shown.

Base.rte/Effects/Pyro.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ AddEffect = MOSParticle
11181118
Sharpness = 0.1
11191119
HitsMOs = 0
11201120
GetsHitByMOs = 0
1121-
ScriptPath = Base.rte/Effects/Pyro/Flame/GroundFlameNew.lua
1121+
ScriptPath = Base.rte/Effects/Pyro/Flame/Flame.lua
11221122
SpriteFile = ContentFile
11231123
FilePath = Base.rte/Effects/Pyro/Flame/Flame00.bmp
11241124
FrameCount = 84
Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
function Create(self)
2-
3-
self.strength = 80; -- damage output
4-
2+
self.strength = 80; -- Damage frequency factor
53
self.checkTimer = Timer();
64
self.checkDelay = math.random(20);
75
end
86

97
function Update(self)
10-
118
self.ToSettle = false;
12-
139
if self.target and IsMOSRotating(self.target) then
14-
1510
self.Vel = self.target.Vel;
1611
self.Pos = self.target.Pos - Vector(self.stickPos.X, self.stickPos.Y):RadRotate(self.target.RotAngle - self.tsAngle);
17-
18-
local actor = MovableMan:GetMOFromID(self.target.RootID); -- inflict damage on the root actor
12+
local actor = MovableMan:GetMOFromID(self.target.RootID); -- Inflict damage on the root actor
1913
if MovableMan:IsActor(actor) then
2014
actor = ToActor(actor);
2115
if math.random() < (self.strength * self.target.DamageMultiplier) / actor.Mass / (self.target.Material.StructuralIntegrity) then
@@ -25,42 +19,34 @@ function Update(self)
2519
else
2620
self.target = nil;
2721
if self.checkTimer:IsPastSimMS(self.checkDelay) then
28-
2922
self.checkTimer:Reset();
30-
self.checkDelay = self.checkDelay + 1; -- Extend the delay for optimization reasons
31-
23+
self.checkDelay = self.checkDelay + 1; -- Gradually extend the delay for optimization reasons
3224
local checkPos = self.Pos + Vector(self.Vel.X, self.Vel.Y):SetMagnitude(math.sqrt(self.Vel.Magnitude));
3325
local mocheck = SceneMan:GetMOIDPixel(checkPos.X, checkPos.Y);
3426
if mocheck ~= 255 then
3527
local mo = MovableMan:GetMOFromID(mocheck);
3628
if mo then
3729
self.target = ToMOSRotating(mo);
38-
39-
self.tsAngle = mo.RotAngle; -- target angle when sticking
40-
30+
self.tsAngle = mo.RotAngle; -- Target angle when sticking
4131
self.stickPos = SceneMan:ShortestDistance(mo.Pos, self.Pos, SceneMan.SceneWrapsX) * 0.8;
42-
4332
self.Pos = mo.Pos - Vector(self.stickPos.X, self.stickPos.Y);
4433
end
4534
end
4635
end
4736
end
48-
4937
local age = self.Age * 0.0001 + 1;
5038
local chance = math.random();
51-
local part;
52-
39+
local particle;
5340
if chance < (0.1 / age) then
54-
part = CreateMOPixel("Ground Fire Burn Particle");
55-
part.Vel = self.Vel + Vector(RangeRand(-10, 10), -math.random(5, 20));
56-
41+
particle = CreateMOPixel("Ground Fire Burn Particle");
42+
particle.Vel = self.Vel + Vector(RangeRand(-10, 10), -math.random(5, 20));
5743
elseif chance < (1 / age) then
58-
part = CreateMOSParticle("Flame Smoke 1");
59-
part.Vel = self.Vel + Vector(0, -3) + Vector(math.random(0, 3), 0):RadRotate(math.random() * 6.28);
60-
part.Lifetime = 100 + math.random(math.ceil(700 / age));
44+
particle = CreateMOSParticle("Flame Smoke 1");
45+
particle.Vel = self.Vel + Vector(0, -3) + Vector(math.random(0, 3), 0):RadRotate(math.random() * 6.28);
46+
particle.Lifetime = 100 + math.random(math.ceil(700 / age));
6147
end
62-
if part then
63-
part.Pos = Vector(self.Pos.X + math.random(-1, 1), self.Pos.Y - math.random(0, 2));
64-
MovableMan:AddParticle(part);
48+
if particle then
49+
particle.Pos = Vector(self.Pos.X + math.random(-1, 1), self.Pos.Y - math.random(0, 2));
50+
MovableMan:AddParticle(particle);
6551
end
6652
end

Base.rte/Effects/Pyro/Flame/GroundFlame.lua

Lines changed: 0 additions & 28 deletions
This file was deleted.

Base.rte/Scripts/AirBlast.lua

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,17 @@ function Update(self)
99
if mo and mo.PinStrength == 0 then
1010
local dist = SceneMan:ShortestDistance(self.Pos, mo.Pos, SceneMan.SceneWrapsX);
1111
if dist.Magnitude < self.range then
12-
local strength = self.strength;
1312
local strSumCheck = SceneMan:CastStrengthSumRay(self.Pos, self.Pos + dist, 3, 0);
14-
if strSumCheck < strength then
15-
strength = strength - strSumCheck;
13+
if strSumCheck < self.strength then
1614
local massFactor = math.sqrt(1 + math.abs(mo.Mass));
1715
local distFactor = 1 + dist.Magnitude * 0.1;
18-
local forceVector = dist:SetMagnitude(strength / distFactor);
19-
mo.Vel = mo.Vel + forceVector / massFactor;
20-
mo.AngularVel = mo.AngularVel - forceVector.X / (massFactor + math.abs(mo.AngularVel));
16+
local forceVector = dist:SetMagnitude((self.strength - strSumCheck) /distFactor);
17+
mo.Vel = mo.Vel + forceVector /massFactor;
18+
mo.AngularVel = mo.AngularVel - forceVector.X /(massFactor + math.abs(mo.AngularVel));
2119
mo:AddForce(forceVector * massFactor, Vector());
2220
end
2321
end
2422
end
2523
end
26-
-- Debug: visualize effect range
27-
-- FrameMan:DrawCirclePrimitive(self.Pos, self.range, 254);
2824
self.ToDelete = true;
2925
end

0 commit comments

Comments
 (0)