Weapon (modding)
< Modding | Components
Modding/Components/WeaponWork in Progress
This page is currently WORK IN PROGRESS. Some things may be missing.
Feel free to contribute and don't worry about perfection - other editors can make corrections if necessary. Just get creating!
Code location (what's this?):
Cosmoteer.Ships.Parts.Weapons.Weapon
The base class for all types of weapon components.
Inherits from OperationalChainablePartComponent
.
Name | Type | Required? | Buffable? | Default value | Description |
---|---|---|---|---|---|
FireInterval | Time | Yes | Yes | Time between shots of the weapon.
Lower means faster. | |
FirePermissionToggle | ID<PartComponentRules>? | - | - | ||
TargetingEmitter | ID<PartComponentRules>? | - | - | ||
ResourceCheckEmitters | List<ID<PartComponentRules>> | - | - | ||
ResourceCheckRequiresAllEmitters | bool | - | - | ||
AIFirepowerRating | Float | - | Yes | How much the AI tries to focus this part.
Higher means more focus. | |
AddAIFirepowerRatingsWhenTargetedByPartCategories | ID<PartCategory>>? | - | - | ||
CanBeGivenExplicitTarget | bool | - | - | true | |
AllowShipWideExplicitTargets | bool | - | - | true | |
AllowShipWideExplicitTargetsToggle | ID<PartComponentRules>? | - | - | ||
ShowExplicitTarget | bool | - | - | true | |
ShowTargetButtons | bool | - | - | true | |
AllowDirectControl | bool | - | - | true | |
AllowDirectControlToggle | ID<PartComponentRules>? | - | - | ||
DefaultDirectControlBinding | int? | - | - | ||
CanSalvage | bool | - | - | (resource_collector / mining_beam) | |
IsDefensiveOnly | bool | - | - | If true, shoots only at enemy projectiles. | |
IncludeInFirepowerEstimation | bool | - | - | (resource_collector) | |
EstimateFirepowerToggle | ID<PartComponentRules>? | - | - | ||
AutoFireToggle | ID<PartComponentRules>? | - | - | ||
AlwaysShowCoverage | bool | - | - | ||
IgnoreFriendlyShipLowLOSChecks | bool | - | - | ||
IgnoreFriendlyShipHighLOSChecks | bool | - | - | ||
IgnoreFriendlyStructureLOSChecks | bool | - | - | ||
IgnoreJunkLOSChecks | bool | - | - | ||
AllowEnemyStructureAutoTargeting | bool | - | - | ||
ProhibitTargetPartsFilter | EffectFilter? | - | - | See link. | |
ProhibitShipRelativePointTargets | bool | - | - | ||
SuppressWholeShipTargetOverlaysForPartsFilter | EffectFilter? | - | - | See link. | |
SuppressWholeShipTargetOverlaysWhenTargetingShipRelativePoints | bool | - | - | ||
SuppressShipWideExplicitTargetsWhenTargetingPartsFilter | EffectFilter? | - | - | See link. | |
SuppressShipWideExplicitTargetsWhenTargetingShipRelativePoints | bool | - | - | ||
SuppressDirectControlWhenTargetingPartsFilter | EffectFilter? | - | - | See link. | |
SuppressDirectControlWhenTargetingShipRelativePoints | bool | - | - | ||
SuppressFirepowerEstimationWhenTargetingPartsFilter | EffectFilter? | - | - | See link. | |
SuppressFirepowerEstimationWhenTargetingShipRelativePoints | bool | - | - | ||
SuppressFirepowerEstimationWhenNotTargetingShipRelativePoints | bool | - | - | ||
SaveSelfTargetPartCategories | ID<PartCategory>>? | - | - | ||
SaveShipRelativeTargets | bool | - | - | ||
ToggleOnMode | WeaponRules.WeaponToggleOnMode | - | - | ||
OverrideTargetNineSlice | NineSlice? | - | - | ||
OverrideTargetCircle | CircleRenderer? | - | - | ||
OverrideTargetLine | CappedLine? | - | - | ||
OverrideReticleSprite | Sprite? | - | - | Presumably, visual for when some unclear thing is overriden. |
Notes
WeaponTargetType
Full list of built-in target types, for use in weapon targeting (maybe hitting as well) :
- ShipParts,
- ShipCenters,
- Bullets,
- Crew,
- Salvage,
- CollectNuggets