Skip to content

Codex/player trading 1.6.1170 - #919

Closed
absol89 wants to merge 19 commits into
tiltedphoques:masterfrom
absol89:codex/player-trading-1.6.1170
Closed

absol89 wants to merge 19 commits into
tiltedphoques:masterfrom
absol89:codex/player-trading-1.6.1170

Conversation

@absol89

@absol89 absol89 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

bugfixes

Three playtest bugs: renamed enchanted items and crafted potions missing from your picker, and Ready cancelling. Tracing each in the code now.

All three bugs had the same cause, and the fix is up as PR #8. CI is building it now.

Cause: the trade picker and the Ready check were working from the server's copy of your inventory. The server builds that copy when you join and then updates it from inventory events. Enchanting, renaming and brewing can change items without sending those events. Your renamed enchanted items and new potions were therefore missing from the server copy, or still listed as their old plain versions. Ready then compared your real inventory against that old copy, found a mismatch and cancelled.

Fix:

Your game now sends its current inventory when a trade opens and again each time you press Ready. The picker and the server checks use that.
If something in your offer is no longer in your inventory, it's dropped from the offer and both players are unreadied.
A mismatched offer now unreadies you instead of cancelling the trade.

The name issue you raised is unaffected: custom names still stay local. Your "AAA" items show and are searchable by name on your side, and your partner sees the base name.

I've added step 11 to the playtest, which repeats your exact case. I'm inferring the in-place-change cause from the code because I can't run the game here. If the potions still don't show after this, please send me the client log from a trade start.

Do you see any other bugs needing fixing?

I'll review the trade code paths end to end for remaining bugs, starting with how the sender's item gets removed.

Fixed missing items and Ready cancelling

Reviewed trade code for other bugs

Fixed sender losing the wrong copy of special items

Waiting on CI for PR #8

Yes, I found one more real bug and pushed a fix to the same PR #8.

Sender could keep the traded item. When an enchanted, renamed or poisoned item was traded, the sender's game was told to remove a newly built copy of that item's details, not the actual one in their inventory. That copy doesn't match anything stored, so most likely a plain version was removed, or nothing at all, and the special item stayed with the sender. That's an item duplication. The fix makes removal find the matching item in the inventory and remove that one. I'm inferring how the engine handles the mismatched copy from the code; step 11 of the playtest will show it. When you check, the traded item should be gone from the sender's inventory.

absol89 and others added 19 commits October 6, 2026 19:24
Add trading invitations, inventory offers, confirmation countdowns, and cancellation through the existing client overlay and server inventory services. Validate offers against canonical server inventories and prepare both sides atomically before sending ownership-checked inventory changes. Integrate native events with the existing UI lifecycle, fonts, notifications, and view store; add C++ and UI regression tests. Correct the TiltedCore v0.2.9 ref required by the existing build.

Adapted from Jacobwasbeast/TiltedEvolution trading implementation; isolated on upstream master without validation-only runtime, quest, animation, or item-drop changes.

Co-authored-by: Jacobwasbeast <jacobwasbeast@outlook.com>
Classify native forms into weapons, armor, ammo, potions, poisons, scrolls, food, ingredients, books, keys, soul gems, and misc. Add accessible category buttons with All as the default and keep broad Skyrim grouping for ammo, poison, and soul-gem subcategories. Filtering preserves offers and native inventory indices, survives state updates, and resets between trades. No server protocol changes.

Validation: production UI build and full release client/launcher link passed; nine UI tests passed, including category filtering and hidden-offer preservation. Native category behavior still needs in-game validation.
Merge ammo into Weapons and soul gems into Misc/Gems, shorten Apparel, enlarge the viewport layout, and follow the global STR text setting. Place Ready/Cancel Ready and Cancel Trade between full-height offer panes using the inventory scrollbar width. Remove redundant Close and Escape cancellation. Keep active sessions and the trade view when F2 hides the overlay; native state updates no longer force navigation, and the Trade menu restores an exchange after visiting other screens.

Validation: production Angular build and ten UI tests passed. Browser preview verified single-line category buttons at 1366x768 and 1920x1080, normal and XL STR text, matching offer/inventory scrollbar widths, centered controls, viewport fit, and trade persistence across F2 toggles. Downgrade changes remain in a separate local stash.
Add a search input beside Your inventory, combining category selection with case- and accent-insensitive Unicode partial-word matching. Reset search between sessions while preserving offers and native indices. Arrange each row as minus, actual quantity, plus, Clear, Max, and remove the duplicate gold-only maximum action.

Validation: twelve UI behavior tests and production Angular build passed. Browser preview verified search placement and single-line quantity controls at 1366x768 normal text and 1920x1080 XL text, plus accented partial-name filtering. Runtime downgrade changes remain stashed and excluded.
Use fixed, font-scaled grid columns for minus, quantity, plus, Clear and Max. Share the step-column width, gap and cell padding with the Offered heading so its left edge matches the quantity input at every STR text size.

Validation: production Angular build passed. Rendered alignment measured at 1366 and 1920 viewport widths for 10, 12, 16, 20 and 26px STR text; every row aligned within 0.02px.
Initialize Ready to false in an explicit noexcept constructor instead of a nested default member initializer. This avoids the GCC 13 type-trait error reported while instantiating the server trade-session map, without changing default readiness or the session layout.

Validation: Windows release server build passed; C++ tests passed 69 assertions in eight cases. A full Linux build remains to be rerun in CI; no Linux/GCC environment is installed locally.
Dock the trade panel to the right of the existing F2 controls/chat, remove the trade popup's full-screen input blocker, and keep chat/menu undimmed. Constrain the popup wrapper to the dock and wrap the left menu to avoid overlap. Left-align Available amounts with their heading and add spacing before Offered.

Validation: production Angular build and twelve UI tests passed. Browser preview confirmed chat remained clickable and a message could be sent with trading open at 1280x720, 1920x1080, and XL text. Available alignment measured across XS through XL and small/large quantities. UI and build commits are separate from the pre-existing runtime downgrade.
Hide quest-flagged inventory entries and Skyrim's internal unarmed form 000001F4 without renumbering native inventory indices. Reject these entries in shared server-side offer validation and omit hidden entries from outgoing UI selections. Preserve other unnamed entries pending identification.

Validation: production UI and Windows server builds passed; thirteen UI tests passed; C++ tests passed 77 assertions. Regression cases cover hiding protected items, preserving native indices and other offers, rejecting the unarmed form, and denying an outgoing offer with a falsified quest flag against a quest-flagged canonical entry.
Render trading directly in a fixed right-hand dock instead of the generic popup frame. Bound the panel and its flex/grid children, use fixed inventory columns, and wrap long item and offer names so intrinsic content cannot enlarge the window beyond the viewport. Preserve left-side chat hit testing and font-scaled quantity controls.

Validation: production Angular build and thirteen UI tests passed. Browser tests exercised 1366 and 1920 widths at all five STR text sizes with long unbroken names and maximum integer quantities. Panel and Max buttons remained inside the screen, and chat stayed clickable.
Use five evenly spaced menu columns so Settings and other actions keep their positions at every STR text size. Center labels within their own buttons and take ornament arrows out of normal text flow. Share the right/bottom dock gap and set explicit viewport-based panel dimensions independent of content width.

Validation: production Angular build and thirteen UI tests passed. Browser checks at 1366 and 1920 widths across XS through XL confirmed a single row of equal-width menu buttons, matching right/bottom trade margins, and clickable chat. Multi-word labels may wrap inside their fixed column.
…emp IDs

Poisons are recreated through the engine's AddPoison call instead of
AddPotion, effects keep the sender's order (recipe comparison is now
order-insensitive), and the trade UI lists each crafted potion's
temporary ID alongside its effects.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSW5HGXzi9kAVm4zdsSaid
Each client hides partner items whose plugin forms or crafted effects it
cannot load, and its Ready request lists the partner items it accepts.
The server transfers only accepted items; the rest stay with their owner,
and senders see which of their offered items the partner cannot receive.
Crafted enchanted gear trades when its enchantment effects resolve.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSW5HGXzi9kAVm4zdsSaid
Applied crafted poisons now carry their recipe in the inventory entry and
compare by recipe instead of temporary ID. The recipient recreates the
coating with AddPoison when every effect resolves locally; otherwise the
weapon stays hidden and remains with its owner.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSW5HGXzi9kAVm4zdsSaid
Finish crafted potion trading: AddPoison for poisons, temp IDs in trade UI
@absol89 absol89 closed this Oct 7, 2026
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