BuffableFloat
Cosmoteer.Ships.Buffs.BuffableFloat
Stores a float value that can be "buffed" to become a different value.
This is not a component. You use it inside components.
Inherits nothing.
Name | Type | Required? | Default value | InheritMember (?) | Description |
---|---|---|---|---|---|
BaseValue | float | Yes | - | true | The value will be this if the buff is not applied. |
BuffTypeID
alias :
|
ID<BuffType>?
meaning :
|
Yes | - | - | Name of the buff you want to apply to this value. |
BuffMode | BuffValueMode
meaning :
|
No | - | - | The way you want that value to be applied.
(See link in Type column for more) |
MinValue | float | No | - | true | Should limit how small the value can become if the buff is applied. |
MiaxValue | float | No | - | true | Should limit how great the value can become if the buff is applied. |
Examples
In thrusters :
ThrustIncreaseTime = { BaseValue=2; BuffType=Engine; BuffMode=Divide; }
Meaning : if unbuffed, the thruster has a 2 seconds ramp-up time. If buffed by an engine room, that time is divided by the buff's value, giving a faster ramp-up.
In railgun_launcher
:
Weapon
{
Type = FixedWeapon
//...
FireInterval = 4
TargetingArc = 90d
AIFirepowerRating = { BaseValue=4000; BuffType=RailgunShot; BuffMode=Multiply; }
//...
}
Meaning : if unbuffed, the AI thinks this part should be attacked with a priority of 4000. If buffed, that priority will be multiplied, making the AI target that part with a lot more focus.
In factory_ammo
:
ResourceConverter
{
Type = ResourceConverter
//...
Interval = { BaseValue=0.5; BuffType=Factory; BuffMode=Divide; }
CheckResourceLimits = true
}
Meaning : if unbuffed, the factory converts sulfur to ammo every 0.5 seconds. If buffed by another factory touching it, that time is divided by the buff's value, increasing production speed.