Skip to content

In character chat messages[MS]

David Skoland edited this page May 18, 2017 · 16 revisions

When the application receives a packet with the header MS, it checks if the amount of elements is valid. If it is not, it's discarded. If it is, it calls handle_chatmessage in courtroom, passing the elements as a pointer. The packet is formatted as follows:

MS#
chat#
pre-emote#
character#
emote#
message#
side#
sfx-name#
emote_modifier#
char_id#
sfx_delay#
shout_modifier#
evidence_id#
char_id/flip_modifier#
realization#
text_color#%

The - X shows which position in the contents array the element is

chat - 0

Static value. AO2 uses this as a desk modifier as well.

  • 0 = no desk
  • 1 = desk

Also, the positions "def", "pro", and "wit" default to desk and the positions "hld", "hlp" and "jud" to no desk if it's "chat".

pre_emote - 1

The gif that plays before the character starts talking, not with the .gif file extension

character - 2

The name of the character that is talking

emote - 3

The emote that should play, does not include (a)(idle) or (b)(talking) prefixes or the .gif extension

message - 4

The chatmessage, displayed in the chatbox and the IC log

side - 5

Which side the character is on. Valid arguments; wit, def, pro, jud, hld, hlp

sfx_name - 6

Name of the sfx that should play during the pre-animation

emote_modifier - 7

A number that dictates emote behavior.

  • 0 = do not play preanimation, overridden to 2 by a non-0 objection_modifier
  • 1 = play preanimation(and sfx)
  • 2 = play preanimation and play objection
  • 3 = unused
  • 4 = unused
  • 5 = no preanimation and zoom
  • 6 = objection and zoom, no preanim

NOTE: these might be changed to stay consistent with 1.x behavior.

char_id - 8(and 12)

Character identifier. Dictates which index in the character list the character is Breaks 1.x if it does not appear in both places, AO2 only relies on index 8

sfx_delay - 9

Dictates how long in milliseconds the client should wait from preanimation has started playing until playing the associated sfx

objection_modifier - 10

Dictates if the player uses an objection, hold it, take that or a custom shout

  • 0 = nothing
  • 1 = hold it
  • 2 = objection
  • 3 = take that
  • 4 = custom shout(AO2 only)

evidence - 11

ID of the evidence presented. 0 is no evidence presented, so it evidence ID starts from 1

char_id/flip - 12

A potentially ambiguous field. Traditionally used for char_id, but AO2 might use it to dictate flip state if the server supports it. For the flip usage:

  • 0 = no flip
  • 1 = flip

realization - 13

Dictates whether a realization flash and sfx should play or not

  • 0 = no realization
  • 1 = realization

text_color - 14

A number that specifices which color the text of the chat message should be

  • 0 = white
  • 1 = green
  • 2 = red
  • 3 = orange
  • 4 = blue(also disables talking animation)
  • 5 = yellow(AO2 only)
  • 6 = it's a secret to everybody