<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.skycorp.global/index.php?action=history&amp;feed=atom&amp;title=Modding%3ABundles</id>
	<title>Modding:Bundles - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.skycorp.global/index.php?action=history&amp;feed=atom&amp;title=Modding%3ABundles"/>
	<link rel="alternate" type="text/html" href="http://wiki.skycorp.global/index.php?title=Modding:Bundles&amp;action=history"/>
	<updated>2026-04-25T17:01:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>http://wiki.skycorp.global/index.php?title=Modding:Bundles&amp;diff=1259&amp;oldid=prev</id>
		<title>SkyCorp: Change format for None mods</title>
		<link rel="alternate" type="text/html" href="http://wiki.skycorp.global/index.php?title=Modding:Bundles&amp;diff=1259&amp;oldid=prev"/>
		<updated>2026-02-27T19:54:15Z</updated>

		<summary type="html">&lt;p&gt;Change format for None mods&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:54, 27 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Tip:  Empty bundles ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Tip:  Empty bundles ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If a mod &amp;#039;&amp;#039;only&amp;#039;&amp;#039; has dependencies but no content itself, it is possible to set the mod json as &amp;lt;code&amp;gt;{ }&amp;lt;/code&amp;gt;  You can then set the dependencies as desired.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If a mod &amp;#039;&amp;#039;only&amp;#039;&amp;#039; has dependencies but no content itself, it is possible to set the mod json as &amp;lt;code&amp;gt;{ &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot;type&amp;quot;: &amp;quot;NONE&amp;quot; &lt;/ins&gt;}&amp;lt;/code&amp;gt;  You can then set the dependencies as desired.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This may be useful if you are building a related set of mods but they function independently and wouldn&amp;#039;t normally need to depend on each other, but you still want a cohesive way for people to download the entire set together with one download.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This may be useful if you are building a related set of mods but they function independently and wouldn&amp;#039;t normally need to depend on each other, but you still want a cohesive way for people to download the entire set together with one download.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff::1.12:old-1256:rev-1259 --&gt;
&lt;/table&gt;</summary>
		<author><name>SkyCorp</name></author>
	</entry>
	<entry>
		<id>http://wiki.skycorp.global/index.php?title=Modding:Bundles&amp;diff=1256&amp;oldid=prev</id>
		<title>SkyCorp: Tip on how to do empty bundles</title>
		<link rel="alternate" type="text/html" href="http://wiki.skycorp.global/index.php?title=Modding:Bundles&amp;diff=1256&amp;oldid=prev"/>
		<updated>2026-02-25T06:08:59Z</updated>

		<summary type="html">&lt;p&gt;Tip on how to do empty bundles&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:08, 25 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Mod dependencies bundling (Automatic) ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Mod dependencies bundling (Automatic) ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is the easiest and most flexible way of bundling -- each mod can list its own dependencies in the mod portal.  Then when the user installs the mod, all dependencies will be installed recursively.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is the easiest and most flexible way of bundling -- each mod can list its own dependencies in the mod portal.  Then when the user installs the mod, all dependencies will be installed recursively.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Tip:  Empty bundles ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If a mod &#039;&#039;only&#039;&#039; has dependencies but no content itself, it is possible to set the mod json as &amp;lt;code&gt;{ }&amp;lt;/code&gt;  You can then set the dependencies as desired.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This may be useful if you are building a related set of mods but they function independently and wouldn&#039;t normally need to depend on each other, but you still want a cohesive way for people to download the entire set together with one download.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Manual bundling ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Manual bundling ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff::1.12:old-1249:rev-1256 --&gt;
&lt;/table&gt;</summary>
		<author><name>SkyCorp</name></author>
	</entry>
	<entry>
		<id>http://wiki.skycorp.global/index.php?title=Modding:Bundles&amp;diff=1249&amp;oldid=prev</id>
		<title>SkyCorp: Mod bundles!</title>
		<link rel="alternate" type="text/html" href="http://wiki.skycorp.global/index.php?title=Modding:Bundles&amp;diff=1249&amp;oldid=prev"/>
		<updated>2026-02-05T21:21:46Z</updated>

		<summary type="html">&lt;p&gt;Mod bundles!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Bundles are mods that contain multiple mod types within them.  (Introduced in r56.1)&lt;br /&gt;
