</code></pre></div></div> <p>Loads the custom message file, and returns the file ID number assigned to it in range from 0x3000 to 0x3FFF for the <code class="language-plaintext highlighter-rouge">message_str_game</code> function to get messages from the file.</p> <ul> <li><code class="language-plaintext highlighter-rouge">fileName</code>: the name of the custom message file (including the .msg extension) in <code class="language-plaintext highlighter-rouge">text\<language>\game\</code> directory.</li> </ul> <p>Alternative form: <code class="language-plaintext highlighter-rouge">int add_extra_msg_file(string fileName, int fileNumber)</code></p> <ul> <li><code class="language-plaintext highlighter-rouge">fileNumber</code>: the file ID number for the <code class="language-plaintext highlighter-rouge">message_str_game</code> function. The available range is from 0x2000 to 0x2FFF (see <code class="language-plaintext highlighter-rouge">ExtraGameMsgFileList</code> setting in <code class="language-plaintext highlighter-rouge">ddraw.ini</code>) Use <code class="language-plaintext highlighter-rouge">fileNumber</code> only if you want to add a message file without editing <code class="language-plaintext highlighter-rouge">ddraw.ini</code> or existing scripts to support the old way.</li> </ul><hr /> <h3 class="d-inline-block" id="critter_inven_obj2"> <a href="#critter_inven_obj2" class="anchor-heading" aria-labelledby="critter_inven_obj2"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>critter_inven_obj2</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">ObjectPtr</span> <span class="n">critter_inven_obj2</span><span class="p">(</span><span class="n">ObjectPtr</span> <span class="n">obj</span><span class="p">,</span> <span class="kt">int</span> <span class="n">type</span><span class="p">)</span>
</code></pre></div></div> <p>Works just like vanilla <code class="language-plaintext highlighter-rouge">critter_inven_obj</code>, but correctly reports item in player’s inactive hand slot.</p><hr /> <h3 class="d-inline-block" id="dialog_message"> <a href="#dialog_message" class="anchor-heading" aria-labelledby="dialog_message"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>dialog_message</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">dialog_message</span><span class="p">(</span><span class="n">string</span> <span class="n">text</span><span class="p">)</span>
</code></pre></div></div> <p>Returns the setting value from the AI packet of an object (critter). Use <code class="language-plaintext highlighter-rouge">AI_CAP_*</code> constants from <strong>define_extra.h</strong> for the <code class="language-plaintext highlighter-rouge">aiParam</code> argument to get AI value.</p><hr /> <h3 class="d-inline-block" id="get_text_width"> <a href="#get_text_width" class="anchor-heading" aria-labelledby="get_text_width"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_text_width</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_text_width</span><span class="p">(</span><span class="n">string</span> <span class="n">text</span><span class="p">)</span>
</code></pre></div></div> <p>Returns the text width in pixels for the currently set font.</p><hr /> <h3 class="d-inline-block" id="item_weight"> <a href="#item_weight" class="anchor-heading" aria-labelledby="item_weight"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>item_weight</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">item_weight</span><span class="p">(</span><span class="n">ObjectPtr</span> <span class="n">obj</span><span class="p">)</span>
</code></pre></div></div> <p>Gets the current weight of an object.</p><hr /> <h3 class="d-inline-block" id="metarule_exist"> <a href="#metarule_exist" class="anchor-heading" aria-labelledby="metarule_exist"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>metarule_exist</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">bool</span> <span class="n">metarule_exist</span><span class="p">(</span><span class="n">string</span> <span class="n">metaruleName</span><span class="p">)</span>
</code></pre></div></div> <p>Returns True if the specified name of metarule (sfall_funcX) function exists in the current version of sfall.</p><hr /> <h3 class="d-inline-block" id="npc_engine_level_up"> <a href="#npc_engine_level_up" class="anchor-heading" aria-labelledby="npc_engine_level_up"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>npc_engine_level_up</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">npc_engine_level_up</span><span class="p">(</span><span class="kt">bool</span> <span class="n">toggle</span><span class="p">)</span>
</code></pre></div></div> <p>Enables/disables the engine function that increases the level of party members in the player leveling process. If the engine function is disabled, the process of leveling up party members should be performed by script functions.</p><hr /> <h3 class="d-inline-block" id="objects_in_radius"> <a href="#objects_in_radius" class="anchor-heading" aria-labelledby="objects_in_radius"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>objects_in_radius</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">array</span> <span class="n">objects_in_radius</span><span class="p">(</span><span class="kt">int</span> <span class="n">tile</span><span class="p">,</span> <span class="kt">int</span> <span class="n">radius</span><span class="p">,</span> <span class="kt">int</span> <span class="n">elevation</span><span class="p">,</span> <span class="kt">int</span> <span class="n">type</span><span class="p">)</span>
</code></pre></div></div> <ul> <li>returns an array of objects of a type (see <code class="language-plaintext highlighter-rouge">OBJ_TYPE_*</code> constants in <strong>define_extra.h</strong>) within the specified radius from the given tile</li> <li>passing -1 to the <code class="language-plaintext highlighter-rouge">type</code> argument or <em>not specifying it</em> will return all objects within the radius</li> <li>the radius is limited to 50 hexes</li> </ul><hr /> <h3 class="d-inline-block" id="set_drugs_data"> <a href="#set_drugs_data" class="anchor-heading" aria-labelledby="set_drugs_data"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_drugs_data</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_drugs_data</span><span class="p">(</span><span class="kt">int</span> <span class="n">type</span><span class="p">,</span> <span class="kt">int</span> <span class="n">pid</span><span class="p">,</span> <span class="kt">int</span> <span class="n">value</span><span class="p">)</span>
</code></pre></div></div> <p>Overrides the parameters of drugs set in the configuration file (<code class="language-plaintext highlighter-rouge">DrugsFile</code> setting in <code class="language-plaintext highlighter-rouge">ddraw.ini</code>). Type: 0 - changes the value of <code class="language-plaintext highlighter-rouge">NumEffects</code> for the drug (see <code class="language-plaintext highlighter-rouge">Drugs.ini</code> for the description of <code class="language-plaintext highlighter-rouge">NumEffects</code>), 1 - changes the duration of the addiction effect for the drug (a value of 1 = one game minute).</p><hr /> <h3 class="d-inline-block" id="set_rest_heal_time"> <a href="#set_rest_heal_time" class="anchor-heading" aria-labelledby="set_rest_heal_time"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_rest_heal_time</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_rest_heal_time</span><span class="p">(</span><span class="kt">int</span> <span class="n">time</span><span class="p">)</span>
</code></pre></div></div> <p>Sets the time interval in minutes for healing during resting. The default is 180</p> <ul> <li>the time interval will be reset each time the player reloads the game</li> </ul><hr /> <h3 class="d-inline-block" id="set_rest_mode"> <a href="#set_rest_mode" class="anchor-heading" aria-labelledby="set_rest_mode"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_rest_mode</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_rest_mode</span><span class="p">(</span><span class="kt">int</span> <span class="n">flags</span><span class="p">)</span>
</code></pre></div></div> <p>Sets the bit flags for the rest mode (see <code class="language-plaintext highlighter-rouge">RESTMODE_*</code> constants in <strong>sfall.h</strong>). Passing 0 will reset the rest mode. It will also be reset each time the player reloads the game.</p><hr /> <h3 class="d-inline-block" id="set_worldmap_heal_time"> <a href="#set_worldmap_heal_time" class="anchor-heading" aria-labelledby="set_worldmap_heal_time"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_worldmap_heal_time</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_worldmap_heal_time</span><span class="p">(</span><span class="kt">int</span> <span class="n">time</span><span class="p">)</span>
</code></pre></div></div> <p>Sets the time interval in minutes for healing during world map travel. The default is 180</p> <ul> <li>passing 0 will revert to 1 second of real time (vanilla engine behavior)</li> <li>passing -1 will disable healing during travel</li> <li>the time interval will be reset each time the player reloads the game</li> </ul><hr /> <h3 class="d-inline-block" id="sfall_func0hide_window"> <a href="#sfall_func0hide_window" class="anchor-heading" aria-labelledby="sfall_func0hide_window"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>sfall_func0(“hide_window”)</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">sfall_func0</span><span class="p">(</span><span class="s">"hide_window"</span><span class="p">)</span>
</code></pre></div></div> <p>Compares two strings case-insensitive, and returns <code class="language-plaintext highlighter-rouge">True</code> if the two strings are matched.</p><hr /> <h3 class="d-inline-block" id="sfall_func3string_compare-string-str1-string-str2-int-codepage"> <a href="#sfall_func3string_compare-string-str1-string-str2-int-codepage" class="anchor-heading" aria-labelledby="sfall_func3string_compare-string-str1-string-str2-int-codepage"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>sfall_func3(“string_compare”, string str1, string str2, int codePage)</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">bool</span> <span class="n">sfall_func3</span><span class="p">(</span><span class="s">"string_compare"</span><span class="p">,</span> <span class="n">string</span> <span class="n">str1</span><span class="p">,</span> <span class="n">string</span> <span class="n">str2</span><span class="p">,</span> <span class="kt">int</span> <span class="n">codePage</span><span class="p">)</span>
</code></pre></div></div> <p>Compares two strings case-insensitive, and returns <code class="language-plaintext highlighter-rouge">True</code> if the two strings are matched</p> <ul> <li><code class="language-plaintext highlighter-rouge">codePage</code>: code page number to properly compare national characters in the range 128-255 of the ASCII code table available encodings: 1250-1252, 866</li> </ul><hr /> <h3 class="d-inline-block" id="spatial_radius"> <a href="#spatial_radius" class="anchor-heading" aria-labelledby="spatial_radius"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>spatial_radius</strong> </h3> <p class="label label-green">sfall.h</p> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">spatial_radius</span><span class="p">(</span><span class="n">ObjectPtr</span> <span class="n">obj</span><span class="p">)</span>
</code></pre></div></div> <p>Clears all set timer events for the current global script.</p> </main> <hr> <footer> <div class="d-md-none"> <div class="mt-4 fs-2"> This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll. </div> </div> </footer> </div> </div> <div class="search-overlay"></div> </div> </body> </html>