This commit is contained in:
github-actions[bot]
2026-04-17 04:00:08 +00:00
parent be9e33d82d
commit ba006cf3f4
9 changed files with 16 additions and 16 deletions
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -5,9 +5,9 @@
</code></pre></div></div> <p>Allows overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) stops a weapon from making aimed shots even if it normally coulld. Affects player and NPCs alike. The list of edited weapons is not saved over game loads, so you need to call the function once at each reload. Use a pid of 0 to represent unarmed.</p><hr /> <h3 id="force_aimed_shots"> <a href="#force_aimed_shots" class="anchor-heading" aria-labelledby="force_aimed_shots"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>force_aimed_shots</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">force_aimed_shots</span><span class="p">(</span><span class="kt">int</span> <span class="n">pid</span><span class="p">)</span>
</code></pre></div></div> <p>Allows overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) Will allow a weapon to make aimed shots even if it normally couldnt. Affects player and NPCs alike. Does not override the effects of the fast shot trait. The list of edited weapons is not saved over game loads, so you need to call the function once at each reload. Use a pid of 0 to represent unarmed.</p><hr /> <h3 id="get_attack_type"> <a href="#get_attack_type" class="anchor-heading" aria-labelledby="get_attack_type"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_attack_type</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_attack_type</span>
</code></pre></div></div><hr /> <h3 id="get_bodypart_hit_modifier"> <a href="#get_bodypart_hit_modifier" class="anchor-heading" aria-labelledby="get_bodypart_hit_modifier"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_bodypart_hit_modifier</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_bodypart_hit_modifier</span><span class="p">(</span><span class="kt">int</span> <span class="n">bodypart</span><span class="p">)</span>
</code></pre></div></div> <p>Gets the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart ids are from 0 to 8.</p><hr /> <h3 class="d-inline-block" id="get_combat_free_move"> <a href="#get_combat_free_move" class="anchor-heading" aria-labelledby="get_combat_free_move"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_combat_free_move</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_combat_free_move</span>
</code></pre></div></div> <p>Returns the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart ids are from 0 to 8.</p><hr /> <h3 class="d-inline-block" id="get_combat_free_move"> <a href="#get_combat_free_move" class="anchor-heading" aria-labelledby="get_combat_free_move"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_combat_free_move</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_combat_free_move</span>
</code></pre></div></div> <p>Returns available “bonus move” points of the current critters turn. For NPCs, this is always 0 unless changed by <code class="language-plaintext highlighter-rouge">set_combat_free_move</code></p><hr /> <h3 id="get_critical_table"> <a href="#get_critical_table" class="anchor-heading" aria-labelledby="get_critical_table"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_critical_table</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_critical_table</span><span class="p">(</span><span class="kt">int</span> <span class="n">crittertype</span><span class="p">,</span> <span class="kt">int</span> <span class="n">bodypart</span><span class="p">,</span> <span class="kt">int</span> <span class="n">level</span><span class="p">,</span> <span class="kt">int</span> <span class="n">valuetype</span><span class="p">)</span>
</code></pre></div></div> <p>Gets current critical table. For details see <a href="http://falloutmods.wikia.com/wiki/Critical_hit_tables">critical hit tables</a>. Requires <code class="language-plaintext highlighter-rouge">OverrideCriticalTable</code> to be enabled in <code class="language-plaintext highlighter-rouge">ddraw.ini</code> (already enabled by default).</p><hr /> <h3 id="get_critter_current_ap"> <a href="#get_critter_current_ap" class="anchor-heading" aria-labelledby="get_critter_current_ap"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_critter_current_ap</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_critter_current_ap</span><span class="p">(</span><span class="n">CritterPtr</span><span class="p">)</span>
</code></pre></div></div> <p>Returns the current critical table. For details see <a href="http://falloutmods.wikia.com/wiki/Critical_hit_tables">critical hit tables</a>. Requires <code class="language-plaintext highlighter-rouge">OverrideCriticalTable</code> to be enabled in <code class="language-plaintext highlighter-rouge">ddraw.ini</code> (already enabled by default).</p><hr /> <h3 id="get_critter_current_ap"> <a href="#get_critter_current_ap" class="anchor-heading" aria-labelledby="get_critter_current_ap"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_critter_current_ap</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_critter_current_ap</span><span class="p">(</span><span class="n">CritterPtr</span><span class="p">)</span>
</code></pre></div></div> <p>Should only be used during the target critters turn while in combat. Calling it outside of combat typically returns the critters max ap, but dont rely on that behaviour. (Specifically, if the critter has never before entered combat, it will probably return the critters base ap ignoring any extra bonuses from perks etc.)</p><hr /> <h3 id="get_last_attacker"> <a href="#get_last_attacker" class="anchor-heading" aria-labelledby="get_last_attacker"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_last_attacker</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">ObjectPtr</span> <span class="n">get_last_attacker</span><span class="p">(</span><span class="n">ObjectPtr</span> <span class="n">critter</span><span class="p">)</span>
</code></pre></div></div> <p>Will return the last critter to deliberately launch an attack against the argument critter. If a critter has not launched/received an attack, it will return 0. Outside of combat always returns 0.</p><hr /> <h3 id="get_last_target"> <a href="#get_last_target" class="anchor-heading" aria-labelledby="get_last_target"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_last_target</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">ObjectPtr</span> <span class="n">get_last_target</span><span class="p">(</span><span class="n">ObjectPtr</span> <span class="n">critter</span><span class="p">)</span>
</code></pre></div></div> <p>Will return the last critter to be deliberately attacked. Outside of combat always returns 0.</p><hr /> <h3 id="reset_critical_table"> <a href="#reset_critical_table" class="anchor-heading" aria-labelledby="reset_critical_table"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>reset_critical_table</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">reset_critical_table</span><span class="p">(</span><span class="kt">int</span> <span class="n">crittertype</span><span class="p">,</span> <span class="kt">int</span> <span class="n">bodypart</span><span class="p">,</span> <span class="kt">int</span> <span class="n">level</span><span class="p">,</span> <span class="kt">int</span> <span class="n">valuetype</span><span class="p">)</span>
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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.2">Jekyll</generator><link href="/sfall/feed.xml" rel="self" type="application/atom+xml" /><link href="/sfall/" rel="alternate" type="text/html" /><updated>2026-04-16T02:32:02+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.2">Jekyll</generator><link href="/sfall/feed.xml" rel="self" type="application/atom+xml" /><link href="/sfall/" rel="alternate" type="text/html" /><updated>2026-04-17T04:00:01+00:00</updated><id>/sfall/feed.xml</id><title type="html">sfall</title><subtitle>Sfall documentation</subtitle></feed>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,7 +11,7 @@
</code></pre></div></div> <p>Returns ambient light level in the range of 0 to 65536. The value returned by get_light_level may not exactly match that set by <code class="language-plaintext highlighter-rouge">set_light_level</code>, as <code class="language-plaintext highlighter-rouge">set_light_level</code> applies modifiers from the Night Vision perk.</p><hr /> <h3 id="get_npc_level"> <a href="#get_npc_level" class="anchor-heading" aria-labelledby="get_npc_level"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_npc_level</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_npc_level</span><span class="p">(</span><span class="n">string</span> <span class="n">npc</span><span class="p">)</span>
</code></pre></div></div><hr /> <h3 id="get_proto_data"> <a href="#get_proto_data" class="anchor-heading" aria-labelledby="get_proto_data"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_proto_data</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_proto_data</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">offset</span><span class="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 /> <h3 id="get_unspent_ap_bonus"> <a href="#get_unspent_ap_bonus" class="anchor-heading" aria-labelledby="get_unspent_ap_bonus"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_unspent_ap_bonus</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_unspent_ap_bonus</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 /> <h3 id="get_unspent_ap_perk_bonus"> <a href="#get_unspent_ap_perk_bonus" class="anchor-heading" aria-labelledby="get_unspent_ap_perk_bonus"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_unspent_ap_perk_bonus</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_unspent_ap_perk_bonus</span>
</code></pre></div></div> <p>Returns 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 /> <h3 id="get_unspent_ap_perk_bonus"> <a href="#get_unspent_ap_perk_bonus" class="anchor-heading" aria-labelledby="get_unspent_ap_perk_bonus"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_unspent_ap_perk_bonus</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_unspent_ap_perk_bonus</span>
</code></pre></div></div> <p>Similar to <code class="language-plaintext 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 /> <h3 id="get_uptime"> <a href="#get_uptime" class="anchor-heading" aria-labelledby="get_uptime"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_uptime</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_uptime</span>
</code></pre></div></div> <p>Just a wrapper around the windows GetTickCount() function. Its useful for making time fade effects in shaders, since they already have access to the current tick count.</p><hr /> <h3 id="get_viewport_x"> <a href="#get_viewport_x" class="anchor-heading" aria-labelledby="get_viewport_x"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_viewport_x</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_viewport_x</span>
</code></pre></div></div><hr /> <h3 id="get_viewport_y"> <a href="#get_viewport_y" class="anchor-heading" aria-labelledby="get_viewport_y"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> <strong>get_viewport_y</strong> </h3> <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="n">get_viewport_y</span>
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -6,7 +6,7 @@
</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 the weight of an item 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>