IS AXM

From LFS Manual
Revision as of 09:08, 10 February 2026 by Bokujishin (talk | contribs) (Created page with "== Introduction == The '''A'''uto'''X''' '''M'''ultiple objects packet is sent by LFS when explicitly requested or as a response to specific events, and can also be sent to t...")
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to navigationJump to search

Introduction

The AutoX Multiple objects packet is sent by LFS when explicitly requested or as a response to specific events, and can also be sent to the game to modify objects.

Setting ISF_AXM_LOAD or ISF_AXM_EDIT in the IS_ISI packet causes LFS to send packets when a layout is loaded or edited, respectively. You can also request packets to be sent for the current layout by sending a TINY_AXM packet.

IS_AXM packet properties
Type Name Description
byte Size 8 + NumO * 8
byte Type ISP_AXM
byte ReqI 0 unless this is a reply to a TINY_AXM request
byte NumO number of objects in this packet
byte UCID unique id of the connection that sent the packet
byte PMOAction see below
byte PMOFlags see below
byte Sp3
ObjectInfo Info[AXM_MAX_OBJECTS] info about each object, 0 to AXM_MAX_OBJECTS (NumO)

The maximum number of objects (AXM_MAX_OBJECTS) in an IS_AXM packet is 60.

Packet Details

Size

The size of the packet is equal to 8 bytes + 8 bytes per object, for a maximum of 488 bytes.

Type

The packet type from the ISP_ enumeration, always ISP_AXM.

ReqI

ReqI is equal to zero, unless the packet is a reply to a TINY_AXM request.

NumO

The number of objects in the packet.

UCID

The unique connection ID that sent the packet.

PMOAction

A value from the PMO_ enumeration:

  • PMO_LOADING_FILE: Sent by the layout loading system only
  • PMO_ADD_OBJECTS: Adding objects (from InSim or editor)
  • PMO_DEL_OBJECTS: Delete objects (from InSim or editor)
  • PMO_CLEAR_ALL: Clear all objects (NumO must be zero)
  • PMO_TINY_AXM: A reply to a TINY_AXM request
  • PMO_TTC_SEL: A reply to a TTC_SEL
  • PMO_SELECTION: Set a connection's layout editor selection
  • PMO_POSITION: User pressed O without anything selected
  • PMO_GET_Z: Request Z values / reply with Z values

PMOFlags

Various flags about the packet:

  • PMO_FILE_END (1)
  • PMO_MOVE_MODIFY (2)
  • PMO_SELECTION_REAL (4)
  • PMO_AVOID_CHECK (8)

PMO_FILE_END

If PMO_FILE_END is set in a PMO_LOADING_FILE packet, LFS has reached the end of a layout file which it is loading.

If you are using InSim to send many packets of objects (for example loading an entire layout through InSim) then you must take care of the bandwidth and buffer overflows. You must not try to send all the objects at once. It's probably good to use LFS's method of doing this: send the first packet of objects then wait for the corresponding IS_AXM that will be output when the packet is processed. Then you can send the second packet and again wait for the IS_AXM and so on.

PMO_MOVE_MODIFY

When objects are moved or modified in the layout editor, two IS_AXM packets are sent. A PMO_DEL_OBJECTS followed by a PMO_ADD_OBJECTS. In this case the flag PMO_MOVE_MODIFY is set in the PMOFlags byte of both packets.

PMO_SELECTION_REAL

If you send an IS_AXM with PMOAction of PMO_SELECTION it is possible for it to be either a selection of real objects (as if the user selected several objects while holding the CTRL key) or a clipboard selection (as if the user pressed CTRL+C after selecting objects). Clipboard is the default selection mode. A real selection can be set by using the PMO_SELECTION_REAL bit in the PMOFlags byte.

Note: If you want to set a real selection immediately after creating objects with PMO_ADD_OBJECTS, make sure you wait until the objects are actually created before setting the selection.

PMO_AVOID_CHECK

If you send an IS_AXM with PMOAction of PMO_ADD_OBJECTS you may wish to set the UCID to one of the guest connections (for example if that user's action caused the objects to be added). In this case some validity checks are done on the guest's computer which may report "invalid position" or "intersecting object" and delete the objects. This can be avoided by setting the PMO_AVOID_CHECK bit.

Info

The list of ObjectInfo contained in the packet.