Common Data Functions

From Danmakufu Wiki
Jump to: navigation, search

SetCommonData

Parameters:
 1) key (char)
 2) value (free)

Maps the given key to the given value in common data. Uses the default common data area. The value can be returned by using GetCommonData with the corresponding key.

GetCommonData

Parameters:
 1) key (char)
 2) default value (free)

Returns the value associated with the given key in common data. Returns the default value if no value had been stored to it previously.

ClearCommonData

Removes all of the common data in the default common data area.

DeleteCommonData

Parameters:
 1) key (char)

Removes the common data mapping with the specified key.

SetAreaCommonData

Parameters:
 1) common data area (char)
 2) key (char)
 3) value (free)

Maps the given key to the given value in the specified area in common data. The value can be returned by using GetAreaCommonData with the corresponding area and key.

GetAreaCommonData

Parameters:
 1) common data area (char)
 2) key (char)
 3) default value (free)

Returns the value associated with the given key in the specified area in common data. Returns the default value if no value had been stored to it previously.

ClearAreaCommonData

Parameters:
 1) common data area (char)

Removes all of the common data in the specified area.

DeleteAreaCommonData

Parameters:
 1) common data area (char)
 2) key (char)

Removes the common data mapping with the specified key in the specified area.

CreateCommonDataArea

Parameters:
 1) common data area name (char)

Creates a common data area to organize common data together. A common data area "" (empty string) has been created by default, which is also used by the SetCommonData series.

IsCommonDataAreaExists

Parameters:
 1) common data area (char)

Returns whether the specified common data area exists.

CopyCommonDataArea

Parameters:
 1) destination common data area
 2) source common data area

Copies the common data in the source area to the destination area. If the source common data area is invalid, nothing will happen.

GetCommonDataAreaKeyList

Returns an array of all common data area names.

GetCommonDataValueKeyList

Parameters:
 1) common data area

Returns an array of the keys in the specified area.

SaveCommonDataAreaA1

Parameters:
 1) common data area (char)

Saves everything in the specified common data area to a data file. Returns true if successful and false if the operation failed.

LoadCommonDataAreaA1

Parameters:
 1) common data area (char)

Loads everything in the specified common data area from the saved data file. Returns true if successful and false if the operation failed.

SaveCommonDataAreaA2

Parameters:
1) common data area (char)
2) file path (char)

Saves everything in the specified common data area to a data file at the specified path. Returns true if successful and false if the operation failed.

LoadCommonDataAreaA2

Parameters:
1) common data area (char)
2) file path (char)

Loads everything in the specified common data area from the saved data file at the specified path. Returns true if successful and false if the operation failed.

SaveCommonDataAreaToReplayFile

Parameters:
 1) common data area (char)

Saves the specified common data area to the replay file. Returns true if successful and false if the operation failed. If this function is called during a replay, Danmakufu will present an error.

LoadCommonDataAreaFromReplayFile

Parameters:
 1) common data area (char)

Loads the specified common data area from the replay file. Returns true if successful and false if the operation failed. If this function is called during gameplay, Danmakufu will present an error.