Customization

From Hack/Mine Wiki
(Difference between revisions)
Jump to: navigation, search
(Script Files)
(Undo revision 1575 by 171.100.59.30 (talk))
Line 3: Line 3:
 
You'll definitely want to use a syntax-highlighted text editor like [http://www.sublimetext.com/ Sublime Text] when customizing Hack/Mine.  A Sublime package for [[Spellscript]] is also available [http://www.mediafire.com/download.php?foak1j6b381huzz here].
 
You'll definitely want to use a syntax-highlighted text editor like [http://www.sublimetext.com/ Sublime Text] when customizing Hack/Mine.  A Sublime package for [[Spellscript]] is also available [http://www.mediafire.com/download.php?foak1j6b381huzz here].
  
This web site really has all the information and facts I wanted about this subject and didn't know who to ask. cacadeaafkgfcddd
+
==The JSON Data Format==
 +
To customize ''hsmConfig.JSON'', you first need to understand the JSON data format.  A .JSON file is simply a text file, except its text must be organized according to a certain set of rules.  If you're a programmer, you can probably understand the precise definition given [http://www.json.org/ here], but otherwise, read on.
 +
 
 +
JSON has three basic textual components: ''values'', ''objects'', and ''arrays''.  A value is either a string of characters enclosed in quotation marks, a real number, an array, an object, '''true''', '''false''', or  '''null'''.  An array is simply a comma-separated list of values enclosed by square brackets.  And finally, an object is a comma-separated list of ''pairs'' enclosed by curly braces, where a pair is simply a string and a value separated by a colon.  That's it!  Here's some example JSON data:
 +
<nowiki>{
 +
    "someNumber" : 34,
 +
    "anotherNumber" : 21.4,
 +
    "aString" : "yo dawg",
 +
    "anArray" : [2, 3, 5.2, null, "hi!"]
 +
    "anotherObject" : { "herp" : 0, "aderp": 1, "alerp" : 2 }
 +
    "jsonIsSuperAmazing" : true,
 +
    "jsonIsComplicated" : false
 +
}</nowiki>
 +
 
 +
Now you're ready to customize ''hsmConfig.JSON''...
  
 
Very nice site!
 
Very nice site!
  
 
Very nice site!
 
Very nice site!

Revision as of 07:08, 5 July 2014

The long-term goal of Hack/Mine is to be thoroughly customizable, such that users can create their own content and share it with the community. As of version 0.6.4, this is starting to become a reality, as users can create their own spells via Spellscript and create their own classes and skill-sets through a configuration file (hsmConfig.JSON) located in the <.minecraft>/spells/ directory. This information propagates over the network automatically, meaning each Hack/Mine server can offer its own unique RPG experience.

You'll definitely want to use a syntax-highlighted text editor like Sublime Text when customizing Hack/Mine. A Sublime package for Spellscript is also available here.

The JSON Data Format

To customize hsmConfig.JSON, you first need to understand the JSON data format. A .JSON file is simply a text file, except its text must be organized according to a certain set of rules. If you're a programmer, you can probably understand the precise definition given here, but otherwise, read on.

JSON has three basic textual components: values, objects, and arrays. A value is either a string of characters enclosed in quotation marks, a real number, an array, an object, true, false, or null. An array is simply a comma-separated list of values enclosed by square brackets. And finally, an object is a comma-separated list of pairs enclosed by curly braces, where a pair is simply a string and a value separated by a colon. That's it! Here's some example JSON data:

{
    "someNumber" : 34,
    "anotherNumber" : 21.4,
    "aString" : "yo dawg",
    "anArray" : [2, 3, 5.2, null, "hi!"]
    "anotherObject" : { "herp" : 0, "aderp": 1, "alerp" : 2 }
    "jsonIsSuperAmazing" : true,
    "jsonIsComplicated" : false
}

Now you're ready to customize hsmConfig.JSON...

Very nice site!

Very nice site!

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox