# Is there any way to change the message that's displayed when you use an item?

**URL:** <https://discourse.cataclysmdda.org/t/is-there-any-way-to-change-the-message-thats-displayed-when-you-use-an-item/4388>\
**Category:** The Drawing Board\
**Created:** [December 5, 2013, 6:19am UTC](https://discourse.cataclysmdda.org/t/is-there-any-way-to-change-the-message-thats-displayed-when-you-use-an-item/4388 "2013-12-05T06:19:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheGrifter](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheGrifter](https://discourse.cataclysmdda.org/u/TheGrifter)\
**Post date:** [December 5, 2013, 6:19am UTC](https://discourse.cataclysmdda.org/t/is-there-any-way-to-change-the-message-thats-displayed-when-you-use-an-item/4388/1 "2013-12-05T06:19:56Z")

</div>

Let’s say I want to change the message that’s displayed when you eat food, or use a drug. Is there any way that could be jsoned out from iuse.cpp?

Just the purely cosmetic message that’s displayed when something is used. I’d appreciate it for flavor text.

---

<div class="post-metadata">

**Author:** ![kilozombie](https://avatars.discourse-cdn.com/v4/letter/k/e274bd/32.png) [@kilozombie](https://discourse.cataclysmdda.org/u/kilozombie)\
**Post date:** [December 5, 2013, 5:21pm UTC](https://discourse.cataclysmdda.org/t/is-there-any-way-to-change-the-message-thats-displayed-when-you-use-an-item/4388/2 "2013-12-05T17:21:03Z")

</div>

Unfortunately the iuse function that prints something relies on a lot of if functions, even for eating. I can’t say it’d be easy jsoning it.

Though I’m really not an experienced coder, to be fair!

---

<div class="post-metadata">

**Author:** ![TheGrifter](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheGrifter](https://discourse.cataclysmdda.org/u/TheGrifter)\
**Post date:** [December 5, 2013, 11:44pm UTC](https://discourse.cataclysmdda.org/t/is-there-any-way-to-change-the-message-thats-displayed-when-you-use-an-item/4388/3 "2013-12-05T23:44:40Z")

</div>

I know changing the actual behind the scenes effects of items would be hard, but the message that’s displayed when they’re used, that seems reasonably feasible. I’m not an expert though.

---

<div class="post-metadata">

**Author:** ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)\
**Post date:** [December 6, 2013, 7:49am UTC](https://discourse.cataclysmdda.org/t/is-there-any-way-to-change-the-message-thats-displayed-when-you-use-an-item/4388/4 "2013-12-06T07:49:51Z")

</div>

You got a compiler and know how to use it (Code::Blocks works OK for me), all you gotta do is change the print\_msg. (#4 in the below example.)

Example: line 936 or so of iuse.cpp. Let’s say you drink a beast mutagen?

g-\>add\_msg\_if\_player(p, \_(“Your heart races and you see blood for a moment.”));  
1 2 3 4 5

1. This tells iuse to check in game.cpp. Needed so it knows where to stick the message. Otherwise, the compiler goes “WTF? I don’t know what you want me to do!” and stops.

2. Actual action: stick in a message, if whatever triggered this code is the player. (Spoiler: it is. NPCs won’t be drinking mutagen for a while.)

3. I presume this is similar syntax to 1. Leave it in and things don’t break.

4. Here’s the actual text. The opening and closing parens & quotes are mandatory and tell the compiler that you want the text they enclose printed, not parsed as some weird syntax & commands it’s never heard of. Couple things to know: don’t just hit enter/return for a new line. Instead, type (without the quotes) “\n” and then either space or hit enter. Likewise, if you want to use “quote marks” you need to put in a slash first, like so: " . Otherwise the compiler will think those quotes represent the end of your text, and chances are a “WTF?” will follow.

5. Close all parens and use a semicolon to indicate you’re done with that line. Missing parens are a great way to cause bugs; they happen to everyone. (Especially me.

…but that one was deliberate. Hoping this helps. 🙂
