Skip to content

VillageScreen.PortRequests returns 5 of the game's 6 Kingsmarch ports (Moti Aro missing) #84

Description

@LostPoE

VillageScreen.PortRequests exposes five port quota structs where the game holds six. The missing one is always the last port, Moti Aro, so any plugin reading Kingsmarch shipping quotas silently loses a destination.

Reproduction

Enter Kingsmarch, open the shipping screen, and count the entries:

var vs = GameController.IngameState.IngameUi.VillageScreen;
LogMessage($"{vs.PortRequests?.Count}"); // 5, with six ports shown in the UI

What's actually there

The six quota structs are one contiguous array with a 24-byte stride, and the sixth is populated normally — the reader just stops one short. Materialising entries past the end of the list:

var list = vs.PortRequests;
var port = GameController.Game.GetObject<VillagePortRequest>(list[0].Address + 24L * list.Count);
  • index 5 (list.Count) — a well-formed request list; at the time of testing, Wheat 30,000 at +40% and Corn 31,000 at +100%, matching what the UI showed for Moti Aro
  • index 6 — empty, i.e. the array's terminator
  • index 7+ — garbage

So the array's real length is six and the count used to build the list is one too small.

Environment

  • ExileCore.dll 1.0.0+5a8a10a6d0d92aaee5a8ea0f23cbd2d69b3a8113-dirty, dated 2026-08-25
  • Path of Exile 1, Kingsmarch / Settlers content

Workaround

Plugins can read the last port straight from the array, indexing off list.Count rather than a hardcoded 5, so the read falls back cleanly once this is fixed: Matejko-poe/VillageManager#2

Happy to test a patched build against the same shipment screen if that helps.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions