stinkey
Forum adept
- Joined
- Sep 8, 2020
- Messages
- 225
- Reaction score
- 74
lol what is this name
Now, have you ever wondered about how DF's values and variables (text, number, potion effect, dynamic, etc.) store their values? Clearly they don't store it in the name or lore; doing /item name [something] doesn't work. Now, with the new release of item tags, we can do /item tag list. Doing this while holding a text value, dynamic variable, or code template shows you the real values behind the item.
Value and variable items have an item tag called varitem. A text value with the value Hello! has the following item tags:
Code templates also store data in their item tags. It's in an item tag called codetemplatedata.
This also has some values, such as author or name. What's interesting is code. It has some text, seemingly gibberish. However, it's actually compressed text, using gzip compression (thanks to otte for telling me it was gzip and base64 not base64 by itself... if you decode with only base64 its just emojis and brackets). Decoded, it says: {"blocks":[{"id":"block","block":"func","args":{"items":[{"item":{"id":"bl_tag","data":{"option":"False","tag":"Is Hidden","action":"dynamic","block":"func"}},"slot":26}]},"data":"hello"}]}. This code template was just a function called hello. You can see that there is func and tag (the option to make the function hidden or not), and data, which contains hello, the function's name. In theory, you could make a code template with some code just by setting the item tags, though the tag is pretty long and wouldn't fit in your chat bar. However, you could bypass the char limit by using set var code blocks.
I'm not sure why the devs made it all in one item tag. I'm not a dev, nor am I super good at coding, so I wouldn't know anyways.
TL;DR DF values are stored in item tags.
Now, have you ever wondered about how DF's values and variables (text, number, potion effect, dynamic, etc.) store their values? Clearly they don't store it in the name or lore; doing /item name [something] doesn't work. Now, with the new release of item tags, we can do /item tag list. Doing this while holding a text value, dynamic variable, or code template shows you the real values behind the item.
Value and variable items have an item tag called varitem. A text value with the value Hello! has the following item tags:
Code templates also store data in their item tags. It's in an item tag called codetemplatedata.
This also has some values, such as author or name. What's interesting is code. It has some text, seemingly gibberish. However, it's actually compressed text, using gzip compression (thanks to otte for telling me it was gzip and base64 not base64 by itself... if you decode with only base64 its just emojis and brackets). Decoded, it says: {"blocks":[{"id":"block","block":"func","args":{"items":[{"item":{"id":"bl_tag","data":{"option":"False","tag":"Is Hidden","action":"dynamic","block":"func"}},"slot":26}]},"data":"hello"}]}. This code template was just a function called hello. You can see that there is func and tag (the option to make the function hidden or not), and data, which contains hello, the function's name. In theory, you could make a code template with some code just by setting the item tags, though the tag is pretty long and wouldn't fit in your chat bar. However, you could bypass the char limit by using set var code blocks.
I'm not sure why the devs made it all in one item tag. I'm not a dev, nor am I super good at coding, so I wouldn't know anyways.
TL;DR DF values are stored in item tags.
Last edited: