<?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=Mod%3ANebula%27s_Mission_Board%2F_Job_callbacks</id>
	<title>Mod:Nebula&#039;s Mission Board/ Job callbacks - 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=Mod%3ANebula%27s_Mission_Board%2F_Job_callbacks"/>
	<link rel="alternate" type="text/html" href="https://wiki.pmdo.pmdcollab.org/wiki/index.php?title=Mod:Nebula%27s_Mission_Board/_Job_callbacks&amp;action=history"/>
	<updated>2026-08-01T09:38:18Z</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=Mod:Nebula%27s_Mission_Board/_Job_callbacks&amp;diff=2831&amp;oldid=prev</id>
		<title>MistressNebula: Account for 1.0.1 changes</title>
		<link rel="alternate" type="text/html" href="https://wiki.pmdo.pmdcollab.org/wiki/index.php?title=Mod:Nebula%27s_Mission_Board/_Job_callbacks&amp;diff=2831&amp;oldid=prev"/>
		<updated>2025-08-01T17:44:16Z</updated>

		<summary type="html">&lt;p&gt;Account for 1.0.1 changes&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:44, 1 August 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Events ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Events ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;There are a few places in which the library checks a job&#039;s &amp;lt;code&amp;gt;Callback&amp;lt;/code&amp;gt; field. These are called &quot;events&quot;, and there are &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nine &lt;/del&gt;in total. Most events can also be interrupted; we will discuss how to do that next.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;There are a few places in which the library checks a job&#039;s &amp;lt;code&amp;gt;Callback&amp;lt;/code&amp;gt; field. These are called &quot;events&quot;, and there are &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ten &lt;/ins&gt;in total. Most events can also be interrupted; we will discuss how to do that next.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&amp;quot;JobTake&amp;quot;&amp;lt;/code&amp;gt;: Happens when a job is taken using the board menu, or when &amp;lt;code&amp;gt;MissionGen:TakeJob(&amp;lt;board_id&amp;gt;, &amp;lt;index&amp;gt;)&amp;lt;/code&amp;gt; is called directly. Interrupting this event will cause it to not add the job to the taken list or mark it as taken.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&amp;quot;JobTake&amp;quot;&amp;lt;/code&amp;gt;: Happens when a job is taken using the board menu, or when &amp;lt;code&amp;gt;MissionGen:TakeJob(&amp;lt;board_id&amp;gt;, &amp;lt;index&amp;gt;)&amp;lt;/code&amp;gt; is called directly. Interrupting this event will cause it to not add the job to the taken list or mark it as taken.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&amp;quot;JobActivate&amp;quot;&amp;lt;/code&amp;gt;: Called when a job is activated from the taken menu, or when &amp;lt;code&amp;gt;MissionGen:ToggleTakenJob(&amp;lt;index&amp;gt;)&amp;lt;/code&amp;gt; is called directly on a currently inactive job. Interrupting this event will cause the job to not be activated.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&amp;quot;JobActivate&amp;quot;&amp;lt;/code&amp;gt;: Called when a job is activated from the taken menu, or when &amp;lt;code&amp;gt;MissionGen:ToggleTakenJob(&amp;lt;index&amp;gt;)&amp;lt;/code&amp;gt; is called directly on a currently inactive job. Interrupting this event will cause the job to not be activated.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;JobDeactivate&quot;&amp;lt;/code&amp;gt; Called when a job is deactivated from the taken menu, or when &amp;lt;code&amp;gt;MissionGen:ToggleTakenJob(&amp;lt;index&amp;gt;)&amp;lt;/code&amp;gt; is called directly on a currently active job. Interrupting this event will cause the job to not be deactivated.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;JobDeactivate&quot;&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: &lt;/ins&gt;Called when a job is deactivated from the taken menu, or when &amp;lt;code&amp;gt;MissionGen:ToggleTakenJob(&amp;lt;index&amp;gt;)&amp;lt;/code&amp;gt; is called directly on a currently active job. Interrupting this event will cause the job to not be deactivated.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;DungeonStart&quot;&amp;lt;/code&amp;gt; Called right before checking if the job is supposed to have a guest. This event cannot be interrupted.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;DungeonStart&quot;&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: &lt;/ins&gt;Called right before checking if the job is supposed to have a guest&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. This event cannot be interrupted.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;FloorStart&quot;&amp;lt;/code&amp;gt; Called at the start of the destination floor of a job. Interrupting this event will prevent any battle event and floor generation step normally required by the job&#039;s type from &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;occurring at all&lt;/del&gt;.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;code&amp;gt;&quot;DungeonEnd&quot;&amp;lt;/code&amp;gt;: Called right before checking for job completion&lt;/ins&gt;. This event cannot be interrupted.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;JobComplete&quot;&amp;lt;/code&amp;gt; Called when a job is marked as completed, or when &amp;lt;code&amp;gt;MissionGen:MarkJobCompleted(&amp;lt;job&amp;gt;)&amp;lt;/code&amp;gt; is called directly. Interrupting this event will prevent the job from being marked as completed.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;FloorStart&quot;&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: &lt;/ins&gt;Called at the start of the destination floor of a job&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, right after applying the segment&#039;s generation steps but before applying the floor&#039;s specific generation steps&lt;/ins&gt;. Interrupting this event will prevent any battle event and floor generation step normally required by the job&#039;s type from &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;being added to the queue&lt;/ins&gt;.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;JobFail&quot;&amp;lt;/code&amp;gt; Called when a job is marked as failed, or when &amp;lt;code&amp;gt;MissionGen:MarkJobFailed(&amp;lt;job&amp;gt;)&amp;lt;/code&amp;gt; is called directly. Interrupting this event will prevent the job from being marked as failed.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;JobComplete&quot;&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: &lt;/ins&gt;Called when a job is marked as completed, or when &amp;lt;code&amp;gt;MissionGen:MarkJobCompleted(&amp;lt;job&amp;gt;)&amp;lt;/code&amp;gt; is called directly. Interrupting this event will prevent the job from being marked as completed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;BeforeReward&quot;&amp;lt;/code&amp;gt; Called right before the reward cutscene is about to start for a specific job. Interrupting this event will skip the cutscene altogether.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;JobFail&quot;&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: &lt;/ins&gt;Called when a job is marked as failed, or when &amp;lt;code&amp;gt;MissionGen:MarkJobFailed(&amp;lt;job&amp;gt;)&amp;lt;/code&amp;gt; is called directly. Interrupting this event will prevent the job from being marked as failed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;AfterReward&quot;&amp;lt;/code&amp;gt; Called right after the reward cutscene ends for a specific job. Interrupting this event will prevent the job from being removed from the taken list.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;BeforeReward&quot;&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: &lt;/ins&gt;Called right before the reward cutscene is about to start for a specific job. Interrupting this event will skip the cutscene altogether.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;&quot;AfterReward&quot;&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: &lt;/ins&gt;Called right after the reward cutscene ends for a specific job. Interrupting this event will prevent the job from being removed from the taken list.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;By attaching code to these events, one can change how the library handles a job; jobs that unlock their target dungeons when activated become possible, for example. Expert modders might even be able to create completely new types of jobs, given enough effort.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;By attaching code to these events, one can change how the library handles a job; jobs that unlock their target dungeons when activated become possible, for example. Expert modders might even be able to create completely new types of jobs, given enough effort.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;cancel&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt;: Begins equal to false. If true, it will interrupt the event if possible.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;cancel&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt;: Begins equal to false. If true, it will interrupt the event if possible.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;job&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;[[Mod:Nebula&amp;#039;s Mission Board/ Job Table|JobTable]]&amp;lt;/code&amp;gt;: The job that this instance of the event applies to.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;job&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;[[Mod:Nebula&amp;#039;s Mission Board/ Job Table|JobTable]]&amp;lt;/code&amp;gt;: The job that this instance of the event applies to.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;: Some extra parameters that may be useful to the callback.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;This gives you full access to all data stored inside the job table, making it easy to write general purpose functions. Plus, as you can see, interrupting an event is as easy as setting &amp;lt;code&amp;gt;cancel&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. The table will &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;then &lt;/del&gt;be returned to the event-calling code, which will check for the field&#039;s state and react accordingly.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;This gives you full access to all data stored inside the job table, making it easy to write general purpose functions. Plus, as you can see, interrupting an event is as easy as setting &amp;lt;code&amp;gt;cancel&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This is not all, though; the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; table might contain different properties depending on the event. If an event is not on this list, its data table will be empty:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;code&amp;gt;&quot;JobTake&quot;&amp;lt;/code&amp;gt;:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &amp;lt;code&amp;gt;board&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;: the id of the board this job is being taken from.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;code&amp;gt;&quot;JobActivate&quot;&amp;lt;/code&amp;gt;: Nothing.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;code&amp;gt;&quot;JobDeactivate&quot;&amp;lt;/code&amp;gt;: Nothing.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;code&amp;gt;&quot;DungeonStart&quot;&amp;lt;/code&amp;gt;: Nothing.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;code&amp;gt;&quot;DungeonEnd&quot;&amp;lt;/code&amp;gt;:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;[https://github.com/RogueCollab/RogueEssence/blob/master/RogueEssence/Data/GameProgress.cs#L72 ResultType]&amp;lt;/code&amp;gt;: &lt;/ins&gt;The &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;final result of this exploration.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;code&amp;gt;&quot;FloorStart&quot;&amp;lt;/code&amp;gt;:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &amp;lt;code&amp;gt;zoneContext&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;[https://github.com/RogueCollab/RogueEssence/blob/master/RogueEssence/LevelGen/Zones/ZoneSegment.cs#L288 ZoneGenContext]&amp;lt;/code&amp;gt; the collection of zone gen data associated to the current task&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &amp;lt;code&amp;gt;context&amp;lt;/code&amp;gt; - any &amp;lt;code&amp;gt;[https://github.com/RogueCollab/RogueEssence/blob/master/RogueEssence/LevelGen/MapGenContext.cs BaseMapGenContext]&amp;lt;/code&amp;gt; implementation: an object that describes the map in its during-generation state&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &amp;lt;code&amp;gt;queue&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;[https://github.com/audinowho/RogueElements/blob/master/RogueElements/StablePriorityQueue.cs StablePriorityQueue]&amp;lt;[https://github.com/audinowho/RogueElements/blob/master/RogueElements/Priority/Priority.cs Priority],any [https://github.com/audinowho/RogueElements/blob/master/RogueElements/MapGen/IGenStep.cs IGenStep] implementation&amp;gt;&amp;lt;/code&amp;gt;: the list of floor generation steps to apply after this callback returns.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &amp;lt;code&amp;gt;seed&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;integer&amp;lt;/code&amp;gt;: the numeric seed supplied to the ZoneStep that is handling this code.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;code&amp;gt;&quot;BeforeReward&quot;&amp;lt;/code&amp;gt;:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &amp;lt;code&amp;gt;zone&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; the id of the zone the player is currently in.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &amp;lt;code&amp;gt;map&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;integer&amp;lt;/code&amp;gt; the index of the map the player is currently in.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;code&amp;gt;&quot;AfterReward&quot;&amp;lt;/code&amp;gt;:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &amp;lt;code&amp;gt;zone&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; the id of the zone the player is currently in.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &amp;lt;code&amp;gt;map&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;integer&amp;lt;/code&amp;gt; the index of the map the player is currently in.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;After the callback returns, the &lt;/ins&gt;table will be returned to the event-calling code, which will check for the field&#039;s state and react accordingly.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Callbacks ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Callbacks ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MistressNebula</name></author>
	</entry>
	<entry>
		<id>https://wiki.pmdo.pmdcollab.org/wiki/index.php?title=Mod:Nebula%27s_Mission_Board/_Job_callbacks&amp;diff=2826&amp;oldid=prev</id>
		<title>MistressNebula: Make page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pmdo.pmdcollab.org/wiki/index.php?title=Mod:Nebula%27s_Mission_Board/_Job_callbacks&amp;diff=2826&amp;oldid=prev"/>
		<updated>2025-07-30T15:43:09Z</updated>

		<summary type="html">&lt;p&gt;Make page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The library contains a callback system that allows modders to attach code to specific jobs to customize their behavior. It functions very similarly to how the base game handles scripted events: you attach a function name and a series of arguments to an id, and the system will fetch a function from somewhere, passing those arguments to it. Let&amp;#039;s see exactly how this works.&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
