https://drl.chaosforge.org/w/index.php?title=Modding:being_API_(0.9.9.7)&feed=atom&action=historyModding:being API (0.9.9.7) - Revision history2024-03-28T19:52:51ZRevision history for this page on the wikiMediaWiki 1.21.1https://drl.chaosforge.org/w/index.php?title=Modding:being_API_(0.9.9.7)&diff=2638&oldid=prevRabinowitz: being:alt_fire2013-07-13T00:59:58Z<p>being:alt_fire</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 00:59, 13 July 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 37:</td>
<td colspan="2" class="diff-lineno">Line 37:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   |{{modarg|boolean}}|{{moddef|list|attack|cln||Coord|target}}</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   |{{modarg|boolean}}|{{moddef|list|attack|cln||Coord|target}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   |{{modarg|boolean}}|{{moddef|list|fire|cln||Coord|target|Item|weapon}}</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   |{{modarg|boolean}}|{{moddef|list|fire|cln||Coord|target|Item|weapon}}</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; 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;"><div>   |{{modarg|boolean}}|{{moddef|list|<del class="diffchange diffchange-inline">fire</del>|cln||Coord|target|Item|weapon}}</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>   |{{modarg|boolean}}|{{moddef|list|<ins class="diffchange diffchange-inline">alt_fire</ins>|cln||Coord|target|Item|weapon}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   |{{modarg|boolean}}|{{moddef|list|reload|cln}}</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   |{{modarg|boolean}}|{{moddef|list|reload|cln}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   |{{modarg|boolean}}|{{moddef|list|alt_reload|cln}}</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   |{{modarg|boolean}}|{{moddef|list|alt_reload|cln}}</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 155:</td>
<td colspan="2" class="diff-lineno">Line 155:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>:'''Returns''': ''True'' if the weapon was fired.  ''False'' if it failed.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>:'''Returns''': ''True'' if the weapon was fired.  ''False'' if it failed.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>----</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>----</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; 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;"><div>;{{moddef|desc|<del class="diffchange diffchange-inline">fire</del>|cln|boolean|Coord|target|Item|weapon}}</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>;{{moddef|desc|<ins class="diffchange diffchange-inline">alt_fire</ins>|cln|boolean|Coord|target|Item|weapon}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Attempts to fire a weapon using its alternate fire mode.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Attempts to fire a weapon using its alternate fire mode.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>:''target'': The location to fire at.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>:''target'': The location to fire at.</div></td></tr>
</table>Rabinowitzhttps://drl.chaosforge.org/w/index.php?title=Modding:being_API_(0.9.9.7)&diff=2593&oldid=prevShark20061: Updating with 0997 info2013-06-09T21:12:47Z<p>Updating with 0997 info</p>
<a href="https://drl.chaosforge.org/w/index.php?title=Modding:being_API_(0.9.9.7)&diff=2593&oldid=2465">Show changes</a>Shark20061https://drl.chaosforge.org/w/index.php?title=Modding:being_API_(0.9.9.7)&diff=2465&oldid=prevYaflhdztioxo: Created page with "WIP pulled from 096 still investigating ------- == API == The Thing API can also be used with beings. {|class="wikitable" style="border: 2px solid ..."2013-04-20T23:11:53Z<p>Created page with "WIP pulled from 096 still investigating ------- == API == The <a href="/wiki/Modding:Thing#API" title="Modding:Thing">Thing API</a> can also be used with beings. {|class="wikitable" style="border: 2px solid ..."</p>
<p><b>New page</b></p><div>WIP pulled from 096 still investigating <br />
<br />
<br />
-------<br />
<br />
<br />
<br />
<br />
<br />
== API ==<br />
The [[Modding:Thing#API|Thing API]] can also be used with beings.<br />
<br />
{|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
! colspan="2" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|Being Interface<br />
{{Table2Col<br />
|es=background: #333;<br />
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|[[Modding:Being|Being]]|being.[[#being_new|new]]([[Modding:Being|Being ID]] id) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_destroy|destroy]]('''boolean''' silent) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_kill|kill]]('''boolean''' overkill) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_ressurect|ressurect]]('''integer''' rrange) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_apply_damage|apply_damage]]('''integer''' damage, [[Modding:Constants#BodyTarget|BodyTarget]] target, [[Modding:Constants#DamageType|DamageType]] damageType) <br />
|'''string'''|[[Modding:Being|Being]]&#058;[[#being_get_name|get_name]]('''boolean''' known, '''boolean''' capitalized) <br />
|[[Modding:Item|Item]]|[[Modding:Being|Being]]&#058;[[#being_get_inv_item|get_inv_item]]('''integer''' slot) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_set_inv_item|set_inv_item]]('''integer''' slot, [[Modding:Item|Item]] item) <br />
|[[Modding:Item|Item]]|[[Modding:Being|Being]]&#058;[[#being_get_eq_item|get_eq_item]]([[Modding:Constants#Equip Slots|Equip Slot]] slot) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_set_eq_item|set_eq_item]]([[Modding:Constants#Equip Slots|Equip Slot]] slot, [[Modding:Item|Item]] item) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_play_sound|play_sound]]('''Sound ID''' sound) <br />
|'''integer'''|[[Modding:Being|Being]]&#058;[[#being_get_total_resistance|get_total_resistance]]([[Modding:Constants#Resistance|Resistance]] resistance, [[Modding:Constants#BodyTarget|BodyTarget]] target) <br />
|'''boolean'''|[[Modding:Being|Being]]&#058;[[#being_use|use]]('''integer''' slot) <br />
|'''boolean'''|[[Modding:Being|Being]]&#058;[[#being_wear|wear]]('''integer''' slot) <br />
|'''boolean'''|[[Modding:Being|Being]]&#058;[[#being_pickup|pickup]]([[Modding:Coord|Coord]] pos) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_attack|attack]]([[Modding:Coord|Coord]] or [[Modding:Being|Being]] target) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_fire|fire]]([[Modding:Coord|Coord]] target, [[Modding:Item|Item]] weapon) <br />
|'''boolean'''|[[Modding:Being|Being]]&#058;[[#being_reload|reload]]() <br />
|'''integer'''|[[Modding:Being|Being]]&#058;[[#being_direct_seek|direct_seek]]([[Modding:Coord|Coord]] target) <br />
|'''boolean'''|[[Modding:Being|Being]]&#058;[[#being_path_find|path_find]]([[Modding:Coord|Coord]] target, '''integer''' cutoff, '''integer''' maximum) <br />
|'''integer'''|[[Modding:Being|Being]]&#058;[[#being_path_next|path_next]]() <br />
|[[Modding:Coord|Coord]]|[[Modding:Being|Being]]&#058;[[#being_flock_target|flock_target]]('''integer''' range, '''integer''' mind, '''integer''' maxd) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_msg|msg]]('''string''' msg_player, '''string''' msg_being) <br />
|[[Modding:Item|Item]]|[[Modding:Being|Being]]&#058;[[#being_select_slot_by_letter|select_slot_by_letter]]('''string''' letter) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_phase|phase]]([[Modding:Cell|Cell ID]] cell) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_spawn|spawn]]([[Modding:Being|Being ID]] being) <br />
|'''boolean'''|[[Modding:Being|Being]]&#058;[[#being_is_visible|is_visible]]() <br />
|'''boolean'''|[[Modding:Being|Being]]&#058;[[#being_is_player|is_player]]() <br />
|'''integer'''|[[Modding:Being|Being]]&#058;[[#being_set_items|set_items]]([[Modding:ItemSet|ItemSet]] set) <br />
|'''void'''|[[Modding:Being|Being]]&#058;[[#being_nuke|nuke]]('''integer''' time) <br />
|[[Modding:Item|Item]], '''boolean'''|[[Modding:Being|Being]]&#058;[[#being_pick_mod_item|pick_mod_item]]('''string''' modletter, '''integer''' techbonus)<br />
|}}<br />
|}<br />
<br />
{{Anchor|being_new}}<br />
;being.new([[Modding:Being|Being ID]] id) &rarr; [[Modding:Being|Being]]<br />
:This creates a newly allocated being of the appropriate type. The being won't exist on the map until it is placed by e.g. Level.drop_being.<br />
----<br />
{{Anchor|being_destroy}}<br />
;[[Modding:Being|Being]]&#058;destroy('''boolean''' silent) <br />
:Deallocates the memory associated with the being and removes it from the level (if applicable). The normal results of killing a being (e.g. leaving a corpse) are ignored. The ''silent'' parameter is optional. If true, applicable OnKill and OnKillAll hooks and events will also be ignored.<br />
----<br />
{{Anchor|being_kill}}<br />
;[[Modding:Being|Being]]&#058;kill('''boolean''' overkill) <br />
:Kills the being. If the optional ''overkill'' parameter is true, then the being will be gibbed.<br />
----<br />
{{Anchor|being_ressurect}}<br />
;[[Modding:Being|Being]]&#058;ressurect('''integer''' rrange) <br />
:Resurrects a single corpse that is found within a square of side-length 2 &times; ''rrange'' + 1, centered around the being. Nearer corpses are preferred. The corpse must not have another being standing on it and must be within sight of the being (as determined by the enemy line-of-sight algorithm). The resurrected being (if any) will have BF_NOEXP set. Messages are included.<br />
----<br />
{{Anchor|being_apply_damage}}<br />
;[[Modding:Being|Being]]&#058;apply_damage('''integer''' damage, [[Modding:Constants#BodyTarget|BodyTarget]] target, [[Modding:Constants#DamageType|DamageType]] damageType) <br />
:Deals damage to the being using the given body target and damage type. (The default damage type is bullet damage.)<br />
----<br />
{{Anchor|being_get_name}}<br />
;[[Modding:Being|Being]]&#058;get_name('''boolean''' known, '''boolean''' capitalized) &rarr; '''string'''<br />
:Returns the name of the being. If ''known'' is true, "the" is added, otherwise "a" or "an" is added. If BF_UNIQUENAME is set for the being, then no article is used in either case. If ''capitalized'' is true, then the first letter will be capitalized.<br />
----<br />
{{Anchor|being_get_inv_item}}<br />
;[[Modding:Being|Being]]&#058;get_inv_item('''integer''' slot) &rarr; [[Modding:Item|Item]]<br />
;[[Modding:Being|Being]].inv&#091;'''integer''' slot] &rarr; [[Modding:Item|Item]]<br />
:Returns the item in the given slot in the being's inventory. If the slot is empty, nil is returned instead. <br />
----<br />
{{Anchor|being_set_inv_item}}<br />
;[[Modding:Being|Being]]&#058;set_inv_item('''integer''' slot, [[Modding:Item|Item]] item) <br />
;[[Modding:Being|Being]].inv&#091;'''integer''' slot] = [[Modding:Item|Item]] item <br />
:Sets the given slot in the being's inventory to the given item. If the slot wasn't empty before, the previous constents are lost.<br />
----<br />
{{Anchor|being_get_eq_item}}<br />
;[[Modding:Being|Being]]&#058;get_eq_item([[Modding:Constants#Equip Slots|Equip Slot]] slot) &rarr; [[Modding:Item|Item]]<br />
;[[Modding:Being|Being]].eq&#091;[[Modding:Constants#Equip Slots|Equip Slot]] slot] &rarr; [[Modding:Item|Item]]<br />
:Returns the item in the given equipment slot of the being. If the slot is empty, nil is returned instead. There are additional shorthands for each equipment slot: the ''eq'' table has .weapon, .prepared, .armor, and .boots fields.<br />
----<br />
{{Anchor|being_set_eq_item}}<br />
;[[Modding:Being|Being]]&#058;set_eq_item([[Modding:Constants#Equip Slots|Equip Slot]] slot, [[Modding:Item|Item]] item) <br />
;[[Modding:Being|Being]].eq&#091;[[Modding:Constants#Equip Slots|Equip Slot]] slot] = [[Modding:Item|Item]] item <br />
:Sets the being's equipment slot to the given item. Any item that was previously in that slot is lost. There are additional shorthands for each equipment slot: the ''eq'' table has .weapon, .prepared, .armor, and .boots fields.<br />
----<br />
{{Anchor|being_play_sound}}<br />
;[[Modding:Being|Being]]&#058;play_sound('''Sound ID''' sound) <br />
:Plays the given sound as if it came from the being's position.<br />
----<br />
{{Anchor|being_get_total_resistance}}<br />
;[[Modding:Being|Being]]&#058;get_total_resistance([[Modding:Constants#Resistance|Resistance]] resistance, [[Modding:Constants#BodyTarget|BodyTarget]] target) &rarr; '''integer'''<br />
:Calculates the being's effective resistance against attacks of the given target (default is body). This accounts for inherent resists as well as equipment bonuses.<br />
----<br />
{{Anchor|being_use}}<br />
;[[Modding:Being|Being]]&#058;use('''integer''' slot) &rarr; '''boolean'''<br />
;[[Modding:Being|Being]]&#058;use([[Modding:Item|Item]] item) &rarr; '''boolean'''<br />
:This makes the being use the given consumable item from its inventory. The function always returns false. (Bug: it is supposed to return true on success.)<br />
----<br />
{{Anchor|being_wear}}<br />
;[[Modding:Being|Being]]&#058;wear('''integer''' slot) &rarr; '''boolean'''<br />
;[[Modding:Being|Being]]&#058;wear([[Modding:Item|Item]] item) &rarr; '''boolean'''<br />
:This makes the being wear the given eqipment from its inventory. Returns true on success and false on failure.<br />
----<br />
{{Anchor|being_pickup}}<br />
;[[Modding:Being|Being]]&#058;pickup([[Modding:Coord|Coord]] pos) &rarr; '''boolean'''<br />
:This makes the being pick up the item at the given position. ''pos'' is optional; it defaults to the being's position. Returns true on success and false on failure.<br />
----<br />
{{Anchor|being_attack}}<br />
;[[Modding:Being|Being]]&#058;attack([[Modding:Coord|Coord]] or [[Modding:Being|Being]] target) <br />
:This makes the being do a standard melee attack against the targeted being or coord.<br />
----<br />
{{Anchor|being_fire}}<br />
;[[Modding:Being|Being]]&#058;fire([[Modding:Coord|Coord]] target, [[Modding:Item|Item]] weapon) <br />
:This makes the being fire at ''target'' with ''weapon''.<br />
----<br />
{{Anchor|being_reload}}<br />
;[[Modding:Being|Being]]&#058;reload() &rarr; '''boolean'''<br />
:This makes the being reload its currently equipped weapon. The return value is true if there being had at least some of the appropriate ammo to attempt reloading with.<br />
----<br />
{{Anchor|being_direct_seek}}<br />
;[[Modding:Being|Being]]&#058;direct_seek([[Modding:Coord|Coord]] target) &rarr; '''integer'''<br />
:This makes the being take a step towards the target. The being will always try to travel in a direct path. The return value is either 0, 1, 2, or 3. 0 indicates success, 1 indicates that a wall blocked the move, 2 indicates that a door blocked the move, and 3 indicates that a being blocked the move.<br />
----<br />
{{Anchor|being_path_find}}<br />
;[[Modding:Being|Being]]&#058;path_find([[Modding:Coord|Coord]] target, '''integer''' cutoff, '''integer''' maximum) &rarr; '''boolean'''<br />
:This attempts to calculate a path between the being and ''target''. The ''cutoff'' and ''maximum'' parameters are somewhat technical, but basically they indicate how much time should be spend searching for a path. DoomRL uses 40, 200 for bosses and 10, 40 for normal enemies. The path will be remembered by the being, and can be followed using path_next. Modders should keep in mind that path-finding is a somewhat expensive operation, especially for large ''cutoff'' and ''maximum''. The return value indicates whether a path was found. Even if no path was found, a path will be loaded that will try to take the being closer to the target (although this path may be empty). This uses the AStar searching algorithm using Euclidean distance as a heuristic. The search is aborted if ''maximum'' nodes are expanded without finding the target or it ''cutoff'' nodes are expanded without getting closer to the target. When aborted, a path is created to the closest expanded node to the target in terms of the heuristic.<br />
----<br />
{{Anchor|being_path_next}}<br />
;[[Modding:Being|Being]]&#058;path_next() &rarr; '''integer'''<br />
:This causes the being to take a step along the path last calculated by path_find. The return value follows the pattern of direct_seek.<br />
----<br />
{{Anchor|being_flock_target}}<br />
;[[Modding:Being|Being]]&#058;flock_target('''integer''' range, '''integer''' mind, '''integer''' maxd) &rarr; [[Modding:Coord|Coord]]<br />
:This looks for the closest being of the same type to the being (within a square ''range''). If the being is farther than ''maxd'' away, then its position is returned. If it is closer than ''mind'', then a position opposite from the closest with respect to the being is returned. Otherwise (or if there is no nearby being of the same type), a random coord from the scanning area is returned.<br />
----<br />
{{Anchor|being_msg}}<br />
;[[Modding:Being|Being]]&#058;msg('''string''' msg_player, '''string''' msg_being) <br />
:If the being is the player, then ''msg_player'' is displayed. If the being is not the player, but visible to the player, the ''msg_being'' is displayed. If either message is nil it is ignored.<br />
----<br />
{{Anchor|being_select_slot_by_letter}}<br />
;[[Modding:Being|Being]]&#058;select_slot_by_letter('''string''' letter) &rarr; [[Modding:Item|Item]]<br />
:Returns the one of the being's equipment where "a" is for armor, "b" is for boots, "w" is for weapon, and "p" is for the prepared slot. If the slot is empty, nil is returned.<br />
----<br />
{{Anchor|being_phase}}<br />
;[[Modding:Being|Being]]&#058;phase([[Modding:Cell|Cell ID]] cell) <br />
:If ''cell'' is omitted, then the being is displaced randomly as if it used a [[phase device]] (without the flashy interface stuff). If the cell is included, the being is displaced to a random cell of the given cell id. If the chosen cell is occupied, a nearby cell is used. If no such cell exists, a random cell is chosen.<br />
----<br />
{{Anchor|being_spawn}}<br />
;[[Modding:Being|Being]]&#058;spawn([[Modding:Being|Being ID]] being) <br />
;[[Modding:Being|Being]]&#058;spawn([[Modding:Being|Being]] being) <br />
:Drops a new being of the appropriate type (or the given being) nearby. The dropped being is set with the BF_NOEXP flag.<br />
----<br />
{{Anchor|being_is_visible}}<br />
;[[Modding:Being|Being]]&#058;is_visible() &rarr; '''boolean'''<br />
:Determines if the player can see the being.<br />
----<br />
{{Anchor|being_is_player}}<br />
;[[Modding:Being|Being]]&#058;is_player() &rarr; '''boolean'''<br />
:Determines if the being is the player.<br />
----<br />
{{Anchor|being_set_items}}<br />
;[[Modding:Being|Being]]&#058;set_items([[Modding:ItemSet|ItemSet]] set) &rarr; '''integer'''<br />
:Counts the number of the being's equipped items that belong to the given set.<br />
----<br />
{{Anchor|being_nuke}}<br />
;[[Modding:Being|Being]]&#058;nuke('''integer''' time) <br />
:Sets the nuke timer to ''time'' and changes the cell under the being to the nuke cell. By default, ''time'' is 1. (Setting the nuke time to 0 will disable the countdown.)<br />
----<br />
{{Anchor|being_pick_mod_item}}<br />
;[[Modding:Being|Being]]&#058;pick_mod_item('''string''' modletter, '''integer''' techbonus) &rarr; [[Modding:Item|Item]], '''boolean'''<br />
:This only works for the player. This gives the player the item select menu used by mods, and calculates whether the mod is legal (using the given ''techbonus''). This includes assembly checking. The first return value is the item on success. The second return value is true on</div>Yaflhdztioxo