AkadenTK/superwarp

Possible support for campaign zone warps?

Heretic6667 opened this issue · 4 comments

Would be much appreciated :) make running around in shadowreign areas less annoying.

Byrth commented

I looked at this today and it's not clear to me how to identify which zones are accessible to warp to. My memory is that users can only warp to zones they have visited before, but it doesn't look like there is a typically bitmask field for it in the 0x34 incoming packet. Perhaps they are piggybacking off of some other system that already sends that information?

Menu parameters in it for me are:
1: 3
2: 1
3: Allied Notes amount
4~8: 0

Altering the values of parameters 1 and 2 do not seem to do anything. If I alter parameter 3 to be below 100 allied notes, the NPC refuses to warp me.

There's gotta be some other data retrieved somehow. Because the menu knows who is in control of each region too.

If we find that data, I bet the other data is nearby.

Byrth commented

I would not be shocked to learn it comes through the same packet that populates /cmap. I will try blocking it and see what happens.

Edit:
Blocking those packets doesn't matter.

I just missed it in the first capture, but there is an automated exchange like this:

  • Action on NPC (0x1A outgoing)
  • NPC Interaction 2 (0x34 incoming)
  • Dialogue Choice (0x5B outgoing)
  • Dialogue Information (0x5C incoming) <--- this holds the info

I am not sure if any of the existing menus that superwarps is compatible with follows this pattern already, but this structure means you cannot validate the request to warp until after the interaction has started.

The relevant 0x5C has this format:

  • First 4 bytes are a bitmap where each bit corresponds to the availability of a zone warp:
    • 0x00000001 lsb: "I do not require your services", generally (always?) set to false
    • 0x00000002: Xarcabard
    • 0x00000004: Beaucedine Glacier
    • 0x00000008: Battalia Downs
    • 0x00000010: Rolanberry Fields
    • 0x00000020: Sauromugue Champaign
    • 0x00000040: Jugner Forest
    • 0x00000080: Pashhow Marshlands
    • 0x00000100: Meriphataud Mountains
    • 0x00000200: Vunkerl Inlet
    • 0x00000400: Grauberg
    • 0x00000800: Fort Karugo-Narugo
    • 0x00001000: East Ronfaure
    • 0x00002000: North Gustaberg
    • 0x00004000: West Sarutabaruta
    • 0x00008000: Southern San d'Oria
    • 0x00010000: Bastok Markets
    • 0x00020000: Windurst Waters
    • 0x00040000: Garlaige Citadel
    • 0x00080000: Crawler's Nest
    • 0x00100000: Eldieme Necropolis
    • 0xFFE00000: No meaning
  • The next 12 bytes are bitpacked ownership enum (4 bit chunks) in the same order as the above, shfited down by 1 because the lsb is not represented.
    • 1: Bastok
    • 2: San d'Oria
    • 3: Windurst
    • 4: Beastmen
    • any other value: shows - for ownership

No other superwarp system follows this behavior. Some dev work would need to be done to support it (as opposed to simply populating the warp system data file). I can look into it this month as I'm subbed to work on Remapster too.