« on: September 07, 2017, 04:20:04 PM »
Today I have an idea for the PC Release of TM. With some pre-made textures, and some new script commands, we can get vanilla custom items (for those who are new to modding, vanilla means mod-less). With some pre-made textures (like generic items and what not) we could create some additional items within TM. This will be useful to people who dislike modding (I have came across several on PC in my time playing on it for a while), as they can still create new items for their server. Also, with the pre-made textures, you can include item-packs within your texture packs (the real term that should be used is resource pack as it contains more than just textures) that allow you to further expand the textures you have available.
To supplement this, you have access to the CreateItem command. The entirety of the command looks like this:
CreateItem [texturePath] [name=X] [desc=X] [stats=[array]]
The texturePath parameter automatically defaults to the current world folder, but the default can be changed in the start screen under Options>Setup. From here the parameter takes a string value that points to the texture name. The supported formats should be a (.png) or (.jpg).
The name parameter is self explanatory, it is the name of the item being created.
The desc parameter is semi-self explanatory, if you don't know what desc means, it means description. This is the description of the item you created.
The Stats parameter is a bit more interesting. It takes an array, which tells how powerful, damaging, durable, etc. the item is. What will set this apart from the stats of a normal item is the fact that you can put custom names in there as sort of a tag on an item.
For example, lets say i have a quality tag that tells the refinement of an item, the following are the possible options:
basic, good, great, excellent, perfect
Using the stats parameter i can do ...quality=(your option here). This puts a custom tag that has the name quality on the item. When you prospect the item, you get the description, as well as the stats within a list.
[item name here]-----------------------------
To also help push this idea, you can query the custom stats of an item within the following command
hasStats [name] [stat] [true|false]
hasStats [name] [stat] [compare] [value]
This command allows you to find a specific stat of a custom item, and will allow you to see if it is there or compare two values. If the requested stat is found, the command will return a value of zero.
To conclude, this should be added for people who want to customize their experience without learning XML or any other coding language besides the scripting language in TM.