Cavestory Mod API
Macros | Functions
Game

A list of game manipulation functions. More...

Macros

#define CAVESTORY_MOD_API   __declspec(dllimport)
 Exports / imports Cavestory Mod API functions & classes.
 
#define NPC_MAX   (0x200 + ANIM_NPC_MAX)
 How many npcs can be initialized at one time.
 
#define BOSS_MAX   20
 How many bosses can be initialized at one time.
 
#define ITEM_MAX   32
 How many items can be initialized at one time for each client.
 
#define ARMS_MAX   8
 How many weapons can be initialized at one time for each client.
 
#define BULLET_MAX   0x200
 How many bullets can be initialized at one time.
 

Functions

CAVESTORY_MOD_API void CSM_SaveScreenshot (const char *pOutputImagePath, GUI_RECT *pSource=NULL)
 Take an unmagnified screenshot and save it at a path. More...
 
CAVESTORY_MOD_API void CSM_SetFramerateVisible (BOOL bValue)
 Set the visibility of the FPS counter. More...
 
CAVESTORY_MOD_API BOOL CSM_IsFramerateVisible ()
 Set the visibility of the FPS counter. More...
 
CAVESTORY_MOD_API void CSM_PlayerState_DrawWeapon (int iFrameX, int iFrameY, SafeClientInterface *pInterface, float fScale=1.f)
 Draw the weapon. More...
 
CAVESTORY_MOD_API void CSM_PlayerState_DrawCharacter (int iFrameX, int iFrameY, SafeClientInterface *pInterface, float fScale=1.f)
 Draw the character. More...
 
CAVESTORY_MOD_API int CSM_FindPlayerAnimFrameByName (const char *pName)
 Find a player animation frame's index by its name. More...
 
CAVESTORY_MOD_API BOOL CSM_CustomPlayer_IsPixelSolid (CustomPlayer *pCharacter, int iFrame, int iX, int iY)
 Determine if a pixel on a specific frame of animation is opaque or not. More...
 
CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetNormalSurfaceId (CustomPlayer *pCharacter)
 Get the surface ID for a character's normal plane. More...
 
CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetNormalMaskSurfaceId (CustomPlayer *pCharacter)
 Get the surface ID for a character's normal mask plane. More...
 
CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetFaceSurfaceId (CustomPlayer *pCharacter)
 Get the surface ID for a character's face plane. More...
 
CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetFaceMaskSurfaceId (CustomPlayer *pCharacter)
 Get the surface ID for a character's face mask plane. More...
 
CAVESTORY_MOD_API void ClearValueView ()
 Clear all view values.
 
CAVESTORY_MOD_API void SetValueView (int *pX, int *pY, int iValue)
 Create a new view value. More...
 
CAVESTORY_MOD_API void ActValueView ()
 Process all view values.
 
CAVESTORY_MOD_API void PutValueView (int iFrameX, int iFrameY)
 Draw all view values. More...
 
CAVESTORY_MOD_API BOOL IsNpCharInsideNpChar (NPCHAR *pNpc, NPCHAR *pOther)
 Check to see if an NPC is clipping bounds with another NPC. More...
 
CAVESTORY_MOD_API bool IsSpecificPlayerInsideNpChar (MYCHAR *pMC, NPCHAR *pNpc)
 Check to see if an NPC is clipping bounds with a player. More...
 
CAVESTORY_MOD_API bool IsPlayerInsideNpChar (NPCHAR *pNpc)
 Check to see if an NPC is clipping bounds with the player. More...
 
CAVESTORY_MOD_API bool IsFocusInsideNpChar (NPCHAR *pNpc)
 Check to see if an NPC is clipping bounds with the NPC's focus object. More...
 
CAVESTORY_MOD_API void SetQuake (int iTime)
 Shake the screen for iTime ticks. More...
 
CAVESTORY_MOD_API void SetQuake2 (int iTime)
 Shake the screen for iTime ticks. More...
 
CAVESTORY_MOD_API void ResetQuake ()
 Stop shaking the screen.
 
CAVESTORY_MOD_API bool IsAgilityAllowed ()
 Check whether the current mod allows agility. More...
 
CAVESTORY_MOD_API bool IsFishingAllowed ()
 Check whether the current mod allows fishing. More...
 
CAVESTORY_MOD_API bool IsCarryingAllowed ()
 Check whether the current mod allows carrying other players. More...
 
CAVESTORY_MOD_API void SetBullet (int iBulNo, int iSpawnX, int iSpawnY, int iDirection, int iCodeArms, int iLevel, int iGhostId=0)
 Spawn a bullet at the coordinates. More...
 
CAVESTORY_MOD_API void SetCaret (int iSpawnX, int iSpawnY, int iCaretId, int iDirection, CARET **pOut=NULL)
 Spawn a caret at the coordinates. More...
 
CAVESTORY_MOD_API void SetNpChar (int iNpcId, int iSpawnX, int iSpawnY, int iVelocityX, int iVelocityY, int iDirection, NPCHAR *pNpc, int iStartIndex, NPCHAR **iOutNPC=0, bool bForceSpawn=false)
 Spawn an NPC at the coordinates. More...
 
CAVESTORY_MOD_API void DeleteNpCharEvent (int iEventNo, BOOL bSetFlag=TRUE)
 Delete all NPCs with a specific event number. More...
 
CAVESTORY_MOD_API void DeleteNpCharFlag (int iFlagNo, BOOL bSetFlag=FALSE)
 Delete all NPCs with a specific flag number. More...
 
CAVESTORY_MOD_API void DeleteNpCharCode (int iCharCode, BOOL bSmoke, BOOL bSetFlag=TRUE)
 Delete all NPCs with a specific character code. More...
 
void CAVESTORY_MOD_API SetNpChar_Backwards (int iNpcId, int iSpawnX, int iSpawnY, int iVelocityX, int iVelocityY, int iDirection, NPCHAR *pNpc, int iStartIndex, NPCHAR **iOutNPC=0, bool bForceSpawn=false)
 Spawn an NPC at the coordinates. More...
 
CAVESTORY_MOD_API bool SetAnimNpChar (int iNpcId, int iVelocityX, int iVelocityY, int iDirection, NPCHAR *pNpc, int iStartIndex, MYCHAR *pMC, CustomPlayer *pCustomChar, NPCHAR **iOutNPC=0)
 Spawn an animation NPC at the coordinates. More...
 
CAVESTORY_MOD_API void CSM_SpawnEXP (int iSubPixelX, int iSubPixelY, int iAmount)
 Spawn a certain amount of EXP pellets. More...
 
