- 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.
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.
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! :))
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.
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.
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! :))
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: