<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.sandboxgamemaker.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Creating_easy_spells</id>
		<title>Creating easy spells - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.sandboxgamemaker.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Creating_easy_spells"/>
		<link rel="alternate" type="text/html" href="https://www.sandboxgamemaker.com/wiki/index.php?title=Creating_easy_spells&amp;action=history"/>
		<updated>2026-05-03T02:49:49Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://www.sandboxgamemaker.com/wiki/index.php?title=Creating_easy_spells&amp;diff=876&amp;oldid=prev</id>
		<title>Siimvuss: Created page with &#039;I&#039;ve seen several spells come my way while on the forums, and they&#039;re all pretty cool! But I myself didn&#039;t know how to create spells with different effects until just recently. S…&#039;</title>
		<link rel="alternate" type="text/html" href="https://www.sandboxgamemaker.com/wiki/index.php?title=Creating_easy_spells&amp;diff=876&amp;oldid=prev"/>
				<updated>2010-07-14T16:46:14Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;I&amp;#039;ve seen several spells come my way while on the forums, and they&amp;#039;re all pretty cool! But I myself didn&amp;#039;t know how to create spells with different effects until just recently. S…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I&amp;#039;ve seen several spells come my way while on the forums, and they&amp;#039;re all pretty cool! But I myself didn&amp;#039;t know how to create spells with different effects until just recently. So I decided to create a Tut for easy to create and use spells! I&amp;#039;ll have some of my own, one of Venima&amp;#039;s (with full credit given to him), and components for new spells!&lt;br /&gt;
&lt;br /&gt;
The first spell is a simple light that comes from your right hand (Yes, I know there are already two of these type of spells, however, this spell is specifically like a flashlight :) ):&lt;br /&gt;
&lt;br /&gt;
    spawn_flashlight = [&lt;br /&gt;
       r_type $ENT_ITEM&lt;br /&gt;
       r_icon flashlight&lt;br /&gt;
       r_description &amp;quot;A flashlight for searching with.&amp;quot;&lt;br /&gt;
       r_item_slots $SLOT_RHAND&lt;br /&gt;
&lt;br /&gt;
       r_addowneffect $STATUS_LIGHT 35 1000000000&lt;br /&gt;
&lt;br /&gt;
       r_interact [&lt;br /&gt;
       r_select $rpginteract&lt;br /&gt;
       r_pickup $rpgself&lt;br /&gt;
       ]&lt;br /&gt;
    ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll break each component down, and explain what each does.&lt;br /&gt;
&lt;br /&gt;
    spawn_flashlight = [&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;spawn_yournamehere&amp;quot; encompasses all the remaining components. Without this, there is no spell. The bracket is very, very important!!!&lt;br /&gt;
&lt;br /&gt;
    r_type $ENT_ITEM&lt;br /&gt;
&lt;br /&gt;
This shows what r_type of &amp;quot;ENT&amp;quot; or &amp;quot;Entitiy&amp;quot; the &amp;quot;spawn&amp;quot; is. In this case, it is an item.&lt;br /&gt;
&lt;br /&gt;
    r_icon flashlight&lt;br /&gt;
&lt;br /&gt;
&amp;quot;r_icon&amp;quot; will show the &amp;quot;icon&amp;quot; of the item, when you pull up the inventory. In this case, a flashlight. (This doesn&amp;#039;t work because RPG mode doesn&amp;#039;t have an &amp;quot;icon&amp;quot; for it)&lt;br /&gt;
&lt;br /&gt;
    r_description &amp;quot;A flashlight for searching with.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This gives the description. Make it a one sentence to work best!&lt;br /&gt;
&lt;br /&gt;
    r_item_slots $SLOT_RHAND&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;r_item_slots&amp;quot; is for assigning the item to a certain spot on your character&amp;#039;s body. $SLOT_RHAND is easily understood. Right hand. :P&lt;br /&gt;
&lt;br /&gt;
    r_addowneffect $STATUS_LIGHT 35 1000000000&lt;br /&gt;
&lt;br /&gt;
The addowneffect allows the user to put a certain limitation on the $STATUS. In this case, the $STATUS is LIGHT. There is a circle of light that surrounds the RC and will last for...... well let&amp;#039;s just say it&amp;#039;ll take a while to disappear! :D&lt;br /&gt;
&lt;br /&gt;
    r_interact [&lt;br /&gt;
       r_select $rpginteract&lt;br /&gt;
       r_pickup $rpgself&lt;br /&gt;
       ]&lt;br /&gt;
    ]&lt;br /&gt;
&lt;br /&gt;
This little bit of code round&amp;#039;s out the spell, showing the game engine what the spell is interacting with. Namely, yourself!&lt;br /&gt;
&lt;br /&gt;
One last bit of info. Every time you add a new item/spell, make sure you add:&lt;br /&gt;
&lt;br /&gt;
    r_additem yourspellnamehere&lt;br /&gt;
&lt;br /&gt;
To this:&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    spawn_player = [&lt;br /&gt;
       r_additem item&lt;br /&gt;
       r_additem item2&lt;br /&gt;
       r_additem spell&lt;br /&gt;
       r_additem spell2&lt;br /&gt;
       r_additem frost&lt;br /&gt;
       r_additem magicarrow&lt;br /&gt;
       r_additem light&lt;br /&gt;
       r_additem eth_vis1&lt;br /&gt;
       r_additem minehelm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the flashlight&amp;#039;s case it would look like this:&lt;br /&gt;
&lt;br /&gt;
    spawn_player = [&lt;br /&gt;
       r_additem item&lt;br /&gt;
       r_additem item2&lt;br /&gt;
       r_additem spell&lt;br /&gt;
       r_additem spell2&lt;br /&gt;
       r_additem frost&lt;br /&gt;
       r_additem magicarrow&lt;br /&gt;
       r_additem light&lt;br /&gt;
       r_additem eth_vis1&lt;br /&gt;
       r_additem minehelm&lt;br /&gt;
       r_additem flashlight&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Why the r_additem flashlight?&amp;quot; you might ask. The reason is this. Do you remember what we were spawning at the beginning? Yes! A flashlight!&lt;br /&gt;
&lt;br /&gt;
    spawn_flashlight = [&lt;br /&gt;
&lt;br /&gt;
It will show the game engine which spell you would like to spawn!&lt;br /&gt;
&lt;br /&gt;
Now, for a spell! :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Those are some main components for an $ENT_ITEM. Now, for a spell!&lt;br /&gt;
This is Venima&amp;#039;s so all the right&amp;#039;s go to him!&lt;br /&gt;
&lt;br /&gt;
    spawn_dust = [&lt;br /&gt;
       r_type $ENT_SPELL&lt;br /&gt;
       r_icon losehealth&lt;br /&gt;
       r_description &amp;quot;sprays flames&amp;quot;&lt;br /&gt;
       r_name &amp;quot;Flame Spray&amp;quot;&lt;br /&gt;
       r_spell_type $STYPE_CONE&lt;br /&gt;
       r_spell_gravity 60&lt;br /&gt;
       r_spell_cost 5&lt;br /&gt;
       r_spell_range 8&lt;br /&gt;
       r_spell_effect 5&lt;br /&gt;
       r_addeffect $STATUS_HEALTH -10 1&lt;br /&gt;
&lt;br /&gt;
       r_interact [&lt;br /&gt;
          r_select $rpginteract&lt;br /&gt;
          r_pickup $rpgself&lt;br /&gt;
       ]&lt;br /&gt;
    ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You know what &amp;quot;spawn_dust = [&amp;quot; is, so I don&amp;#039;t need to dissemble. Look at the &amp;quot;r_type&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    r_type $ENT_SPELL&lt;br /&gt;
&lt;br /&gt;
This r_type, is a spell, as indicated by $ENT_SPELL.&lt;br /&gt;
&lt;br /&gt;
The icon, is:&lt;br /&gt;
&lt;br /&gt;
    r_icon losehealth&lt;br /&gt;
&lt;br /&gt;
You all know what this means, however, this icon will show up.&lt;br /&gt;
&lt;br /&gt;
    r_description &amp;quot;sprays flames&amp;quot;&lt;br /&gt;
       r_name &amp;quot;Flame Spray&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You all know what the description does, and the name will appear when you open up the spell&amp;#039;s tab.&lt;br /&gt;
&lt;br /&gt;
The next part is important, so I&amp;#039;ll explain as best as possible:&lt;br /&gt;
&lt;br /&gt;
    r_spell_type $STYPE_CONE&lt;br /&gt;
       r_spell_gravity 60&lt;br /&gt;
       r_spell_cost 5&lt;br /&gt;
       r_spell_range 8&lt;br /&gt;
       r_spell_effect 5&lt;br /&gt;
       r_addeffect $STATUS_HEALTH -10 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The r_spell_type will represent what form the spell will take. There are three forms: Target, Cone, and Self. Alternatively, instead of r_spell_type $STYPE_CONE you may place a 1 next to the r_spell_type.&lt;br /&gt;
&lt;br /&gt;
The r_spell_gravity is easily explained. This will be how much gravity will affect the attack.&lt;br /&gt;
The r_spell_cost is 5. 5 mana. Mana is regenerated so don&amp;#039;t worry about running out!&lt;br /&gt;
The next part is important: the r_spell_range. You can have a long range, or a short range. It&amp;#039;s up to you. However, the range is also affected by the gravity, so make sure these work together. The r_spell_effect I have yet to understand but as far as I know it is alright to leave out. Check out the fireball spell under data/game_rpg.cfg to learn more.&lt;br /&gt;
&lt;br /&gt;
The addeffect:&lt;br /&gt;
&lt;br /&gt;
    r_addeffect $STATUS_HEALTH -10 1&lt;br /&gt;
&lt;br /&gt;
Shows what will happen when the spell reaches it&amp;#039;s intended target. It will affect the health status of the target, reducing it by -10. The 1 next to it signifies that this spell with take health out once. This is not a continually draining spell.&lt;br /&gt;
&lt;br /&gt;
And just like with the flashlight, you must place the r_additem at the end of your &amp;quot;spawn_player&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    spawn_player = [&lt;br /&gt;
       r_additem item&lt;br /&gt;
       r_additem item2&lt;br /&gt;
       r_additem spell&lt;br /&gt;
       r_additem spell2&lt;br /&gt;
       r_additem frost&lt;br /&gt;
       r_additem magicarrow&lt;br /&gt;
       r_additem light&lt;br /&gt;
       r_additem eth_vis1&lt;br /&gt;
       r_additem minehelm&lt;br /&gt;
       r_additem flashlight&lt;br /&gt;
       r_additem dust&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope that you all get some help from this, and will be able to create easy spells! I will go into more in-depth spells later, but this took awhile so just hold your horses. Don&amp;#039;t hesitate to ask questions!&lt;br /&gt;
Arc&lt;/div&gt;</summary>
		<author><name>Siimvuss</name></author>	</entry>

	</feed>