1.3 BUG Possible Logic Issue in Bail Script

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

kevrlet
Posts: 13
Joined: Mon, 3. Dec 18, 03:56
x4

1.3 BUG Possible Logic Issue in Bail Script

Post by kevrlet »

Version and language: 1.3, English
Modded: No
(everything else, even the 'mods?' question, are really irrelevant to this)

Unless I am reading this wrong (and it has been a while since I've coded in LUA, so it's possible), in md.notifications.PlayerOwnedShipAttacks, this line determines the bail rate of enemy ships when under fire by player-controlled ships:

Code: Select all

<set_value name="$ejectchance" exact="( (46 - $target.combinedskill / 5) * [(($target.maxhull)f / [($attacker.maxhull)f, 1.0].max), 1.0].min * [(($attacker.shieldpercentage + $attacker.hullpercentage) / [($target.shieldpercentage + $target.hullpercentage), 1.0].max), 1.0].min )i"/>
Specifically, the target.maxhull / attacker.maxhull bit looks like it will negatively impact bail rates if the player's ship has more max hull than the enemy - and have no impact if the player's ship has less. If I'm right, even within class (Scout vs Heavy Fighter, for example), this can more than cut the bail rate in half.

Return to “X4: Foundations - Technical Support”