ProgressionEvents Objects and Variables

From PSwiki
Revision as of 18:38, 24 July 2024 by Talad (talk | contribs) (Created page with "=== Supported Objects === Inside a Progression events script you can have references to a specific object, which is usually passed by code while running the event. Example:     env.Define("Attacker",      attacker);     env.Define("AttackWeapon",  weapon); This code defines two variables you will be able to access in the script, which point to an instantiated C++ object. The current objects supported are: * PSCharacter * PSItem * PSItemStats * PSSpell * PS...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Supported Objects

Inside a Progression events script you can have references to a specific object, which is usually passed by code while running the event.

Example:

    env.Define("Attacker",      attacker);

    env.Define("AttackWeapon",  weapon);

This code defines two variables you will be able to access in the script, which point to an instantiated C++ object.

The current objects supported are:

  • PSCharacter
  • PSItem
  • PSItemStats
  • PSSpell
  • PSTrade
  • PSTradeProcess
  • NPCBrain
  • psNPCManager
  • psSectorInfo

Variables by Objects

Each object then has a number of variables or functions. You can access those with this syntax: <Object>:<variable>

Continuing the example above, if we know we have an object called Attacker, which is a PSCharacter, we can use:

Attacker:HP

in the script to get it's HP value.

Here is the current list of supported variables:

PSCharacter properties:

"stamina_drain_p"

"stamina_drain_m"

"attack_speed_mod"

"attack_damage_mod"

"defense_avoid_mod"

"defense_absorb_mod"

"combatstance"

"isadvisorbanned"

"advisorpoints"

"AttackerTargeted"

"TotalTargetedBlockValue"

"TotalUntargetedBlockValue"

"DodgeValue"

"KillExp"

"GetAttackValueModifier"

"GetDefenseValueModifier"

"HP"

"MaxHP"

"BaseHP"

"Mana"

"MaxMana"

"BaseMana"

"PStamina"

"MStamina"

"MaxPStamina"

"MaxMStamina"

"BasePStamina"

"BaseMStamina"

"AllArmorStrMalus"

"AllArmorAgiMalus"

"PID"

"loc_x"

"loc_y"

"loc_z"

"loc_yrot"

"sector"

"owner"

"IsNPC"

"IsPet"

"Race"

"RaceUID"

PSItem properties

"Skill1"

"Skill2"

"Skill3"

"Quality"

"ArmQuality"

"MaxQuality"

"WeaponCBV"

"Latency"

"UntargetedBlockValue"

"TargetedBlockValue"

"Hardness"

"DecayRate"

"DecayResistance"

"Penetration"

"DamageSlash"

"ProtectSlash"

"ExtraDamagePct"

"DamageBlunt"

"ProtectBlunt"

"DamagePierce"

"ProtectPierce"

"StrMalus"

"AgiMalus"

"Weight"

"MentalFactor"

"RequiredRepairSkill"

"RepairDifficultyPct"

"SalePrice"

"PristinePrice"

"Charges"

"MaxCharges"

"Range"

"Slot"

"Owner"

"ArmorType"

"IsMeleeWeapon"

"IsBothHandsWeapon"

"IsRangeWeapon"

"IsAmmo"

"IsArmor"

"IsShield"

"StackCount"

"Id"

"DodgeValue"

"AllArmorStrMalus" || property == "AllArmorAgiMalus"

"defense_avoid_mod" || property == "defense_absorb_mod"

"GetDefenseValueModifier"

"MinFaction"

PSItemStats properties

"Quality"

"Id"

"CategoryID"

PSSpell properties

"Realm"

"Way"

PSTrade properties

"ItemQualityPenaltyPercent"

"ItemQuantity"

"ItemID"

"ResultItemID"

"TransformPoints"

PSTradeProcess

"PrimarySkillId"

"MaxPrimarySkill"

"MinPrimarySkill"

"PrimarySkillQualityFactor"

"PrimarySkillPracticePoints"

"SecondarySkillId"

"MaxSecondarySkill"

"MinSecondarySkill"

"SecondarySkillQualityFactor"

"SecondarySkillPracticePoints"

"WorkItemId"

"EquipmentId"

NPCBrain

"InsideTribeHome"

"InsideRegion"

"Hate"

"HasTarget"

"HP"

"MaxHP"

"Mana"

"MaxMana"

"PStamina"

"MaxPStamina"

"MStamina"

"MaxMStamina"

psNPCManager

"gameYear"

"gameMonth"

"gameHour"

"gameMinute"

psSectorInfo

"uid"