Module (Data Type)¶
- Table of contents
- Module (Data Type)
- Description
- Members
- Methods
- Examples
Description¶
This data type includes information and performs actions that are exclusive to fitted ship Modules
Please note that ONLY the ToItem member will work when not in space, the rest require you to be undocked.
Members¶
- item
ToItem
- Access the module as an item type
-
int64
ID
-
bool
IsGoingOnline
-
bool
IsWaitingForActiveTarget
-
bool
IsChangingAmmo
-
bool
IsReloadingAmmo
-
bool
IsOnline
- Is module online (as opposed to active)
-
bool
IsDeactivating
-
bool
IsActivatable
-
bool
IsAutoReloadOn
-
double
SpecialtyCrystalMiningAmount
-
string
DefaultEffectName
-
string
DefaultEffectDescription
- entity
LastTarget
- This member returns the last target upon which the module was activated.
- entity
LastTargeted
- alias for LastTarget
-
int64
TargetID
- -1 if target destroyed, no target, or N/A
-
int64
LastTargetedID
- alias for TargetID
-
bool
AutoRepeat
-
bool
IsBeingRepaired
- Activatable Modules - Require Module.IsActivatable == TRUE
- Modules with charges - Require Module.Charge(exists)
-
Module Properties - Will report NULL if module does not have property.
-
double
PowergridUsage
-
double
OptimalRange
-
double
TechLevel
-
double
ActivationCost
-
double
HP
- Hitpoints.
-
double
Damage
- Hit points damage.
-
double
ActivationTime
-
double
Duration
- Alias for ActivationTime.
-
double
Volume
-
double
AccessDifficultyBonus
-
double
CPUUsage
-
double
Capacity
-
double
MaxTractorVelocity
-
double
Mass
-
double
OverloadSpeedFactorBonus
-
double
MassAddition
-
double
HeatDamage
-
double
Thrust
-
double
MaxVelocityBonus
-
double
MaxVelocityPenalty
-
double
StructureHPBonus
-
double
CargoCapacityBonus
-
double
ShieldBonus
-
double
CapacitorRechargeRateBonus
-
double
ShieldRechargeRateBonus
-
double
ShieldTransferRange
-
double
CapacitorBonus
-
double
PowergridBonus
-
double
ShieldHPBonus
-
double
VelocityModifier
-
double
ChargeRate
-
double
RateOfFire
-
double
OverloadRateOfFireBonus
-
double
MiningAmount
-
double
CrystalsDamage
-
int
TargetGroup
-
double
SurveyScanRange
-
double
CPUOutputBonus
-
double
TrackingSpeed
- This rounds to the nearest thousandth.
-
double
DamageModifier
-
double
EMDamage
-
double
KineticDamage
-
double
ThermalDamage
-
double
ExplosiveDamage
-
int
ChargeSize
-
double
AccuracyFalloff
-
double
SignatureResolution
-
double
OverloadOptimalRangeBonus
-
double
OverloadRepairBonus
-
double
OverloadDurationBonus
-
double
ArmorHPRepaired
-
double
ExplosiveDmgResistanceBonus
-
double
KineticDmgResistanceBonus
-
double
ThermalDmgResistanceBonus
-
double
EMDmgResistanceBonus
-
double
ArmorHPBonus
-
double
RateOfFireBonus
-
double
MiningAmountBonus
-
double
CPUPenaltyPercent
-
double
WarpScrambleStrength
-
bool
UsesFrequencyCrystals
-
double
SensorRecalibrationTime
-
double
ReactivationDelay
-
int
ScanResolutionBonus
-
double
EnergyTransferAmount
-
double
TransferRange
-
double
MaxNeutralizationRange
-
double
EnergyNeutralized
-
double
Methods¶
Activate
Activate<MW_SINGLEBRACKET>#</MW_SINGLEBRACKET>
- is the ID number of an entity that is currently locked
Click
-
ChangeAmmo
- The "ChangeAmmo" METHOD of the 'module' datatype will now work without any arguments. When utilized in this fashion, it will simply "reload" using the same type of ammo that is currently found in it (obviously, this only works if there is currently ammo/charge in the module when you use this method.)
ChangeAmmo<MW_SINGLEBRACKET>AmmoID#</MW_SINGLEBRACKET>
-
ChangeAmmo<MW_SINGLEBRACKET>AmmoID#,Quantity</MW_SINGLEBRACKET>
- Parameter is the Item.ID of an ammunition from your ship's cargo
-
UnloadToCargo
(For modules that contain charges/ammo) -
ReloadAll
(For modules that have the 'Reload all' menu option available)
Deactivate
SetAutoReloadOn
SetAutoReloadOff
PutOnline
PutOffline
GetAvailableAmmo<MW_SINGLEBRACKET><index:item></MW_SINGLEBRACKET>
-
RemoveCharge
- requires you to be in station and fitting window be open
SetManualOff
SetManualOn
ToggleOverload
-
Unfit
- requires you to be in station and fitting window be open
Examples¶
1)
variable int i = 1
variable index:module Modules
variable int ModulesCount = ${Me.Ship.GetModules
[Modules
}
echo Populating Modules List:: ${ModulesCount} modules total
do
{
echo Module ${i} - ${Modules.Get
${i}
].ToItem.Name}
}
while ${i:Inc} <= ${ModulesCount}
2)
variable int i = 0
do
{
echo Module ${i} - ${Me.Ship.Module
[HiSlot${i}].ToItem.Name}: ${Me.Ship.Module[HiSlot${i}
].IsActive}
}
while ${i:Inc} <= 7
Returns:
Module 0 - Electron Blaster Cannon II: FALSE
Module 1 - Electron Blaster Cannon I: FALSE
Module 2 - Electron Blaster Cannon I: FALSE
Module 3 - Electron Blaster Cannon I: FALSE
Module 4 - Electron Blaster Cannon I: FALSE
Module 5 - Salvager I: FALSE
Module 6 - NULL: NULL
Module 7 - NULL: NULL