<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.datoolset.net/mw/index.php?action=history&amp;feed=atom&amp;title=User%3ASunjammer%2FPlaceables_with_codex_entries_tutorial_%28draft%29</id>
		<title>User:Sunjammer/Placeables with codex entries tutorial (draft) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.datoolset.net/mw/index.php?action=history&amp;feed=atom&amp;title=User%3ASunjammer%2FPlaceables_with_codex_entries_tutorial_%28draft%29"/>
		<link rel="alternate" type="text/html" href="https://www.datoolset.net/mw/index.php?title=User:Sunjammer/Placeables_with_codex_entries_tutorial_(draft)&amp;action=history"/>
		<updated>2026-10-13T19:38:18Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.6</generator>

	<entry>
		<id>https://www.datoolset.net/mw/index.php?title=User:Sunjammer/Placeables_with_codex_entries_tutorial_(draft)&amp;diff=19950&amp;oldid=prev</id>
		<title>Sunjammer: Created</title>
		<link rel="alternate" type="text/html" href="https://www.datoolset.net/mw/index.php?title=User:Sunjammer/Placeables_with_codex_entries_tutorial_(draft)&amp;diff=19950&amp;oldid=prev"/>
				<updated>2020-04-27T16:37:20Z</updated>
		
		<summary type="html">&lt;p&gt;Created&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
* Create '''new''' a plot resource (because [[Bug:_Duplicating_a_plot_duplicates_the_uneditable_GUID|duplicating a plot duplicates the uneditable GUID]])&lt;br /&gt;
** Set the plot type to one with a &amp;quot;Codex - &amp;quot; prefix&lt;br /&gt;
** Add a single Main Flag: remember the number (usually 0 as it is the only flag)&lt;br /&gt;
* Create a placeable and place it in an area&lt;br /&gt;
* Open the [[Placeable#Variables|placeable's variables]]&lt;br /&gt;
* Set PLC_CODEX_PLOT to the name of the plot resource&lt;br /&gt;
* Set PLC_CODEX_FLAG to the number of the plot flag&lt;br /&gt;
&lt;br /&gt;
When the Player examines the placeable it triggers EVENT_TYPE_USE event&lt;br /&gt;
&lt;br /&gt;
The default behaviour (routed through the [[placeable_core script]]) is perfectly adequate.&lt;br /&gt;
&lt;br /&gt;
When the Player clicks on the placeable the following script runs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dascript&amp;gt;&lt;br /&gt;
void Placeable_ShowCodexEntry(object oPlc)&lt;br /&gt;
{&lt;br /&gt;
    string sCodexPlot = GetLocalString(oPlc, PLC_CODEX_PLOT);&lt;br /&gt;
    int nCodexFlag    = GetLocalInt(oPlc, PLC_CODEX_FLAG);&lt;br /&gt;
&lt;br /&gt;
    if (sCodexPlot != &amp;quot;&amp;quot; &amp;amp;&amp;amp; nCodexFlag &amp;gt;= 0)&lt;br /&gt;
    {&lt;br /&gt;
        string sSummary = GetPlotSummary(sCodexPlot, nCodexFlag);&lt;br /&gt;
&lt;br /&gt;
        // :&lt;br /&gt;
&lt;br /&gt;
        if (!WR_GetPlotFlag(sCodexPlot, nCodexFlag))&lt;br /&gt;
        {&lt;br /&gt;
            WR_SetPlotFlag(sCodexPlot, nCodexFlag, TRUE, TRUE);&lt;br /&gt;
            RewardXPParty(XP_CODEX, XP_TYPE_CODEX, OBJECT_INVALID, GetHero());&lt;br /&gt;
        }&lt;br /&gt;
        UI_DisplayCodexMessage(oPlc, sSummary);&lt;br /&gt;
        SetObjectInteractive(oPlc, FALSE);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/dascript&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sunjammer</name></author>	</entry>

	</feed>