CAVESTORY_MOD_API void CSM_SpawnHeart (int iSubPixelX, int iSubPixelY, int iAmount)
 Spawn a heart pickup that gives a certain amount of health. More...
 
CAVESTORY_MOD_API void CSM_SpawnAmmo (int iSubPixelX, int iSubPixelY, int iAmount)
 Spawn a missile pickup. More...
 
CAVESTORY_MOD_API int CountArmsBullet (int iArmsCode, int iGhostId=-1)
 Get the number of bullets matching the given description onscreen. More...
 
CAVESTORY_MOD_API int CountBulletNum (int iBulletCode, int iGhostId=-1)
 Get the number of bullets matching the given description onscreen. More...
 
CAVESTORY_MOD_API void DeleteArmBullets (int iArmsCode)
 Delete all bullets matching the arms ID. More...
 
CAVESTORY_MOD_API void ClearBullet ()
 Delete all bullets.
 
CAVESTORY_MOD_API bool IsActiveSomeBullet ()
 Check if some bullet is active.
 
CAVESTORY_MOD_API BOOL HasArmsData (long iCode)
 Check to see if the singleplayer character has a weapon. More...
 
CAVESTORY_MOD_API BOOL AddArmsData2 (long iCode, long iNum, long iMaxNum, long iLevel)
 Add arms data to the singleplayer character. More...
 
CAVESTORY_MOD_API BOOL UseArmsEnergy (long iNum, ARMS *pArmsTable, int iSelectedIdx)
 Use some arms energy from the selected arm. More...
 
CAVESTORY_MOD_API void ChangeToFirstArms ()
 Switch to this client's first weapon.
 
CAVESTORY_MOD_API MYCHARGetLocalPlayerCharacter ()
 Get the local player. More...
 
CAVESTORY_MOD_API BOOL ChargeArmsEnergy (long iChargeAmt, ARMS *pArmsTable, int iSelectedWeapon)
 Charge the selected weapon in pArmsTable. More...
 
CAVESTORY_MOD_API void SetDestroyNpCharUp (int iSpawnX, int iSpawnY, int iMaxRandomXOffset, int iSmokeAmt)
 Spawns smoke at the given coordinates & flashes the screen. More...
 
CAVESTORY_MOD_API BOOL TransferDataStage (int iStageNo, int iEventNo, int iSpawnX, int iSpawnY)
 Transfer over to a vanilla map. More...
 
CAVESTORY_MOD_API BOOL TransferStage (int iStageNo, int iEventNo, int iSpawnX, int iSpawnY)
 Transfer over to a new map. More...
 
CAVESTORY_MOD_API BOOL TransferStage2 (int iStageNo, int iEventNo)
 Transfer over to a new map without moving characters. More...
 
CAVESTORY_MOD_API unsigned int CSM_EntProp_GetFieldNameCRC (const char *pFieldName)
 Get the CRC value of a property field's name. More...
 
CAVESTORY_MOD_API int CSM_EntProp_GetFieldIndexByCrc (NPCHAR *pNpc, unsigned int iFieldCrc)
 Lookup the index of an NPC's property field. More...
 
CAVESTORY_MOD_API int CSM_EntProp_GetFieldIndex (NPCHAR *pNpc, const char *pFieldName)
 Lookup the index of an NPC's property field. More...
 
CAVESTORY_MOD_API int CSM_EntProp_GetFieldValue_ScanString (NPCHAR *pNpc, int iFieldIndex, const char *pFormat,...)
 Fetch the value of a field for a specific NPC. More...
 
CAVESTORY_MOD_API char * CSM_EntProp_GetFieldValue_String (NPCHAR *pNpc, int iFieldIndex, char *pOutBuffer, int iOutBufferSize, const char *pDefaultValue="")
 Fetch the value of a field for a specific NPC. More...
 
CAVESTORY_MOD_API int CSM_EntProp_GetFieldValue_Int (NPCHAR *pNpc, int iFieldIndex, int iDefaultValue=0)
 Fetch the value of a field for a specific NPC. More...
 
CAVESTORY_MOD_API float CSM_EntProp_GetFieldValue_Float (NPCHAR *pNpc, int iFieldIndex, float fDefaultValue=0.0f)
 Fetch the value of a field for a specific NPC. More...
 
CAVESTORY_MOD_API BOOL CSM_EntProp_GetFieldValue_Boolean (NPCHAR *pNpc, int iFieldIndex, BOOL bDefaultValue=FALSE)
 Fetch the value of a field for a specific NPC. More...
 
CAVESTORY_MOD_API GUI_COLORCSM_EntProp_GetFieldValue_Color (NPCHAR *pNpc, int iFieldIndex, GUI_COLOR *pColorPtr, GUI_COLOR pDefaultValue=GUI_COLOR(0, 0, 0, 0))
 Fetch the value of a field for a specific NPC. More...
 
CAVESTORY_MOD_API GUI_POINTCSM_EntProp_GetFieldValue_Point (NPCHAR *pNpc, int iFieldIndex, GUI_POINT *pPointPtr, GUI_POINT pDefaultValue=GUI_POINT(0, 0))
 Fetch the value of a field for a specific NPC. More...
 
CAVESTORY_MOD_API GUI_RECTCSM_EntProp_GetFieldValue_Rect (NPCHAR *pNpc, int iFieldIndex, GUI_RECT *pRectPtr, GUI_RECT pDefaultValue=GUI_RECT(0, 0, 0, 0))
 Fetch the value of a field for a specific NPC. More...
 
CAVESTORY_MOD_API void CSM_Map_DeleteTile (int iX, int iY, bool bRecordChange=true)
 Delete a map tile at the specified coordinates. More...
 
CAVESTORY_MOD_API void CSM_Map_ShiftTileIndex (int iX, int iY, bool bRecordChange=true)
 Shift a map tile to the left one tile index. More...
 
CAVESTORY_MOD_API BOOL CSM_Map_SetTileIndex (int iX, int iY, unsigned short iTileIndex, bool bCreateSmoke=true, bool bRecordChange=true)
 Set the map tile index for a specified tile. More...
 
CAVESTORY_MOD_API void CSM_Map_ActAnimatedTiles ()
 Act animated tiles.
 
CAVESTORY_MOD_API void CSM_Map_ClearAllTileAnimations (bool bForeground)
 Clear a specific map tile's animation. More...
 
CAVESTORY_MOD_API void CSM_Map_ClearTileAnimation (bool bForeground, unsigned int iX, unsigned int iY)
 Clear a specific map tile's animation. More...
 
