Skip to content

fix: "<item> - received / given" messages name the item again - #540

Merged
JaXt0r merged 1 commit into
developfrom
fix/create-invitems-sets-item
Nov 22, 2026
Merged

JaXt0r merged 1 commit into
developfrom
fix/create-invitems-sets-item

Conversation

@BoroBongo

Copy link
Copy Markdown
Contributor

What

The "... - received" / "... - given" messages name the item again (e.g. "Pochodnia - otrzymałeś" instead of
" - otrzymałeś", "2 przedm. - otrzymałeś (Pochodnia)" instead of "... ()").

  • VmNpcInventoryExternalDomain.CreateInvItem/CreateInvItems: like the engine, the created item becomes the scripts'
    global item (OpenGothic does the same in create_invitems).

Why

Playtest 2026-11-22 (G2 Night of the Raven): every item given in a dialog (Cavalorn, Dexter, Greg) printed an
empty name. The log showed ZenKit DaedalusVm: Accessing member "C_ITEM.NAME" without an instance set right before
each print. G2's B_GiveInvItems reads item.name right after CreateInvItems, and we never set item there.
No issue exists for it.

How to test manually

  • G2: Cavalorn at his hut before Khorinis gives you his equipment - the messages show the item names.
  • G2: give an item in a dialog (e.g. the farmer clothes to Greg) - "... - oddałeś" shows the item name.
  • Log: no Accessing member "C_ITEM.NAME" without an instance set after these dialogs.
  • G1: Diego gives you his items at the start - messages unchanged.

Save/load

No state. item is a script global that the next item external overwrites anyway.

Known gaps / follow-ups

  • Compiled in the Editor together with the other fixes from the same playtest (EditMode tests 87/87), not play tested yet.

AI usage

Claude found the cause in the user's session log and wrote the fix. The user found the bug in a playtest.

…iveInvItems)

Like the engine, CreateInvItem(s) makes the created item the scripts' global 'item'. G2's B_GiveInvItems reads
item.name right after CreateInvItems; without it the print was " - otrzymałeś" / "2 przedm. - otrzymałeś ()" and ZenKit
logged 'Accessing member "C_ITEM.NAME" without an instance set' (Cavalorn, Dexter, Greg).
@JaXt0r
JaXt0r merged commit 67b6245 into develop Nov 22, 2026
1 check passed
@JaXt0r
JaXt0r deleted the fix/create-invitems-sets-item branch November 22, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants