<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pmdo.pmdcollab.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Tutorial%3AStoring_Custom_Data_on_Pok%C3%A9mon</id>
	<title>Tutorial:Storing Custom Data on Pokémon - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pmdo.pmdcollab.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Tutorial%3AStoring_Custom_Data_on_Pok%C3%A9mon"/>
	<link rel="alternate" type="text/html" href="https://wiki.pmdo.pmdcollab.org/wiki/index.php?title=Tutorial:Storing_Custom_Data_on_Pok%C3%A9mon&amp;action=history"/>
	<updated>2026-07-31T08:25:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.pmdo.pmdcollab.org/wiki/index.php?title=Tutorial:Storing_Custom_Data_on_Pok%C3%A9mon&amp;diff=4611&amp;oldid=prev</id>
		<title>Imbion: Imbion moved page Storing Custom Data on Pokémon to Tutorial:Storing Custom Data on Pokémon</title>
		<link rel="alternate" type="text/html" href="https://wiki.pmdo.pmdcollab.org/wiki/index.php?title=Tutorial:Storing_Custom_Data_on_Pok%C3%A9mon&amp;diff=4611&amp;oldid=prev"/>
		<updated>2025-10-16T15:45:27Z</updated>

		<summary type="html">&lt;p&gt;Imbion moved page &lt;a href=&quot;/Storing_Custom_Data_on_Pok%C3%A9mon&quot; class=&quot;mw-redirect&quot; title=&quot;Storing Custom Data on Pokémon&quot;&gt;Storing Custom Data on Pokémon&lt;/a&gt; to &lt;a href=&quot;/Tutorial:Storing_Custom_Data_on_Pok%C3%A9mon&quot; title=&quot;Tutorial:Storing Custom Data on Pokémon&quot;&gt;Tutorial:Storing Custom Data on Pokémon&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:45, 16 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Imbion</name></author>
	</entry>
	<entry>
		<id>https://wiki.pmdo.pmdcollab.org/wiki/index.php?title=Tutorial:Storing_Custom_Data_on_Pok%C3%A9mon&amp;diff=3000&amp;oldid=prev</id>
		<title>Shitpost Sunkern: Created page with &quot;Each &lt;code&gt; Character&lt;/code&gt; has a &lt;code&gt; LuaData&lt;/code&gt; property that can be used to store custom data. This can be useful as an alternative to a raw Script Variable since the data will follow a Pokémon specifically, and won&#039;t need to be indexed in some other way.  A &lt;code&gt;Character&lt;/code&gt;&#039;s &lt;code&gt;LuaData&lt;/code&gt; can be accessed by calling it in a Lua script:      [char].LuaData  &lt;code&gt;LuaData&lt;/code&gt; is just...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.pmdo.pmdcollab.org/wiki/index.php?title=Tutorial:Storing_Custom_Data_on_Pok%C3%A9mon&amp;diff=3000&amp;oldid=prev"/>
		<updated>2025-08-09T12:27:42Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Each &amp;lt;code&amp;gt;&lt;a href=&quot;/wiki/index.php?title=Character_Reference&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Character Reference (page does not exist)&quot;&gt; Character&lt;/a&gt;&amp;lt;/code&amp;gt; has a &amp;lt;code&amp;gt;&lt;a href=&quot;/wiki/index.php?title=Character_Reference&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Character Reference (page does not exist)&quot;&gt; LuaData&lt;/a&gt;&amp;lt;/code&amp;gt; property that can be used to store custom data. This can be useful as an alternative to a raw &lt;a href=&quot;/wiki/index.php?title=Script_Variable&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Script Variable (page does not exist)&quot;&gt;Script Variable&lt;/a&gt; since the data will follow a Pokémon specifically, and won&amp;#039;t need to be indexed in some other way.  A &amp;lt;code&amp;gt;Character&amp;lt;/code&amp;gt;&amp;#039;s &amp;lt;code&amp;gt;LuaData&amp;lt;/code&amp;gt; can be accessed by calling it in a Lua script:      [char].LuaData  &amp;lt;code&amp;gt;LuaData&amp;lt;/code&amp;gt; is just...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Each &amp;lt;code&amp;gt;[[Character Reference | Character]]&amp;lt;/code&amp;gt; has a &amp;lt;code&amp;gt;[[Character Reference#LuaData | LuaData]]&amp;lt;/code&amp;gt; property that can be used to store custom data. This can be useful as an alternative to a raw [[Script Variable]] since the data will follow a Pokémon specifically, and won&amp;#039;t need to be indexed in some other way.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;Character&amp;lt;/code&amp;gt;&amp;#039;s &amp;lt;code&amp;gt;LuaData&amp;lt;/code&amp;gt; can be accessed by calling it in a Lua script:&lt;br /&gt;
&lt;br /&gt;
    [char].LuaData&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;LuaData&amp;lt;/code&amp;gt; is just a Lua table, so any function or index into it works like any other Lua table. For example, you can set and check values like so:&lt;br /&gt;
&lt;br /&gt;
    [char].LuaData.nature = &amp;quot;adamant&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    if [char].LuaData.pointsEarned &amp;gt; 100 then&lt;br /&gt;
        -- do something&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
To delete a variable in &amp;lt;code&amp;gt;LuaData&amp;lt;/code&amp;gt;, set it to &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt;, just like any other variable:&lt;br /&gt;
&lt;br /&gt;
    [char].LuaData.temp = nil&lt;br /&gt;
&lt;br /&gt;
[[Category: Scripting]]&lt;/div&gt;</summary>
		<author><name>Shitpost Sunkern</name></author>
	</entry>
</feed>