# Custom Color game message from debug menu lua console

**URL:** <https://discourse.cataclysmdda.org/t/custom-color-game-message-from-debug-menu-lua-console/11247>\
**Category:** The Lab\
**Created:** [January 17, 2016, 6:32am UTC](https://discourse.cataclysmdda.org/t/custom-color-game-message-from-debug-menu-lua-console/11247 "2016-01-17T06:32:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Labtop\_215](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@Labtop\_215](https://discourse.cataclysmdda.org/u/Labtop_215)\
**Post date:** [January 17, 2016, 6:32am UTC](https://discourse.cataclysmdda.org/t/custom-color-game-message-from-debug-menu-lua-console/11247/1 "2016-01-17T06:32:47Z")

</div>

I have been playing around with game.add\_msg(“A message here.”) to try and output a message to my game log for role playing purposes. However, I’ve only been able to output messages in white that eventually fade out to grey.

I have tried several different ways to output a different colored message to the log besides white.  
Examples I’ve tried:  
game.add\_msg( game\_message\_type : 3,(“A message here.”))  
game.add\_msg(“A message here.”, count : 2 , type : 3) (and various different iterations involving putting double quotes around either count and type, or 2 and 3…)  
game.add\_msg( m\_bad, (“A message here!”))  
game.add\_msg( \<color\_red\> “A message here.” \</color\_red\>) (which paints part of the message red in the command history bar, interestingly enough)

and various different iterations thereof.

I’m working from [http://smf.cataclysmdda.com/index.php?topic=4345.0](http://smf.cataclysmdda.com/index.php?topic=4345.0)  
[https://github.com/CleverRaven/Cataclysm-DDA/blob/b69e73826c8a505af93727eb34ee678e26bb0cf8/src/messages.h](https://github.com/CleverRaven/Cataclysm-DDA/blob/b69e73826c8a505af93727eb34ee678e26bb0cf8/src/messages.h)  
[https://github.com/CleverRaven/Cataclysm-DDA/blob/d56e624ed03b6efba398b17b53ed5dda2b027d56/tests/fake\_messages.cpp](https://github.com/CleverRaven/Cataclysm-DDA/blob/d56e624ed03b6efba398b17b53ed5dda2b027d56/tests/fake_messages.cpp)  
[https://github.com/CleverRaven/Cataclysm-DDA/blob/d56e624ed03b6efba398b17b53ed5dda2b027d56/src/messages.cpp](https://github.com/CleverRaven/Cataclysm-DDA/blob/d56e624ed03b6efba398b17b53ed5dda2b027d56/src/messages.cpp)

Is it possible to send custom colored messages to your characters logbook by using the game.add\_msg function through the lua console provided by the debug menu?  
Can anybody help me do this?

---

<div class="post-metadata">

**Author:** ![Zhilkin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zhilkin/32/3749_2.png) [@Zhilkin](https://discourse.cataclysmdda.org/u/Zhilkin)\
**Post date:** [September 27, 2017, 12:39pm UTC](https://discourse.cataclysmdda.org/t/custom-color-game-message-from-debug-menu-lua-console/11247/2 "2017-09-27T12:39:53Z")

</div>

```auto
game.add_msg("A <color_red>message</color> here.")
```
