Skip to content

Non-integer currencies causing client problems #742

@ozen-m

Description

@ozen-m

SPT Version

4.0

Project Type

Server

Expected Result

Transact with traders normally

Actual Result

If for some reason, most likely through a mod, a user is able to sell/buy an item with its currency not rounded off and the resulting currency is saved in the profile, the client continues with the transaction but is met with infinite loading, and further transactions are blocked. A restart of the client can be done, but transacting again results the same.

It was suggested that the server round off currencies to avoid this.

Steps To Reproduce

For demonstration purposes, we manually edit the profile.json

  1. Under characters.pmc.Inventory.items, find an element with "_tpl": "5449016a4bdc2d6f028b456f", (roubles)
  2. Edit its upd.StackObjectsCount to have a decimal value
  3. Go in game then buy from any trader
  4. Observe infinite loading

Server Log

spt20260317.log

BepinEx Log

N/A

Client Log

N/A

Player Profile

Line 592
69b9797ebb8b5a60b4271dc2.json

Screenshots

No response

Metadata

Metadata

Assignees

Labels

triageA fresh issue, yet to be reviewed

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions