Emitter
Feel free to contribute and don't worry about perfection - other editors can make corrections if necessary. Just get creating!
Code locations (what's this?):
• Cosmoteer.Ships.Parts.Weapons.Emitter
• Cosmoteer.Ships.Parts.Weapons.EmitterRules
The base class for emitters that attach to weapons.
Inherits from OperationalChainablePartComponentRules
.
An abstract class, made to be inherited from (don't use it directly).
Inheritors :
Also contains the ResourceUsageRules class.
Name | Type | Required? | Buffable? | Default value | Description |
---|---|---|---|---|---|
FireTrigger | ID<PartComponentRules>?
meaning : Reference to a component |
Yes | - | - | What component calls for the shot to be fired. In the base game that's always a trigger or a TurretWeapon.
Since this field is required, you can just have a line with |
GetTargetFrom | ID<PartComponentRules>?
(Only |
Yes | - | - | Presumably, a component that tells this emitter what target it should emit towards.
In the base game that's always a |
FireDelay | Time | - | Yes | - | |
DynamicDelayPredictor | ID<PartComponentRules>? | - | - | - | |
ResourceUsage | List<EmitterRules.ResourceUsageRules>
meaning : A list of ResourceUsageRules. |
- | - | new | Contrary to what Type suggests, this does not need to be formatted like a list. You can just add the necessary parameters among the rest of the Emitter fields directly.
See Examples below. |
Recoil | - | Yes | - | If > 0, the shot will push back the ship that the weapon is attached to.
Higher numbers push more. | |
Burst | Range<BuffableInt> | - | Yes | new | If set to a number higher than 1, can be used to make burst weapons, like shotguns. |
BurstDelay | Float | - | Yes | - | Can be used to make burst weapons, like shotguns. |
UseResourcePerShotInBurst | bool | - | - | - | Presumably, if "true", each shot fired in a burst will consume the amount of resources specified in ResourceUsage .
|
ResourceScaleFactor | ID<PartComponentRules>? | - | - | - | Presumably used to apply a form of scaling. |
Notes
Nothing yet.
ResourceUsageRules
Nested within the EmitterRules
definition and nowhere else.
The fields in this class allow an Emitter to consume resources when shooting.
Name | Type | Required? | Buffable? | Default value | Description |
---|---|---|---|---|---|
ResourceStorage | ID<PartComponentRules> | Yes | - | - | Which component loses resources when the emitter shoots. |
ResourcesUsed | Int | - | Yes | 1 | How many resources are lost per shot. |
MinResourcesUsed | Int? | - | Yes | - | Presumably, the emitter cannot shoot if less than this amount of resource is available.
Ammo weapons do not set this at all.
Energy weapons always have "1", which suggests that they are able to shoot with any amount of remaining power, regardless of |
Examples
ResourceUsageRules
in ships\terran\mining_laser_small.rules
:
BeamEmitterBase : <./Data/shots/mining_beam_small/mining_beam_small.rules>
{
Type = BeamEmitter
ChainedTo = Turret
FireTrigger // none, but field is required
GetTargetFrom = Turret
Location = [1.484375*.75, 0]
OperationalToggle = IsOperational
Duration = .2
ResourceStorage = BatteryStorage
ResourcesUsed = 120
MinResourcesUsed = 1
Width = abs((&../BeamEmitterLeft/Location/1) - (&../BeamEmitterRight/Location/1)) + (&^/0/Width) / 2
}
- ↑ fact check needed: See the label for the context.