Difference between revisions of "DotP 2014: ObjectDC Functions"
RiiakShiNal (Talk | contribs) (→RSN_GetObjectDC) |
RiiakShiNal (Talk | contribs) m (→Functions - RSN_OBJECTDC.LOL: Added a list of linked functions.) |
||
Line 6: | Line 6: | ||
== Items Included == | == Items Included == | ||
=== Functions - RSN_OBJECTDC.LOL === | === Functions - RSN_OBJECTDC.LOL === | ||
+ | * [[#RSN_ClearObjectDC|RSN_ClearObjectDC]]( oCard ) | ||
+ | * [[#RSN_GetObjectDC|RSN_GetObjectDC]]( oCard, bCreate ) | ||
+ | * [[#RSN_ObjectDC|RSN_ObjectDC]]() | ||
+ | |||
==== RSN_ClearObjectDC ==== | ==== RSN_ClearObjectDC ==== | ||
This function hopefully won't be necessary since I use Set_CardPtr, though if for whatever reason the pointer doesn't get set to null on zone change this can be used to clear it. | This function hopefully won't be necessary since I use Set_CardPtr, though if for whatever reason the pointer doesn't get set to null on zone change this can be used to clear it. |
Revision as of 15:57, 9 July 2013
This mod is aimed at creating an Object Data Chest that can be used simply since DotP 2014 removed the ObjectDataChest that we had been using in DotP 2013 for some cards/functions.
Contents
Installation
Just drop the wad into the DotP 2014 game directory and you're done.
Items Included
Functions - RSN_OBJECTDC.LOL
- RSN_ClearObjectDC( oCard )
- RSN_GetObjectDC( oCard, bCreate )
- RSN_ObjectDC()
RSN_ClearObjectDC
This function hopefully won't be necessary since I use Set_CardPtr, though if for whatever reason the pointer doesn't get set to null on zone change this can be used to clear it.
Parameters:
- oCard - The Card Object to look for and clear the Object Data Chest for.
Usage Example:
RSN_ClearObjectDC( TriggerObject() )
RSN_GetObjectDC
This function does the real checking and allows for other cards to look at a card's ObjectDC. LUA will set any missing parameters to nil and due to the way I coded the function the second parameter only matters if it is true, so for false it can be treated as optional.
Parameters:
- oCard - The Card Object to get the Object Data Chest for.
- bCreate - Whether to create an Object Data Chest if one is not found.
Usage Examples:
local oDC = RSN_GetObjectDC( TriggerObject() ) if (oDC ~= nil) then -- Check Something local nItemCount = oDC:Int_Get( 355 ) end
local oDC = RSN_GetObjectDC( TriggerObject(), false ) if (oDC ~= nil) then -- Check Something local nItemCount = oDC:Int_Get( 355 ) end
local oDC = RSN_GetObjectDC( FilteredCard(), true ) oDC:Int_Set( 355, 1 ) oDC:Set_CardPtr( 356, EffectSource() )
RSN_ObjectDC
This function is meant to be an analogue for DotP 2013's ObjectDC() function. It returns the Object Data Chest for the current object (creating one if it doesn't exist).
Parameters: None
Usage Example:
local oDC = RSN_ObjectDC() oDC:Int_Inc( 0 )