Burst Fire Missiles & Weapon Damage Falloff

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
teleportationwars
Posts: 158
Joined: Fri, 12. Jul 19, 14:03

Burst Fire Missiles & Weapon Damage Falloff

Post by teleportationwars » Mon, 5. Aug 19, 10:39

DocAce was kind enough to answer how to do these things on discord.

Burst Fire Missiles:
2:45 AM] DocAce: Like this:
<missile amount="3" delay="0.2" />
my test:
<macro name="tpwareq_pulse_small_missile_macro" class="missile">
<component ref="tpwareq_pulse_small_missile_comp" />
<properties>
<identification name="{734550,12325}" basename="{734550,12326}" description="{734550,12328}" />
<ammunition value="1" />
<missile amount="6" delay="0.2" barrelamount="1" lifetime="90" range="15000" guided="1" icon="missile_guided_mk1" retarget="1" tags="guided" />
<explosiondamage value="3000" />
<reload time="10" />
<hull max="1000" />
<effects>
<explosion ref="ref_missile_explosion_light_01" />
<launch ref="missile_guided_muzzle" />
</effects>
<longrangescan minlevel="15" />
<weapon system="missile_guided" />
<countermeasure resilience="0.74" />
<physics mass="0.329">
<inertia pitch="0.264" yaw="0.264" roll="0.264" />
<drag forward="0.066" reverse="0.263" horizontal="0.472" vertical="0.472" pitch="0.125" yaw="0.125" roll="0.125" />
</physics>
</properties>
<connections>
<connection ref="con_engine01">
<macro ref="engine_missile_guided_mk1_macro" connection="ship" />
</connection>
</connections>
</macro>

Weapon Damage Falloff:
1:48 AM] DocAce: Huh, it does do something. The damage value is interpolated between the max and min values using a decrease time or rate you can specify. (If you set one the other is automatically calculated.) I think it's ineffective in this example macro because it's not set.
Let me just give you a full damage node example, all values at their defaults:
<damage min="0" max="0" value="0" hull="0" shield="0" noshield="0" delay="0" time="0" rate="0" />
Bullets then add some properties of their own:
<damage repair="false">
<multiplier mining="1" />
</damage>
[1:49 AM] DocAce: If I understand the code correctly it's decreasing the damage based on the time after bullet launch. You could effectively do range scaling with this.
my test:
<macro name="tpwareq_pulse_small_proj_bullet_macro" class="bullet">
<component ref="tpwareq_pulse_small_proj_bullet_comp" />
<properties>
<bullet speed="2800" lifetime="6" amount="1" barrelamount="1" icon="weapon_plasma_mk1" timediff="0.005" angle="0.05" maxhits="1" ricochet="0" scale="0" attach="0" />
<reload time="0.5" />
<damage min="100" max="100000" value="100000" time="6" />
<effects>
<impact ref="tpwar_warp_small" />
<launch ref="muzzle_gen_s_plasma_01_mk1" />
</effects>
<weapon system="weapon_standard" />
</properties>
</macro>
Did a little testing. Most bad numbers you can put in break the damage scaling so that no damage is done, however:
<damage min="500" max="1" value="500" time="6" />
makes for 750000 damage.

Post Reply

Return to “X4: Foundations - Scripts and Modding”