Project

General

Profile

Module (Data Type)

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
    • bool IsActive
      • TRUE when the module is active, including when the module is flashing red in cooldown mode after being deactivated.
    • bool IsOffensive
    • bool IsAssistance
    • int EffectCategory
    • evetime TimeLastClicked
  • Modules with charges - Require Module.Charge(exists)
    • item Charge
      • The charge type loaded into this module.
    • int CurrentCharges
    • int MaxCharges

Methods

  • Activate
  • Activate<MW_SINGLEBRACKET>#</MW_SINGLEBRACKET>
      1. 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.)
Here is an example:
"MyShip.Module[HiSlot0]:ChangeAmmo"
  • 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
NOTE: This method will replace your current ammo with the ammo given in the same quantity, unless you provide Quantity
NOTE: If using the Quantity parameter, be careful: if you use a quantity that is too high for the module, it'll fail entirely. See Module.MaxCharges
  • 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