Difference between revisions of "Osiris/API/ApplyStatus"

From Divinity Engine Wiki
Jump to: navigation, search
(Documented ApplyStatus)
 
m
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
===== Full Definition(s) =====
 
===== Full Definition(s) =====
 +
* (Shared mod) call '''ApplyStatus'''(''(GUIDSTRING)'''''_Object''', ''(STRING)'''''_Status''', ''(REAL)'''''_Duration''')
 +
* (Shared mod) call '''ApplyStatus'''(''(GUIDSTRING)'''''_Object''', ''(STRING)'''''_Status''', ''(REAL)'''''_Duration''', ''(INTEGER)'''''_Force''')
 
* call '''ApplyStatus'''(''(GUIDSTRING)'''''_Object''', ''(STRING)'''''_Status''', ''(REAL)'''''_Duration''', ''(INTEGER)'''''_Force''', ''(GUIDSTRING)'''''_Source''')
 
* call '''ApplyStatus'''(''(GUIDSTRING)'''''_Object''', ''(STRING)'''''_Status''', ''(REAL)'''''_Duration''', ''(INTEGER)'''''_Force''', ''(GUIDSTRING)'''''_Source''')
 
===== Description =====
 
===== Description =====
Applies the status with name '''_Status''' to '''_Object''', which can either be a character or an item. The status will last for '''_Duration''' seconds. If '''_Duration''' is -1.0, it will last until explicitly removed by either script or another status/effect interaction (e.g. a permanent '''BURNING''' status can still be removed by making the object '''WET''').
+
Applies the status with stats name '''_Status''' to '''_Object''', which can either be a character or an item. The status will last for '''_Duration''' seconds. If '''_Duration''' is -1.0, it will last until explicitly removed by either script or another status/effect interaction (e.g. a permanent '''BURNING''' status can still be removed by making the object '''WET''').
  
 
If '''_Force''' is '''1''', normal status immunities are ignored (e.g., a status that is normally blocked by physical armour, can be force-applied to ignore the fact that the target may have physical armour left). If it is '''0''', normal status immunities apply.
 
If '''_Force''' is '''1''', normal status immunities are ignored (e.g., a status that is normally blocked by physical armour, can be force-applied to ignore the fact that the target may have physical armour left). If it is '''0''', normal status immunities apply.
  
'''_Source''' specifies the object, either a character or item, that the game should consider as the source of this status effect. This is mainly useful for scripted skill applications, where you want '''_Object''' to react as if '''_Source''' applied this status. You can pass '''NULL_00000000-0000-0000-0000-000000000000''' if there is no specific source.
+
''(New parameter in DOS2 Patch 5)'' '''_Source''' specifies the object, either a character or item, that the game should consider as the source of this status effect. This is mainly useful for scripted skill applications, where you want '''_Object''' to react as if '''_Source''' applied this status. You can pass '''NULL_00000000-0000-0000-0000-000000000000''' if there is no specific source.
 
===== Notes =====
 
===== Notes =====
* The '''_Source''' parameter is new in DOS2 Patch 5.
+
* The overloads in the Shared mod use the defaults '''_Force''' = '''0''', and '''_Source''' = '''NULL_00000000-0000-0000-0000-000000000000'''.
* There are overloads in the shared mod for this call without the '''_Force''' and/or '''_Source''' parameters for backwards compatibility. They use the defaults '''0''' and '''NULL_00000000-0000-0000-0000-000000000000''', respectively.
 
 
* Even when using '''_Force''' == 1, '''_Object''' may not actually have '''_Status''' after calling this routine, because another status may nullify this one. E.g., if a character has the '''RESTED''' status and you force-apply '''KNOCKED_DOWN''', then this application will
 
* Even when using '''_Force''' == 1, '''_Object''' may not actually have '''_Status''' after calling this routine, because another status may nullify this one. E.g., if a character has the '''RESTED''' status and you force-apply '''KNOCKED_DOWN''', then this application will
 
** ignore physical armor, which normally blocks '''KNOCKED_DOWN'''
 
