mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
25 lines
40 KiB
HTML
25 lines
40 KiB
HTML
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <link rel="stylesheet" href="/sfall/assets/css/just-the-docs-default.css"> <link rel="stylesheet" href="/sfall/assets/css/just-the-docs-head-nav.css" id="jtd-head-nav-stylesheet"> <style id="jtd-nav-activation"> .site-nav > ul.nav-list:first-child > li:not(:nth-child(26)) > a, .site-nav > ul.nav-list:first-child > li > ul > li > a, .site-nav > ul.nav-list:first-child > li > ul > li > ul > li > a { background-image: none; } .site-nav > ul.nav-list:not(:first-child) a, .site-nav li.external a { background-image: none; } .site-nav > ul.nav-list:first-child > li:nth-child(26) > a { font-weight: 600; text-decoration: none; }.site-nav > ul.nav-list:first-child > li:nth-child(26) > button svg { transform: rotate(-90deg); }.site-nav > ul.nav-list:first-child > li.nav-list-item:nth-child(26) > ul.nav-list { display: block; } </style> <script src="/sfall/assets/js/vendor/lunr.min.js"></script> <script src="/sfall/assets/js/just-the-docs.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="/sfall/favicon.ico" type="image/x-icon"> <!-- Begin Jekyll SEO tag v2.8.0 --> <title>Sfall funcX macros | sfall</title> <meta name="generator" content="Jekyll v3.9.0" /> <meta property="og:title" content="Sfall funcX macros" /> <meta property="og:locale" content="en_US" /> <meta name="description" content="Sfall documentation" /> <meta property="og:description" content="Sfall documentation" /> <link rel="canonical" href="/sfall/sfall-funcx-macros/" /> <meta property="og:url" content="/sfall/sfall-funcx-macros/" /> <meta property="og:site_name" content="sfall" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary" /> <meta property="twitter:title" content="Sfall funcX macros" /> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"WebPage","description":"Sfall documentation","headline":"Sfall funcX macros","url":"/sfall/sfall-funcx-macros/"}</script> <!-- End Jekyll SEO tag --> <link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png"> <link rel="manifest" href="/assets/favicon/site.webmanifest"> <link rel="mask-icon" href="/assets/favicon/safari-pinned-tab.svg" color="#5bbad5"> <meta name="msapplication-TileColor" content="#da532c"> <meta name="msapplication-config" content="/assets/favicon/browserconfig.xml"> <meta name="theme-color" content="#ffffff"> </head> <body> <a class="skip-to-main" href="#main-content">Skip to main content</a> <svg xmlns="http://www.w3.org/2000/svg" class="d-none"> <symbol id="svg-link" viewBox="0 0 24 24"> <title>Link</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"> <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE --> <symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link"> <title id="svg-external-link-title">(external link)</title> <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line> </symbol> <symbol id="svg-doc" viewBox="0 0 24 24"> <title>Document</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file"> <path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline> </svg> </symbol> <symbol id="svg-search" viewBox="0 0 24 24"> <title>Search</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"> <circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line> </svg> </symbol> <!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md --> <symbol id="svg-copy" viewBox="0 0 16 16"> <title>Copy</title> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16"> <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/> <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/> </svg> </symbol> <symbol id="svg-copied" viewBox="0 0 16 16"> <title>Copied</title> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16"> <path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/> <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/> </svg> </symbol> </svg> <div class="side-bar"> <div class="site-header" role="banner"> <a href="/sfall/" class="site-title lh-tight"> sfall </a> <button id="menu-button" class="site-button btn-reset" aria-label="Toggle menu" aria-pressed="false"> <svg viewBox="0 0 24 24" class="icon" aria-hidden="true"><use xlink:href="#svg-menu"></use></svg> </button> </div> <nav aria-label="Main" id="site-nav" class="site-nav"> <ul class="nav-list"><li class="nav-list-item"><a href="/sfall/" class="nav-list-link">Home</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Arrays category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/arrays/" class="nav-list-link">Arrays</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/array-functions/" class="nav-list-link">Array functions</a></li><li class="nav-list-item"><a href="/sfall/lists/" class="nav-list-link">Lists</a></li></ul></li><li class="nav-list-item"><a href="/sfall/best-practices/" class="nav-list-link">Best practices</a></li><li class="nav-list-item"><a href="/sfall/data-types/" class="nav-list-link">Data types</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Global scripts category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/global-scripts/" class="nav-list-link">Global scripts</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/global-script-functions/" class="nav-list-link">Global script functions</a></li></ul></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Hooks category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/hooks/" class="nav-list-link">Hooks</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/hook-functions/" class="nav-list-link">Hook functions</a></li><li class="nav-list-item"><a href="/sfall/hook-types/" class="nav-list-link">Hook types</a></li></ul></li><li class="nav-list-item"><a href="/sfall/sslc/" class="nav-list-link">SSLC</a></li><li class="nav-list-item"><a href="/sfall/optimization/" class="nav-list-link">Optimization</a></li><li class="nav-list-item"><a href="/sfall/animations/" class="nav-list-link">Animations</a></li><li class="nav-list-item"><a href="/sfall/art-and-appearance/" class="nav-list-link">Art and appearance</a></li><li class="nav-list-item"><a href="/sfall/audio/" class="nav-list-link">Audio</a></li><li class="nav-list-item"><a href="/sfall/car/" class="nav-list-link">Car</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Combat category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/combat/" class="nav-list-link">Combat</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/knockback/" class="nav-list-link">Knockback</a></li><li class="nav-list-item"><a href="/sfall/weapons-and-ammo/" class="nav-list-link">Weapons and ammo</a></li></ul></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Direct memory access category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/direct-memory-access/" class="nav-list-link">Direct memory access</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/call_offset_vx/" class="nav-list-link">call_offset_vX</a></li><li class="nav-list-item"><a href="/sfall/read_xxx/" class="nav-list-link">read_xxx</a></li><li class="nav-list-item"><a href="/sfall/write_xxx/" class="nav-list-link">write_xxx</a></li></ul></li><li class="nav-list-item"><a href="/sfall/explosions/" class="nav-list-link">Explosions</a></li><li class="nav-list-item"><a href="/sfall/global-variables/" class="nav-list-link">Global variables</a></li><li class="nav-list-item"><a href="/sfall/graphics/" class="nav-list-link">Graphics</a></li><li class="nav-list-item"><a href="/sfall/ini-settings/" class="nav-list-link">INI settings</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Interface category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/interface/" class="nav-list-link">Interface</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/cursor/" class="nav-list-link">Cursor</a></li><li class="nav-list-item"><a href="/sfall/inventory/" class="nav-list-link">Inventory</a></li><li class="nav-list-item"><a href="/sfall/main-interface/" class="nav-list-link">Main interface</a></li><li class="nav-list-item"><a href="/sfall/outline/" class="nav-list-link">Outline</a></li><li class="nav-list-item"><a href="/sfall/pip-boy/" class="nav-list-link">Pip-Boy</a></li><li class="nav-list-item"><a href="/sfall/tags/" class="nav-list-link">Tags</a></li><li class="nav-list-item"><a href="/sfall/windows-and-images/" class="nav-list-link">Windows and images</a></li></ul></li><li class="nav-list-item"><a href="/sfall/keyboard-and-mouse/" class="nav-list-link">Keyboard and mouse</a></li><li class="nav-list-item"><a href="/sfall/locks/" class="nav-list-link">Locks</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Maps and encounters category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/maps-and-encounters/" class="nav-list-link">Maps and encounters</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/rest/" class="nav-list-link">Rest</a></li><li class="nav-list-item"><a href="/sfall/worldmap/" class="nav-list-link">Worldmap</a></li></ul></li><li class="nav-list-item"><a href="/sfall/objects-and-scripts/" class="nav-list-link">Objects and scripts</a></li><li class="nav-list-item"><a href="/sfall/other/" class="nav-list-link">Other</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Perks and traits category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/perks-and-traits/" class="nav-list-link">Perks and traits</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/npc-perks/" class="nav-list-link">NPC perks</a></li></ul></li><li class="nav-list-item"><a href="/sfall/sfall-funcx-macros/" class="nav-list-link">Sfall funcX macros</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Sfall category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/sfall/" class="nav-list-link">Sfall</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/funcx/" class="nav-list-link">funcX</a></li><li class="nav-list-item"><a href="/sfall/version/" class="nav-list-link">Version</a></li></ul></li><li class="nav-list-item"><a href="/sfall/skills/" class="nav-list-link">Skills</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Stats category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/stats/" class="nav-list-link">Stats</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/alter-min-max/" class="nav-list-link">Alter min/max</a></li></ul></li><li class="nav-list-item"><a href="/sfall/tiles-and-paths/" class="nav-list-link">Tiles and paths</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="toggle items in Utility category" aria-pressed="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/sfall/utility/" class="nav-list-link">Utility</a><ul class="nav-list"><li class="nav-list-item"><a href="/sfall/math/" class="nav-list-link">Math</a></li><li class="nav-list-item"><a href="/sfall/strings/" class="nav-list-link">Strings</a></li></ul></li><li class="nav-list-item"><a href="/sfall/virtual-file-system/" class="nav-list-link">Virtual file system</a></li></ul> </nav> <footer class="site-footer"> This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll. </footer> </div> <div class="main" id="top"> <div id="main-header" class="main-header"> <div class="search" role="search"> <div class="search-input-wrap"> <input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search sfall" aria-label="Search sfall" autocomplete="off"> <label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label> </div> <div id="search-results" class="search-results"></div> </div> <nav aria-label="Auxiliary" class="aux-nav"> <ul class="aux-nav-list"> <li class="aux-nav-list-item"> <a href="https://nma-fallout.com/threads/fo2-engine-tweaks-sfall.178390/" class="site-button" > Forum </a> </li> <li class="aux-nav-list-item"> <a href="https://github.com/phobos2077/sfall/" class="site-button" > GitHub </a> </li> </ul> </nav> </div> <div class="main-content-wrap"> <div id="main-content" class="main-content"> <main> <h1 class="no_toc" id="sfall-funcx-macros"> <a href="#sfall-funcx-macros" class="anchor-heading" aria-labelledby="sfall-funcx-macros"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Sfall funcX macros </h1> <h2 class="no_toc" id="functions"> <a href="#functions" class="anchor-heading" aria-labelledby="functions"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Functions </h2> <ul id="markdown-toc"> <li><a href="#add_extra_msg_file" id="markdown-toc-add_extra_msg_file"><strong>add_extra_msg_file</strong></a></li> <li><a href="#critter_inven_obj2" id="markdown-toc-critter_inven_obj2"><strong>critter_inven_obj2</strong></a></li> <li><a href="#dialog_message" id="markdown-toc-dialog_message"><strong>dialog_message</strong></a></li> <li><a href="#get_current_inven_size" id="markdown-toc-get_current_inven_size"><strong>get_current_inven_size</strong></a></li> <li><a href="#get_metarule_table" id="markdown-toc-get_metarule_table"><strong>get_metarule_table</strong></a></li> <li><a href="#get_object_ai_data" id="markdown-toc-get_object_ai_data"><strong>get_object_ai_data</strong></a></li> <li><a href="#get_text_width" id="markdown-toc-get_text_width"><strong>get_text_width</strong></a></li> <li><a href="#item_weight" id="markdown-toc-item_weight"><strong>item_weight</strong></a></li> <li><a href="#metarule_exist" id="markdown-toc-metarule_exist"><strong>metarule_exist</strong></a></li> <li><a href="#npc_engine_level_up" id="markdown-toc-npc_engine_level_up"><strong>npc_engine_level_up</strong></a></li> <li><a href="#objects_in_radius" id="markdown-toc-objects_in_radius"><strong>objects_in_radius</strong></a></li> <li><a href="#set_drugs_data" id="markdown-toc-set_drugs_data"><strong>set_drugs_data</strong></a></li> <li><a href="#set_rest_heal_time" id="markdown-toc-set_rest_heal_time"><strong>set_rest_heal_time</strong></a></li> <li><a href="#set_rest_mode" id="markdown-toc-set_rest_mode"><strong>set_rest_mode</strong></a></li> <li><a href="#sfall_func0hide_window" id="markdown-toc-sfall_func0hide_window"><strong>sfall_func0(“hide_window”)</strong></a></li> <li><a href="#sfall_func0show_window" id="markdown-toc-sfall_func0show_window"><strong>sfall_func0(“show_window”)</strong></a></li> <li><a href="#sfall_func1hide_window-string-winname" id="markdown-toc-sfall_func1hide_window-string-winname"><strong>sfall_func1(“hide_window”, string winName)</strong></a></li> <li><a href="#sfall_func1remove_timer_event-int-fixedparam" id="markdown-toc-sfall_func1remove_timer_event-int-fixedparam"><strong>sfall_func1(“remove_timer_event”, int fixedParam)</strong></a></li> <li><a href="#sfall_func1show_window-string-winname" id="markdown-toc-sfall_func1show_window-string-winname"><strong>sfall_func1(“show_window”, string winName)</strong></a></li> <li><a href="#sfall_func2string_compare-string-str1-string-str2" id="markdown-toc-sfall_func2string_compare-string-str1-string-str2"><strong>sfall_func2(“string_compare”, string str1, string str2)</strong></a></li> <li><a href="#sfall_func3string_compare-string-str1-string-str2-int-codepage" id="markdown-toc-sfall_func3string_compare-string-str1-string-str2-int-codepage"><strong>sfall_func3(“string_compare”, string str1, string str2, int codePage)</strong></a></li> <li><a href="#spatial_radius" id="markdown-toc-spatial_radius"><strong>spatial_radius</strong></a></li> <li><a href="#void-sfall_func0remove_timer_event" id="markdown-toc-void-sfall_func0remove_timer_event"><strong>void sfall_func0(“remove_timer_event”)</strong></a></li> </ul><hr /> <h3 class="d-inline-block" id="add_extra_msg_file"> <a href="#add_extra_msg_file" class="anchor-heading" aria-labelledby="add_extra_msg_file"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>add_extra_msg_file</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">add_extra_msg_file</span><span class="p">(</span><span class="n">string</span> <span class="n">fileName</span><span class="p">)</span>
|
||
</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>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 <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. 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 <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>
|
||
</code></pre></div></div> <p>Removes all timer events with the specified <code class="language-plaintext highlighter-rouge">fixedParam</code> value for the current global script.</p><hr /> <h3 class="d-inline-block" id="sfall_func1show_window-string-winname"> <a href="#sfall_func1show_window-string-winname" class="anchor-heading" aria-labelledby="sfall_func1show_window-string-winname"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>sfall_func1(“show_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_func1</span><span class="p">(</span><span class="s">"show_window"</span><span class="p">,</span> <span class="n">string</span> <span class="n">winName</span><span class="p">)</span>
|
||
</code></pre></div></div> <p>Displays the specified hidden script window. <code class="language-plaintext highlighter-rouge">winName</code>: the window name, assigned to the window by the <code class="language-plaintext highlighter-rouge">CreateWin/create_win</code> function</p><hr /> <h3 class="d-inline-block" id="sfall_func2string_compare-string-str1-string-str2"> <a href="#sfall_func2string_compare-string-str1-string-str2" class="anchor-heading" aria-labelledby="sfall_func2string_compare-string-str1-string-str2"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>sfall_func2(“string_compare”, string str1, string str2)</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_func2</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>
|
||
</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>Returns radius of spatial script, associated with given dummy-object (returned by <code class="language-plaintext highlighter-rouge">create_spatial</code>).</p><hr /> <h3 class="d-inline-block" id="void-sfall_func0remove_timer_event"> <a href="#void-sfall_func0remove_timer_event" class="anchor-heading" aria-labelledby="void-sfall_func0remove_timer_event"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>void sfall_func0(“remove_timer_event”)</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">"remove_timer_event"</span><span class="p">)</span>
|
||
</code></pre></div></div> <p>Clears all set timer events for the current global script.</p> </main> </div> </div> <div class="search-overlay"></div> </div> </body> </html>
|