CAVESTORY_MOD_API void CSM_Map_SetTileAnimation (bool bForeground, unsigned int iX, unsigned int iY, RECT *pRectList, unsigned char iRectCount, unsigned short iWait, Surface_Ids iSurfaceId=SURFACE_ID_LEVEL_TILESET)
 Set a map tile's animation. More...
 
CAVESTORY_MOD_API TEXT_SCRIPT_PTR_DATAGetCurrentTextScriptConfig ()
 Get the current text script context. More...
 
CAVESTORY_MOD_API void GetTextScriptPath (char *pPath)
 Get the text script path. More...
 
CAVESTORY_MOD_API void SetTextScriptContext (TEXT_SCRIPT_PTR_DATA *pData=&default_TextScriptPtrData)
 Set the current text script context. More...
 
CAVESTORY_MOD_API BOOL StartTextScript (int iEventNo, bool bTransmit=true, TEXT_SCRIPT_PTR_DATA *pData=&default_TextScriptPtrData, bool bUseRestrictionLevel=false, TextScriptTarget iTargetType=TextScriptTarget::TS_TARGET_EVERYONE, NPCHAR *pSourceNpc=NULL)
 Start a text script event. More...
 
CAVESTORY_MOD_API void StopTextScript ()
 Stop text script.
 
CAVESTORY_MOD_API int LoadTimeCounter (const char *pFileName="290.rec")
 Load the time counter's total time. More...
 
CAVESTORY_MOD_API unsigned long long int GetHellTimerGlobalTimerOffset ()
 Get the global timer offset at which the hell counter started at. More...
 
CAVESTORY_MOD_API void SetHellTimerGlobalTimerOffset (unsigned long long int iOffset)
 Set the global timer offset at which the hell counter started at. More...
 
CAVESTORY_MOD_API void SetHellTimerFrameCount (int iFrameCount)
 Set the current hell timer frame count. More...
 
CAVESTORY_MOD_API int GetHellTimerFrameCount ()
 Get the current hell timer frame count. More...
 
CAVESTORY_MOD_API void SetHellTimerMS (int iTimeInMS)
 Set the current hell timer time in milliseconds. More...
 
CAVESTORY_MOD_API int GetHellTimerMS ()
 Get the current hell timer time in milliseconds. More...
 
CAVESTORY_MOD_API BOOL IsProfile ()
 Check if there is a profile. More...
 
CAVESTORY_MOD_API BOOL SaveProfile (const char *pFileName, MYCHAR *pMC=NULL)
 Save the current gamestate to a profile. More...
 
CAVESTORY_MOD_API BOOL LoadProfile (const char *pFileName, BOOL bDoGameFuncs=TRUE)
 Load a profile into the current gamestate. More...
 
CAVESTORY_MOD_API BOOL SaveProfileIntoMem (PROFILE *pProfile)
 Save the current gamestate to a PROFILE* struct. More...
 
CAVESTORY_MOD_API BOOL LoadProfileFromMem (PROFILE *pProfile)
 Load the gamestate from a PROFILE* struct. More...
 
CAVESTORY_MOD_API BOOL LoadProfileIntoMem (const char *pName, PROFILE *pProfile, unsigned long long *pModifyTime=NULL)
 Load a profile into a PROFILE* struct. More...
 
CAVESTORY_MOD_API unsigned int CompareTileTypeXY (int iX, int iY, unsigned int iTileTypes)
 Compare tile types for tile at X, Y. More...
 
CAVESTORY_MOD_API unsigned int CompareTileTypeNPC (NPCHAR *pNpc, unsigned int iTileTypes)
 Compare tile types for the map tile that npc is on. More...
 
CAVESTORY_MOD_API unsigned int CompareTileType (unsigned int iTileTypes, unsigned int iOtherTileTypes)
 Compare two tile types against each other. More...
 
CAVESTORY_MOD_API unsigned int GetTileFlagsXY (int iX, int iY)
 Fetch the tile type flags for a map tile. More...
 
CAVESTORY_MOD_API unsigned int GetTileFlagsNPC (NPCHAR *pNpc)
 Fetch the tile type flags for a map tile. More...
 
CAVESTORY_MOD_API void GetFramePosition (int *iX, int *iY)
 Get the current camera position. More...
 
CAVESTORY_MOD_API void SetFramePosition (int iX, int iY)
 Set frame position. More...
 
CAVESTORY_MOD_API void SetFadeMask ()
 Completely fade the screen out.
 
CAVESTORY_MOD_API void ClearFade ()
 Clear the current screen fade.
 
CAVESTORY_MOD_API void StartFadeOut (signed char iDirect)
 Fade the screen out. More...
 
CAVESTORY_MOD_API void StartFadeIn (signed char iDirect)
 Fade the screen in. More...
 
CAVESTORY_MOD_API void ProcFade ()
 Process the fade.
 
CAVESTORY_MOD_API void PutFade ()
 Draw the fade.
 
CAVESTORY_MOD_API BOOL GetFadeActive ()
 Check to see if the screen is being faded. More...
 
CAVESTORY_MOD_API BOOL IsFadedOut ()
 Check to see if the screen is blacked out. More...
 

Detailed Description

A list of game manipulation functions.

Function Documentation

◆ AddArmsData2()

CAVESTORY_MOD_API BOOL AddArmsData2 ( long  iCode,
long  iNum,
long  iMaxNum,
long  iLevel 
)

Add arms data to the singleplayer character.

Parameters
iCodeThe weapon ID.
iNumThe amount of ammo.
iMaxNumMaximum amount of ammo. Pass '0' to have infinite ammo.
iLevelThe level of the weapon. Only pass 1 through 3.

◆ ChargeArmsEnergy()

CAVESTORY_MOD_API BOOL ChargeArmsEnergy ( long  iChargeAmt,
ARMS pArmsTable,
int  iSelectedWeapon 
)

Charge the selected weapon in pArmsTable.

Parameters
iChargeAmtThe amount to charge.
pArmsTableThe arms table.
iSelectedWeaponThe selected weapon
Returns
Returns true on success, false otherwise.

◆ CompareTileType()

CAVESTORY_MOD_API unsigned int CompareTileType ( unsigned int  iTileTypes,
unsigned int  iOtherTileTypes 
)

Compare two tile types against each other.

Parameters
iTileTypesThe tile types we want to test
iOtherTileTypesThe tile types we want to test
Returns
Returns a bit-wise and of tile_type and tile_types

◆ CompareTileTypeNPC()

CAVESTORY_MOD_API unsigned int CompareTileTypeNPC ( NPCHAR pNpc,
unsigned int  iTileTypes 
)

Compare tile types for the map tile that npc is on.