&lt;br /&gt;
== Methods of bundling ==&lt;br /&gt;
There are two ways to create bundles:&lt;br /&gt;
&lt;br /&gt;
1)  Manually through JSON (forced)&lt;br /&gt;
&lt;br /&gt;
2)  Automatically through the mod dependencies system&lt;br /&gt;
&lt;br /&gt;
Generally speaking, manual bundles should only be made if the submods have &amp;#039;&amp;#039;no&amp;#039;&amp;#039; potential use independently.  For instance, before bundling a monster and a map manually, consider that another modder might want to use the monster in a custom map, or spawn it in a procedural map.  In that case, having each of the monster and the map individually listed in the mod database allows more flexibility for the mods to be used in future ways.&lt;br /&gt;
&lt;br /&gt;
== Mod dependencies bundling (Automatic) ==&lt;br /&gt;
This is the easiest and most flexible way of bundling -- each mod can list its own dependencies in the mod portal.  Then when the user installs the mod, all dependencies will be installed recursively.&lt;br /&gt;
&lt;br /&gt;
== Manual bundling ==&lt;br /&gt;
Set the type of the mod to &amp;lt;code&amp;gt;BUNDLE&amp;lt;/code&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;type&amp;quot;: &amp;quot;BUNDLE&amp;quot;,&lt;br /&gt;
	&amp;quot;includedMods&amp;quot;:&lt;br /&gt;
	[&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;spawn&amp;quot;: true,&lt;br /&gt;
			&amp;quot;mod&amp;quot;:&lt;br /&gt;
			{ ... }&lt;br /&gt;
		},&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;spawn&amp;quot;: true,&lt;br /&gt;
			&amp;quot;mod&amp;quot;:&lt;br /&gt;
			{ ... }&lt;br /&gt;
		}, ...&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&amp;lt;code&amp;gt;includedMods&amp;lt;/code&amp;gt; will be an array of sub mods, each one specifies:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;spawn&amp;lt;/code&amp;gt; - whether the item or monster should be spawned in the environment&lt;br /&gt;
