SelfBuffProvider
< Modding | ComponentsModding/Components/SelfBuffProvider
Jump to navigation
Jump to search
.rules
file/node location: Cosmoteer.Ships.Parts.Buffs.PartSelfBuffProviderRules
Stores rules for a buff provider that provides a buff to its own part.
Inherits from BasePartBuffProvider and has no specific parameters.
Used by chaingun
, railgun_launcher
, thruster_rocket_extender
, and thruster_rocket_nozzle
.
Not used by chaingun_magazine
.
Notes
Apparently one use case is being the "final handler" for a value propagated by a multi-part buff that also has ChainsFromBuffType = true
.
Examples
railgun_launcher
has :
ShotBuffProvider
{
Type = SelfBuffProvider
BuffType = RailgunShot
ChainsFromBuffType = Railgun
BuffAmount = { BaseValue=0; BuffType=Railgun; BuffMode=Add; }
}
RailgunShot
is used to scale bullet_railgun
in that projectile's own code :
Range = { BaseValue=300; BuffType=RailgunShot; BuffMode=Multiply; MaxValue=600; }
IdealRange
[
{ BaseValue=150; BuffType=RailgunShot; BuffMode=Multiply; MaxValue=300; }
{ BaseValue=300; BuffType=RailgunShot; BuffMode=Multiply; MaxValue=600; }
]
IdealRadius = [5, 50]
Speed = { BaseValue=360; BuffType=RailgunShot; BuffMode=Multiply; MaxValue=1200; }
ReceivableBuffs = [RailgunShot]
This demonstrates that buffs can be used by both parts and projectiles.