Parameters
pNpcThe NPC to use the position of
iTileTypesThe tile types we want to test
Returns
Returns an & of the map tile's tiletype flags & tile_types

◆ CompareTileTypeXY()

CAVESTORY_MOD_API unsigned int CompareTileTypeXY ( int  iX,
int  iY,
unsigned int  iTileTypes 
)

Compare tile types for tile at X, Y.

Parameters
iXThe map tile's X position that we want to test
iYThe map tile's Y position that we want to test
iTileTypesThe tile types we want to test
Returns
Returns an & of the map tile's tiletype flags & tile_types

◆ CountArmsBullet()

CAVESTORY_MOD_API int CountArmsBullet ( int  iArmsCode,
int  iGhostId = -1 
)

Get the number of bullets matching the given description onscreen.

Parameters
iArmsCodeThe arms the bullets should belong to.
iGhostIdThe ghost ID they should belong to. Can be -1 to count bullets regardless of ghost id.
Returns
Returns the number of bullets matching the description.

◆ CountBulletNum()

CAVESTORY_MOD_API int CountBulletNum ( int  iBulletCode,
int  iGhostId = -1 
)

Get the number of bullets matching the given description onscreen.

Parameters
iArmsCodeThe arms the bullets should belong to.
iGhostIdThe ghost ID they should belong to. Can be -1 to count bullets regardless of ghost id.
Returns
Returns the number of bullets matching the description.

◆ CSM_CustomPlayer_GetFaceMaskSurfaceId()

CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetFaceMaskSurfaceId ( CustomPlayer *  pCharacter)

Get the surface ID for a character's face mask plane.

Parameters
pCharacterThe player character object.
Returns
Returns the surface ID on success, FALSE otherwise.

◆ CSM_CustomPlayer_GetFaceSurfaceId()

CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetFaceSurfaceId ( CustomPlayer *  pCharacter)

Get the surface ID for a character's face plane.

Parameters
pCharacterThe player character object.
Returns
Returns the surface ID on success, FALSE otherwise.

◆ CSM_CustomPlayer_GetNormalMaskSurfaceId()

CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetNormalMaskSurfaceId ( CustomPlayer *  pCharacter)

Get the surface ID for a character's normal mask plane.

Parameters
pCharacterThe player character object.
Returns
Returns the surface ID on success, FALSE otherwise.

◆ CSM_CustomPlayer_GetNormalSurfaceId()

CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetNormalSurfaceId ( CustomPlayer *  pCharacter)

Get the surface ID for a character's normal plane.

Parameters
pCharacterThe player character object.
Returns
Returns the surface ID on success, FALSE otherwise.

◆ CSM_CustomPlayer_IsPixelSolid()

CAVESTORY_MOD_API BOOL CSM_CustomPlayer_IsPixelSolid ( CustomPlayer *  pCharacter,
int  iFrame,
int  iX,
int  iY 
)

Determine if a pixel on a specific frame of animation is opaque or not.

Parameters
pCharacterThe player character to determine the solidity of.
iFrameThe frame to reference.
iXThe X position.
iYThe Y position.
Returns
Returns TRUE if the pixel has an alpha color value of 127 or higher, FALSE otherwise.

◆ CSM_EntProp_GetFieldIndex()

CAVESTORY_MOD_API int CSM_EntProp_GetFieldIndex ( NPCHAR pNpc,
const char *  pFieldName 
)

Lookup the index of an NPC's property field.

Parameters
pNpcThe NPC to get the field of.
pFieldNameThe name of the property field.
Returns
Returns the index of the field on success, otherwise returns -1.

◆ CSM_EntProp_GetFieldIndexByCrc()

CAVESTORY_MOD_API int CSM_EntProp_GetFieldIndexByCrc ( NPCHAR pNpc,
unsigned int  iFieldCrc 
)

Lookup the index of an NPC's property field.

Parameters
pNpcThe NPC to get the field of.
iFieldCrcThe field name's CRC value.
Returns
Returns the index of the field on success, otherwise returns -1.
See also
CSM_EntProp_GetFieldNameCRC

◆ CSM_EntProp_GetFieldNameCRC()

CAVESTORY_MOD_API unsigned int CSM_EntProp_GetFieldNameCRC ( const char *  pFieldName)

Get the CRC value of a property field's name.

Parameters
pFieldNameThe name of the property field.
Returns
Returns the hashed result.

◆ CSM_EntProp_GetFieldValue_Boolean()

CAVESTORY_MOD_API BOOL CSM_EntProp_GetFieldValue_Boolean ( NPCHAR pNpc,
int  iFieldIndex,
BOOL  bDefaultValue = FALSE 
)

Fetch the value of a field for a specific NPC.

Parameters
pNpcThe NPC to get the field of.
iFieldIndexThe index of the field.
bDefaultValueThe default value for this property if it is not defined.
Returns
Returns the boolean value.

◆ CSM_EntProp_GetFieldValue_Color()

CAVESTORY_MOD_API GUI_COLOR* CSM_EntProp_GetFieldValue_Color ( NPCHAR pNpc,
int  iFieldIndex,
GUI_COLOR pColorPtr,
GUI_COLOR  pDefaultValue = GUI_COLOR(0, 0, 0, 0) 
)

Fetch the value of a field for a specific NPC.

Parameters
pNpcThe NPC to get the field of.
iFieldIndexThe index of the field.
pColorPtrA pointer to the GUI_COLOR that will hold the information.
bDefaultValueThe default value for this property if it is not defined.
Returns
Returns pColorPtr.

◆ CSM_EntProp_GetFieldValue_Float()

CAVESTORY_MOD_API float CSM_EntProp_GetFieldValue_Float ( NPCHAR pNpc,
int  iFieldIndex,
float  fDefaultValue = 0.0f 
)

Fetch the value of a field for a specific NPC.

Parameters
pNpcThe NPC to get the field of.
iFieldIndexThe index of the field.
fDefaultValueThe default value for this property if it is not defined.
Returns
Returns the float value.

◆ CSM_EntProp_GetFieldValue_Int()

CAVESTORY_MOD_API int CSM_EntProp_GetFieldValue_Int ( NPCHAR pNpc,
int  iFieldIndex,
int  iDefaultValue = 0 
)

Fetch the value of a field for a specific NPC.

Parameters
pNpcThe NPC to get the field of.
iFieldIndexThe index of the field.
iDefaultValueThe default value for this property if it is not defined.
Returns
Returns the integer value.

◆ CSM_EntProp_GetFieldValue_Point()