** ignore physical armor, which normally blocks '''KNOCKED_DOWN'''
** not apply the '''KNOCKED_DOWN''' status, but instead remove the '''RESTED''' status (since that status blocks '''KNOCKED_DOWN''')
+
** not apply the '''KNOCKED_DOWN''' status, but instead remove the '''RESTED''' status (since that status and '''KNOCKED_DOWN''' cancel each other out)
 +
* The duration of a single combat round is 6.0 seconds
 
===== See Also =====
 
===== See Also =====
 
* [[Osiris/API/CharacterStatusApplied|CharacterStatusApplied]]
 
* [[Osiris/API/CharacterStatusApplied|CharacterStatusApplied]]
 
* [[Osiris/API/CharacterStatusAttempt|CharacterStatusAttempt]]
 
* [[Osiris/API/CharacterStatusAttempt|CharacterStatusAttempt]]
 
* [[Osiris/API/CharacterStatusRemoved|CharacterStatusRemoved]]
 
* [[Osiris/API/CharacterStatusRemoved|CharacterStatusRemoved]]
 +
* [[Osiris/API/CharacterUseSkill|CharacterUseSkill]]
 
* [[Osiris/API/HasActiveStatus|HasActiveStatus]]
 
* [[Osiris/API/HasActiveStatus|HasActiveStatus]]
 
* [[Osiris/API/ItemStatusAttempt|ItemStatusAttempt]]
 
* [[Osiris/API/ItemStatusAttempt|ItemStatusAttempt]]
 
* [[Osiris/API/ItemStatusChange|ItemStatusChange]]
 
* [[Osiris/API/ItemStatusChange|ItemStatusChange]]
 
* [[Osiris/API/ItemStatusRemoved|ItemStatusRemoved]]
 
* [[Osiris/API/ItemStatusRemoved|ItemStatusRemoved]]
 +
* [[Osiris/API/RemoveHarmfulStatuses|RemoveHarmfulStatuses]]
 +
* [[Osiris/API/RemoveStatus|RemoveStatus]]
  
[[Category:Osiris Calls]]
+
[[Category:Osiris Calls|ApplyStatus]]

Latest revision as of 14:17, 7 June 2019

Full Definition(s)
  • (Shared mod) call ApplyStatus((GUIDSTRING)_Object, (STRING)_Status, (REAL)_Duration)
  • (Shared mod) call ApplyStatus((GUIDSTRING)_Object, (STRING)_Status, (REAL)_Duration, (INTEGER)_Force)
  • call ApplyStatus((GUIDSTRING)_Object, (STRING)_Status, (REAL)_Duration, (INTEGER)_Force, (GUIDSTRING)_Source)
Description

Applies the status with stats name _Status to _Object, which can either be a character or an item. The status will last for _Duration seconds. If _Duration is -1.0, it will last until explicitly removed by either script or another status/effect interaction (e.g. a permanent BURNING status can still be removed by making the object WET).

If _Force is 1, normal status immunities are ignored (e.g., a status that is normally blocked by physical armour, can be force-applied to ignore the fact that the target may have physical armour left). If it is 0, normal status immunities apply.

(New parameter in DOS2 Patch 5) _Source specifies the object, either a character or item, that the game should consider as the source of this status effect. This is mainly useful for scripted skill applications, where you want _Object to react as if _Source applied this status. You can pass NULL_00000000-0000-0000-0000-000000000000 if there is no specific source.

Notes
  • The overloads in the Shared mod use the defaults _Force = 0, and _Source = NULL_00000000-0000-0000-0000-000000000000.
  • Even when using _Force == 1, _Object may not actually have _Status after calling this routine, because another status may nullify this one. E.g., if a character has the RESTED status and you force-apply KNOCKED_DOWN, then this application will
    • ignore physical armor, which normally blocks KNOCKED_DOWN
    • not apply the KNOCKED_DOWN status, but instead remove the RESTED status (since that status and KNOCKED_DOWN cancel each other out)
  • The duration of a single combat round is 6.0 seconds
See Also