The "Losing unmounted items" problem in Freelancer
People have regularly reported unmounted items disappearing when a player has a large number of unmounted items - cargo, ammunition, batteries, nanobots, and spare equipment such as guns and turrets. I spent a couple of days investigating this and believe I can provide a fairly precise description of the real underlying problem. Due to length, I'm posting some possible ways to help the problem as a followup.
Summary Probable Description of the Problem
Freelancer keeps a list of all of a pilot's "distinct items". The list can only contain 256 items, and if this length is exceeded the game may crash. I'm not completely clear on why certain items disappear in different scenarios, but I suspect that the net loss is based on the "death penalty" configured in freelancer.ini in the [Server section.
How Freelancer Counts "Distinct Items"
Although it's not easy to access the possessions of a pilot "dynamically" - between points when the game is saved to a file - you CAN see the last saved possessions as Freelancer counts them by looking at a decoded .FL file. If you add up the number of lines starting with
<pre><font size=1 face=Courier>
ship_archetype =
equip =
cargo =
</font></pre>
you will get the count.
Here's an example. The following lines are from a decoded copy of the "vanilla" newplayer.fl file:
<pre><font size=1 face=Courier>
ship_archetype = ge_fighter
equip = ge_gf1_engine_01
equip = ge_fighter_power01
equip = ge_s_scanner_01
equip = ge_s_tractor_01
equip = LargeWhiteSpecial, HpHeadlight
equip = SlowSmallOrange, HpRunningLight01
equip = SlowSmallOrange, HpRunningLight02
equip = SlowSmallOrange, HpRunningLight05
equip = contrail01, HpContrail01
equip = contrail01, HpContrail02
equip = DockingLightRedSmall, HpDockLight01
equip = DockingLightRedSmall, HpDockLight02
equip = shield01_mark01_lf, HpShield01
equip = li_gun01_mark01, HpWeapon01
equip = li_gun01_mark01, HpWeapon02
equip = ge_s_cm_01, HpCM01
cargo = ge_s_cm_01_ammo, 20
cargo = ge_s_battery_01, 10
cargo = ge_s_repair_01, 10
</font></pre>
This contains a total of 20 separate items. Notice some important things here:
+ Possessions that you cannot see obviously do count. In the standard game, contrails, engines, power plants, scanners, and tractors are not visible. So the first 12 items above count towards your total possessions, along with following 4 mounted items.
+ STACKED items - for example, the 20 units of countermeasure ammo - count as a single distinct possession.
+ UNSTACKED items, even with the SAME identity, count as "distinct items". So items such as unequipped guns that are normally added as single items each count separately. Again, "distinct items" comes down to just counting lines. So the following 2 unequipped Justice Mark 1 guns count as 2 more items:
<pre><font size=1 face=Courier>
cargo = li_gun01_mark01, 1
cargo = li_gun01_mark01, 1
</font></pre>
This is enough information to answer some important questions about item management.
How Many Visible Distinct Items Can A Pilot Have?
There is no way to automatically know in-game. If we subtract the ship itself, we're left with 255 item slots. Then, we have to subtract all invisible items such as (possibly) power plants, engines, tractor beams, contrails, and docking lights. These vary depending on both the mod and the particular ship. As a rule of thumb, probably a number in the range of 180-200 would work.
Unfortunately, there's no way for a player to directly "count" the items easily. When someone is nearing the limit, they usually have large, poorly-sorted lists and may easily lose count as they flip between inventory screens.
Summary Probable Description of the Problem
Freelancer keeps a list of all of a pilot's "distinct items". The list can only contain 256 items, and if this length is exceeded the game may crash. I'm not completely clear on why certain items disappear in different scenarios, but I suspect that the net loss is based on the "death penalty" configured in freelancer.ini in the [Server section.
How Freelancer Counts "Distinct Items"
Although it's not easy to access the possessions of a pilot "dynamically" - between points when the game is saved to a file - you CAN see the last saved possessions as Freelancer counts them by looking at a decoded .FL file. If you add up the number of lines starting with
<pre><font size=1 face=Courier>
ship_archetype =
equip =
cargo =
</font></pre>
you will get the count.
Here's an example. The following lines are from a decoded copy of the "vanilla" newplayer.fl file:
<pre><font size=1 face=Courier>
ship_archetype = ge_fighter
equip = ge_gf1_engine_01
equip = ge_fighter_power01
equip = ge_s_scanner_01
equip = ge_s_tractor_01
equip = LargeWhiteSpecial, HpHeadlight
equip = SlowSmallOrange, HpRunningLight01
equip = SlowSmallOrange, HpRunningLight02
equip = SlowSmallOrange, HpRunningLight05
equip = contrail01, HpContrail01
equip = contrail01, HpContrail02
equip = DockingLightRedSmall, HpDockLight01
equip = DockingLightRedSmall, HpDockLight02
equip = shield01_mark01_lf, HpShield01
equip = li_gun01_mark01, HpWeapon01
equip = li_gun01_mark01, HpWeapon02
equip = ge_s_cm_01, HpCM01
cargo = ge_s_cm_01_ammo, 20
cargo = ge_s_battery_01, 10
cargo = ge_s_repair_01, 10
</font></pre>
This contains a total of 20 separate items. Notice some important things here:
+ Possessions that you cannot see obviously do count. In the standard game, contrails, engines, power plants, scanners, and tractors are not visible. So the first 12 items above count towards your total possessions, along with following 4 mounted items.
+ STACKED items - for example, the 20 units of countermeasure ammo - count as a single distinct possession.
+ UNSTACKED items, even with the SAME identity, count as "distinct items". So items such as unequipped guns that are normally added as single items each count separately. Again, "distinct items" comes down to just counting lines. So the following 2 unequipped Justice Mark 1 guns count as 2 more items:
<pre><font size=1 face=Courier>
cargo = li_gun01_mark01, 1
cargo = li_gun01_mark01, 1
</font></pre>
This is enough information to answer some important questions about item management.
How Many Visible Distinct Items Can A Pilot Have?
There is no way to automatically know in-game. If we subtract the ship itself, we're left with 255 item slots. Then, we have to subtract all invisible items such as (possibly) power plants, engines, tractor beams, contrails, and docking lights. These vary depending on both the mod and the particular ship. As a rule of thumb, probably a number in the range of 180-200 would work.
Unfortunately, there's no way for a player to directly "count" the items easily. When someone is nearing the limit, they usually have large, poorly-sorted lists and may easily lose count as they flip between inventory screens.