Forums » Bugs

Inconsistent GetStationMerchInfo(*).mass

Dec 29, 2023 helix397 link
Summary: The output of GetStationMerchInfo(*) sometimes has differrent `.mass` values for the same item.

Steps to replicate:
- Disable all plugins by renaming the /plugins folder to /_plugins
- Start the game, log in, and enter the universe
- Dock with the station in Ukari L2
- Select a Warthog MkII, launch and re-dock
- Execute this in the lua console: `/lua for i=1,GetNumStationMerch() do local info = GetStationMerchInfo(i) if info.name == 'Warthog Territorial Defender' then print(info.mass) end end`
-- This command looks for a merch item named "Warthog Territorial Defender", then prints its mass
- Result is 11.110000610352
- Select an Atlas MkIII, launch and re-dock
- Execute the command again
- Result is 14.909999847412

Expected behavior: mass of the WTD remains the same no matter what

Actual behavior: GetStationMerchInfo(*) says the WTD's mass is different now

Notes:
- Replicated just now 2023-12-29, about 6:50pm PST, on VO version 1.8.675. My OS is Windows 10 running on a Dell laptop with Nvidia GeForce graphics card.
- Have not checked other items/ships
- Have not checked other stations
- The WTD's description says its mass is 5300kg, which doesn't seem to match either ~11.1 or ~14.9
- I used Fast Charge Power Cells and no other addons in my ships
- Equipping other addons (eg. weapons) on your ship seems to change the numbers somehow
- Shutting the game down and restarting it does not seem to change the numbers

=== errors.log ===
Note: I have replaced chat messages with "-" for privacy reasons. The "in hog2" and "in atlas3" lines were printed via `/lua print(*)` after launching into space with the hog2/atlas3 respectively.

Windows 10.00.19045 (platform 2)
Is 64bit OS? Yes
Fri Dec 29 18:44:20 2023
There is 35 percent of memory in use.
There are 33279888 total KB of physical memory.
There are 21313408 free KB of physical memory.
There are 38260624 total KB of paging file.
There are 25284456 free KB of paging file.
There are 2097024 total KB of virtual memory.
There are 2018684 free KB of virtual memory.
There are 0 free KB of extended memory.
loaded ./media.rlb
loaded ./media6.rlb
loaded ./media7.rlb
loaded ./demos.rlb
archive returned 0
build date Dec 14 2023 23:53:15
Initializing job system with 5 threads and 32768 jobs per thread.
ovr_Initialize: -3001
[12/29/23 18:44:20] Found driver: "Windows Sound (WAV) driver". Type 1, Version 10.1. Load @0x10000000
[12/29/23 18:44:20] Instantiate address: 10002540
[12/29/23 18:44:20] Found driver: "DirectX11 GKGL driver". Type 5, Version 150.0. Load @0x048d0000
[12/29/23 18:44:20] Instantiate address: 048D36D0
[12/29/23 18:44:20] Found driver: "DirectX8.1 GKGL driver". Type 5, Version 142.1. Load @0x04940000
[12/29/23 18:44:20] Instantiate address: 04963890
[12/29/23 18:44:20] Found driver: "DirectX9 GKGL driver". Type 5, Version 150.0. Load @0x04940000
[12/29/23 18:44:20] Instantiate address: 0498A5F0
[12/29/23 18:44:20] Found driver: "Vulkan GKGL driver". Type 5, Version 150.0. Load @0x04b60000
[12/29/23 18:44:20] Instantiate address: 04B696D0
[12/29/23 18:44:20] Found driver: "OpenGL Reference GKGL driver". Type 5, Version 150.0. Load @0x04c30000
[12/29/23 18:44:20] Instantiate address: 04C43A10
[12/29/23 18:44:20] Found driver: "Vista Sound driver". Type 1, Version 10.0. Load @0x050b0000
[12/29/23 18:44:20] Instantiate address: 050B235E
[12/29/23 18:44:20] Found driver: "XAudio2 Sound driver". Type 1, Version 10.0. Load @0x05110000
[12/29/23 18:44:20] Instantiate address: 051118CE
Using multithreaded rendering.
Using 6 physics worker threads. and g_do_mp = 1
using other arch.
DoGameMPJobs.
starting job system.
Starting game job.
[12/29/23 18:44:25] Creating 2048x2048 shadowmap.
Created 2 refraction targets
Loaded sensitivity envelope for touch regions.
Loaded sensitivity envelope for quest controllers.
Input driver initialized.
HAS_LEAP - calling initLeapMouse
VO_API_VERSION = 19
[12/29/23 18:44:32] Flight-Assist mode disabled.
[12/29/23 18:44:32] Auto-Aim enabled.
[12/29/23 18:44:32] Auto-Fire enabled.
TTS initialized.
Welcome to Vendetta Online.

[12/29/23 18:44:47] Welcome to Vendetta Online.

[12/29/23 18:44:47] Welcome to Vendetta Online.
[12/29/23 18:44:53] [397] *** Channel 397 is active.
[12/29/23 18:44:53] You are entering Ukari L-2
[12/29/23 18:44:54] *** Luxen requests permission to become your buddy. Type /buddy accept "Luxen" to accept.
[12/29/23 18:44:57] People in the room: Ravenwolf397
[12/29/23 18:44:57] You are now in Caelestis Watch (UIT Barracks).
-
in hog2
[12/29/23 18:46:28] People in the room: Ravenwolf397
[12/29/23 18:46:28] You are now in Caelestis Watch (UIT Barracks).
11.110000610352
in atlas3
-
[12/29/23 18:46:53] People in the room: Ravenwolf397
[12/29/23 18:46:53] You are now in Caelestis Watch (UIT Barracks).
14.909999847412
Ending game job.
Waiting for game thread to exit.
game thread was joined.
worker 0: num jobs executed: 0
worker 1: num jobs executed: 32862
worker 2: num jobs executed: 9111
worker 3: num jobs executed: 1137
worker 4: num jobs executed: 1686
Jan 03, 2024 helix397 link
Did some more poking around.

Tested a random commodity, light weapon, heavy weapon, power cell and turret - all had correct mass values. Issue appears to only affect ships.

I think I figured out what number is being produced: it seems to be GetStationMerchInfo(*).mass = (mass of current ship, including addons and cargo) + (mass of merch ship)

This also affects InvManager.GetInventoryItemPrototype(GetStationMerchInfo(*).itemtype):GetMass(), which produces the same values. However unlike GetStationMerchInfo(*).mass, the prototype :GetMass() result will change whenever you select a new ship, not just after launching & re-docking.
Jan 05, 2024 incarnate link
I believe this should be fixed in the most-recent patch update.