Can rebuilding a road segment move a passer past its blocker? #11

Closed
opened 2026-10-05 20:35:53 +00:00 by haylan · 1 comment
Owner

Part of #1

Question

On a two-way road (one lane per direction), can a script move a held-back passer past its blocker by rebuilding the road segment under it? The human observed that removing a segment moves the vehicles that are on it. Settle what that move actually does:

  1. Where does a vehicle on a removed or rebuilt segment end up: ahead, behind, at the segment start, re-pathed, or sent to a depot?
  2. Does it keep its line, its passengers or cargo, and its speed?
  3. Can a script do the same, without the player: api.cmd.makeWorldBuildProposalCmd with a SimpleProposal.streetProposal that removes the segment and re-adds an identical one?
  4. Does the blocker get moved the same way? If so, can the two be told apart?
  5. What does a rebuild cost (money, visible flicker, side effects on towns or traffic)?

HITL: the human removes or rebuilds segments in game while the probe logs positions. Outcome: go/no-go for "rebuild to move the passer" as the single-lane overtaking mechanism.

Part of #1 ## Question On a two-way road (one lane per direction), can a script move a held-back passer past its blocker by rebuilding the road segment under it? The human observed that removing a segment moves the vehicles that are on it. Settle what that move actually does: 1. Where does a vehicle on a removed or rebuilt segment end up: ahead, behind, at the segment start, re-pathed, or sent to a depot? 2. Does it keep its line, its passengers or cargo, and its speed? 3. Can a script do the same, without the player: `api.cmd.makeWorldBuildProposalCmd` with a `SimpleProposal.streetProposal` that removes the segment and re-adds an identical one? 4. Does the blocker get moved the same way? If so, can the two be told apart? 5. What does a rebuild cost (money, visible flicker, side effects on towns or traffic)? HITL: the human removes or rebuilds segments in game while the probe logs positions. Outcome: go/no-go for "rebuild to move the passer" as the single-lane overtaking mechanism.
haylan added the wayfinder:prototype label 2026-10-05 20:35:53 +00:00
haylan self-assigned this 2026-10-05 20:37:02 +00:00
Author
Owner

Resolution

No-go: rebuilding the segment under a held-back passer does not get it past the blocker.

  • Hand-built proposals (copied BaseEdge/BaseEdgeStreet into a SimpleProposal) were silently rejected: the segments kept their ids.
  • api.engine.util.proposal.replaceSegment(seg) plus makeWorldBuildProposalCmd(p, nil, true, true) (the official campaign's call) does rebuild the segment, even from engine state.
  • Two-way road (country_new_small), 3 rebuilds: no effect. The gap stayed at 25.8 m, both vehicles stayed in lane 2, same speed and order for 10+ snapshots. The human confirmed this in game.
  • Multilane road (country_new_medium), 3 rebuilds: afterwards the leader moved from lane 4 to lane 3 each time, and in 1 of 3 cases the follower got past. Not proof (the engine also switches lanes by itself at segment ends). Passed to the multilane ticket as an observation.
  • Side findings: engine-thread scripts can't use sendCommand callbacks, and can't send api.cmd.debug.makeComponentExchangeCmd at all ("Error decoding argument #3"). GUI-thread scripts can (as the downloaded mods do). makeVehicleSetLineCmd doesn't force a lane change. The only built-in teleport is makeVehicleSendToDepotCmd(…, jumpToDepotEntity).

Details: docs/research/vehicle-probe.md on branch prototype/vehicle-probe (the rebuild code is last in commit 5d3a254 and removed in bfe5a22).

## Resolution **No-go: rebuilding the segment under a held-back passer does not get it past the blocker.** - Hand-built proposals (copied `BaseEdge`/`BaseEdgeStreet` into a `SimpleProposal`) were silently rejected: the segments kept their ids. - `api.engine.util.proposal.replaceSegment(seg)` plus `makeWorldBuildProposalCmd(p, nil, true, true)` (the official campaign's call) **does** rebuild the segment, even from engine state. - **Two-way road (`country_new_small`), 3 rebuilds:** no effect. The gap stayed at 25.8 m, both vehicles stayed in lane 2, same speed and order for 10+ snapshots. The human confirmed this in game. - **Multilane road (`country_new_medium`), 3 rebuilds:** afterwards the leader moved from lane 4 to lane 3 each time, and in 1 of 3 cases the follower got past. Not proof (the engine also switches lanes by itself at segment ends). Passed to the multilane ticket as an observation. - Side findings: engine-thread scripts can't use `sendCommand` callbacks, and can't send `api.cmd.debug.makeComponentExchangeCmd` at all ("Error decoding argument #3"). GUI-thread scripts can (as the downloaded mods do). `makeVehicleSetLineCmd` doesn't force a lane change. The only built-in teleport is `makeVehicleSendToDepotCmd(…, jumpToDepotEntity)`. Details: `docs/research/vehicle-probe.md` on branch `prototype/vehicle-probe` (the rebuild code is last in commit 5d3a254 and removed in bfe5a22).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: haylan/tpf3-overtake#11