There are a few places in which the library checks a job&amp;#039;s &amp;lt;code&amp;gt;Callback&amp;lt;/code&amp;gt; field. These are called &amp;quot;events&amp;quot;, and there are nine in total. Most events can also be interrupted; we will discuss how to do that next.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;JobTake&amp;quot;&amp;lt;/code&amp;gt;: Happens when a job is taken using the board menu, or when &amp;lt;code&amp;gt;MissionGen:TakeJob(&amp;lt;board_id&amp;gt;, &amp;lt;index&amp;gt;)&amp;lt;/code&amp;gt; is called directly. Interrupting this event will cause it to not add the job to the taken list or mark it as taken.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;JobActivate&amp;quot;&amp;lt;/code&amp;gt;: Called when a job is activated from the taken menu, or when &amp;lt;code&amp;gt;MissionGen:ToggleTakenJob(&amp;lt;index&amp;gt;)&amp;lt;/code&amp;gt; is called directly on a currently inactive job. Interrupting this event will cause the job to not be activated.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;JobDeactivate&amp;quot;&amp;lt;/code&amp;gt; Called when a job is deactivated from the taken menu, or when &amp;lt;code&amp;gt;MissionGen:ToggleTakenJob(&amp;lt;index&amp;gt;)&amp;lt;/code&amp;gt; is called directly on a currently active job. Interrupting this event will cause the job to not be deactivated.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;DungeonStart&amp;quot;&amp;lt;/code&amp;gt; Called right before checking if the job is supposed to have a guest. This event cannot be interrupted.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;FloorStart&amp;quot;&amp;lt;/code&amp;gt; Called at the start of the destination floor of a job. Interrupting this event will prevent any battle event and floor generation step normally required by the job&amp;#039;s type from occurring at all. &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;JobComplete&amp;quot;&amp;lt;/code&amp;gt; Called when a job is marked as completed, or when &amp;lt;code&amp;gt;MissionGen:MarkJobCompleted(&amp;lt;job&amp;gt;)&amp;lt;/code&amp;gt; is called directly. Interrupting this event will prevent the job from being marked as completed.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;JobFail&amp;quot;&amp;lt;/code&amp;gt; Called when a job is marked as failed, or when &amp;lt;code&amp;gt;MissionGen:MarkJobFailed(&amp;lt;job&amp;gt;)&amp;lt;/code&amp;gt; is called directly. Interrupting this event will prevent the job from being marked as failed.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;BeforeReward&amp;quot;&amp;lt;/code&amp;gt; Called right before the reward cutscene is about to start for a specific job. Interrupting this event will skip the cutscene altogether.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;AfterReward&amp;quot;&amp;lt;/code&amp;gt; Called right after the reward cutscene ends for a specific job. Interrupting this event will prevent the job from being removed from the taken list.&lt;br /&gt;
&lt;br /&gt;
By attaching code to these events, one can change how the library handles a job; jobs that unlock their target dungeons when activated become possible, for example. Expert modders might even be able to create completely new types of jobs, given enough effort.&lt;br /&gt;
&lt;br /&gt;
=== The Event Table ===&lt;br /&gt;
When an event is called, a small table of data is generated and then passed to whatever callback is assigned to it. This table contains the following data:&lt;br /&gt;
* &amp;lt;code&amp;gt;cancel&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt;: Begins equal to false. If true, it will interrupt the event if possible.&lt;br /&gt;
* &amp;lt;code&amp;gt;job&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;[[Mod:Nebula&amp;#039;s Mission Board/ Job Table|JobTable]]&amp;lt;/code&amp;gt;: The job that this instance of the event applies to.&lt;br /&gt;
&lt;br /&gt;
This gives you full access to all data stored inside the job table, making it easy to write general purpose functions. Plus, as you can see, interrupting an event is as easy as setting &amp;lt;code&amp;gt;cancel&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. The table will then be returned to the event-calling code, which will check for the field&amp;#039;s state and react accordingly.&lt;br /&gt;
&lt;br /&gt;
== Callbacks ==&lt;br /&gt;
To use the callback system, you first need to set the [[Mod:Nebula&amp;#039;s Mission Board/ Editing settings#mission_callback_root|mission_callback_root]] setting to a global table of your choice. All callbacks will then need to be stored inside that table. Furthermore, this is what their signature should look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function(&amp;lt;evt&amp;gt;, &amp;lt;args&amp;gt;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where:&lt;br /&gt;
* &amp;lt;code&amp;gt;evt&amp;lt;/code&amp;gt; is the event table discussed above&lt;br /&gt;
* &amp;lt;code&amp;gt;args&amp;lt;/code&amp;gt; is the list of arguments set when registering the callback.&lt;br /&gt;
&lt;br /&gt;
Any changes to the job table will be kept after the callback ends, so you can even use this to change the job&amp;#039;s properties if you want.&lt;br /&gt;
&lt;br /&gt;
=== Registering a callback ===&lt;br /&gt;
Once you have your callback ready, you need to register it to a job. This is done by using this function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MissionGen:RegisterCallback(&amp;lt;job&amp;gt;, &amp;lt;event&amp;gt;, &amp;lt;func&amp;gt;, &amp;lt;args&amp;gt;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where:&lt;br /&gt;
* &amp;lt;code&amp;gt;job&amp;lt;/code&amp;gt; is the job table to add the callback to.&lt;br /&gt;
* &amp;lt;code&amp;gt;event&amp;lt;/code&amp;gt; is the id of the event to subscribe to, as discussed at the top.&lt;br /&gt;
* &amp;lt;code&amp;gt;func&amp;lt;/code&amp;gt; is the name of the callback function.&lt;br /&gt;
* &amp;lt;code&amp;gt;event&amp;lt;/code&amp;gt; is optional, and is the table of arguments to pass to this instance of the callback. If not set, it defaults to an empty table. You should not save C# objects or functions in here, because they wouldn&amp;#039;t be saved correctly.&lt;br /&gt;
&lt;br /&gt;
This will make it so that the given function is called when the given event is triggered. Do keep in mind that only one callback per event can be registered inside a job. Trying to register a second function will remove the previous one.&lt;br /&gt;
&lt;br /&gt;
Once your callback is registered, just give the job to the player in some way, and you&amp;#039;re good to go.&lt;/div&gt;</summary>
		<author><name>MistressNebula</name></author>
	</entry>
</feed>