Author Topic:  (PC Idea) Custom Items from Pre-made textures (With scripts)  (Read 446 times)

0 Members and 1 Guest are viewing this topic.

Cooldude8

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Awards
  • Xbox: Sharpbraineagl1
  • Steam: wesley51471
(PC Idea) Custom Items from Pre-made textures (With scripts)
« 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.

I.E.

[item name here]-----------------------------
[description here]

Attack: 40
Defense: 40
...
Quality: Good
-------------------------------------------------

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.

Gary

  • Tester
  • Supreme Member
  • *****
  • Posts: 2929
  • Steam: Conmaan ... ... Discord: Conmaan #9586
  • Awards 1 year on site+100 posts Was in the top 10 of the forum stats page as of 4/12/15 Former MotM winners
    • View Profile
    • Awards
Re: (PC Idea) Custom Items from Pre-made textures (With scripts)
« Reply #1 on: September 08, 2017, 01:01:50 AM »
You don't have to have any sort of a working knowledge of xml to make mods for Total Miner, just follow the instructions listed on either (1)Craig's detailed post regarding how to make mods or (2) my step by step videos on the subject.


               

Link to my youtube channel:
https://www.youtube.com/channel/UCo4rmelSOUB9YMM0Is-zWyQ