Text color for DM/emotes? Chat bubbles?

Hi. I’ve been looking for an answer everywhere and still can’t find anything. I’ve actually seen colored emotes (written in * *) and DM texts (it was orange so it didn’t blend with what players where writing) on a few servers, but I don’t know HOW to make it happen. I’ve searched every single 2da and I can’t find anything… could someone please help me? I’m playing LAN game with my friends and white text everywhere is painful to the eyes.

And the second thing, is there any mod here that works as a typing indicator? I mean, I’ve seen chat bubbles on a few servers, but I still can’t find anything here on vault.

I would be grateful for any help, thanks a lot.

Hi Janti,

Colours are defined in code and you can set them as a custom token. I used orange journal entry titles in my own module, The Scroll, which you can download and check the full workings in you want to.

Check out this page from my website: https://theworldofalthea.wixsite.com/home/nwn2colours (Updated website.) This page has some example code too.

In my OnModuleLoad hook, I have defined Custom Token 1014 as the colour orange:

SetCustomToken(1014, “<color=Orange>”); // Orange

And then added it before the journal entry I wanted coloured: INFO: Rule Updates

I hope that gives you the flow of things, but check my module for more info and examples. Basically, you use a custom token prior to the text you need to colour change.

Cheers, Lance.

here’s a console-script that shows what the standard colors look like in the chatbox

// 'printcolors'
//
// Prints examples of colors contained in NWN2_Colors.2da to the chat window.
// kevL 2011 aug 18


