Editing Wiki Help

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 205: Line 205:
<code>[<b></b>itemdata:itm_plastic:stack_size]</code> => [itemdata:itm_plastic:stack_size]
<code>[<b></b>itemdata:itm_plastic:stack_size]</code> => [itemdata:itm_plastic:stack_size]


----


This can in theory retrieve data into endless depths, but of course the data files are not that deep. But for example you could get the identifier of an input material:
This can in theory retrieve data into endless depths, but of course the data files are not that deep. But for example you could get the identifier of an input material:
Line 215: Line 213:




----
And if that seems fancy: It is possible to chain replacements. First data is grabbed, then the info replacements. This happens twice and after that come localization and finally icon replacements.


And if that seems fancy: It is possible to chain replacements. First data is grabbed, then the info replacements. This happens twice and after that come localization and finally icon replacements.


<code>[<b></b>t:[<b></b>itemdata:itm_7segment_display:input_materials:0:loca_string]]</code> => [t:[itemdata:itm_7segment_display:input_materials:0:loca_string]]
<code>[<b></b>t:[<b></b>itemdata:itm_7segment_display:input_materials:0:loca_string]]</code> => [t:[itemdata:itm_7segment_display:input_materials:0:loca_string]]


<code>[<b></b>item:[<b></b>itemdata:itm_7segment_display:input_materials:0:loca_string]]</code> => [item:[itemdata:itm_7segment_display:input_materials:0:loca_string]]
<code>[<b></b>item:[<b></b>itemdata:itm_7segment_display:input_materials:0:loca_string]]</code> => [item:[itemdata:itm_7segment_display:input_materials:0:loca_string]]
----
In case you try to fetch data that does not exist, the replacement will remove the replacement from the page and display nothing instead. This may proof useful when mass copying certain stuff into fixed tables, but might cause issues if further digging into data is based of it.
<code>[<b></b>itemdata:itm_plastic:input_materials:0:loca_string]</code> => [itemdata:itm_plastic:input_materials:0:loca_string]
<code>[<b></b>itemdata:itm_7segment_display:input_materials:2:loca_string]</code> => [itemdata:itm_7segment_display:input_materials:2:loca_string]
----
Last but not least: If you try to access an array or class through this, instead of getting the data placed, you will only get a true in return.
<code>Can be crafted: [<b></b>itemdata:itm_plastic:input_materials]</code> => Can be crafted: [itemdata:itm_plastic:input_materials]
<code>Can be crafted: [<b></b>itemdata:itm_7segment_display:input_materials]</code> => Can be crafted: [itemdata:itm_7segment_display:input_materials]

Please note that all contributions to Good Company may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Good Company:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)