<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FSOMA%2FScripting%2FInterfaces_Overview</id>
	<title>HPL3/SOMA/Scripting/Interfaces Overview - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FSOMA%2FScripting%2FInterfaces_Overview"/>
	<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/Interfaces_Overview&amp;action=history"/>
	<updated>2026-10-04T04:27:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/Interfaces_Overview&amp;diff=7250&amp;oldid=prev</id>
		<title>TiMan: Add a sourced SOMA guide with explanations and stock-script examples.</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/Interfaces_Overview&amp;diff=7250&amp;oldid=prev"/>
		<updated>2026-10-02T12:19:38Z</updated>

		<summary type="html">&lt;p&gt;Add a sourced SOMA guide with explanations and stock-script examples.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{shortPageTitle}}&lt;br /&gt;
&lt;br /&gt;
Script interfaces connect SOMA’s AngelScript classes to engine objects and callbacks. Start with a stock terminal to see how a base class differs from a callback interface.&lt;br /&gt;
&lt;br /&gt;
== Trace the terminal script ==&lt;br /&gt;
# Open &amp;lt;code&amp;gt;script/props/Prop_Terminal.hps&amp;lt;/code&amp;gt;. Its declaration is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
class cScrPropTerminal : iScrProp, iScrProp_Interface&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Follow &amp;lt;code&amp;gt;iScrProp&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;script/interfaces/Prop_Interface.hps&amp;lt;/code&amp;gt;. It stores a native &amp;lt;code&amp;gt;cLuxProp&amp;lt;/code&amp;gt; handle in &amp;lt;code&amp;gt;mBaseObj&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;SetupBaseInterface&amp;lt;/code&amp;gt; assigns it and &amp;lt;code&amp;gt;GetBase()&amp;lt;/code&amp;gt; returns it.&lt;br /&gt;
# Return to the terminal’s &amp;lt;code&amp;gt;SetupAfterLoad&amp;lt;/code&amp;gt;. It reads resource variables and calls &amp;lt;code&amp;gt;mBaseObj.CreateAndSetupGui&amp;lt;/code&amp;gt; to set up the terminal GUI. This is an example of using the engine object exposed by the base.&lt;br /&gt;
&lt;br /&gt;
The terminal also implements &amp;lt;code&amp;gt;iScrProp_Interface&amp;lt;/code&amp;gt;. Its script defines callbacks such as &amp;lt;code&amp;gt;SetupAfterLoad&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;OnInteract&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GetInteractIconId&amp;lt;/code&amp;gt;; these are separate from the base’s handle-access functions.&lt;br /&gt;
&lt;br /&gt;
== Find the matching base ==&lt;br /&gt;
The area, agent, critter, player, effect and user-module interface files use the same handle-wrapper pattern for their corresponding native object types. Use the base belonging to the script you are studying; the prop wrapper holds a &amp;lt;code&amp;gt;cLuxProp&amp;lt;/code&amp;gt;, while the module wrapper holds a &amp;lt;code&amp;gt;cLuxUserModule&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Continue with a working example ==&lt;br /&gt;
* [[HPL3/SOMA/Scripting/Terminals Overview|Set up a terminal]]&lt;br /&gt;
* [[HPL3/SOMA/Scripting/Module Interface|Trace a user module]]&lt;br /&gt;
* [[HPL3/Scripting/Entity Components|Add behavior through entity components]]&lt;br /&gt;
&lt;br /&gt;
[[Category:English]]&lt;/div&gt;</summary>
		<author><name>TiMan</name></author>
		
	</entry>
</feed>