CAVESTORY_MOD_API GUI_POINT* CSM_EntProp_GetFieldValue_Point ( NPCHAR pNpc,
int  iFieldIndex,
GUI_POINT pPointPtr,
GUI_POINT  pDefaultValue = GUI_POINT(0, 0) 
)

Fetch the value of a field for a specific NPC.

Parameters
pNpcThe NPC to get the field of.
iFieldIndexThe index of the field.
pPointPtrA pointer to the GUI_POINT that will hold the information.
bDefaultValueThe default value for this property if it is not defined.
Returns
Returns pPointPtr.

◆ CSM_EntProp_GetFieldValue_Rect()

CAVESTORY_MOD_API GUI_RECT* CSM_EntProp_GetFieldValue_Rect ( NPCHAR pNpc,
int  iFieldIndex,
GUI_RECT pRectPtr,
GUI_RECT  pDefaultValue = GUI_RECT(0, 0, 0, 0) 
)

Fetch the value of a field for a specific NPC.

Parameters
pNpcThe NPC to get the field of.
iFieldIndexThe index of the field.
pPointPtrA pointer to the GUI_POINT that will hold the information.
bDefaultValueThe default value for this property if it is not defined.
Returns
Returns pRectPtr.

◆ CSM_EntProp_GetFieldValue_ScanString()

CAVESTORY_MOD_API int CSM_EntProp_GetFieldValue_ScanString ( NPCHAR pNpc,
int  iFieldIndex,
const char *  pFormat,
  ... 
)

Fetch the value of a field for a specific NPC.

Parameters
pNpcThe NPC to get the field of.
iFieldIndexThe index of the field.
pFormatThe expected format of the string.
...Pointers to variables that will be filled when reading the string.
Returns
Returns the number of variables filled.

◆ CSM_EntProp_GetFieldValue_String()

CAVESTORY_MOD_API char* CSM_EntProp_GetFieldValue_String ( NPCHAR pNpc,
int  iFieldIndex,
char *  pOutBuffer,
int  iOutBufferSize,
const char *  pDefaultValue = "" 
)

Fetch the value of a field for a specific NPC.

Parameters
pNpcThe NPC to get the field of.
iFieldIndexThe index of the field.
pOutBufferA pointer to a buffer to hold the value.
iOutBufferSizeThe size of pOutBuffer.
Returns
Returns pOutValue.

◆ CSM_FindPlayerAnimFrameByName()

CAVESTORY_MOD_API int CSM_FindPlayerAnimFrameByName ( const char *  pName)

Find a player animation frame's index by its name.

Parameters
pNameThe name of the player animation (ex: "FRAME_COLLAPSED")
Returns
Returns the index of the player animation on success, otherwise returns -1 if the animation could not be found.

◆ CSM_IsFramerateVisible()

CAVESTORY_MOD_API BOOL CSM_IsFramerateVisible ( )

Set the visibility of the FPS counter.

Returns
Returns TRUE if the FPS counter is visible, FALSE otherwise.

◆ CSM_Map_ClearAllTileAnimations()

CAVESTORY_MOD_API void CSM_Map_ClearAllTileAnimations ( bool  bForeground)

Clear a specific map tile's animation.

Parameters
bForegroundWhether the foreground tiles should be cleared(TRUE), or background tiles should be cleared(FALSE).

◆ CSM_Map_ClearTileAnimation()

CAVESTORY_MOD_API void CSM_Map_ClearTileAnimation ( bool  bForeground,
unsigned int  iX,
unsigned int  iY 
)

Clear a specific map tile's animation.

Parameters
bForegroundWhether the animated tile should be found in the foreground list(TRUE) or background list(FALSE).
iXThe map tile's X position.
iYThe map tile's Y position.

◆ CSM_Map_DeleteTile()

CAVESTORY_MOD_API void CSM_Map_DeleteTile ( int  iX,
int  iY,
bool  bRecordChange = true 
)

Delete a map tile at the specified coordinates.

Parameters
iXThe Y position of the map tile.
iYThe X position of the map tile.
bRecordChangeRecord the change and transmit it to all clients. If this is false, then newly connecting clients will not be sent this change.

◆ CSM_Map_SetTileAnimation()

CAVESTORY_MOD_API void CSM_Map_SetTileAnimation ( bool  bForeground,
unsigned int  iX,
unsigned int  iY,
RECT pRectList,
unsigned char  iRectCount,
unsigned short  iWait,
Surface_Ids  iSurfaceId = SURFACE_ID_LEVEL_TILESET 
)

Set a map tile's animation.

Parameters
bForegroundWhether the animated tile should appear on the foreground(TRUE) or background(FALSE).
iXThe map tile's X position.
iYThe map tile's Y position.
pRectListA list of RECTs defining tile data.
iRectCountThe number of frames pRectList holds.
iWaitThe number of frames that should pass before the frame counter increments.
iSurfaceIdThe surface ID that should be used to draw the tile.

◆ CSM_Map_SetTileIndex()

CAVESTORY_MOD_API BOOL CSM_Map_SetTileIndex ( int  iX,
int  iY,
unsigned short  iTileIndex,
bool  bCreateSmoke = true,
bool  bRecordChange = true 
)

Set the map tile index for a specified tile.

Parameters
iXThe Y position of the map tile.
iYThe X position of the map tile.
iTileIndexThe new tile index for the map tile.
bCreateSmokeCreate smoke.
bRecordChangeRecord the change and transmit it to all clients. If this is false, then newly connecting clients will not be sent this change.

◆ CSM_Map_ShiftTileIndex()

CAVESTORY_MOD_API void CSM_Map_ShiftTileIndex ( int  iX,
int  iY,
bool  bRecordChange = true 
)

Shift a map tile to the left one tile index.

Parameters
iXThe Y position of the map tile.
iYThe X position of the map tile.
bRecordChangeRecord the change and transmit it to all clients. If this is false, then newly connecting clients will not be sent this change.

◆ CSM_PlayerState_DrawCharacter()

CAVESTORY_MOD_API void CSM_PlayerState_DrawCharacter ( int  iFrameX,
int  iFrameY,
SafeClientInterface pInterface,
float  fScale = 1.f 
)

Draw the character.

Parameters
iFrameXCamera X offset
iFrameYCamera Y offset
pInterfaceThe interface to use
fScaleThe scale of the player

◆ CSM_PlayerState_DrawWeapon()

CAVESTORY_MOD_API void CSM_PlayerState_DrawWeapon ( int  iFrameX,
int  iFrameY,
SafeClientInterface pInterface,
float  fScale = 1.f 
)

Draw the weapon.

Parameters
iFrameXCamera X offset
iFrameYCamera Y offset
pInterfaceThe interface to use
fScaleThe scale of the weapon

