</code></pre></div></div><p>Adds a timer event that calls the <codeclass="highlighter-rouge">timed_event_p_proc</code> procedure in the current global script <codeclass="highlighter-rouge">time</code>: the number of ticks after which the event timer is triggered <codeclass="highlighter-rouge">fixedParam</code>: the value that is passed to the <codeclass="highlighter-rouge">timed_event_p_proc</code> procedure for the <codeclass="highlighter-rouge">fixed_param</code> function</p><hr/><h3class="d-inline-block"id="add_trait"><ahref="#add_trait"class="anchor-heading"aria-labelledby="add_trait"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>add_trait</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">add_trait</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">traitID</span><spanclass="p">)</span>
</code></pre></div></div><p>adds the specified trait to the player</p><hr/><h3id="create_message_window"><ahref="#create_message_window"class="anchor-heading"aria-labelledby="create_message_window"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>create_message_window</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">create_message_window</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">message</span><spanclass="p">)</span>
</code></pre></div></div><p>Creates new spatial script with given SID, at given tile, and radius.</p><hr/><h3id="game_loaded"><ahref="#game_loaded"class="anchor-heading"aria-labelledby="game_loaded"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>game_loaded</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">game_loaded</span><spanclass="p">()</span>
</code></pre></div></div><p>Returns 1 the first time it is called after a new game or game load, and 0 any time after. It works on an individual basis for each script, so one script wont interfere with others. Its primary use is for global scripts, so that they know when to call <codeclass="highlighter-rouge">set_global_script_repeat</code>, but it can be called from normal scripts too.</p><hr/><h3id="gdialog_get_barter_mod"><ahref="#gdialog_get_barter_mod"class="anchor-heading"aria-labelledby="gdialog_get_barter_mod"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>gdialog_get_barter_mod</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">gdialog_get_barter_mod</span>
</code></pre></div></div><p>A more flexible version of in_world_map. It will return a set of flags indicating which mode the game is currently in. These flags are the same as those used in the <codeclass="highlighter-rouge">set_shader_mode function</code>.</p><hr/><h3id="get_inven_ap_cost"><ahref="#get_inven_ap_cost"class="anchor-heading"aria-labelledby="get_inven_ap_cost"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_inven_ap_cost</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_inven_ap_cost</span>
</code></pre></div></div><p>Returns the current AP cost to access the inventory in combat</p><hr/><h3id="get_kill_counter"><ahref="#get_kill_counter"class="anchor-heading"aria-labelledby="get_kill_counter"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_kill_counter</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_kill_counter</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">critterType</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns ambient light level in range 0..65536. The value returned by get_light_level may not exactly match that set by <codeclass="highlighter-rouge">set_light_level</code>, as <codeclass="highlighter-rouge">set_light_level</code> applies modifiers from the Night Vision perk.</p><hr/><h3id="get_npc_level"><ahref="#get_npc_level"class="anchor-heading"aria-labelledby="get_npc_level"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_npc_level</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_npc_level</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">npc</span><spanclass="p">)</span>
</code></pre></div></div><p>Used to read the in-memory copies of the .pro files Fallout makes when they are loaded. The offset refers to the offset in memory from the start of the proto to the element you are reading.</p><hr/><h3id="get_unspent_ap_bonus"><ahref="#get_unspent_ap_bonus"class="anchor-heading"aria-labelledby="get_unspent_ap_bonus"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_unspent_ap_bonus</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_unspent_ap_bonus</span><spanclass="p">()</span>
</code></pre></div></div><p>Gets the AC bonus you receive per unused action point at the end of your turn in combat. To allow for fractional values, the value given if divided by 4. (Hence the default value is 4 and not 1.)</p><hr/><h3id="get_unspent_ap_perk_bonus"><ahref="#get_unspent_ap_perk_bonus"class="anchor-heading"aria-labelledby="get_unspent_ap_perk_bonus"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_unspent_ap_perk_bonus</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_unspent_ap_perk_bonus</span><spanclass="p">()</span>
</code></pre></div></div><p>Similar to <codeclass="highlighter-rouge">get_unspent_ap_bonus</code>, but accounts for the extra AC granted by the H2H Evade perk. (The default value of this is also 4, equivalent to doubling the original bonus.</p><hr/><h3id="get_uptime"><ahref="#get_uptime"class="anchor-heading"aria-labelledby="get_uptime"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_uptime</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_uptime</span><spanclass="p">()</span>
</code></pre></div></div><p>Just a wrapper around the windows GetTickCount() function. It’s useful for making time fade effects in shaders, since they already have access to the current tick count.</p><hr/><h3id="get_viewport_x"><ahref="#get_viewport_x"class="anchor-heading"aria-labelledby="get_viewport_x"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_viewport_x</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_viewport_x</span><spanclass="p">()</span>
</code></pre></div></div><p>Takes a party member PID or an NPC name (deprecated, for compatibility with sfall 4.1.5/3.8.15 or earlier) as an argument. The NPC must be in your party. This function ignores player level requirements and the minimum 3 player level delay between NPC level gains. It also ignores the random element, regardless of sfall’s <codeclass="highlighter-rouge">NPCAutoLevel</code> setting.</p><hr/><h3id="input_funcs_available"><ahref="#input_funcs_available"class="anchor-heading"aria-labelledby="input_funcs_available"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>input_funcs_available</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">input_funcs_available</span><spanclass="p">()</span>
</code></pre></div></div><p>The input functions are only available if the user has the input hook turned on in <codeclass="highlighter-rouge">ddraw.ini</code>. Use <codeclass="highlighter-rouge">input_funcs_available</code> to check.</p><hr/><h3id="mark_movie_played"><ahref="#mark_movie_played"class="anchor-heading"aria-labelledby="mark_movie_played"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>mark_movie_played</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">mark_movie_played</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">id</span><spanclass="p">)</span>
</code></pre></div></div><p>Works exactly the same as message_str, except you get messages from files in <codeclass="highlighter-rouge">text/english/game</code> folder. Use <codeclass="highlighter-rouge">GAME_MSG_*</code> defines or <codeclass="highlighter-rouge">mstr_*</code> macros from <codeclass="highlighter-rouge">sfall.h</code> to use specific msg file</p><ul><li>Additional game msg files added by <codeclass="highlighter-rouge">ExtraGameMsgFileList</code> setting will have consecutive fileIds assigned beginning from 0x2000 to 0x2FFF. (e.g. if you set <codeclass="highlighter-rouge">ExtraGameMsgFileList=foo,bar</code> in <codeclass="highlighter-rouge">ddraw.ini</code>, <codeclass="highlighter-rouge">foo.msg</code> will be associated with 0x2000 and <codeclass="highlighter-rouge">bar.msg</code> with 0x2001.).</li><li>If a file has a specific number assigned in <codeclass="highlighter-rouge">ExtraGameMsgFileList</code>, its fileId will be (0x2000 + assigned number). (e.g. with <codeclass="highlighter-rouge">ExtraGameMsgFileList=foo,bar:2,foobar</code> in <codeclass="highlighter-rouge">ddraw.ini</code>, <codeclass="highlighter-rouge">bar.msg</code> will be associated with 0x2002 and <codeclass="highlighter-rouge">foobar.msg</code> with 0x2003.)</li></ul><hr/><h3id="mod_kill_counter"><ahref="#mod_kill_counter"class="anchor-heading"aria-labelledby="mod_kill_counter"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>mod_kill_counter</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">mod_kill_counter</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">critterType</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">amount</span><spanclass="p">)</span>
</code></pre></div></div><p><codeclass="highlighter-rouge">nb_*</code> functions are reserved for the brotherhood tactical training mod, and should be avoided.</p><hr/><h3id="resume_game"><ahref="#resume_game"class="anchor-heading"aria-labelledby="resume_game"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>resume_game</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">resume_game</span><spanclass="p">()</span>
</code></pre></div></div><p>Changes maximum chance of success and chance mod for each steal attempt. <codeclass="highlighter-rouge">max</code> will replace 95% success chance cap (so you can set 100% maximum chance, for instance). <codeclass="highlighter-rouge">mod</code> will add this much percent to each success chance. for example if your chance is 50% and <codeclass="highlighter-rouge">mod</code> is 20, you will get 70% actual success rate</p><hr/><h3id="set_critter_hit_chance_mod"><ahref="#set_critter_hit_chance_mod"class="anchor-heading"aria-labelledby="set_critter_hit_chance_mod"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_critter_hit_chance_mod</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_critter_hit_chance_mod</span><spanclass="p">(</span><spanclass="n">CritterPtr</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">max</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">mod</span><spanclass="p">)</span>
</code></pre></div></div><p>The same as <codeclass="highlighter-rouge">set_base_pickpocket</code>, but applies only to specific critter.</p><hr/><h3id="set_df_model"><ahref="#set_df_model"class="anchor-heading"aria-labelledby="set_df_model"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_df_model</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_df_model</span><spanclass="p">(</span><spanclass="n">string</span><spanclass="n">name</span><spanclass="p">)</span>
</code></pre></div></div><p>Effects all critters rather than just the player and can set the maximum in range from 0 to 999.</p><hr/><h3id="set_hp_per_level_mod"><ahref="#set_hp_per_level_mod"class="anchor-heading"aria-labelledby="set_hp_per_level_mod"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_hp_per_level_mod</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_hp_per_level_mod</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">mod</span><spanclass="p">)</span>
</code></pre></div></div><p>Effects all critters rather than just the player and can set the maximum in range from 0 to 999.</p><hr/><h3id="set_pipboy_available"><ahref="#set_pipboy_available"class="anchor-heading"aria-labelledby="set_pipboy_available"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_pipboy_available</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_pipboy_available</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">available</span><spanclass="p">)</span>
</code></pre></div></div><p>Will only accept 0 or 1 as an argument. Using any other value will cause the function to have no effect. Use 0 to disable the pipboy, and 1 to enable it.</p><hr/><h3id="set_proto_data"><ahref="#set_proto_data"class="anchor-heading"aria-labelledby="set_proto_data"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_proto_data</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_proto_data</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">pid</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">offset</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">value</span><spanclass="p">)</span>
</code></pre></div></div><p>Used to alter the in-memory copies of the .pro files Fallout makes when they are loaded. The offset refers to the offset in memory from the start of the proto to the element you are reading. Changes are not stored on disc, and are not permanent. If you modify the protos, and then Fallout subsequently reloads the file your changes will be lost.</p><hr/><h3id="set_unspent_ap_bonus"><ahref="#set_unspent_ap_bonus"class="anchor-heading"aria-labelledby="set_unspent_ap_bonus"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_unspent_ap_bonus</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_unspent_ap_bonus</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">multiplier</span><spanclass="p">)</span>
</code></pre></div></div><p>Alters the AC bonus you receive per unused action point at the end of your turn in combat. To allow for fractional values, the value given if divided by 4. (Hence the default value is 4 and not 1.)</p><hr/><h3id="set_unspent_ap_perk_bonus"><ahref="#set_unspent_ap_perk_bonus"class="anchor-heading"aria-labelledby="set_unspent_ap_perk_bonus"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_unspent_ap_perk_bonus</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_unspent_ap_perk_bonus</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">multiplier</span><spanclass="p">)</span>
</code></pre></div></div><p>Similar to <codeclass="highlighter-rouge">set_unspent_ap_bonus</code>, but effects the extra AC granted by the H2H Evade perk. (The default value of this is also 4, equivalent to doubling the original bonus.</p><hr/><h3id="set_viewport_x"><ahref="#set_viewport_x"class="anchor-heading"aria-labelledby="set_viewport_x"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_viewport_x</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_viewport_x</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">view_x</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns 1 if last sneak attempt (roll against skill) was successful, 0 otherwise. This calls an internal engine function which is used to determine the perception range of critters (which you can override using <codeclass="highlighter-rouge">HOOK_WITHINPERCEPTION</code>).</p><hr/><h3id="stop_game"><ahref="#stop_game"class="anchor-heading"aria-labelledby="stop_game"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>stop_game</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">stop_game</span><spanclass="p">()</span>
</code></pre></div></div><p>unequips an item from the specified slot for a critter or the player can take off player’s equipped item when the inventory is opened, or the player is in the barter screen slot: 0 - armor slot, 1 - right slot, 2 - left slot (see <codeclass="highlighter-rouge">INVEN_TYPE_*</code> in <codeclass="highlighter-rouge">define.h</code>)</p></div></div><divclass="search-overlay"></div></div></body></html>