<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.hackslashmine.net/hsmwiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.hackslashmine.net/hsmwiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=171.100.59.30</id>
		<title>Hack/Mine Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.hackslashmine.net/hsmwiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=171.100.59.30"/>
		<link rel="alternate" type="text/html" href="http://www.hackslashmine.net/hsmwiki/Special:Contributions/171.100.59.30"/>
		<updated>2026-07-04T10:25:07Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.2</generator>

	<entry>
		<id>http://www.hackslashmine.net/hsmwiki/Customization</id>
		<title>Customization</title>
		<link rel="alternate" type="text/html" href="http://www.hackslashmine.net/hsmwiki/Customization"/>
				<updated>2014-05-19T10:31:24Z</updated>
		
		<summary type="html">&lt;p&gt;171.100.59.30: /* The JSON Data Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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 ''&amp;lt;.minecraft&amp;gt;/spells/'' directory.  This information propagates over the network automatically, meaning each Hack/Mine server can offer its own unique RPG experience.&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
This web site really has all the information and facts I wanted about this subject and didn't know who to ask. cacadeaafkgfcddd&lt;br /&gt;
&lt;br /&gt;
==hsmConfig Layout==&lt;br /&gt;
At the highest level, ''hsmConfig'' is an object with several expected objects within it, including &amp;quot;classes&amp;quot; and &amp;quot;spells&amp;quot;.  Every object within the &amp;quot;classes&amp;quot; object will be added to Hack/Mine as a selectable class, whereas every object within &amp;quot;spells&amp;quot; will be added to the set of all possible spells that classes may have assigned to them.  A description of all possible pairs for objects contained by ''classes'' and ''spells'' is now given.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;LString&amp;quot; and &amp;quot;Script&amp;quot; refer to a strings that, if beginning '@', will be used to retrieve a value from the user's selected language files, or a script from the ''spells'' directory, respectively.  Also, &amp;quot;Number&amp;quot; refers to any real number, whereas &amp;quot;Integer&amp;quot; refers to an integer.  &amp;quot;Boolean&amp;quot; refers to values of either ''true'' or ''false''.  &amp;quot;Map&amp;quot; refers to an object.  And finally, note that block and item IDs should be [[Block and Item IDs|display IDs]], which are consistent with the vanilla Minecraft IDs but differ from the ones you'd be using within [[Spellscript]].&lt;br /&gt;
&lt;br /&gt;
===Class===&lt;br /&gt;
To add a class to H/M, add a pair ''&amp;lt;className&amp;gt; : &amp;lt;classObject&amp;gt;'' to the classes object.  &amp;lt;classObject&amp;gt; may consist of the following pairs:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key || Type || Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;climbableBlocks&amp;quot; || Array of Integers ||  A list of block IDs that the player may freely climb, much like a ladder.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;description&amp;quot; || LString || The flavor-text presented on the character-rolling GUI when the class is moused over.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;displayColor&amp;quot; || String || The hexcode for the class's color, used through various GUIs for flavor.  Should be formatted ''RRGGBB''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;healthPerFortitude&amp;quot; || Integer || How much health the player receives per point of fortitude (default is 10).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;relativeIndex&amp;quot; || Number || Must be non-negative.  Used to decide in what order to present the classes on GUIs.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;startingItems&amp;quot; || Array of Integers or Strings || A list of itemIDs that the player receives when the class is selected.  A stack of multiple items may be specified by appending a ':' followed by the desired stack size (e.g. &amp;quot;20:64&amp;quot; is a stack of 64 glass).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;startingSpells&amp;quot; || Array of Strings || A list of spells, referenced from the ''spells'' object by name, that the player begins with.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Spell===&lt;br /&gt;
To add a spell to H/M, add a pair ''&amp;lt;spellName&amp;gt; : &amp;lt;spellObject&amp;gt;'' to the spells object.  You'll also need to reference it from a class under the classes object via the &amp;quot;startingSpells&amp;quot; key (Additional methods of incorporating spells, such as in a talent tree, are planned.)  &amp;lt;spellObject&amp;gt; may consist of the following pairs:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key || Type || Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;activeManaCost&amp;quot; || Number || The base mana required each tick the spell is cast.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;activeManaCostPerStat&amp;quot; || Number || The additional mana required per stat each tick the spell is cast (see &amp;quot;stat&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;activeScript&amp;quot; || Script || The script to execute each tick the spell is being cast.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;activeScriptParams&amp;quot; || Map of Strings || Supplies custom parameters to the activeScript (see Custom Parameters below).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;coolDown&amp;quot; || Integer || The number of ticks before the spell may be cast again.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;delayCast&amp;quot; || Boolean || If true, does not expend the initial mana cost or begin the cool down when initially cast, on the assumption the Spellscript method ''SpellInstance.delayedCast'' will be called from within &amp;quot;effectScript&amp;quot; later.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;description&amp;quot; || LString || The description of the spell provided in its mouseover tooltip.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;displayName&amp;quot; || LString || The name of the spell as presented throughout various GUIs.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;effectScript&amp;quot; || Script || The script to execute when the spell is first cast.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;effectScriptParams&amp;quot; || Map of Strings || Supplies custom parameters to the effectScript (see Custom Parameters below).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;manaCost&amp;quot; || Number || The base mana required to initially cast the spell.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;manaCostPerStat&amp;quot; || Number || The additional mana required per stat to initially cast the spell (see &amp;quot;stat&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;stat&amp;quot; || String || The stat used to calculate additional initial or active mana cost.  Case-insensitive, may be &amp;quot;str&amp;quot;, &amp;quot;strength&amp;quot;, &amp;quot;dex&amp;quot;, etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;textureID&amp;quot; || Integer || The texture index of the icon to use for the spell in various GUIs (calculated as ''x + y * 16'')&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Script Files==&lt;br /&gt;
Script files can be placed in and referenced from the ''spells'' directory, and are interpreted as [[Spellscript]] scripts.  For both &amp;quot;activeScript&amp;quot; and &amp;quot;effectScript&amp;quot;, a return type of ''bool'' is expected, indicating whether the spell is successfully cast.  The scripts also have the following variables in scope:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| World || world || The world (e.g. the Surface, the Nether, the End) in which the spell is being cast.&lt;br /&gt;
|-&lt;br /&gt;
| SpellInstance || spellInstance || The instance of the spell being cast.&lt;br /&gt;
|-&lt;br /&gt;
| Living || caster || The Living casting the spell (most likely a Player)&lt;br /&gt;
|-&lt;br /&gt;
| Entity || targetEntity || (&amp;quot;effectScript&amp;quot; only) The Entity the spell is cast on, if any.&lt;br /&gt;
|-&lt;br /&gt;
| Block || targetBlock || (&amp;quot;effectScript&amp;quot; only) The Block the spell is cast on, if any.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Custom Parameters===&lt;br /&gt;
Custom parameters are a way of making your script files easily configurable and reusable.  Rather than hard-coding particular values into your script files (for example, the strength of a jump technique), you can insert identifiers surrounded by double exclamation marks in their place (for example, !!JUMP_STRENGTH!!).  Then, whenever one of those scripts is referenced in ''hsmConfig'', you would also define an object of custom parameters, like:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;mySpell&amp;quot;: {&lt;br /&gt;
    &amp;quot;effectScript&amp;quot;: &amp;quot;@spell_jump.ss&amp;quot;,&lt;br /&gt;
    &amp;quot;effectScriptParams&amp;quot;: { &amp;quot;JUMP_STRENGTH&amp;quot;: &amp;quot;3.2&amp;quot; }&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now for the spell mySpell, !!JUMP_STRENGTH!! will be replaced by the string specified in ''hsmConfig''!  Pretty cool, eh?&lt;br /&gt;
&lt;br /&gt;
Since it's simple string replacement, you can replace custom parameters with whatever snippets of code you desire.  Suppose you wanted JUMP_STRENGTH to depend on strength in one spell, and dexterity in another-- you could do something like this:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;mySpell&amp;quot;: {&lt;br /&gt;
    &amp;quot;effectScript&amp;quot;: &amp;quot;@spell_jump.ss&amp;quot;,&lt;br /&gt;
    &amp;quot;effectScriptParams&amp;quot;: { &amp;quot;JUMP_STRENGTH&amp;quot;: &amp;quot;3 + caster.getStr() * .02&amp;quot; }&lt;br /&gt;
},&lt;br /&gt;
&amp;quot;anotherSpell&amp;quot;: {&lt;br /&gt;
    &amp;quot;effectScript&amp;quot;: &amp;quot;@spell_jump.ss&amp;quot;,&lt;br /&gt;
    &amp;quot;effectScriptParams&amp;quot;: { &amp;quot;JUMP_STRENGTH&amp;quot;: &amp;quot;3 + caster.getDex() * .02&amp;quot; }&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don't get too crazy though-- you want to be able to glance at a custom parameter's name and value and know exactly what it does, and depending on variables defined in another file can detract from this.&lt;/div&gt;</summary>
		<author><name>171.100.59.30</name></author>	</entry>

	</feed>