</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-plaintexthighlighter-rouge">message_str_game</code> function to get messages from the file.</p><ul><li><codeclass="language-plaintext highlighter-rouge">fileName</code>: the name of the custom message file (including the .msg extension) in <codeclass="language-plaintext highlighter-rouge">text\<language>\game\</code> directory.</li></ul><p>Alternative form: <codeclass="language-plaintext highlighter-rouge">int add_extra_msg_file(string fileName, int fileNumber)</code></p><ul><li><codeclass="language-plaintext highlighter-rouge">fileNumber</code>: the file ID number for the <codeclass="language-plaintext highlighter-rouge">message_str_game</code> function. The available range is from 0x2000 to 0x2FFF (see <codeclass="language-plaintext highlighter-rouge">ExtraGameMsgFileList</code> setting in <codeclass="language-plaintext highlighter-rouge">ddraw.ini</code>) Use <codeclass="language-plaintext highlighter-rouge">fileNumber</code> only if you want to add a message file without editing <codeclass="language-plaintext highlighter-rouge">ddraw.ini</code> or existing scripts to support the old way.</li></ul><hr/><h3class="d-inline-block"id="critter_inven_obj2"><ahref="#critter_inven_obj2"class="anchor-heading"aria-labelledby="critter_inven_obj2"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>critter_inven_obj2</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">ObjectPtr</span><spanclass="n">critter_inven_obj2</span><spanclass="p">(</span><spanclass="n">ObjectPtr</span><spanclass="n">obj</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">type</span><spanclass="p">)</span>
</code></pre></div></div><p>Works just like vanilla <codeclass="language-plaintext highlighter-rouge">critter_inven_obj</code>, but correctly reports item in player’s inactive hand slot.</p><hr/><h3class="d-inline-block"id="dialog_message"><ahref="#dialog_message"class="anchor-heading"aria-labelledby="dialog_message"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>dialog_message</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">dialog_message</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">text</span><spanclass="p">)</span>
</code></pre></div></div><p>Displays a message in the NPC response window in dialog or barter screen.</p><hr/><h3class="d-inline-block"id="get_current_inven_size"><ahref="#get_current_inven_size"class="anchor-heading"aria-labelledby="get_current_inven_size"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_current_inven_size</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">get_current_inven_size</span><spanclass="p">(</span><spanclass="n">ObjectPtr</span><spanclass="n">object</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns the current inventory size of the container or the critter.</p><hr/><h3class="d-inline-block"id="get_metarule_table"><ahref="#get_metarule_table"class="anchor-heading"aria-labelledby="get_metarule_table"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_metarule_table</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">array</span><spanclass="n">get_metarule_table</span>
</code></pre></div></div><p>Returns names of all currently available script functions.</p><hr/><h3class="d-inline-block"id="get_object_ai_data"><ahref="#get_object_ai_data"class="anchor-heading"aria-labelledby="get_object_ai_data"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_object_ai_data</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_object_ai_data</span><spanclass="p">(</span><spanclass="n">ObjectPtr</span><spanclass="n">object</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">aiParam</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns the setting value from the AI packet of an object (critter). Use <codeclass="language-plaintext highlighter-rouge">AI_CAP_*</code> constants from <codeclass="language-plaintext highlighter-rouge">define_extra.h</code> for the <codeclass="language-plaintext highlighter-rouge">aiParam</code> argument to get AI value.</p><hr/><h3class="d-inline-block"id="get_text_width"><ahref="#get_text_width"class="anchor-heading"aria-labelledby="get_text_width"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_text_width</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_text_width</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">text</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns the text width in pixels for the currently set font.</p><hr/><h3class="d-inline-block"id="item_weight"><ahref="#item_weight"class="anchor-heading"aria-labelledby="item_weight"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>item_weight</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">item_weight</span><spanclass="p">(</span><spanclass="n">ObjectPtr</span><spanclass="n">obj</span><spanclass="p">)</span>
</code></pre></div></div><p>Gets the current weight of an object.</p><hr/><h3class="d-inline-block"id="metarule_exist"><ahref="#metarule_exist"class="anchor-heading"aria-labelledby="metarule_exist"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>metarule_exist</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">bool</span><spanclass="n">metarule_exist</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">metaruleName</span><spanclass="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/><h3class="d-inline-block"id="npc_engine_level_up"><ahref="#npc_engine_level_up"class="anchor-heading"aria-labelledby="npc_engine_level_up"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>npc_engine_level_up</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">npc_engine_level_up</span><spanclass="p">(</span><spanclass="kt">bool</span><spanclass="n">toggle</span><spanclass="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/><h3class="d-inline-block"id="objects_in_radius"><ahref="#objects_in_radius"class="anchor-heading"aria-labelledby="objects_in_radius"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>objects_in_radius</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">objects_in_radius</span><spanclass="s">", int tile, int radius, int elevation, int type)</span><spanclass="err">
</span></code></pre></div></div><ul><li>returns an array of objects of a type (see <codeclass="language-plaintext highlighter-rouge">OBJ_TYPE_*</code> constants in <codeclass="language-plaintext highlighter-rouge">define_extra.h</code>) within the specified radius from the given tile</li><li>passing -1 to the <codeclass="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/><h3class="d-inline-block"id="set_drugs_data"><ahref="#set_drugs_data"class="anchor-heading"aria-labelledby="set_drugs_data"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_drugs_data</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_drugs_data</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">type</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">pid</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">value</span><spanclass="p">)</span>
</code></pre></div></div><p>Overrides the parameters of drugs set in the configuration file (<codeclass="language-plaintext highlighter-rouge">DrugsFile</code> setting in <codeclass="language-plaintext highlighter-rouge">ddraw.ini</code>). Type: 0 - changes the value of <codeclass="language-plaintext highlighter-rouge">NumEffects</code> for the drug (see <codeclass="language-plaintext highlighter-rouge">Drugs.ini</code> for the description of <codeclass="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/><h3class="d-inline-block"id="set_rest_heal_time"><ahref="#set_rest_heal_time"class="anchor-heading"aria-labelledby="set_rest_heal_time"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_rest_heal_time</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_rest_heal_time</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">time</span><spanclass="p">)</span>
</code></pre></div></div><p>Sets the time interval in minutes for healing during resting. The default is 180. Note: The interval will be reset each time the player reloads the game.</p><hr/><h3class="d-inline-block"id="set_rest_mode"><ahref="#set_rest_mode"class="anchor-heading"aria-labelledby="set_rest_mode"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_rest_mode</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_rest_mode</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">flags</span><spanclass="p">)</span>
</code></pre></div></div><p>Sets the bit flags for the rest mode (see <codeclass="language-plaintext highlighter-rouge">RESTMODE_*</code> constants in <codeclass="language-plaintext highlighter-rouge">sfall.h</code>). Passing 0 will reset the rest mode. It will also be reset each time the player reloads the game.</p><hr/><h3class="d-inline-block"id="sfall_func0hide_window"><ahref="#sfall_func0hide_window"class="anchor-heading"aria-labelledby="sfall_func0hide_window"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>sfall_func0(“hide_window”)</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">sfall_func0</span><spanclass="p">(</span><spanclass="s">"hide_window"</span><spanclass="p">)</span>
</code></pre></div></div><p>Displays the script window previously hidden with the <codeclass="language-plaintext highlighter-rouge">sfall_func0("hide_window")</code> function.</p><hr/><h3class="d-inline-block"id="sfall_func1hide_window-string-winname"><ahref="#sfall_func1hide_window-string-winname"class="anchor-heading"aria-labelledby="sfall_func1hide_window-string-winname"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>sfall_func1(“hide_window”, string winName)</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">sfall_func0</span><spanclass="p">(</span><spanclass="s">"hide_window"</span><spanclass="p">)</span>
</code></pre></div></div><p>Hides the specified script window.</p><ul><li>winName: the window name, assigned to the window by the <codeclass="language-plaintext highlighter-rouge">CreateWin/create_win</code> function</li></ul><hr/><h3class="d-inline-block"id="sfall_func1remove_timer_event-int-fixedparam"><ahref="#sfall_func1remove_timer_event-int-fixedparam"class="anchor-heading"aria-labelledby="sfall_func1remove_timer_event-int-fixedparam"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>sfall_func1(“remove_timer_event”, int fixedParam)</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">sfall_func1</span><spanclass="p">(</span><spanclass="s">"remove_timer_event"</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">fixedParam</span><spanclass="p">)</span>
</code></pre></div></div><p>Removes all timer events with the specified <codeclass="language-plaintext highlighter-rouge">fixedParam</code> value for the current global script.</p><hr/><h3class="d-inline-block"id="sfall_func1show_window-string-winname"><ahref="#sfall_func1show_window-string-winname"class="anchor-heading"aria-labelledby="sfall_func1show_window-string-winname"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>sfall_func1(“show_window”, string winName)</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">sfall_func1</span><spanclass="p">(</span><spanclass="s">"show_window"</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">winName</span><spanclass="p">)</span>
</code></pre></div></div><p>Displays the specified hidden script window. <codeclass="language-plaintext highlighter-rouge">winName</code>: the window name, assigned to the window by the <codeclass="language-plaintext highlighter-rouge">CreateWin/create_win</code> function</p><hr/><h3class="d-inline-block"id="sfall_func2string_compare-string-str1-string-str2"><ahref="#sfall_func2string_compare-string-str1-string-str2"class="anchor-heading"aria-labelledby="sfall_func2string_compare-string-str1-string-str2"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>sfall_func2(“string_compare”, string str1, string str2)</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">bool</span><spanclass="n">sfall_func2</span><spanclass="p">(</span><spanclass="s">"string_compare"</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">str1</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">str2</span><spanclass="p">)</span>
</code></pre></div></div><p>Compares two strings case-insensitive, and returns <codeclass="language-plaintext highlighter-rouge">True</code> if the two strings are matched.</p><hr/><h3class="d-inline-block"id="sfall_func3string_compare-string-str1-string-str2-int-codepage"><ahref="#sfall_func3string_compare-string-str1-string-str2-int-codepage"class="anchor-heading"aria-labelledby="sfall_func3string_compare-string-str1-string-str2-int-codepage"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>sfall_func3(“string_compare”, string str1, string str2, int codePage)</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">bool</span><spanclass="n">sfall_func3</span><spanclass="p">(</span><spanclass="s">"string_compare"</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">str1</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">str2</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">codePage</span><spanclass="p">)</span>
</code></pre></div></div><p>Compares two strings case-insensitive, and returns <codeclass="language-plaintext highlighter-rouge">True</code> if the two strings are matched</p><ul><li><codeclass="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/><h3class="d-inline-block"id="spatial_radius"><ahref="#spatial_radius"class="anchor-heading"aria-labelledby="spatial_radius"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>spatial_radius</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">spatial_radius</span><spanclass="p">(</span><spanclass="n">ObjectPtr</span><spanclass="n">obj</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns radius of spatial script, associated with given dummy-object (returned by <codeclass="language-plaintext highlighter-rouge">create_spatial</code>).</p><hr/><h3class="d-inline-block"id="void-sfall_func0remove_timer_event"><ahref="#void-sfall_func0remove_timer_event"class="anchor-heading"aria-labelledby="void-sfall_func0remove_timer_event"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>void sfall_func0(“remove_timer_event”)</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">sfall_func0</span><spanclass="p">(</span><spanclass="s">"remove_timer_event"</span><spanclass="p">)</span>
</code></pre></div></div><p>Clears all set timer events for the current global script.</p></main></div></div><divclass="search-overlay"></div></div></body></html>