◆ CSM_SaveScreenshot()

CAVESTORY_MOD_API void CSM_SaveScreenshot ( const char *  pOutputImagePath,
GUI_RECT pSource = NULL 
)

Take an unmagnified screenshot and save it at a path.

Must end with '.png'.

Parameters
pOutputImagePathThe output file path.
pSourceThe source rect to save. Must be magnified to screen coordinates. Can be NULL.

◆ CSM_SetFramerateVisible()

CAVESTORY_MOD_API void CSM_SetFramerateVisible ( BOOL  bValue)

Set the visibility of the FPS counter.

Parameters
bValueWhether it's visible or not.

◆ CSM_SpawnAmmo()

CAVESTORY_MOD_API void CSM_SpawnAmmo ( int  iSubPixelX,
int  iSubPixelY,
int  iAmount 
)

Spawn a missile pickup.

Parameters
iSubPixelXThe X position at which to spawn the missiles at.
iSubPixelYThe Y position at which to spawn the missiles at.
iAmountThe amount of missiles that should be given.

◆ CSM_SpawnEXP()

CAVESTORY_MOD_API void CSM_SpawnEXP ( int  iSubPixelX,
int  iSubPixelY,
int  iAmount 
)

Spawn a certain amount of EXP pellets.

Parameters
iSubPixelXThe X position at which to spawn the pellets at.
iSubPixelYThe Y position at which to spawn the pellets at.
iAmountThe amount of EXP that should be given.

◆ CSM_SpawnHeart()

CAVESTORY_MOD_API void CSM_SpawnHeart ( int  iSubPixelX,
int  iSubPixelY,
int  iAmount 
)

Spawn a heart pickup that gives a certain amount of health.

Parameters
iSubPixelXThe X position at which to spawn the heart at.
iSubPixelYThe Y position at which to spawn the heart at.
iAmountThe amount of life that should be given.

◆ DeleteArmBullets()

CAVESTORY_MOD_API void DeleteArmBullets ( int  iArmsCode)

Delete all bullets matching the arms ID.

Parameters
iArmsCodeThe arms code whose bullets we should be deleting.

◆ DeleteNpCharCode()

CAVESTORY_MOD_API void DeleteNpCharCode ( int  iCharCode,
BOOL  bSmoke,
BOOL  bSetFlag = TRUE 
)

Delete all NPCs with a specific character code.

Parameters
iCharCodeThe character code to search for.
bSmokeWhether to spawn smoke on deletion or not.

◆ DeleteNpCharEvent()

CAVESTORY_MOD_API void DeleteNpCharEvent ( int  iEventNo,
BOOL  bSetFlag = TRUE 
)

Delete all NPCs with a specific event number.

Parameters
iEventNoThe event number to search for.
bSetFlagNormally, when an NPC is deleted, its flag gets set. If this is 'false', the flag will not get set.

◆ DeleteNpCharFlag()

CAVESTORY_MOD_API void DeleteNpCharFlag ( int  iFlagNo,
BOOL  bSetFlag = FALSE 
)

Delete all NPCs with a specific flag number.

Parameters
iFlagNoThe flag number to search for.
bSetFlagNormally, when an NPC is deleted, its flag gets set. If this is 'false', the flag will not get set.

◆ GetCurrentTextScriptConfig()

CAVESTORY_MOD_API TEXT_SCRIPT_PTR_DATA* GetCurrentTextScriptConfig ( )

Get the current text script context.

Returns
Returns the current TS context.

◆ GetFadeActive()

CAVESTORY_MOD_API BOOL GetFadeActive ( )

Check to see if the screen is being faded.

Returns
Returns true if the screen is fading in or out.

◆ GetFramePosition()

CAVESTORY_MOD_API void GetFramePosition ( int *  iX,
int *  iY 
)

Get the current camera position.

Parameters
iXA pointer to an int to hold the camera's X position.
iYA pointer to an int to hold the camera's Y position.

◆ GetHellTimerFrameCount()

CAVESTORY_MOD_API int GetHellTimerFrameCount ( )

Get the current hell timer frame count.

Returns
Returns the timer's time.

◆ GetHellTimerGlobalTimerOffset()

CAVESTORY_MOD_API unsigned long long int GetHellTimerGlobalTimerOffset ( )

Get the global timer offset at which the hell counter started at.

Returns
Returns the timer's time.

◆ GetHellTimerMS()

CAVESTORY_MOD_API int GetHellTimerMS ( )

Get the current hell timer time in milliseconds.

Returns
Returns the timer's time in milliseconds.

◆ GetLocalPlayerCharacter()

CAVESTORY_MOD_API MYCHAR* GetLocalPlayerCharacter ( )

Get the local player.

Returns
Returns gMC.

◆ GetTextScriptPath()

CAVESTORY_MOD_API void GetTextScriptPath ( char *  pPath)

Get the text script path.

Parameters
pPathA buffer to hold the text script path in.

◆ GetTileFlagsNPC()

CAVESTORY_MOD_API unsigned int GetTileFlagsNPC ( NPCHAR pNpc)

Fetch the tile type flags for a map tile.

Parameters
pNpcThe NPC to use the position of
Returns
Returns the tiletype flags for the corresponding map tile
See also
TileType

◆ GetTileFlagsXY()

CAVESTORY_MOD_API unsigned int GetTileFlagsXY ( int  iX,
int  iY 
)

Fetch the tile type flags for a map tile.

Parameters
iXThe map tile's X position
iYThe map tile's Y position
Returns
Returns the tiletype flags for the corresponding map tile

◆ HasArmsData()

CAVESTORY_MOD_API BOOL HasArmsData ( long  iCode)

Check to see if the singleplayer character has a weapon.

Parameters
iCodeThe weapon ID.
Returns
Returns TRUE if the weapon was found, FALSE if not.

◆ IsAgilityAllowed()

CAVESTORY_MOD_API bool IsAgilityAllowed ( )

Check whether the current mod allows agility.

Returns
Returns true if it is, false otherwise.

◆ IsCarryingAllowed()

CAVESTORY_MOD_API bool IsCarryingAllowed ( )

Check whether the current mod allows carrying other players.

Returns
Returns true if it is, false otherwise.

◆ IsFadedOut()

CAVESTORY_MOD_API BOOL IsFadedOut ( )

Check to see if the screen is blacked out.

Returns
Returns true if the screen is faded out completely.

◆ IsFishingAllowed()

CAVESTORY_MOD_API bool IsFishingAllowed ( )

Check whether the current mod allows fishing.

Returns
Returns true if it is, false otherwise.

◆ IsFocusInsideNpChar()

