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
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/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?