Difference between revisions of "IS MSO"
Bokujishin (talk | contribs) (Created page with "== Introduction == The '''MS'''g '''O'''ut packet is a variable-size packet containing text messages sent by LFS. Messages that appear in-game are sent to external programs....") |
Bokujishin (talk | contribs) m |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
The '''MS'''g '''O'''ut packet is a variable-size packet containing text messages sent by LFS. Messages that appear in-game are sent to external programs. Hidden messages typed with <code>/o message</code> are also reported. | The '''MS'''g '''O'''ut packet is a variable-size packet containing text messages sent by LFS. Messages that appear in-game are sent to external programs. Hidden messages typed with <code>/o message</code> are also reported. | ||
| − | + | {| class="wikitable" | |
| − | + | |+ IS_MSO packet properties | |
| − | + | |- | |
| − | + | ! Type !! Name !! Description | |
| − | + | |- | |
| − | + | | byte | |
| − | + | | Size | |
| − | + | | 12, 16, 20... 136 depending on Msg | |
| − | + | |- | |
| − | + | | byte | |
| − | + | | Type | |
| − | + | | ISP_MSO | |
| − | + | |- | |
| − | } | + | | byte |
| + | | ReqI | ||
| + | | 0 | ||
| + | |- | ||
| + | | byte | ||
| + | | Zero | ||
| + | | | ||
| + | |- | ||
| + | | byte | ||
| + | | UCID | ||
| + | | connection's unique id (0 = host) | ||
| + | |- | ||
| + | | byte | ||
| + | | PLID | ||
| + | | player's unique id (if zero, use UCID) | ||
| + | |- | ||
| + | | byte | ||
| + | | UserType | ||
| + | | set if typed by a user (see User Values below) | ||
| + | |- | ||
| + | | byte | ||
| + | | TextStart | ||
| + | | first character of the actual text (after player name) | ||
| + | |- | ||
| + | | char | ||
| + | | Msg[128] | ||
| + | | 4, 8, 12... 128 characters - last byte is zero | ||
| + | |} | ||
== Packet Details == | == Packet Details == | ||
| Line 35: | Line 62: | ||
The unique ID of the connection that sent the message. A value of 0 represents the host (in multiplayer) or the local client (in single player). | The unique ID of the connection that sent the message. A value of 0 represents the host (in multiplayer) or the local client (in single player). | ||
| − | Only used if PLID is 0. | + | Only used if [[#PLID|PLID]] is 0. |
=== PLID === | === PLID === | ||
| − | The player ID of the player who sent the message. If 0, [[#UCID]] is used instead. | + | The player ID of the player who sent the message. If 0, [[#UCID|UCID]] is used instead. |
=== UserType === | === UserType === | ||
| Line 51: | Line 78: | ||
=== TextStart === | === TextStart === | ||
| − | The position of the first character of the actual message (skips the sender's name if [[#UserType]] is MSO_USER). | + | The position of the first character of the actual message (skips the sender's name if [[#UserType|UserType]] is MSO_USER). |
=== Msg === | === Msg === | ||
| − | The bytes representing the message (for MSO_USER, this includes the sender's name, you can use [[#TextStart]] to skip it). | + | The bytes representing the message (for MSO_USER, this includes the sender's name, you can use [[#TextStart|TextStart]] to skip it). |
The message can be 4, 8, ..., up to 128 bytes, padded with zeros. The last byte is always zero. | The message can be 4, 8, ..., up to 128 bytes, padded with zeros. The last byte is always zero. | ||
[[Category:InSim packets]] | [[Category:InSim packets]] | ||
Latest revision as of 18:35, 9 February 2026
Introduction
The MSg Out packet is a variable-size packet containing text messages sent by LFS. Messages that appear in-game are sent to external programs. Hidden messages typed with /o message are also reported.
| Type | Name | Description |
|---|---|---|
| byte | Size | 12, 16, 20... 136 depending on Msg |
| byte | Type | ISP_MSO |
| byte | ReqI | 0 |
| byte | Zero | |
| byte | UCID | connection's unique id (0 = host) |
| byte | PLID | player's unique id (if zero, use UCID) |
| byte | UserType | set if typed by a user (see User Values below) |
| byte | TextStart | first character of the actual text (after player name) |
| char | Msg[128] | 4, 8, 12... 128 characters - last byte is zero |
Packet Details
Size
The size of the packet varies from 12 to 136 bytes depending on the message contents.
Type
The packet type from the ISP_ enumeration, always ISP_MSO.
ReqI
ReqI is always equal to zero.
UCID
The unique ID of the connection that sent the message. A value of 0 represents the host (in multiplayer) or the local client (in single player). Only used if PLID is 0.
PLID
The player ID of the player who sent the message. If 0, UCID is used instead.
UserType
One of the MSO_ enumeration values:
- MSO_SYSTEM (0): System message
- MSO_USER (1): Normal visible user message
- MSO_PREFIX (2): Hidden message starting with the InSim prefix (see IS_ISI)
- MSO_O (3): Hidden message typed on local PC with
/ocommand
TextStart
The position of the first character of the actual message (skips the sender's name if UserType is MSO_USER).
Msg
The bytes representing the message (for MSO_USER, this includes the sender's name, you can use TextStart to skip it).
The message can be 4, 8, ..., up to 128 bytes, padded with zeros. The last byte is always zero.