mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
deploy: 143ec750cf
This commit is contained in:
+12
-12
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -473,6 +473,7 @@ function scrollNav() {
|
||||
if (targetLink) {
|
||||
const rect = targetLink.getBoundingClientRect();
|
||||
document.getElementById('site-nav').scrollBy(0, rect.top - 3*rect.height);
|
||||
targetLink.removeAttribute('href');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,7 +484,6 @@ function activateNav() {
|
||||
var target = navLink();
|
||||
if (target) {
|
||||
target.classList.toggle('active', true);
|
||||
target.removeAttribute('href');
|
||||
}
|
||||
while (target) {
|
||||
while (target && !(target.classList && target.classList.contains('nav-list-item'))) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="/sfall/feed.xml" rel="self" type="application/atom+xml" /><link href="/sfall/" rel="alternate" type="text/html" /><updated>2023-10-07T13:16:15+00:00</updated><id>/sfall/feed.xml</id><title type="html">sfall</title><subtitle>Sfall documentation</subtitle></feed>
|
||||
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="/sfall/feed.xml" rel="self" type="application/atom+xml" /><link href="/sfall/" rel="alternate" type="text/html" /><updated>2023-10-16T03:36:00+00:00</updated><id>/sfall/feed.xml</id><title type="html">sfall</title><subtitle>Sfall documentation</subtitle></feed>
|
||||
+1
-1
@@ -12,6 +12,6 @@
|
||||
</code></pre></div></div><hr /> <h3 id="set_shader_float"> <a href="#set_shader_float" class="anchor-heading" aria-labelledby="set_shader_float"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_shader_float</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_shader_float</span><span class="p">(</span><span class="kt">int</span> <span class="n">ID</span><span class="p">,</span> <span class="n">string</span> <span class="n">param</span><span class="p">,</span> <span class="kt">float</span> <span class="n">value</span><span class="p">)</span>
|
||||
</code></pre></div></div><hr /> <h3 id="set_shader_int"> <a href="#set_shader_int" class="anchor-heading" aria-labelledby="set_shader_int"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_shader_int</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_shader_int</span><span class="p">(</span><span class="kt">int</span> <span class="n">ID</span><span class="p">,</span> <span class="n">string</span> <span class="n">param</span><span class="p">,</span> <span class="kt">int</span> <span class="n">value</span><span class="p">)</span>
|
||||
</code></pre></div></div><hr /> <h3 id="set_shader_mode"> <a href="#set_shader_mode" class="anchor-heading" aria-labelledby="set_shader_mode"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_shader_mode</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_shader_mode</span><span class="p">(</span><span class="kt">int</span> <span class="n">mode</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Tells sfall when to use a shader. The parameter is a set of 32 flags which specify the screens on which the shader will be disabled, unless bit 32 is set, in which case the shader will only be active on those screens. Remember that screens are displayed on top of each other; if the player opens the character menu which in combat, the game still considers the player to be in combat. See <code class="language-plaintext highlighter-rouge">sfall.h</code> for a list of defines.</p><hr /> <h3 id="set_shader_texture"> <a href="#set_shader_texture" class="anchor-heading" aria-labelledby="set_shader_texture"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_shader_texture</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_shader_texture</span><span class="p">(</span><span class="kt">int</span> <span class="n">ID</span><span class="p">,</span> <span class="n">string</span> <span class="n">param</span><span class="p">,</span> <span class="kt">int</span> <span class="n">texID</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Tells sfall when to use a shader. The parameter is a set of 32 flags which specify the screens on which the shader will be disabled, unless bit 32 is set, in which case the shader will only be active on those screens. Remember that screens are displayed on top of each other; if the player opens the character menu which in combat, the game still considers the player to be in combat. See <strong>sfall.h</strong> for a list of defines.</p><hr /> <h3 id="set_shader_texture"> <a href="#set_shader_texture" class="anchor-heading" aria-labelledby="set_shader_texture"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_shader_texture</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_shader_texture</span><span class="p">(</span><span class="kt">int</span> <span class="n">ID</span><span class="p">,</span> <span class="n">string</span> <span class="n">param</span><span class="p">,</span> <span class="kt">int</span> <span class="n">texID</span><span class="p">)</span>
|
||||
</code></pre></div></div><hr /> <h3 id="set_shader_vector"> <a href="#set_shader_vector" class="anchor-heading" aria-labelledby="set_shader_vector"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_shader_vector</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_shader_vector</span><span class="p">(</span><span class="kt">int</span> <span class="n">ID</span><span class="p">,</span> <span class="n">string</span> <span class="n">param</span><span class="p">,</span> <span class="kt">float</span> <span class="n">f1</span><span class="p">,</span> <span class="kt">float</span> <span class="n">f2</span><span class="p">,</span> <span class="kt">float</span> <span class="n">f3</span><span class="p">,</span> <span class="kt">float</span> <span class="n">f4</span><span class="p">)</span>
|
||||
</code></pre></div></div> </main> </div> </div> <div class="search-overlay"></div> </div> </body> </html>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</code></pre></div></div> <p>This basically changes hook argument for the next script. <strong>Mod B</strong> code:</p> <div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">original_chance</span> <span class="o">=</span> <span class="nx">get_sfall_arg</span><span class="p">;</span>
|
||||
<span class="nx">set_sfall_return</span><span class="p">(</span><span class="nx">original_chance</span> <span class="o">*</span> <span class="mf">1.5</span><span class="p">);</span>
|
||||
<span class="nx">set_sfall_arg</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="p">(</span><span class="nx">original_chance</span> <span class="o">*</span> <span class="mf">1.5</span><span class="p">));</span>
|
||||
</code></pre></div></div> <p>So if you combine both mods together, they will run in chain and the end result will be a 75% from original hit chance (hook register order doesn’t matter in this case, if you use <code class="language-plaintext highlighter-rouge">set_sfall_arg</code> in both hooks).</p> <p>The defines to use for the <code class="language-plaintext highlighter-rouge">hookID</code> are in <code class="language-plaintext highlighter-rouge">sfall.h</code>.</p><hr /> <h3 id="register_hook_proc_spec"> <a href="#register_hook_proc_spec" class="anchor-heading" aria-labelledby="register_hook_proc_spec"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>register_hook_proc_spec</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">register_hook_proc_spec</span><span class="p">(</span><span class="kt">int</span> <span class="n">hookID</span><span class="p">,</span> <span class="n">procedure</span> <span class="n">proc</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>So if you combine both mods together, they will run in chain and the end result will be a 75% from original hit chance (hook register order doesn’t matter in this case, if you use <code class="language-plaintext highlighter-rouge">set_sfall_arg</code> in both hooks).</p> <p>The defines to use for the <code class="language-plaintext highlighter-rouge">hookID</code> are in <strong>sfall.h</strong>.</p><hr /> <h3 id="register_hook_proc_spec"> <a href="#register_hook_proc_spec" class="anchor-heading" aria-labelledby="register_hook_proc_spec"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>register_hook_proc_spec</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">register_hook_proc_spec</span><span class="p">(</span><span class="kt">int</span> <span class="n">hookID</span><span class="p">,</span> <span class="n">procedure</span> <span class="n">proc</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Works the same as <code class="language-plaintext highlighter-rouge">register_hook_proc</code>, except that it registers the current script at the end of the hook script execution chain (i.e. the script will be executed after all previously registered scripts for the same hook, including the <code class="language-plaintext highlighter-rouge">hs_<name>.int</code> script). In addition, all scripts hooked to a single hook point with this function are executed in the exact order of how they were registered. In the case of using <code class="language-plaintext highlighter-rouge">register_hook</code> and <code class="language-plaintext highlighter-rouge">register_hook_proc</code> functions, scripts are executed in reverse order of how they were registered. <strong>The execution chain of script procedures for a hook is as follows:</strong> 1. Procedures registered with <code class="language-plaintext highlighter-rouge">register_hook</code> and <code class="language-plaintext highlighter-rouge">register_hook_proc</code> functions (executed in reverse order of registration). 2. The <code class="language-plaintext highlighter-rouge">hs_<name>.int</code> script. 3. Procedures registered with the <code class="language-plaintext highlighter-rouge">register_hook_proc_spec</code> function (executed in the exact order of registration).</p><hr /> <h3 id="set_sfall_arg"> <a href="#set_sfall_arg" class="anchor-heading" aria-labelledby="set_sfall_arg"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_sfall_arg</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_sfall_arg</span><span class="p">(</span><span class="kt">int</span> <span class="n">argNum</span><span class="p">,</span> <span class="kt">int</span> <span class="n">value</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Changes argument value. The argument number (<code class="language-plaintext highlighter-rouge">argNum</code>) is 0-indexed. This is useful if you have several hook scripts attached to one hook point (see <code class="language-plaintext highlighter-rouge">register_hook_proc</code>).</p><hr /> <h3 id="set_sfall_return"> <a href="#set_sfall_return" class="anchor-heading" aria-labelledby="set_sfall_return"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_sfall_return</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_sfall_return</span><span class="p">(</span><span class="kt">int</span> <span class="n">value</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Changes argument value. The argument number (<code class="language-plaintext highlighter-rouge">argNum</code>) is 0-indexed. This is useful if you have several hook scripts attached to one hook point (see <code class="language-plaintext highlighter-rouge">register_hook_proc</code>).</p><hr /> <h3 id="set_sfall_return"> <a href="#set_sfall_return" class="anchor-heading" aria-labelledby="set_sfall_return"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>set_sfall_return</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">set_sfall_return</span><span class="p">(</span><span class="n">any</span> <span class="n">value</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Used to return the new values from the script. Each time it’s called it sets the next value, or if you’ve already set all return values it does nothing.</p> </main> </div> </div> <div class="search-overlay"></div> </div> </body> </html>
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -4,15 +4,15 @@
|
||||
</code></pre></div></div> <p>Displays a message in the NPC response window in dialog or barter screen.</p><hr /> <h3 class="d-inline-block" id="get_current_inven_size"> <a href="#get_current_inven_size" class="anchor-heading" aria-labelledby="get_current_inven_size"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_current_inven_size</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">get_current_inven_size</span><span class="p">(</span><span class="n">ObjectPtr</span> <span class="n">object</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Returns the current inventory size of the container or the critter.</p><hr /> <h3 class="d-inline-block" id="get_metarule_table"> <a href="#get_metarule_table" class="anchor-heading" aria-labelledby="get_metarule_table"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_metarule_table</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">get_metarule_table</span>
|
||||
</code></pre></div></div> <p>Returns names of all currently available script functions.</p><hr /> <h3 class="d-inline-block" id="get_object_ai_data"> <a href="#get_object_ai_data" class="anchor-heading" aria-labelledby="get_object_ai_data"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_object_ai_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">int</span> <span class="n">get_object_ai_data</span><span class="p">(</span><span class="n">ObjectPtr</span> <span class="n">object</span><span class="p">,</span> <span class="kt">int</span> <span class="n">aiParam</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 <code class="language-plaintext highlighter-rouge">define_extra.h</code> 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 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">objects_in_radius</span><span class="s">", int tile, int radius, int elevation, int type)</span><span class="err">
|
||||
</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 <code class="language-plaintext highlighter-rouge">define_extra.h</code>) 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>
|
||||
</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. Note: The interval will be reset each time the player reloads the game.</p><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 <code class="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 /> <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>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="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>Hides currently active (selected) script window.</p><hr /> <h3 class="d-inline-block" id="sfall_func0show_window"> <a href="#sfall_func0show_window" class="anchor-heading" aria-labelledby="sfall_func0show_window"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>sfall_func0(“show_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">"show_window"</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Displays the script window previously hidden with the <code class="language-plaintext highlighter-rouge">sfall_func0("hide_window")</code> function.</p><hr /> <h3 class="d-inline-block" id="sfall_func1hide_window-string-winname"> <a href="#sfall_func1hide_window-string-winname" class="anchor-heading" aria-labelledby="sfall_func1hide_window-string-winname"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>sfall_func1(“hide_window”, string winName)</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>Hides the specified script window.</p> <ul> <li>winName: the window name, assigned to the window by the <code class="language-plaintext highlighter-rouge">CreateWin/create_win</code> function</li> </ul><hr /> <h3 class="d-inline-block" id="sfall_func1remove_timer_event-int-fixedparam"> <a href="#sfall_func1remove_timer_event-int-fixedparam" class="anchor-heading" aria-labelledby="sfall_func1remove_timer_event-int-fixedparam"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>sfall_func1(“remove_timer_event”, int fixedParam)</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_func1</span><span class="p">(</span><span class="s">"remove_timer_event"</span><span class="p">,</span> <span class="kt">int</span> <span class="n">fixedParam</span><span class="p">)</span>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
</code></pre></div></div> <ul> <li>Returns FID information about the square under the given tile at elevation 0</li> <li>Pass elevation as 4-bit number in bits 25-28 to access other elevations</li> <li>Pass result mode in bits 29-32: 0 - ground FID, 1 - roof FID, 2 - raw data.</li> </ul><hr /> <h3 class="d-inline-block" id="get_tile_ground_fid"> <a href="#get_tile_ground_fid" class="anchor-heading" aria-labelledby="get_tile_ground_fid"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_tile_ground_fid</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_tile_ground_fid</span><span class="p">(</span><span class="kt">int</span> <span class="n">tileNum</span><span class="p">,</span> <span class="kt">int</span> <span class="n">elevation</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Returns FID of a ground tile at given tile number and elevation.</p><hr /> <h3 class="d-inline-block" id="get_tile_roof_fid"> <a href="#get_tile_roof_fid" class="anchor-heading" aria-labelledby="get_tile_roof_fid"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_tile_roof_fid</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_tile_roof_fid</span><span class="p">(</span><span class="kt">int</span> <span class="n">tileNum</span><span class="p">,</span> <span class="kt">int</span> <span class="n">elevation</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Returns FID of a roof tile at given tile number and elevation. Note that FID of 1 is used when there is no actual roof.</p><hr /> <h3 id="obj_blocking_line"> <a href="#obj_blocking_line" class="anchor-heading" aria-labelledby="obj_blocking_line"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>obj_blocking_line</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">ObjectPtr</span> <span class="n">obj_blocking_line</span><span class="p">(</span><span class="n">ObjectPtr</span> <span class="n">objFrom</span><span class="p">,</span> <span class="kt">int</span> <span class="n">tileTo</span><span class="p">,</span> <span class="kt">int</span> <span class="n">blockingType</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Returns first object which blocks direct linear path from <code class="language-plaintext highlighter-rouge">objFrom</code> to <code class="language-plaintext highlighter-rouge">tileTo</code> using selected blocking function (see <code class="language-plaintext highlighter-rouge">BLOCKING_TYPE_*</code> constants in <code class="language-plaintext highlighter-rouge">sfall.h</code>). If path is clear (no blocker was encountered by selected function) - returns 0. <code class="language-plaintext highlighter-rouge">objFrom</code> is always excluded from calculations, but is required to be a valid object.</p><hr /> <h3 id="obj_blocking_tile"> <a href="#obj_blocking_tile" class="anchor-heading" aria-labelledby="obj_blocking_tile"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>obj_blocking_tile</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">ObjectPtr</span> <span class="n">obj_blocking_tile</span><span class="p">(</span><span class="kt">int</span> <span class="n">tileNum</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">blockingType</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Returns first object which blocks direct linear path from <code class="language-plaintext highlighter-rouge">objFrom</code> to <code class="language-plaintext highlighter-rouge">tileTo</code> using selected blocking function (see <code class="language-plaintext highlighter-rouge">BLOCKING_TYPE_*</code> constants in <strong>sfall.h</strong>). If path is clear (no blocker was encountered by selected function) - returns 0. <code class="language-plaintext highlighter-rouge">objFrom</code> is always excluded from calculations, but is required to be a valid object.</p><hr /> <h3 id="obj_blocking_tile"> <a href="#obj_blocking_tile" class="anchor-heading" aria-labelledby="obj_blocking_tile"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>obj_blocking_tile</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">ObjectPtr</span> <span class="n">obj_blocking_tile</span><span class="p">(</span><span class="kt">int</span> <span class="n">tileNum</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">blockingType</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Returns first object blocking given tile using given blocking function or 0 if tile is clear.</p><hr /> <h3 id="path_find_to"> <a href="#path_find_to" class="anchor-heading" aria-labelledby="path_find_to"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>path_find_to</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">array</span> <span class="n">path_find_to</span><span class="p">(</span><span class="n">ObjectPtr</span> <span class="n">objFrom</span><span class="p">,</span> <span class="kt">int</span> <span class="n">tileTo</span><span class="p">,</span> <span class="kt">int</span> <span class="n">blockingType</span><span class="p">)</span>
|
||||
</code></pre></div></div> <p>Returns the shortest path to a given tile using given blocking function as an array of tile directions (0..5) to move on each step. Array length equals to a number of steps. Empty array means that specified target cannot be reached.</p><hr /> <h3 class="d-inline-block" id="tile_by_position"> <a href="#tile_by_position" class="anchor-heading" aria-labelledby="tile_by_position"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>tile_by_position</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">tile_by_position</span><span class="p">(</span><span class="kt">int</span> <span class="n">x</span><span class="p">,</span> <span class="kt">int</span> <span class="n">y</span><span class="p">)</span>
|
||||
</code></pre></div></div> <ul> <li>returns the tile number at the x, y position relative to the top-left corner of the screen</li> <li>if the position is outside of the range of tiles, it will return -1</li> </ul><hr /> <h3 id="tile_get_objs"> <a href="#tile_get_objs" class="anchor-heading" aria-labelledby="tile_get_objs"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>tile_get_objs</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">array</span> <span class="n">tile_get_objs</span><span class="p">(</span><span class="kt">int</span> <span class="n">tileNum</span><span class="p">,</span> <span class="kt">int</span> <span class="n">elevation</span><span class="p">)</span>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user