# CustomMessage: How to create a deco object definition?

**URL:** https://forum.clonkspot.org/t/custommessage-how-to-create-a-deco-object-definition/1129
**Category:** Help
**Created:** [20. August 2017 um 12:02 UTC](https://forum.clonkspot.org/t/custommessage-how-to-create-a-deco-object-definition/1129 "2017-08-20T12:02:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nazarion](https://forum.clonkspot.org/user_avatar/forum.clonkspot.org/nazarion/32/145_2.png) [@Nazarion](https://forum.clonkspot.org/u/Nazarion)
#### Post date: [20. August 2017 um 12:02 UTC](https://forum.clonkspot.org/t/custommessage-how-to-create-a-deco-object-definition/1129/1 "2017-08-20T12:02:22Z")

</div>

Hello/Hallo, i need to create a deco for CustomMessage ( _CustomMessage (string message, object obj, int plr, int offset\_x, int offset\_y, int color, **id deco** , string portrait, int flags);_ )  
but i have no clue how does deco objects work.  
I want to know how to create deco object definitions and how to make them show correctly.

---

<div class="post-metadata">

### Author: ![Sven2](https://forum.clonkspot.org/user_avatar/forum.clonkspot.org/sven2/32/42_2.png) [@Sven2](https://forum.clonkspot.org/u/Sven2)
#### Post date: [21. August 2017 um 01:26 UTC](https://forum.clonkspot.org/t/custommessage-how-to-create-a-deco-object-definition/1129/2 "2017-08-21T01:26:13Z")

</div>

deco should be the ID of a definition that is used to provide the graphics and metrics for the dialog frame. It should define in script:  
FrameDecorationBorderTop, FrameDecorationBorderBottom, FrameDecorationBorderLeft, FrameDecorationBorderRight: Functions to return the border margins  
FrameDecorationBackClr: RGBa value of solid background  
  
The border graphics are defined as actions in the ActMap:  
FrameDecoTopLeft, FrameDecoTopRight, FrameDecoBottomLeft, FrameDecoBottomRight: Corner elements  
FrameDecoTop, FrameDecoBottom, FrameDecoLeft, FrameDecoRight: Bordeer elements  
FrameDecoWall: Background element (not sure if that's actually implemented).

---

<div class="post-metadata">

### Author: ![Sven2](https://forum.clonkspot.org/user_avatar/forum.clonkspot.org/sven2/32/42_2.png) [@Sven2](https://forum.clonkspot.org/u/Sven2)
#### Post date: [21. August 2017 um 01:27 UTC](https://forum.clonkspot.org/t/custommessage-how-to-create-a-deco-object-definition/1129/3 "2017-08-21T01:27:47Z")

</div>

Btw: I'd suggest you just copy an existing deco object and adjust it. For example from `S2Tower.c4s/S2TowerObj.c4d/Dlg.c3d/MenuDeco.c4d`

---

<div class="post-metadata">

### Author: ![Nazarion](https://forum.clonkspot.org/user_avatar/forum.clonkspot.org/nazarion/32/145_2.png) [@Nazarion](https://forum.clonkspot.org/u/Nazarion)
#### Post date: [22. August 2017 um 12:27 UTC](https://forum.clonkspot.org/t/custommessage-how-to-create-a-deco-object-definition/1129/4 "2017-08-22T12:27:39Z")

</div>

I understood basic things to make a menu deco. Thank you. That works easier than i expected.
