</code></pre></div></div><p>Returns 1 if the aimed attack mode is selected, 0 otherwise.</p><hr/><h3id="block_combat"><ahref="#block_combat"class="anchor-heading"aria-labelledby="block_combat"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>block_combat</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">block_combat</span><spanclass="p">(</span><spanclass="kt">bool</span><spanclass="n">value</span><spanclass="p">)</span>
</code></pre></div></div><p>Deny the player to enter combat mode.</p><hr/><h3id="combat_data"><ahref="#combat_data"class="anchor-heading"aria-labelledby="combat_data"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>combat_data</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">mixed</span><spanclass="n">combat_data</span>
</code></pre></div></div><ul><li>returns a pointer to the <codeclass="language-plaintext highlighter-rouge">C_ATTACK_*</code> data for the current combat attack process (see defined constants in <strong>define_extra.h</strong>)</li><li>can be used in conjunction with the <codeclass="language-plaintext highlighter-rouge">get_object_data</code> and <codeclass="language-plaintext highlighter-rouge">set_object_data</code> functions example: <codeclass="language-plaintext highlighter-rouge">sfall_func3("set_object_data", sfall_func0("combat_data"), C_ATTACK_UNUSED, 255);</code></li></ul><hr/><h3id="disable_aimed_shots"><ahref="#disable_aimed_shots"class="anchor-heading"aria-labelledby="disable_aimed_shots"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>disable_aimed_shots</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">disable_aimed_shots</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">pid</span><spanclass="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.) 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/><h3id="force_aimed_shots"><ahref="#force_aimed_shots"class="anchor-heading"aria-labelledby="force_aimed_shots"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>force_aimed_shots</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">force_aimed_shots</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">pid</span><spanclass="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 couldn’t. 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/><h3id="get_attack_type"><ahref="#get_attack_type"class="anchor-heading"aria-labelledby="get_attack_type"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_attack_type</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_attack_type</span>
</code></pre></div></div><p>Gets the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart id’s are from 0 to 8.</p><hr/><h3class="d-inline-block"id="get_combat_free_move"><ahref="#get_combat_free_move"class="anchor-heading"aria-labelledby="get_combat_free_move"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_combat_free_move</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_combat_free_move</span>
</code></pre></div></div><p>Returns available “bonus move” points of the current critter’s turn. For NPCs, this is always 0 unless changed by <codeclass="language-plaintext highlighter-rouge">set_combat_free_move</code></p><hr/><h3id="get_critical_table"><ahref="#get_critical_table"class="anchor-heading"aria-labelledby="get_critical_table"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_critical_table</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_critical_table</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">crittertype</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">bodypart</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">level</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">valuetype</span><spanclass="p">)</span>
</code></pre></div></div><p>Gets current critical table. For details see <ahref="http://falloutmods.wikia.com/wiki/Critical_hit_tables">critical hit tables</a>. Requires <codeclass="language-plaintext highlighter-rouge">OverrideCriticalTable</code> to be enabled in <codeclass="language-plaintext highlighter-rouge">ddraw.ini</code> (already enabled by default).</p><hr/><h3id="get_critter_current_ap"><ahref="#get_critter_current_ap"class="anchor-heading"aria-labelledby="get_critter_current_ap"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_critter_current_ap</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_critter_current_ap</span><spanclass="p">(</span><spanclass="n">CritterPtr</span><spanclass="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 don’t 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/><h3id="get_last_attacker"><ahref="#get_last_attacker"class="anchor-heading"aria-labelledby="get_last_attacker"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_last_attacker</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">ObjectPtr</span><spanclass="n">get_last_attacker</span><spanclass="p">(</span><spanclass="n">ObjectPtr</span><spanclass="n">critter</span><spanclass="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/><h3id="get_last_target"><ahref="#get_last_target"class="anchor-heading"aria-labelledby="get_last_target"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_last_target</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">ObjectPtr</span><spanclass="n">get_last_target</span><spanclass="p">(</span><spanclass="n">ObjectPtr</span><spanclass="n">critter</span><spanclass="p">)</span>
</code></pre></div></div><p>Will return the last critter to be deliberately attacked. Outside of combat always returns 0.</p><hr/><h3id="reset_critical_table"><ahref="#reset_critical_table"class="anchor-heading"aria-labelledby="reset_critical_table"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>reset_critical_table</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">reset_critical_table</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">crittertype</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">bodypart</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">level</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">valuetype</span><spanclass="p">)</span>
</code></pre></div></div><p>Resets the critical table to default (or to the contents of <codeclass="language-plaintext highlighter-rouge">CriticalOverrides.ini</code>, if it exists). For details see ‘http://falloutmods.wikia.com/wiki/Critical_hit_tables’. Requires <codeclass="language-plaintext highlighter-rouge">OverrideCriticalTable</code> to be set to 1 in <codeclass="language-plaintext highlighter-rouge">ddraw.ini</code>. (Disabled by default, because it noticably increases loading times.)</p><hr/><h3id="set_bodypart_hit_modifier"><ahref="#set_bodypart_hit_modifier"class="anchor-heading"aria-labelledby="set_bodypart_hit_modifier"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_bodypart_hit_modifier</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_bodypart_hit_modifier</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">bodypart</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">value</span><spanclass="p">)</span>
</code></pre></div></div><p>Alters the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart id’s are from 0 to 8. Changes are not saved, and will reset to the defaults (or to the values specified in ddraw.ini if they exist) at each reload.</p><hr/><h3class="d-inline-block"id="set_combat_free_move"><ahref="#set_combat_free_move"class="anchor-heading"aria-labelledby="set_combat_free_move"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_combat_free_move</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_combat_free_move</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">value</span><spanclass="p">)</span>
</code></pre></div></div><p>Allows changing “bonus move” points (yellow lights on the interface bar) that can only be used for movement, not attacking</p><ul><li>Can be called from <codeclass="language-plaintext highlighter-rouge">HOOK_COMBATTURN</code> at the start of the turn (will not work on <codeclass="language-plaintext highlighter-rouge">dude_obj</code>)</li><li>Can be called from <codeclass="language-plaintext highlighter-rouge">HOOK_STDPROCEDURE</code> with <codeclass="language-plaintext highlighter-rouge">combat_proc</code> event (will work on both NPCs and <codeclass="language-plaintext highlighter-rouge">dude_obj</code>)</li></ul><hr/><h3id="set_critical_table"><ahref="#set_critical_table"class="anchor-heading"aria-labelledby="set_critical_table"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_critical_table</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_critical_table</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">crittertype</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">bodypart</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">level</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">valuetype</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">value</span><spanclass="p">)</span>
</code></pre></div></div><p>Used for modifying the critical table. For details see <ahref="http://falloutmods.wikia.com/wiki/Critical_hit_tables">critical hit tables</a>. Changes are not saved, and will reset to the defaults (or to the contents of <codeclass="language-plaintext highlighter-rouge">CriticalOverrides.ini</code>, if it exists) at each game reload. Requires <codeclass="language-plaintext highlighter-rouge">OverrideCriticalTable</code> to be enabled in <codeclass="language-plaintext highlighter-rouge">ddraw.ini</code> (already enabled by default).</p><hr/><h3id="set_critter_burst_disable"><ahref="#set_critter_burst_disable"class="anchor-heading"aria-labelledby="set_critter_burst_disable"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_critter_burst_disable</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_critter_burst_disable</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">critter</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">disable</span><spanclass="p">)</span>
</code></pre></div></div><p>Should only be used during the target critters turn while in combat.</p><hr/><h3class="d-inline-block"id="set_spray_settings"><ahref="#set_spray_settings"class="anchor-heading"aria-labelledby="set_spray_settings"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_spray_settings</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_spray_settings</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">centerMult</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">centerDiv</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">targetMult</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">targetDiv</span><spanclass="p">)</span>
</code></pre></div></div><p>Allows changing the multipliers and divisors for the bullet distribution of burst attacks dynamically. All settings are automatically reset to default values (i.e. <strong>ComputeSpray_*</strong> settings in ddraw.ini) after each attack action</p><ul><li>Should be called before the calculation of the bullet distribution (e.g. in <codeclass="language-plaintext highlighter-rouge">HOOK_TOHIT</code> or <codeclass="language-plaintext highlighter-rouge">HOOK_AMMOCOST</code>)</li><li><codeclass="language-plaintext highlighter-rouge">centerDiv/targetDiv</code>: the minimum value of divisor is 1</li><li><codeclass="language-plaintext highlighter-rouge">centerMult/targetMult</code>: multiplier values are capped at divisor values</li><li><strong>NOTE:</strong> refer to the description of <strong>ComputeSpray_*</strong> settings in ddraw.ini for details of the bullet distribution of burst attacks</li></ul></main><hr><footer><divclass="d-md-none mt-4 fs-2"> This site uses <ahref="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll. </div></footer></div></div><divclass="search-overlay"></div></div></body></html>