Difference between revisions of "DotP 2014: ObjectDC Functions"

From RSN Magic
Jump to: navigation, search
(Created page with "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/funct...")
 
(Installation)
Line 2: Line 2:
  
 
== Installation ==
 
== Installation ==
 +
Just drop the wad into the DotP 2014 game directory and you're done.
  
 
== Items Included ==
 
== Items Included ==

Revision as of 04:49, 5 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.

Installation

Just drop the wad into the DotP 2014 game directory and you're done.

Items Included

Functions - RSN_OBJECTDC.LOL

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.

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(), 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 )

Download

File:Data DLC 8192 ObjectDC.wad