CAVESTORY_MOD_API bool IsFocusInsideNpChar ( NPCHAR pNpc)

Check to see if an NPC is clipping bounds with the NPC's focus object.

Parameters
pNpcThe NPCHAR to test against.
Returns
Returns true if they are overlapping, false otherwise.
Note
This function uses 'pNpc->focus', NOT 'gMC'.

◆ IsNpCharInsideNpChar()

CAVESTORY_MOD_API BOOL IsNpCharInsideNpChar ( NPCHAR pNpc,
NPCHAR pOther 
)

Check to see if an NPC is clipping bounds with another NPC.

Parameters
pNpcThe NPCHAR to test for.
pOtherThe NPCHAR to test against.
Returns
Returns true if they are overlapping, false otherwise.

◆ IsPlayerInsideNpChar()

CAVESTORY_MOD_API bool IsPlayerInsideNpChar ( NPCHAR pNpc)

Check to see if an NPC is clipping bounds with the player.

Parameters
pNpcThe NPCHAR to test against.
Returns
Returns true if they are overlapping, false otherwise.
Note
This function uses 'gMC', NOT pNpc->focus.

◆ IsProfile()

CAVESTORY_MOD_API BOOL IsProfile ( )

Check if there is a profile.

Returns
Returns true if there is a profile.

◆ IsSpecificPlayerInsideNpChar()

CAVESTORY_MOD_API bool IsSpecificPlayerInsideNpChar ( MYCHAR pMC,
NPCHAR pNpc 
)

Check to see if an NPC is clipping bounds with a player.

Parameters
pMCThe player to test for.
pNpcThe NPCHAR to test against.
Returns
Returns true if they are overlapping, false otherwise.

◆ LoadProfile()

CAVESTORY_MOD_API BOOL LoadProfile ( const char *  pFileName,
BOOL  bDoGameFuncs = TRUE 
)

Load a profile into the current gamestate.

Parameters
pFileNameThe name of the savefile.
bDoGameFuncsWhether to call essential game funcs or not.
Returns
Returns true on success.

◆ LoadProfileFromMem()

CAVESTORY_MOD_API BOOL LoadProfileFromMem ( PROFILE pProfile)

Load the gamestate from a PROFILE* struct.

Parameters
pProfileA pointer to a PROFILE to hold the information.
Returns
Returns true on success.

◆ LoadProfileIntoMem()

CAVESTORY_MOD_API BOOL LoadProfileIntoMem ( const char *  pName,
PROFILE pProfile,
unsigned long long *  pModifyTime = NULL 
)

Load a profile into a PROFILE* struct.

Parameters
pNameThe name of the savefile.
pProfileA pointer to a PROFILE to hold the information.
pModifyTimeA pointer to an INT which will hold the last modified time for this save file. Can be NULL.
pProfileNameA pointer to a CHAR array which will hold the profile name for this save file. Can be NULL.
Returns
Returns true on success.

◆ LoadTimeCounter()

CAVESTORY_MOD_API int LoadTimeCounter ( const char *  pFileName = "290.rec")

Load the time counter's total time.

Parameters
pFileNameThe file name of the record to load.
Returns
Returns the timer's time.

◆ PutValueView()

CAVESTORY_MOD_API void PutValueView ( int  iFrameX,
int  iFrameY 
)

Draw all view values.

Parameters
iFrameXThe camera's X position.
iFrameYThe camera's Y position.

◆ SaveProfile()

CAVESTORY_MOD_API BOOL SaveProfile ( const char *  pFileName,
MYCHAR pMC = NULL 
)

Save the current gamestate to a profile.

Parameters
pFileNameThe name of the savefile.
pMCThe player object to use. Set to NULL to use gMC.
pProfileNameThe name of the savegame.
Returns
Returns true on success.

◆ SaveProfileIntoMem()

CAVESTORY_MOD_API BOOL SaveProfileIntoMem ( PROFILE pProfile)

Save the current gamestate to a PROFILE* struct.

Parameters
pProfileThe profile to copy the gamestate into.
Returns
Returns true on success.

◆ SetAnimNpChar()

CAVESTORY_MOD_API bool SetAnimNpChar ( int  iNpcId,
int  iVelocityX,
int  iVelocityY,
int  iDirection,
NPCHAR pNpc,
int  iStartIndex,
MYCHAR pMC,
CustomPlayer *  pCustomChar,
NPCHAR **  iOutNPC = 0 
)

Spawn an animation NPC at the coordinates.

