<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://drl.chaosforge.org/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://drl.chaosforge.org/w/index.php?action=history&amp;feed=atom&amp;title=Modding%3Aplayer_API_%280.9.9.7%29</id>
		<title>Modding:player API (0.9.9.7) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://drl.chaosforge.org/w/index.php?action=history&amp;feed=atom&amp;title=Modding%3Aplayer_API_%280.9.9.7%29"/>
		<link rel="alternate" type="text/html" href="https://drl.chaosforge.org/w/index.php?title=Modding:player_API_(0.9.9.7)&amp;action=history"/>
		<updated>2026-05-29T20:56:32Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21.1</generator>

	<entry>
		<id>https://drl.chaosforge.org/w/index.php?title=Modding:player_API_(0.9.9.7)&amp;diff=2566&amp;oldid=prev</id>
		<title>Shark20061: Created page with &quot;''This page is currently under construction.''  You can also use the being API and thing API with the player, since it is also a being.  {|class=&quot;wikitable&quot; style=&quot;border: 2px so...&quot;</title>
		<link rel="alternate" type="text/html" href="https://drl.chaosforge.org/w/index.php?title=Modding:player_API_(0.9.9.7)&amp;diff=2566&amp;oldid=prev"/>
				<updated>2013-05-30T21:37:40Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;This page is currently under construction.&amp;#039;&amp;#039;  You can also use the being API and thing API with the player, since it is also a being.  {|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;border: 2px so...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;''This page is currently under construction.''&lt;br /&gt;
&lt;br /&gt;
You can also use the being API and thing API with the player, since it is also a being.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: darkred; color: yellow; font-size: 120%; text-align: center&amp;quot;|Player Interface&lt;br /&gt;
 {{Table2Col&lt;br /&gt;
  |es=background: #333;&lt;br /&gt;
  |c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px;&lt;br /&gt;
  |c2=padding:0px 2px;&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|set_affect|col||AffectID|id|integer|duration}}&lt;br /&gt;
  |{{modarg|integer}}|{{moddef|list|get_affect_time|cln||AffectID|id}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|remove_affect|cln||AffectID|id}}&lt;br /&gt;
  |{{modarg|boolean}}|{{moddef|list|is_affect|cln||AffectID|id}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|add_exp|cln||integer|xp}}&lt;br /&gt;
  |{{modarg|boolean}}|{{moddef|list|has_won|cln}}&lt;br /&gt;
  |{{modarg|integer}}|{{moddef|list|get_trait|cln||TraitID}}&lt;br /&gt;
  |{{modarg|string}}|{{moddef|list|get_trait_hist|cln}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|power_backpack|cln}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|win|cln}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|continue_game|cln}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|choose_trait|cln}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|level_up|cln}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|exit|cln||string|[next]}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|exit|cln||integer|[next]}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|quick_weapon|cln||ItemID|id}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|set_inv_size|cln||integer|size}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|mortem_print|cln||string|line}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|remove_medals|cln||table|medallist}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|remove_award|cln||AwardID|award}}&lt;br /&gt;
  |{{modarg|void}}|{{moddef|list|set_award|cln||AwardID|award|integer|level}}&lt;br /&gt;
  |{{modarg|boolean}}|{{moddef|list|has_award|cln||AwardID|award|integer|level}}&lt;br /&gt;
  |{{modarg|integer}}|{{moddef|list|get_award|cln||AwardID|award}}&lt;br /&gt;
  |{{modarg|void}}   |{{moddef|list|remove_medal|cln||MedalID|medal}}&lt;br /&gt;
  |{{modarg|void}}   |{{moddef|list|add_medal|cln||MedalID|medal}}&lt;br /&gt;
  |{{modarg|boolean}}|{{moddef|list|has_medal|cln||MedalID|medal}}&lt;br /&gt;
  |{{modarg|void}}   |{{moddef|list|remove_badge|cln||BadgeID|badge}}&lt;br /&gt;
  |{{modarg|void}}   |{{moddef|list|add_badge|cln||BadgeID|badge}}&lt;br /&gt;
  |{{modarg|boolean}}|{{moddef|list|has_badge|cln||BadgeID|badge}}&lt;br /&gt;
  |{{modarg|void}}   |{{moddef|list|remove_assembly|cln||ModArrayID|assembly}}&lt;br /&gt;
  |{{modarg|void}}   |{{moddef|list|add_assembly|cln||ModArrayID|assembly}}&lt;br /&gt;
  |{{modarg|boolean}}|{{moddef|list|has_assembly|cln||ModArrayID|assembly}}&lt;br /&gt;
  |{{modarg|void}}   |{{moddef|list|remove_found_item|cln||ItemID|item}}&lt;br /&gt;
  |{{modarg|void}}   |{{moddef|list|add_found_item|cln||ItemID|item}}&lt;br /&gt;
  |{{modarg|boolean}}|{{moddef|list|has_found_item|cln||ItemID|item}}&lt;br /&gt;
  |{{modarg|void}}   |{{moddef|list|add_history|cln||string|line}}&lt;br /&gt;
  |}}&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|set_affect|col||AffectID|id|integer|duration}}&lt;br /&gt;
Adds the indicated affect to the player.&lt;br /&gt;
:''id'': The ID of the affect to add.&lt;br /&gt;
:''duration'': The number of actions to add the affect for.  If the affect is already active, the duration is extended by this amount.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|get_affect_time|cln|integer|AffectID|id}}&lt;br /&gt;
Gets the remaining duration of the indicated affect.&lt;br /&gt;
:''id'': The ID of the affect to get the duration for.&lt;br /&gt;
:'''Returns''': The remaining duration of the affect.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|remove_affect|cln||AffectID|id}}&lt;br /&gt;
Removes the indicated affect from the player.&lt;br /&gt;
:''id'': The ID of the affect to remove.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|is_affect|cln|boolean|AffectID|id}}&lt;br /&gt;
Checks to see if the given affect is active on the player.&lt;br /&gt;
:''id'': The ID of the affect to check for.&lt;br /&gt;
:'''Returns''': ''True'' if the affect is currently active on the player, ''False'' if not.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|add_exp|cln||integer|xp}}&lt;br /&gt;
Gives the player extra experience points.&lt;br /&gt;
:''xp'': The amount of experience to add.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|has_won|cln|boolean}}&lt;br /&gt;
Indicates whether the player has won or not.&lt;br /&gt;
:'''Returns''': ''True'' if the player has won the game, ''False'' if not.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|get_trait|cln|integer|TraitID}}&lt;br /&gt;
integer player:get_trait ( integer trait )&lt;br /&gt;
Gets the current level of a given trait.&lt;br /&gt;
:''trait'': The trait to get the level for.&lt;br /&gt;
:'''Returns''': The level of the trait.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|get_trait_hist|cln|string}}&lt;br /&gt;
Gets the history string for the player's traits (&amp;quot;Iro-&amp;gt;Iro-&amp;gt;HR&amp;quot;).&lt;br /&gt;
:'''Returns''': The history string.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|power_backpack|cln}}&lt;br /&gt;
Gives the player the BF_BACKPACK flag and re-packs the ammo items in the inventory.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|win|cln}}&lt;br /&gt;
Makes the player win the game and ends the game at the end of the turn.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|continue_game|cln}}&lt;br /&gt;
Stops the game from ending at the end of the turn.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|choose_trait|cln}}&lt;br /&gt;
Opens the trait menu and allows the player to pick a new trait.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|level_up|cln}}&lt;br /&gt;
Increments the player's level count, calls the level up hooks, opens the trait menu, and prints the appropriate messages.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|exit|cln||string|[next]}}&lt;br /&gt;
;{{moddef|desc|exit|cln||integer|[next]}}&lt;br /&gt;
Leaves the current level and goes to the specified level.&lt;br /&gt;
:''next'': ''Optional.'' The string ID of the special level to go to, or the number of the level in the episode to exit to.  If omitted, the default is to go to the next numbered level in the episode.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|quick_weapon|cln||ItemID|id}}&lt;br /&gt;
Quick-swaps the equipped weapon with indicated weapon ID, if it is in the player's inventory.&lt;br /&gt;
:''id'': The id of the weapon to swap to.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|set_inv_size|cln||integer|size}}&lt;br /&gt;
Sets the number of usable slots in the player's inventory.&lt;br /&gt;
:''size'': A number from 1 to MAX_INV_SIZE to set the number of available slots to.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|mortem_print|cln||string|line}}&lt;br /&gt;
Writes a line of the mortem.  Can only be used while printing the mortem.&lt;br /&gt;
:''line'': The text to write.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|remove_medals|cln||table|medallist}}&lt;br /&gt;
Removes specified medals from the player's earned medals list.&lt;br /&gt;
:''medallist'': The list of medals to remove.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|remove_award|cln||AwardID|award}}&lt;br /&gt;
Removes a custom award from the player's data.&lt;br /&gt;
:''award'': The award to remove.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|set_award|cln||AwardID|award|integer|level}}&lt;br /&gt;
Grants the indicated award to the player.&lt;br /&gt;
:''award'': The award to give.&lt;br /&gt;
:''level'': The quality level of the award to give.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|has_award|cln|boolean|AwardID|award|integer|level}}&lt;br /&gt;
Indicates if the player has earned the specified award.&lt;br /&gt;
:''award'': The award to check for.&lt;br /&gt;
:''level'': The minimum quality level of the award to check for.&lt;br /&gt;
:'''Returns''': ''True'' if the player has at least the given level of the given award, ''False'' otherwise.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|get_award|cln|integer|AwardID|award}}&lt;br /&gt;
Gets the quality level of a specified award.&lt;br /&gt;
:''award'': The award to look for.&lt;br /&gt;
:'''Returns''': The current level of the award earned.  0 is returned if the award has not been earned at all.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|remove_medal|cln||MedalID|medal}}&lt;br /&gt;
Removes a medal from the player's earned medals.&lt;br /&gt;
:''medal'': The medal to remove.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|add_medal|cln||MedalID|medal}}&lt;br /&gt;
Grants a medal to the player.&lt;br /&gt;
:''medal'': The medal to give.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|has_medal|cln|boolean|MedalID|medal}}&lt;br /&gt;
Checks if the player has a specified medal.&lt;br /&gt;
:''medal'': The medal to check for.&lt;br /&gt;
:'''Returns''': ''True'' if the player has earned the medal, ''False'' if they have not.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|remove_badge|cln||BadgeID|badge}}&lt;br /&gt;
Removes a badge from the player's earned badges.&lt;br /&gt;
:''badge'': The badge to remove.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|add_badge|cln||BadgeID|badge}}&lt;br /&gt;
Grants a badge to the player.&lt;br /&gt;
:''badge'': The badge to add.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|has_badge|cln|boolean|BadgeID|badge}}&lt;br /&gt;
Checks to see if the player has the specified badge.&lt;br /&gt;
:''badge'': The badge to check for.&lt;br /&gt;
:'''Returns''': ''True'' if the player has earned the indicated badge, ''False'' if not.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|remove_assembly|cln||ModArrayID|assembly}}&lt;br /&gt;
Removes an assembly from the list of created assemblies.&lt;br /&gt;
:''assembly'': The assembly to remove.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|add_assembly|cln||ModArrayID|assembly}}&lt;br /&gt;
Adds an assembly to the list of created assemblies.&lt;br /&gt;
:''assembly'': The assembly to add.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|has_assembly|cln|boolean|ModArrayID|assembly}}&lt;br /&gt;
Checks to see if the player has the specified assembly in the list of created assemblies.&lt;br /&gt;
:''assembly'': The assembly to check for.&lt;br /&gt;
:'''Returns''': ''True'' if the assembly is in the list, ''False'' if it is not.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|remove_found_item|cln||ItemID|item}}&lt;br /&gt;
Removes the indicated item from the list of found items.&lt;br /&gt;
:''item'': The item to remove.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|add_found_item|cln||ItemID|item}}&lt;br /&gt;
Adds the indicated item to the list of found items.&lt;br /&gt;
:''item'': The item to add.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|has_found_item|cln|boolean|ItemID|item}}&lt;br /&gt;
Checks to see if the player has the indicated item.&lt;br /&gt;
:''item'': The item to check for.&lt;br /&gt;
:'''Returns''': ''True'' if the player has found the item, ''False'' if they have not.&lt;br /&gt;
----&lt;br /&gt;
;{{moddef|desc|add_history|cln||string|line}}&lt;br /&gt;
Adds a line to the history section of the mortem.  Can be called anywhere prior to the end of printing the mortem.&lt;br /&gt;
:''line'': The line of text to add.  Use &amp;quot;@1&amp;quot; in the string to insert the current depth.&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Shark20061</name></author>	</entry>

	</feed>