Skip to main content
A 1000×1000 tile grid per server, addressed by a 1-based linear index; season “nine palaces” maps join nine servers into one 3000×3000 grid. The client streams the visible part of the map itself, through C#-owned block-pull requests, and supplements that with single-point pulls, server-side “find nearest” searches, and bulk per-server datasets. SFS2X’s built-in area-of-interest streaming exists in the SDK and is completely unused.

Tile math

On a season “nine palaces” map, the 1.0.364 C# sets the world size to 3000 when the palace list holds 9 servers. A tile’s server is the grid cell (x / 1000, y / 1000), and its index is x + y * 3000 + 1. Battlefield worlds take their size from Lua instead (static-analysis-only).

Query model

  1. Viewport block pull (C#-owned): world.get.block, world.get.new, and, on the cross-server line, world.get.cross. These never appear in the Lua command catalog; C# WorldPointManager sends them as the camera moves and handles the replies itself. world.get.block asks for up to 160 block indices per request (static-analysis-only):
    leftBottom and rightTop are tile indices computed on a 3000-wide grid. world.get.new is the view-level variant, {x, y, serverId, type, viewLvl, timeStamp, worldId}. Replies carry per-server sub-replies (serverPointArr[]) or flat serverId/worldId, with protobuf byte arrays: points[] as WorldPointInfo, lands[] as LandPointInfo, deserts[] as DesertInfo, alInfos[], plus overlays such as hotSpots, triggers, and greenPoints. After the first request with clearUuidSet=1, the client drops every previously known point the server didn’t return. push.world.get.block tells the client to re-request its view.
  2. Single-point pull: world.get.detail.new {point, serverId, worldId, previewAssistance, pointType, uid}. The field is point, not pointId.
  3. Server-side “find nearest”: find.resource, find.enemy.point: the client sends criteria only (level, type), no coordinates at all; the server searches from the player’s context and returns a single point id. find.monster is the same family but (unusually) also sends a pointId alongside its criteria.
  4. Bulk per-server/per-alliance push: world.get.alliance.city.info, lw.req.world.occupy.info: the entire dataset for a server, no pagination. Pushes are invalidate-then-refetch, not deltas.
  5. Batch pull by uuid list: radar/detect-event lookups, pipe-delimited uuid lists.
world.get.march.infos {x, y, needCross} finds marches passing near a raw tile coordinate. March state then streams as C#-handled pushes: push.world.march.new carries a protobuf WorldMarch (or a WorldMarchDeltaMeta delta), and push.world.march.del carries the march uuid and isBattleFail. In all, 29 world, scene, and season push.* messages are handled only in C#.

Railway trucks and alliance trains

Trucks and trains are marches, but their cargo and raid state come from the railway module (1.0.370 Lua, unchanged in this part since 1.0.364; static-analysis-only).
  • The list: train.list {isRefresh: Bool} returns other players’ trucks in ls[], alliance trains in allianceTrainList[], and the servers you’re matched against in trainServers, a comma-separated string. The client sends isRefresh: true from the list’s Refresh button, and on its first call of the server day.
  • Entry type: each entry’s type is 1 (truck) or 2 (alliance train), and cfgId is a train_property row. For trucks, quality 1-5 is N to UR, and quality 10 is the Reindeer Sleigh. The wire carries only cfgId, not the quality.
  • Truck cargo: baseGoods and extraGoods, each {full, cur}. full is what the truck set out with and cur what’s left. Goods entries are {type, value} with a RewardType: 1 iron, 20 food, 31 coins, 7 an item {id, num}.
  • Reroll: train.change {uuid: Long} replaces a parked truck at random; the reply’s myTrain is the new truck. Its cost in item 1520001 (train_para 12) is train_para 9 (“0,1”) at index changeCountByGold + 1, the last entry past the end, and 1 without changeCountByGold, so only a truck’s first reroll is free. The game asks first for the sleigh and for a truck holding the train_para 55 goods (2 of item 2270000 or 500105), and asks before a truck below SSR leaves with its free reroll unused. train.batch.change is the paid batch path (tickets or diamonds). The opt-in truck-reroll uses only the free one, on N, R and SR trucks, and runs before truck-deploy.
  • Train cargo: per carriage, in marchInfo.carriageList[].trainGoods.
  • Past raids: marchInfo.plunderRecord[].
  • Raid count and caps: the count is marchInfo.robTimes. A truck takes at most train_para row 21 raids (2), the sleigh 1, and an alliance train alliance_train.k10 (3), less one with a VIP aboard.
  • completeness: shown as “Integrity: %”.
  • Defensive power: marchInfo.power, or the sum of marchInfo.heroInfo[].power for a truck. For a train it’s the sum of marchInfo.formation.armyUnit1-3.power.
  • One entry: train.refresh {uuid, serverId} re-reads it. The reply is the whole train, or only {uuid, lastUpdateTime}. The client sends it at most every 600 s for others’ trucks (train_para 39) and every 60 s for its own (row 51).
  • On the world map: a truck march’s WorldMarch carries the same train object, which the C# hands to the same store (CSharpCallLuaInterface.AddOrUpdateTrain).
  • Your own count: your raids today are trainData.dailyRobCount (in init and in train.data), capped by train_para row 11 (4) and shared by trucks and trains.
The opt-in railway-plunder feature drops every truck and train on the account’s own server before anything else: user.serverId, and user.crossFightSrcServerId during a cross-server fight. The client doesn’t enforce this. CheckTrainInMatchServer only checks the server-sent trainServers, and your own server can be in that list.

Core commands