Parameters
iNpcIdThe ID of the NPC to spawn.
iVelocityXThe initial X velocity.
iVelocityYThe initial Y velocity.
iDirectionThe initial direction.
pNpcThe NPC this should be pointing to.
iStartIndexWhich NPC slot the spawner should start from when looking for an available slot.
pMCThe player character this anim npc should be tied to.
pCharThe custom player character for this player.
iOutNPCA pointer to the spawned NPC (NULL if the NPC couldn't be spawned!)
Deprecated:
Animation NPCs have been replaced by the PlayerState system.

◆ SetBullet()

CAVESTORY_MOD_API void SetBullet ( int  iBulNo,
int  iSpawnX,
int  iSpawnY,
int  iDirection,
int  iCodeArms,
int  iLevel,
int  iGhostId = 0 
)

Spawn a bullet at the coordinates.

Parameters
iBulNoThe ID of the bullet to spawn.
iSpawnXThe X position to spawn the bullet at.
iSpawnYThe Y position to spawn the bullet at.
iDirectionThe direction the bullet should be facing.
iCodeArmsShould be set to the weapon number that spawned this bullet (-1 if no weapon spawned it)
iLevelThe level of the bullet
iGhostIdShould be set to the client ghost ID that spawned this bullet (-1 if no client spawned it)

◆ SetCaret()

CAVESTORY_MOD_API void SetCaret ( int  iSpawnX,
int  iSpawnY,
int  iCaretId,
int  iDirection,
CARET **  pOut = NULL 
)

Spawn a caret at the coordinates.

Parameters
iSpawnXThe subpixel X position to spawn the caret at.
iSpawnYThe subpixel Y position to spawn the caret at.
iCaretIdThe ID of the caret to spawn.
iDirectionThe direction to spawn the caret at.
pOutPointer to a variable that will hold the created caret.
Examples
BulletAct.cpp.

◆ SetDestroyNpCharUp()

CAVESTORY_MOD_API void SetDestroyNpCharUp ( int  iSpawnX,
int  iSpawnY,
int  iMaxRandomXOffset,
int  iSmokeAmt 
)

Spawns smoke at the given coordinates & flashes the screen.

Parameters
iSpawnXThe smoke's X spawn coordniate
iSpawnYThe smoke's Y spawn coordniate
iMaxRandomXOffsetThe maximum random X value offset.
iSmokeAmtHow many smoke particles to spawn.

◆ SetFramePosition()

CAVESTORY_MOD_API void SetFramePosition ( int  iX,
int  iY 
)

Set frame position.

Parameters
iXThe new X position.
iYThe new Y position.

◆ SetHellTimerFrameCount()

CAVESTORY_MOD_API void SetHellTimerFrameCount ( int  iFrameCount)

Set the current hell timer frame count.

Parameters
iFrameCountThe amount of frames to set the timer at.

◆ SetHellTimerGlobalTimerOffset()

CAVESTORY_MOD_API void SetHellTimerGlobalTimerOffset ( unsigned long long int  iOffset)

Set the global timer offset at which the hell counter started at.

Parameters
iOffsetThe time offset.

◆ SetHellTimerMS()

CAVESTORY_MOD_API void SetHellTimerMS ( int  iTimeInMS)

Set the current hell timer time in milliseconds.

Parameters
iTimeInMSThe amount of time, in milliseconds, to set the timer to.

◆ SetNpChar()

CAVESTORY_MOD_API void SetNpChar ( int  iNpcId,
int  iSpawnX,
int  iSpawnY,
int  iVelocityX,
int  iVelocityY,
int  iDirection,
NPCHAR pNpc,
int  iStartIndex,
NPCHAR **  iOutNPC = 0,
bool  bForceSpawn = false 
)

Spawn an NPC at the coordinates.

Parameters
iNpcIdThe ID of the NPC to spawn.
iSpawnXThe initial X position.
iSpawnYThe initial Y position.
iVelocityXThe initial X velocity.
iVelocityYThe initial Y velocity.
iDirectionThe initial direction.
pNpcThe NPC this should be pointing to.
iStartIndexWhich NPC slot the spawner should start from when looking for an available slot.
iOutNPCA pointer to the spawned NPC (NULL if the NPC couldn't be spawned!)
bForceSpawnForce this NPC to spawn regardless

◆ SetNpChar_Backwards()

void CAVESTORY_MOD_API SetNpChar_Backwards ( int  iNpcId,
int  iSpawnX,
int  iSpawnY,
int  iVelocityX,
int  iVelocityY,
int  iDirection,
NPCHAR pNpc,
int  iStartIndex,
NPCHAR **  iOutNPC = 0,
bool  bForceSpawn = false 
)

Spawn an NPC at the coordinates.

Parameters
iNpcIdThe ID of the NPC to spawn.
iSpawnXThe initial X position.
iSpawnYThe initial Y position.
iVelocityXThe initial X velocity.
iVelocityYThe initial Y velocity.
iDirectionThe initial direction.
pNpcThe NPC this should be pointing to.
iStartIndexWhich NPC slot the spawner should start from when looking for an available slot.
iOutNPCA pointer to the spawned NPC (NULL if the NPC couldn't be spawned!)
bForceSpawnForce this NPC to spawn regardless

◆ SetQuake()

CAVESTORY_MOD_API void SetQuake ( int  iTime)

Shake the screen for iTime ticks.

Parameters
iTimeThe ticks to shake the screen for.

◆ SetQuake2()

CAVESTORY_MOD_API void SetQuake2 ( int  iTime)

Shake the screen for iTime ticks.

Parameters
iTimeThe ticks to shake the screen for.

◆ SetTextScriptContext()

CAVESTORY_MOD_API void SetTextScriptContext ( TEXT_SCRIPT_PTR_DATA pData = &default_TextScriptPtrData)

Set the current text script context.

Parameters
pDataA pointer to the new context.

◆ SetValueView()

CAVESTORY_MOD_API void SetValueView ( int *  pX,
int *  pY,
int  iValue 
)

Create a new view value.

Parameters
pXA pointer to the damaged entity's X variable.
pYA pointer to the damaged entity's Y variable.
iValueThe value to show.

◆ StartFadeIn()

CAVESTORY_MOD_API void StartFadeIn ( signed char  iDirect)

Fade the screen in.

Parameters
iDirectThe direction to fade in from.
See also
Directions

◆ StartFadeOut()

CAVESTORY_MOD_API void StartFadeOut ( signed char  iDirect)

Fade the screen out.

Parameters
iDirectThe direction to fade out to.
See also
Directions

◆ StartTextScript()

CAVESTORY_MOD_API BOOL StartTextScript ( int  iEventNo,
bool  bTransmit = true,
TEXT_SCRIPT_PTR_DATA pData = &default_TextScriptPtrData,
bool  bUseRestrictionLevel = false,
TextScriptTarget  iTargetType = TextScriptTarget::TS_TARGET_EVERYONE,
NPCHAR pSourceNpc = NULL 
)

Start a text script event.

Parameters
iEventNoThe event number.
bTransmitTransmit to everyone on the server.
pDataThe context to start the text script event with.
bUseRestrictionLevelUse the restriction level option.
pSourceNpcThe NPC that was used to start this event.
Returns
Returns true on success.

◆ TransferDataStage()

CAVESTORY_MOD_API BOOL TransferDataStage ( int  iStageNo,
int  iEventNo,
int  iSpawnX,
int  iSpawnY 
)

Transfer over to a vanilla map.

Parameters
iStageNoThe stage index.
iEventNoThe script event to call.
iSpawnXMap tile's X position to spawn on.
iSpawnYMap tile's Y position to spawn on.
Returns
Returns 1 on success.

◆ TransferStage()

CAVESTORY_MOD_API BOOL TransferStage ( int  iStageNo,
int  iEventNo,
int  iSpawnX,
int  iSpawnY 
)

Transfer over to a new map.

Parameters
iStageNoThe stage index.
iEventNoThe script event to call.
iSpawnXMap tile's X position to spawn on.
iSpawnYMap tile's Y position to spawn on.
Returns
Returns 1 on success.

◆ TransferStage2()

CAVESTORY_MOD_API BOOL TransferStage2 ( int  iStageNo,
int  iEventNo 
)

Transfer over to a new map without moving characters.

Parameters
iStageNoThe stage index.
iEventNoThe script event to call.
Returns
Returns 1 on success.

◆ UseArmsEnergy()

CAVESTORY_MOD_API BOOL UseArmsEnergy ( long  iNum,
ARMS pArmsTable,
int  iSelectedIdx 
)

Use some arms energy from the selected arm.

Parameters
iNumThe amount of energy to use.
pArmsTableA pointer to the arms table.
iSelectedIdxThe currently selected weapon index.