<aside> 📦 DTADD.acs
</aside>
<aside> âš¡ int CreatePlayerTranslation(int id, int cyan, int blue)
</aside>
This function acts as a shorthand, wrapper for the Zandronum function CreateTranslation
. However, it also logs the ID being used into a table for the debug functions, [core_checktranslation](<https://mm8bdm.notion.site/core_checktranslation-b2f12d896d2245c1953d85748824935a>)
and [core_logtranslations](<https://mm8bdm.notion.site/core_logtranslations-848d101d944b4b719bf3d029bdf244e2>)
.
id
: Int - The translation ID to reference the created translation by.cyan
: Int - The palette color or RGB triplet to change palette color 192 (cyan) to.blue
: Int - The palette color or RGB triplet to change palette color 198 (blue) to.<aside> 💡 Note: The RGB triplet being referred to here is an integer that has been packed with bytes such that the first byte is a 0-255 red value, the second byte is a 0-255 green value, and the third byte is a 0-255 blue value.
An integer such as this can be made using the rgbTriplet
function from COLOFUNC.acs
or it can be done using the functions and scripts noted in the [Pack Bytes and Shorts](<https://mm8bdm.notion.site/Pack-Bytes-and-Shorts-16ba96bd2e1e45d2ba5534fb8bc34e32>)
page.
</aside>
id
value handed to the function. A very niche return value, but it has its uses.This example highlights 2 translations made in base MM8BDM, one that only uses palette colors and another that uses an RGB triplet to show how it is done using the rgbTriplet
function from COLOFUNC.acs
.
#include "COLOFUNC.acs"
script "core_shortenedcolors" OPEN CLIENTSIDE {
CreatePlayerTranslation (CLR_JEWELMAN, 4, 36);
CreatePlayerTranslation (CLR_MAGMAMAN, 216, rgbTriplet(208, 32, 32));
}