Divinity: Original Sin 2

Divinity: Original Sin 2

airi_VANGUARD
Airi  [desarrollador] 19 OCT 2023 a las 10:30
Script Helpers
-- work in progress --
Most of these are going to require Norbyte's Script Extender.

Events
Timers
  • TimerFinished("VANGUARD_SETUP")
    Occurs a couple seconds after the GameStarted event, long enough for players etc to have spawned in.
  • TimerFinished("VANGUARD_CombatStartUp")
    Occurs a split second after combat start, after all DB's etc have been generated.
Character StoryEvents
  • StoryEvent((CHARACTERGUID)_Char, "VANGUARD_StartedActiveSneaking")
    Character starts Sneaking (not invis) during their own turn.
  • StoryEvent((CHARACTERGUID)_Char, "VANGUARD_StoppedActiveSneaking")
  • StoryEvent((CHARACTERGUID)_Char, "VANGUARD_AnyStatusApplied")
    Buffered, for use with periodic checks.
  • StoryEvent((CHARACTERGUID)_Char, "VANGUARD_CombatCleanUp")
    Occurs a split second after character leaves combat, useful for cleaning up DB's
  • StoryEvent((CHARACTERGUID)_Char, "VANGUARD_CombatStartUp")
    A split second after char enters combat, useful for referencing DB's that generate when entering combat
  • StoryEvent((CHARACTERGUID)_PlayerChar, "VANGUARD_SETUP")
    Occurs 1s after screen loads
  • StoryEvent((CHARACTERGUID)_Char, "KCE_AttributeCheck")
    For player and non-player characters; ideal for periodic out-of-combat checks. (From Divinity Unleashed, modified)
Procs
  • VANGUARD_TaggedInFeelerRange((CHARACTERGUID)_Feeler, (CHARACTERGUID)_Tagged)
    Occurs when any combatant enters within 4m of another combatant.
  • VANGUARD_TaggedNotInFeelerRange((CHARACTERGUID)_Feeler, (CHARACTERGUID)_Tagged)
  • VANGUARD_ProcessCharacterHit((CHARACTERGUID)_Char,(CHARACTERGUID)_Causee,(INTEGER64)_Handle)
    perfect for modifying Character-On-Character hits (NRD_OnPrepareHit). Occurs after attribute/ability modifiers from other mods take place (specifically Divinity Unleashed).
  • VANGUARD_ProcessCharacterStatusHit((CHARACTERGUID)_Target, (CHARACTERGUID)_Attacker, (INTEGER64)_StatusHandle)
    Same as above, but for NRD_OnHit.



Queries
Native Osiris
  • ASC_CharacterIsIncapacitated((CHARACTERGUID)_Char, _IsIncapacitated)
    Includes compatibilty for OdinBlade and Divinity Unleashed.
  • ASC_CharacterTargetRelationship((CHARACTERGUID)_Char, (CHARACTERGUID)_Target, (STRING)_Alias)
    Aliases include "Enemy", "Ally", "Neutral", "NonHostile", "NonAlly", "Any". Mostly just used by below queries.
  • ASC_IsTargetWithinDistance((CHARACTERGUID)_Char, (CHARACTERGUID)_Target, (REAL)_QryDistance)
    Succeeds if _Char is within _QryDistance of _Target.
  • ASC_IsTargetWithinDistance((CHARACTERGUID)_Char, (CHARACTERGUID)_Target, (REAL)_QryDistance, (STRING)_Alias)
    Includes a relationship check using the same aliases listed above.
  • ASC_IsValidCharacterLink((CHARACTERGUID)_Char, (CHARACTERGUID)_Target)
    Succeeds if both characters are still alive and exist and in combat etc.
  • ASC_EyeContact((CHARACTERGUID)_Target, (CHARACTERGUID)_Attacker)
    Succeeds if both characters are within each other's sight cones.
  • ASC_IsActiveTurn((CHARACTERGUID)_Char, _IsTurn)
    Succeeds if the character is in combat and it is their turn. Because Osiris apparently doesn't have an equivalent.
  • ASC_CharacterIsStealthed((CHARACTERGUID)_Char, _IsStealthed)
    Succeeds if the character is Sneaking or Invisible. Working on compatibility with other mods.
Script Extender
  • ASC_IsKCELoaded((INTEGER)_Bool)
    Is Divinity Unleashed loaded, 1 or 0
  • ASC_CharacterHasSkillMemorized((CHARACTERGUID)_Char, (STRING)_Skill, (INTEGER)_Bool)
    Has _Char learned _Skill and also have it currently active/memorized, 1 or 0.
  • ROLL_DoubleRandom((INTEGER)_PrctChance)
    Enter an integer between 1 and 100. Performs two rolls and the query succeeds if one of them passes.
  • ASC_StatusHasAttribute((INTEGER64)_StatusHandle, (STRING)_Alias, (CHARACTERGUID)_Target)
    Succeeds if the status instance has the specified attribute. List of aliases is long and will have to be listed separately.
  • ASC_IsStatusHitType((INTEGER64)_StatusHandle, (STRING)_Alias, (CHARACTERGUID)_Target)
    Succeeds if the hit status has the specified source type: "Melee" (basic attack), "Magic" (any skill that doesn't use weapon damage), "Ranged" (basic attack), "Weapon" (any skill based on weapon damage), "Surface", "DoT", "Reflected", "Tick" (surface or dot), "MeleeWeapon" (melee basic attack or weapon skill)
  • ASC_HitHasAttribute((INTEGER64)_HitHandle, (STRING)_Alias)
    Same as StatusHasAttribute above, but for NRD_OnPrepareHit instead of NRD_OnHit or other statuses
  • ASC_IsHitType((INTEGER64)_HitHandle, (STRING)_Alias)
    Same as IsStatusHitType above, but for NRD_OnPrepareHit
  • ASC_IsStatusCausedBy((CHARACTERGUID)_Target, (STRING)_StatusId, (CHARACTERGUID)_Source)
    Succeeds if the status was caused by _Source
  • ASC_CharacterIsInTargetMeleeRange((CHARACTERGUID)_Char, (CHARACTERGUID)_Enemy, _IsIn)
    Is _Char is within the weapon range of _Enemy, 1 or 0
Última edición por Airi; 19 OCT 2023 a las 10:35