• Hey! Register here to create your account, engage with the community, and talk about what is new!

Thorough Guide to Item Variables

RDM

Member
Overlord
Joined
Sep 6, 2020
Messages
36
Reaction score
22
Hi, y'all. Item variables are an important part of DiamondFire and they are instrumental in spicing up your games. Item variables excel at storing large amounts of information into smaller spaces. Here's an example of an item variable at work before we get started.

1599849407977.png

Part 1: How to use Item Variables

You create item variables just as you would normal variables, only you're setting the variables to items instead of text or numbers. These function exactly how other variables would function, so there's no need to get technical about it -- they're still variables.

Note: for "Get" Set Variable Actions (e.g. Get Item Name, Get Item Durability), the item you place in the chest is listed as not optional -- It doesn't have to be a regular item because that's completely useless. You can totally use another variable for this (an item variable of course). It just has to be set to an item.
Note: for "Set" Set Variable Actions (e.g. Set Item Name, Set Item Durability), the item you place in the chest is listed as optional -- For new variables, you're going to need to put an item in there to my knowledge. Gotta set the variable to an item! It's optional mostly for item variables that have already been set. If you leave the item slot blank, it will not change the variable's represented item -- This is just a time save.

1599851024717.png
1599851117490.png

Part 2: How to apply Item Variables

There's a couple of ways you can apply item variables. A mistake that I see often in applying item variables is that if an item variable is updated, people forget to update players or GUIs with the updated item [variable]. Remember, your item variables might be updated automatically, but you still need to give that updated information.

Now, to apply item variables, just plop that variable into an inventory, GUI, or otherwise. If you've set it to an item, it will update and show that item (plus any other things you might have added to it) instead of the magma cream. (Unless your item variable is set to a magma cream of course! :))

1599851737516.png

Part 3: Applications of Item Variables

There are a lot of applications that Item Variables have. Here's most of them.

- Item Material Manipulation
- Item Name Manipulation
- Item Lore Manipulation
- Item Stack Size Manipulation
- Item Durability Manipulation
- Item Breakability Manipulation
- Item Enchantment Manipulation
- Item Head Manipulation
- Book Text Manipulation
- Item Tag Manipulation (Includes custom item tags)
- Item Color Manipulation
- Item Visibility Flag Manipulation
- Placeable/Breakable Block Manipulation
- Item Attribute Manipulation
- Item Rarity Manipulation
- You can use "Get" Set Item Actions (For example, Get Item Material, Get Item Name) with If Variable conditions to further manipulate item vars.
 
Last edited:

TheMinesYT

Notorious member
Joined
Sep 7, 2020
Messages
91
Reaction score
6
Hi, y'all. Item variables are an important part of DiamondFire and they are instrumental in spicing up your games. Item variables excel at storing large amounts of information into smaller spaces. Here's an example of an item variable at work before we get started.

View attachment 115

Part 1: How to use Item Variables

You create item variables just as you would normal variables, only you're setting the variables to items instead of text or numbers. These function exactly how other variables would function, so there's no need to get technical about it -- they're still variables.

Note: for "Get" Set Variable Actions (e.g. Get Item Name, Get Item Durability), the item you place in the chest is listed as not optional -- It doesn't have to be a regular item because that's completely useless. You can totally use another variable for this (an item variable of course). It just has to be set to an item.
Note: for "Set" Set Variable Actions (e.g. Set Item Name, Set Item Durability), the item you place in the chest is listed as optional -- For new variables, you're going to need to put an item in there to my knowledge. Gotta set the variable to an item! It's optional mostly for item variables that have already been set. If you leave the item slot blank, it will not change the variable's represented item -- This is just a time save.

View attachment 125
View attachment 127

Part 2: How to apply Item Variables

There's a couple of ways you can apply item variables. A mistake that I see often in applying item variables is that people forget to update their item variables with new information, so the new information never displays on the item. Remember, your item variables might be based on other information that is updated automatically (Like %default wins or %default coins), but you've still got to apply that onto your item variable!!

Now, to apply item variables, just plop that variable into an inventory, GUI, or otherwise. If you've set it to an item, it will update and show that item (plus any other things you might have added to it) instead of the magma cream. (Unless your item variable is set to a magma cream of course! :))

View attachment 128

Part 3: Applications of Item Variables

There are a lot of applications that Item Variables have. Here's most of them.

- Item Material Manipulation
- Item Name Manipulation
- Item Lore Manipulation
- Item Stack Size Manipulation
- Item Durability Manipulation
- Item Breakability Manipulation
- Item Enchantment Manipulation
- Item Head Manipulation
- Book Text Manipulation
- Item Tag Manipulation (Includes custom item tags)
- Item Color Manipulation
- Item Visibility Flag Manipulation
- Placeable/Breakable Block Manipulation
- Item Attribute Manipulation
- Item Rarity Manipulation
- You can use "Get" Set Item Actions (For example, Get Item Material, Get Item Name) with If Variable conditions to further manipulate item vars.
Yes this is perfection thank you so much lol so good sooo goood
 

RDM

Member
Overlord
Joined
Sep 6, 2020
Messages
36
Reaction score
22
Hi y'all, glad everyone is liking the guide. I appreciate your suggestions and will take them into consideration. I've made a change within Part 2 that should make it more clear and easily understood.

Old:
A mistake that I see often in applying item variables is that people forget to update their item variables with new information, so the new information never displays on the item. Remember, your item variables might be based on other information that is updated automatically (Like %default wins or %default coins), but you've still got to apply that onto your item variable!!
New:
A mistake that I see often in applying item variables is that if an item variable is updated, people forget to update players or GUIs with the updated item [variable]. Remember, your item variables might be updated automatically, but you still need to give that updated information.
 
Top Bottom