void main()
{
    object oPC = OBJECT_SELF;

    SendMessageToPC(oPC, "<c=AliceBlue>This is 0                AliceBlue               F0F8FF</c>");
    SendMessageToPC(oPC, "<c=AntiqueWhite>This is 1             AntiqueWhite            FAEBD7</c>");
    SendMessageToPC(oPC, "<c=Aqua>This is 2                     Aqua                    00FFFF</c>");
    SendMessageToPC(oPC, "<c=Aquamarine>This is 3               Aquamarine              7FFFD4</c>");
    SendMessageToPC(oPC, "<c=Azure>This is 4                    Azure                   F0FFFF</c>");
    SendMessageToPC(oPC, "<c=Beige>This is 5                    Beige                   F5F5DC</c>");
    SendMessageToPC(oPC, "<c=Bisque>This is 6                   Bisque                  FFE4C4</c>");
    SendMessageToPC(oPC, "<c=Black>This is 7                    Black                   000000</c>");
    SendMessageToPC(oPC, "<c=BlanchedAlmond>This is 8           BlanchedAlmond          FFEBCD</c>");
    SendMessageToPC(oPC, "<c=Blue>This is 9                     Blue                    0000FF</c>");
    SendMessageToPC(oPC, "<c=BlueViolet>This is 10              BlueViolet              8A2BE2</c>");
    SendMessageToPC(oPC, "<c=Brown>This is 11                   Brown                   A52A2A</c>");
    SendMessageToPC(oPC, "<c=BurlyWood>This is 12               BurlyWood               DEB887</c>");
    SendMessageToPC(oPC, "<c=CadetBlue>This is 13               CadetBlue               5F9EA0</c>");
    SendMessageToPC(oPC, "<c=Chartreuse>This is 14              Chartreuse              7FFF00</c>");
    SendMessageToPC(oPC, "<c=Chocolate>This is 15               Chocolate               D2691E</c>");
    SendMessageToPC(oPC, "<c=Coral>This is 16                   Coral                   FF7F50</c>");
    SendMessageToPC(oPC, "<c=CornflowerBlue>This is 17          CornflowerBlue          6495ED</c>");
    SendMessageToPC(oPC, "<c=Cornsilk>This is 18                Cornsilk                FFF8DC</c>");
    SendMessageToPC(oPC, "<c=Crimson>This is 19                 Crimson                 DC143C</c>");
    SendMessageToPC(oPC, "<c=Cyan>This is 20                    Cyan                    00FFFF</c>");
    SendMessageToPC(oPC, "<c=DarkBlue>This is 21                DarkBlue                00008B</c>");
    SendMessageToPC(oPC, "<c=DarkCyan>This is 22                DarkCyan                008B8B</c>");
    SendMessageToPC(oPC, "<c=DarkGoldenRod>This is 23           DarkGoldenRod           B8860B</c>");
    SendMessageToPC(oPC, "<c=DarkGray>This is 24                DarkGray                A9A9A9</c>");
    SendMessageToPC(oPC, "<c=DarkGreen>This is 25               DarkGreen               006400</c>");
    SendMessageToPC(oPC, "<c=DarkKhaki>This is 26               DarkKhaki               BDB76B</c>");
    SendMessageToPC(oPC, "<c=DarkMagenta>This is 27             DarkMagenta             8B008B</c>");
    SendMessageToPC(oPC, "<c=DarkOliveGreen>This is 28          DarkOliveGreen          556B2F</c>");
    SendMessageToPC(oPC, "<c=DarkOrange>This is 29              DarkOrange              FF8C00</c>");
    SendMessageToPC(oPC, "<c=DarkOrchid>This is 30              DarkOrchid              9932CC</c>");
    SendMessageToPC(oPC, "<c=DarkRed>This is 31                 DarkRed                 8B0000</c>");
    SendMessageToPC(oPC, "<c=DarkSalmon>This is 32              DarkSalmon              E9967A</c>");
    SendMessageToPC(oPC, "<c=DarkSeaGreen>This is 33            DarkSeaGreen            8FBC8F</c>");
    SendMessageToPC(oPC, "<c=DarkSlateBlue>This is 34           DarkSlateBlue           483D8B</c>");
    SendMessageToPC(oPC, "<c=DarkSlateGray>This is 35           DarkSlateGray           2F4F4F</c>");
    SendMessageToPC(oPC, "<c=DarkTurquoise>This is 36           DarkTurquoise           00CED1</c>");
    SendMessageToPC(oPC, "<c=DarkViolet>This is 37              DarkViolet              9400D3</c>");
    SendMessageToPC(oPC, "<c=DeepPink>This is 38                DeepPink                FF1493</c>");
    SendMessageToPC(oPC, "<c=DeepSkyBlue>This is 39             DeepSkyBlue             00BFFF</c>");
    SendMessageToPC(oPC, "<c=DimGray>This is 40                 DimGray                 696969</c>");
    SendMessageToPC(oPC, "<c=DodgerBlue>This is 41              DodgerBlue              1E90FF</c>");
    SendMessageToPC(oPC, "<c=Feldspar>This is 42                Feldspar                D19275</c>");
    SendMessageToPC(oPC, "<c=FireBrick>This is 43               FireBrick               B22222</c>");
    SendMessageToPC(oPC, "<c=FloralWhite>This is 44             FloralWhite             FFFAF0</c>");
    SendMessageToPC(oPC, "<c=ForestGreen>This is 45             ForestGreen             228B22</c>");
    SendMessageToPC(oPC, "<c=Fuchsia>This is 46                 Fuchsia                 FF00FF</c>");
    SendMessageToPC(oPC, "<c=Gainsboro>This is 47               Gainsboro               DCDCDC</c>");
    SendMessageToPC(oPC, "<c=GhostWhite>This is 48              GhostWhite              F8F8FF</c>");
    SendMessageToPC(oPC, "<c=Gold>This is 49                    Gold                    FFD700</c>");
    SendMessageToPC(oPC, "<c=GoldenRod>This is 50               GoldenRod               DAA520</c>");
    SendMessageToPC(oPC, "<c=Gray>This is 51                    Gray                    808080</c>");
    SendMessageToPC(oPC, "<c=Green>This is 52                   Green                   008000</c>");
    SendMessageToPC(oPC, "<c=GreenYellow>This is 53             GreenYellow             ADFF2F</c>");
    SendMessageToPC(oPC, "<c=HoneyDew>This is 54                HoneyDew                F0FFF0</c>");
    SendMessageToPC(oPC, "<c=HotPink>This is 55                 HotPink                 FF69B4</c>");
    SendMessageToPC(oPC, "<c=IndianRed>This is 56               IndianRed               CD5C5C</c>");
    SendMessageToPC(oPC, "<c=Indigo>This is 57                  Indigo                  4B0082</c>");
    SendMessageToPC(oPC, "<c=Ivory>This is 58                   Ivory                   FFFFF0</c>");
    SendMessageToPC(oPC, "<c=Khaki>This is 59                   Khaki                   F0E68C</c>");
    SendMessageToPC(oPC, "<c=Lavender>This is 60                Lavender                E6E6FA</c>");
    SendMessageToPC(oPC, "<c=LavenderBlush>This is 61           LavenderBlush           FFF0F5</c>");
    SendMessageToPC(oPC, "<c=LawnGreen>This is 62               LawnGreen               7CFC00</c>");
    SendMessageToPC(oPC, "<c=LemonChiffon>This is 63            LemonChiffon            FFFACD</c>");
    SendMessageToPC(oPC, "<c=LightBlue>This is 64               LightBlue               ADD8E6</c>");
    SendMessageToPC(oPC, "<c=LightCoral>This is 65              LightCoral              F08080</c>");
    SendMessageToPC(oPC, "<c=LightCyan>This is 66               LightCyan               E0FFFF</c>");
    SendMessageToPC(oPC, "<c=LightGoldenRodYellow>This is 67    LightGoldenRodYellow    FAFAD2</c>");
    SendMessageToPC(oPC, "<c=LightGrey>This is 68               LightGrey               D3D3D3</c>");
    SendMessageToPC(oPC, "<c=LightGreen>This is 69              LightGreen              90EE90</c>");
    SendMessageToPC(oPC, "<c=LightPink>This is 70               LightPink               FFB6C1</c>");
    SendMessageToPC(oPC, "<c=LightSalmon>This is 71             LightSalmon             FFA07A</c>");
    SendMessageToPC(oPC, "<c=LightSeaGreen>This is 72           LightSeaGreen           20B2AA</c>");
    SendMessageToPC(oPC, "<c=LightSkyBlue>This is 73            LightSkyBlue            87CEFA</c>");
    SendMessageToPC(oPC, "<c=LightSlateBlue>This is 74          LightSlateBlue          8470FF</c>");
    SendMessageToPC(oPC, "<c=LightSlateGray>This is 75          LightSlateGray          778899</c>");
    SendMessageToPC(oPC, "<c=LightSteelBlue>This is 76          LightSteelBlue          B0C4DE</c>");
    SendMessageToPC(oPC, "<c=LightYellow>This is 77             LightYellow             FFFFE0</c>");
    SendMessageToPC(oPC, "<c=Lime>This is 78                    Lime                    00FF00</c>");
    SendMessageToPC(oPC, "<c=LimeGreen>This is 79               LimeGreen               32CD32</c>");
    SendMessageToPC(oPC, "<c=Linen>This is 80                   Linen                   FAF0E6</c>");
    SendMessageToPC(oPC, "<c=Magenta>This is 81                 Magenta                 FF00FF</c>");
    SendMessageToPC(oPC, "<c=Maroon>This is 82                  Maroon                  800000</c>");
    SendMessageToPC(oPC, "<c=MediumAquaMarine>This is 83        MediumAquaMarine        66CDAA</c>");
    SendMessageToPC(oPC, "<c=MediumBlue>This is 84              MediumBlue              0000CD</c>");
    SendMessageToPC(oPC, "<c=MediumOrchid>This is 85            MediumOrchid            BA55D3</c>");
    SendMessageToPC(oPC, "<c=MediumPurple>This is 86            MediumPurple            9370D8</c>");
    SendMessageToPC(oPC, "<c=MediumSeaGreen>This is 87          MediumSeaGreen          3CB371</c>");
    SendMessageToPC(oPC, "<c=MediumSlateBlue>This is 88         MediumSlateBlue         7B68EE</c>");
    SendMessageToPC(oPC, "<c=MediumSpringGreen>This is 89       MediumSpringGreen       00FA9A</c>");
    SendMessageToPC(oPC, "<c=MediumTurquoise>This is 90         MediumTurquoise         48D1CC</c>");
    SendMessageToPC(oPC, "<c=MediumVioletRed>This is 91         MediumVioletRed         C71585</c>");
    SendMessageToPC(oPC, "<c=MidnightBlue>This is 92            MidnightBlue            191970</c>");
    SendMessageToPC(oPC, "<c=MintCream>This is 93               MintCream               F5FFFA</c>");
    SendMessageToPC(oPC, "<c=MistyRose>This is 94               MistyRose               FFE4E1</c>");
    SendMessageToPC(oPC, "<c=Moccasin>This is 95                Moccasin                FFE4B5</c>");
    SendMessageToPC(oPC, "<c=NavajoWhite>This is 96             NavajoWhite             FFDEAD</c>");
    SendMessageToPC(oPC, "<c=Navy>This is 97                    Navy                    000080</c>");
    SendMessageToPC(oPC, "<c=OldLace>This is 98                 OldLace                 FDF5E6</c>");
    SendMessageToPC(oPC, "<c=Olive>This is 99                   Olive                   808000</c>");
    SendMessageToPC(oPC, "<c=OliveDrab>This is 100              OliveDrab               6B8E23</c>");
    SendMessageToPC(oPC, "<c=Orange>This is 101                 Orange                  FFA500</c>");
    SendMessageToPC(oPC, "<c=OrangeRed>This is 102              OrangeRed               FF4500</c>");
    SendMessageToPC(oPC, "<c=Orchid>This is 103                 Orchid                  DA70D6</c>");
    SendMessageToPC(oPC, "<c=PaleGoldenRod>This is 104          PaleGoldenRod           EEE8AA</c>");
    SendMessageToPC(oPC, "<c=PaleGreen>This is 105              PaleGreen               98FB98</c>");
    SendMessageToPC(oPC, "<c=PaleTurquoise>This is 106          PaleTurquoise           AFEEEE</c>");
    SendMessageToPC(oPC, "<c=PaleVioletRed>This is 107          PaleVioletRed           D87093</c>");
    SendMessageToPC(oPC, "<c=PapayaWhip>This is 108             PapayaWhip              FFEFD5</c>");
    SendMessageToPC(oPC, "<c=PeachPuff>This is 109              PeachPuff               FFDAB9</c>");
    SendMessageToPC(oPC, "<c=Peru>This is 110                   Peru                    CD853F</c>");
    SendMessageToPC(oPC, "<c=Pink>This is 111                   Pink                    FFC0CB</c>");
    SendMessageToPC(oPC, "<c=Plum>This is 112                   Plum                    DDA0DD</c>");
    SendMessageToPC(oPC, "<c=PowderBlue>This is 113             PowderBlue              B0E0E6</c>");
    SendMessageToPC(oPC, "<c=Purple>This is 114                 Purple                  800080</c>");
    SendMessageToPC(oPC, "<c=Red>This is 115                    Red                     FF0000</c>");
    SendMessageToPC(oPC, "<c=RosyBrown>This is 116              RosyBrown               BC8F8F</c>");
    SendMessageToPC(oPC, "<c=RoyalBlue>This is 117              RoyalBlue               0000B8</c>");
    SendMessageToPC(oPC, "<c=SaddleBrown>This is 118            SaddleBrown             8B4513</c>");
    SendMessageToPC(oPC, "<c=Salmon>This is 119                 Salmon                  FA8072</c>");
    SendMessageToPC(oPC, "<c=SandyBrown>This is 120             SandyBrown              F4A460</c>");
    SendMessageToPC(oPC, "<c=SeaGreen>This is 121               SeaGreen                2E8B57</c>");
    SendMessageToPC(oPC, "<c=SeaShell>This is 122               SeaShell                FFF5EE</c>");
    SendMessageToPC(oPC, "<c=Sienna>This is 123                 Sienna                  A0522D</c>");
    SendMessageToPC(oPC, "<c=Silver>This is 124                 Silver                  C0C0C0</c>");
    SendMessageToPC(oPC, "<c=SkyBlue>This is 125                SkyBlue                 87CEEB</c>");
    SendMessageToPC(oPC, "<c=SlateBlue>This is 126              SlateBlue               6A5ACD</c>");
    SendMessageToPC(oPC, "<c=SlateGray>This is 127              SlateGray               708090</c>");
    SendMessageToPC(oPC, "<c=Snow>This is 128                   Snow                    FFFAFA</c>");
    SendMessageToPC(oPC, "<c=SpringGreen>This is 129            SpringGreen             00FF7F</c>");
    SendMessageToPC(oPC, "<c=SteelBlue>This is 130              SteelBlue               4682B4</c>");
    SendMessageToPC(oPC, "<c=Tan>This is 131                    Tan                     D2B48C</c>");
    SendMessageToPC(oPC, "<c=Teal>This is 132                   Teal                    808000</c>");
    SendMessageToPC(oPC, "<c=Thistle>This is 133                Thistle                 D8BFD8</c>");
    SendMessageToPC(oPC, "<c=Tomato>This is 134                 Tomato                  FF6347</c>");
    SendMessageToPC(oPC, "<c=Turquoise>This is 135              Turquoise               40E0D0</c>");
    SendMessageToPC(oPC, "<c=Violet>This is 136                 Violet                  EE82EE</c>");
    SendMessageToPC(oPC, "<c=VioletRed>This is 137              VioletRed               D02090</c>");
    SendMessageToPC(oPC, "<c=Wheat>This is 138                  Wheat                   F5DEB3</c>");
    SendMessageToPC(oPC, "<c=White>This is 139                  White                   FFFFFF</c>");
    SendMessageToPC(oPC, "<c=WhiteSmoke>This is 140             WhiteSmoke              F5F5F5</c>");
    SendMessageToPC(oPC, "<c=Yellow>This is 141                 Yellow                  FFFF00</c>");
    SendMessageToPC(oPC, "<c=YellowGreen>This is 142            YellowGreen             9ACD32</c>");
    SendMessageToPC(oPC, "<c=Text>This is 143                   Text                    C0C0C0</c>");
    SendMessageToPC(oPC, "<c=TextPositive>This is 144           TextPositive            0DFEF8</c>");
    SendMessageToPC(oPC, "<c=TextNegative>This is 145           TextNegative            FB2D2D</c>");
    SendMessageToPC(oPC, "<c=TextNeutral>This is 146            TextNeutral             DEDEDE</c>");
    SendMessageToPC(oPC, "<c=ItemUseable>This is 147            ItemUseable             FFFFFF</c>");
    SendMessageToPC(oPC, "<c=ItemNotUseable>This is 148         ItemNotUseable          FF0000</c>");
    SendMessageToPC(oPC, "<c=Unidentified>This is 149           Unidentified            00FFFF</c>");
    SendMessageToPC(oPC, "<c=HotbarText>This is 150             HotbarText              BCBCBC</c>");
    SendMessageToPC(oPC, "<c=HotbarDisabled>This is 151         HotbarDisabled          666666</c>");
    SendMessageToPC(oPC, "<c=HotbarItmNoUse>This is 152         HotbarItmNoUse          FF0000</c>");
}
1 Like

You have to modify the OnChat script (if you don’t have one, create one) so that it DOESN’T sent the “normal” message, then modifies the message as you want, and then sends the modified message as if the PC had spoken it in the first place.

So basically you have a StartingConditional function that returns TRUE if the message is sent, FALSE if it isn’t.

You return TRUE for all characters that don’t have to fire the script (NPCs, controlled familiars, whatever you want), while for the others you write all the conditions you want, send the message using SendChatMessage and then return FALSE.

Send me a message and I will send you my code, I have done it on my server!