kuertee / x4-mod-da-ku-ai-tweaks

deadairaitweaks + kuertee attack ai tweaks
17 stars 4 forks source link

Meaning of ImproveBuildStoragePrioritization #22

Closed Schwarzemona closed 3 weeks ago

Schwarzemona commented 3 weeks ago

https://github.com/kuertee/x4-mod-da-ku-ai-tweaks/blob/3257e713f53c09c44c7071971fd98b1c0b12da41/t/0001.xml#L156 I don't understand the description of ImproveBuildStoragePrioritization. What do you mean by “This also fixes a bug where player ships would ignore the minimum volume so you shouldn't see large ships with 27 energy cells.” My understanding the script that the priority of the BuildStorage raised for S/M ship.

DeadAirRT commented 3 weeks ago

Vanilla code tries to find trades of a certain amount of volume. It also has a prioritization for trades with a build storage. There is a bug with the code where player ships will ignore the volume if it is for a build storage. This results in player owned large ships trading tiny amounts of wares.

The adjustment makes build storage prioritization only apply to Medium or Small ships, no longer applying to Large ships. It also fixes a bug that causes large ships to take extremely small trades.