* &amp;lt;code&amp;gt;mod&amp;lt;/code&amp;gt; - the submod&amp;#039;s json&lt;br /&gt;
&lt;br /&gt;
=== Full example ===&lt;br /&gt;
This example bundles the [https://skycorp.global/skyscript/mods/v/20/sample-vending-machine vending machine] and the [https://skycorp.global/skyscript/mods/v/19/sample-soda soda] it dispenses as one combined mod.  It only spawns the vending machine, but since the soda is loaded, the vending machine can spawn soda through its lua code.&lt;br /&gt;
&lt;br /&gt;
(In reality, you would not want to bundle these together as by using the automatic dependency system, other mods could make use of the soda entity for their own purposes.)&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;type&amp;quot;: &amp;quot;BUNDLE&amp;quot;,&lt;br /&gt;
	&amp;quot;includedMods&amp;quot;:&lt;br /&gt;
	[&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;spawn&amp;quot;: true,&lt;br /&gt;
			&amp;quot;mod&amp;quot;:&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;type&amp;quot;: &amp;quot;ENTITY&amp;quot;,&lt;br /&gt;
				&amp;quot;name&amp;quot;:&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;literalString&amp;quot;: &amp;quot;Vending Machine&amp;quot;&lt;br /&gt;
				},&lt;br /&gt;
				&amp;quot;description&amp;quot;:&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;literalString&amp;quot;: &amp;quot;The vending machine advertises $1 for one diet soda.&amp;quot;&lt;br /&gt;
				},&lt;br /&gt;
				&amp;quot;doUse&amp;quot;:&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;programBoolean&amp;quot;: true&lt;br /&gt;
				},&lt;br /&gt;
				&amp;quot;isUseable&amp;quot;:&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;literalBoolean&amp;quot;: true&lt;br /&gt;
				},&lt;br /&gt;
				&amp;quot;lua&amp;quot;:  &amp;quot;function doUse()\r\n\t-- NOTE: If creating a full store, it would probably be better to use the\r\n\t-- existing store code, however as of Feb 2018 this is not yet exposed to\r\n\t-- LUA modding.  However, this is fine for a &amp;#039;shop&amp;#039; that only sells one\r\n\t-- item.\r\n\r\n\tplayer = Player.getInstance();\r\n\r\n\tif player.removeCash(1) then\r\n\t\t-- Player has enough currency to cover the transaction, and it was\r\n\t\t-- deducted successfully.\r\n\r\n\t\t-- This matches the id field in entity json.  Generally best to use the\r\n\t\t-- same name as your mod wiki page to prevent conflicts between multiple\r\n\t\t-- mods.\r\n\t\tsoda = Entity.generate(\&amp;quot;Sample Soda\&amp;quot;);\r\n\r\n\t\tif soda == nil then\r\n\t\t\tMainScreen.addGameText(\&amp;quot;Please also load the Sample Soda mod.\&amp;quot;);\r\n\t\telse\r\n\t\t\tMainScreen.addGameText(&amp;#039;You insert $1 into the vending machine.  &amp;#039; ..\r\n\t\t\t\t&amp;#039;It spits out a can of diet soda.&amp;#039;);\r\n\r\n\t\t\t-- Set location to be the same location as vending machine.\r\n\t\t\t-- Since the player must be next to the vending machine to use it,\r\n\t\t\t-- this function works fine.  Another (longer) method would be to get\r\n\t\t\t-- the vending machine&amp;#039;s location and set the soda&amp;#039;s location to it.\t\t\t\r\n\t\t\tsoda.moveEntityToSameRoomAsPlayer();\r\n\t\tend\r\n\telse\r\n\t\t-- Player didn&amp;#039;t have enough currency to cover the total cost of transaction.\r\n\t\t-- No currency was deducted.\r\n\t\t\r\n\t\tMainScreen.addGameText(&amp;#039;You need at least $1 to buy a soda.&amp;#039;);\t\r\n\tend\r\n\r\n\treturn true; -- Automatic continue scene\r\nend&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;spawn&amp;quot;: false,&lt;br /&gt;
			&amp;quot;mod&amp;quot;:&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;type&amp;quot;: &amp;quot;ENTITY&amp;quot;,&lt;br /&gt;
				&amp;quot;id&amp;quot;: &amp;quot;Sample Soda&amp;quot;,&lt;br /&gt;
				&amp;quot;name&amp;quot;:&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;literalString&amp;quot;: &amp;quot;Soda&amp;quot;&lt;br /&gt;
				},&lt;br /&gt;
				&amp;quot;description&amp;quot;:&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;literalString&amp;quot;: &amp;quot;A can of diet soda.&amp;quot;&lt;br /&gt;
				},&lt;br /&gt;
				&amp;quot;doUse&amp;quot;:&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;programBoolean&amp;quot;: true&lt;br /&gt;
				},&lt;br /&gt;
				&amp;quot;isUseable&amp;quot;:&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;literalBoolean&amp;quot;: true&lt;br /&gt;
				},&lt;br /&gt;
				&amp;quot;isPickupable&amp;quot;:&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;literalBoolean&amp;quot;: true&lt;br /&gt;
				},&lt;br /&gt;
				&amp;quot;lua&amp;quot;:  &amp;quot;function doUse()\r\n\t-- NOTE: The engine actually has support for food objects that will adjust\r\n\t-- the player&amp;#039;s weight appropriately, however, this is not yet exposed to\r\n\t-- LUA modding as of Feb 2018.  For the purposes of this example, the soda\r\n\t-- will just replenish HP with no other consequences.\r\n\r\n\tplayer = Player.getInstance();\r\n\r\n\tMainScreen.addGameText(&amp;#039;You gulp down the soda.  &amp;#039;);\t\r\n\r\n\tplayer.heal(3); -- Heal 3HP\r\n\r\n\tthis.deleteEntity(); -- Remove entity from world or inventory\r\n\r\n\treturn true; -- Automatic continue scene\r\nend&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>SkyCorp</name></author>
	</entry>
</feed>