Don't click here unless you want to be banned.

LSL Wiki : exchangeTLML

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org

Tight List Markup Language (TLML)

Version 0.6


TLML

This is the language in which the prim-pages sent over TLTP are coded. A prim-page is made of one or more prims, which have each their own TLML description. This description is called a TLML command, and is a single string composed of the following substrings:

Command Format:
Field: Description:
separator char, defined here then used to parse the rest of the command
target part number integer cast as string, representation of the target's link number for differentiating prims of a page
separator same as above
URL optional URL the prim should point at, see format here
separator same as above
prim attribute mask hex-integer cast into a string, contains bitflags indicating how to read the rest of the command, see below
separator
parameters
1 paramater for each entry in the mask that requires a paramater, if an entry uses multiple parmamaters they are TightLists
separator same as above
face attribute mask hex-integer cast into a string, contains bitflags indicating how to read the rest of the command, see below
separator
parameters
1 paramater for each entry in the mask that requires a paramater, if an entry uses multiple parmamaters they are TightLists

TightList([prim_number, TLTP_command, prim_mask] + prim_mask_data + [face_mask_1] + face_mask_data_1 + ... [face_mask_n] + face_mask_data_n)

The server can also say a special code instead of a target part number:

Code Meaning
-1 Server unavailable
-2 Server Error
-3 Access Refused (if your server enforces access restriction on some pages)
-4 Page Missing. Should provide the index of the default page. (404 here we are :))
-97 Wait. Should provide a positive float value, the browser will wait this much before processing the next line
-98 Comment. Everything after this code is skipped by the browser
-99 Page Clear. This will clear the display of the browser.


Prim mask and parameters:
Bit Hex Name Description
4 0x1 BITPrimConfigMask Mask, that defaults values or recycles them
5 0x2 BITShowOnCommand Show On Command, string
6 & 7 0xC shape change 0x0 = recycle, 0x40 = PRIM_TYPE TightList, 0x80 = SetPrimTypeChained TightList, 0xC0 = raw TightListType
8 0x10 BITSize prim size (vector)
9 0x20 BITPos prim position (vector)
10 0x40 BITCourners prim corners TightList(vector,vector)
11 0x80 BITLocalRot llSetLocalRot(euler-vector | rotation)
12 0x100 BITSetTextText llSetText(string text)
13 0x200 BITSetTextAtrib llSetText(<r,g,b> | (<r,g,b,a>))
14 0x400 BITParticleSystem llParticleSystem TightListType
15 0x800 BITTargetOmega llTargetOmega TightList(vector axis, float spinrate, float gain)
16 0x1000 BITTextureAnim llSetTextureAnim TightList(ta_mode, ta_face, ta_xf, ta_yf, ta_sf, ta_ef, ta_speed)
17 0x2000 BITXyText XyTextMod See Table TightList
18 0x4000 BITSetURL Not implemented, will eat 1 parmater

Prim Config Mask:
Bit Hex Name Description
0 0x1 BITPrimDefaultShape default box-shape
1 0x2 BITPrimDefaultLocalRot set local rotation to <0,0,0,1>
2 0x4 BITPrimDefaultSetText_text keep llSetText text
3 0x8 BITPrimDefaultSetText_atrib keep llSetText color & alpha
4 0x10 BITPrimKeepParticle keep llParticleSystem
5 0x20 BITPrimKeepTargetOmega keep llTargetOmega axis, spinrate, gain
6 0x40 BITPrimKeepTextureAnim keep llSetTextureAnim ta_mode, ta_face, ta_xf, ta_yf, ta_sf, ta_ef, ta_speed
7 0x80 BITPrimKeepXyText keep XyTextMod, this doesn't do anything currently
8 0x100 BITPrimKeepURL keep llSetPrimURL, this doesn't do anything currently

Face mask and parameters:
Bit Hex Name Description
0-3 0xF face face number, if ALL_SIDES face = 0xF
4 0x10 BITFaceConfigMask Mask, that defaults values or recycles them
5 0x20 reserved TightList or (To-Be-Determined), will eat 1 parmater
6 & 7 0xC0 fullbright 0x0 = recycle, 0x40 = No Full Bright, 0x80 = reserved, 0xC0 = Full Bright
8 0x100 BITTexture texture_key or TightList([notecard_texture_key, subgroup, notecard_line])
9 0x200 BITColor color <r,g,b>
10 0x400 BITAlpha alpha
11 0x800 BITTexture_scale _scale texture_scale
12 0x1000 BITTexture_offset texture_offset
13 0x2000 BITTexture_rot texture_rot
14 0x4000 BITShiny shiny
15 0x8000 BITBump bump

Face Config Mask:
Bit Hex Name Description
0 0x1 BITFaceDefaultTexture default texture to white
1 0x2 BITFaceDefaultColor default color to <1,1,1>
2 0x4 BITFaceDefaultAlpha default alpha to 1.0
3 0x8 BITFaceDefaultTexture_scale default texture_scale to <1,1,1>
4 0x10 BITFaceDefaultTexture_offset default texture_offset to <0,0,0>
5 0x20 BITFaceDefaultTexture_rot default texture_rot to 0.0
6 0x40 BITFaceDefaultShiny default shiny to none
7 0x80 BITFaceDefaultBump default bump to none
BITSetTextAtrib if RGB is set to 0,0,0 and A is not set then A will automaticly set to 1. If you don't want this, set a value for A. Detecting this situation isn't easy, because of size constraints we don't bother.



Multiple commands can be concatenated together, although it is more efficient to compress everything in one command (takes less characters for the same result). Multiple commands addressed to different prims can be joined on seperate lines (seperate them with a "\n" character).
Note: TLTP distinguishes between the various data types it can transport by prepending a letter. In the case of TLML, that letter is "T". If you pass multiple TLML lines you should prepend "T" to each line.


Example command:
/0/U!Page!1!66864f3c-e095-d9c8-058d-d6575e6ed1b8/8201F/<1,1,0>/<.25,.25,0>/<.75,.75,0>
- "/" = the command uses this character as seperator for the remainder of the command string.
- "0" = this command targets the first child prim of the browser client.
- U!Page!1!66864f3c-e095-d9c8-058d-d6575e6ed1b8 = URL of the page requested when the target child prim is clicked
- 8201F = 0x1+0x2+0x4+0x8+0x10+0x2000+0x80000 = bits 0, 1, 2, 3, 4, 13 and 19 are set = the command contains a color and corners
- <1,1,0> = color parameter (yellow)
- <0.25,0.25,0.0> = lower left corner coordinates
- <0.75,0.75,0.0> = top right corner coordinates
This command thus turns the first child prim into a yellow centered opaque rectangle covering about half the screen.

Multiple formats may be chained together; just concatenate each format definition with its attributes, this is useful for setting different textures on different faces of a prim. This can be used to emulate the functionality of XyText though there is an XyText interface built in.
That's cool, but there still is a limit on the character number that can be passed in a chat line or an email...
Very true which is why this protocol wastes as little space as possible
If no server key is specified in the URL then the browser simply sends the request to the server that generated the prim.

Notecard texture key interface - The notecard texture key interface is a simple interface for using notecards to store lists of texture keys. While it could be given it's own script it has been merged into XyTextMod script to keep the script count down. The details of the interface will be released shortly.
How does the new TLTP v0.3 transport layer affect this new interface ? If you need a seperate data type feel free to add it to the list on the TLTP page.
This format won't need a new codes but will need a new url code, the simplified notecard page format will need it's own code and url code


XyTextMod (XTM hence forth) is a unification between the two versions of XyText and eliminates the need for remaps and escape codes.
There are two ways to configure XTM through the TLTP feature_mask and though XTM own interface. XTM must be first setup though TLTP (setting XyText_key, XyText_line, XyText_BlockPosition) then with further configuration though XTM (font, version, fading). The format for the two methods of configuration are identical, the only difference is that some attributes can only be set with a particular interface. XyTextMod uses XyTextMod Protocall (XTMP hence forth).

Bit Hex TLML XTMP Effects Description
0,1,2 0x7 Yes Yes XyText_version Version Number (0x1 is 3 letters per prim, 0x2 is 4 letters per prim)
3 0x8 Yes No XyText_key If bit 4 is not set, use the current pages URL
4 0x10 Yes* Yes XyText_key XyText_key is used to restrict a XTM block to a specific page
5 0x20 Yes Yes XyText_line This allows for multiple independant lines of text on a page
6 0x40 Yes No XyText_BlockPosition This tells the prim which block of text it should display from the string
7 0x80 Yes Yes XyText_font The font texture to use.
8 0x100 No Yes XyText_fading Enables fade in and fade out
9 0x200 No Yes XyText_fade_delay Period before text should fade out
10 0x400 Yes Yes XyText_max_alpha Sets the Alpha & Max Alpha used when fading
11 0x800 Yes Yes XyText_color Sets the color
12 0x1000 Yes Yes Full Bright Sets full bright on the xytext faces, this takes a paramater
16,17 0x30000 Yes Yes XyText Text Sets the text on the prims

VersionDescription
0 Recycle
1 4 characters per face
2 5 characters per face
3 8 characters per face
4 10 characters per face
5 reserved
6 reserved
7 reserved

About bits 3 & 4:
When a XTMP command is recieved first check is to see if the prim is a part of the group that message is inteded for via XyText_key, XyText_key is the source url for the page the message originated from. After that it checks XyText_line to see if they match; if they do it executes the command.

About bits 12 & 13:

Example XTMP config:
llMessageLinked(LINK_SET, 3100, ",0x411,471a92ff-50f4-2858-2f36-deab4cc50276:next,0.5", "471a92ff-50f4-2858-2f36-deab4cc50276:home")
This allows the page next write text into home and also sets the max alpha to 0.5.


Because the scripts have grown in size and quantity, the scripts have been split across multiple pages.

exchangeTLTPBrowser
exchangeTLMLRenderer
exchangeTLMLGenerator



Changes between TLML 0.5 & 0.6:

While writing TLML and it supporting scripts i've been driven to make TLML as efficiant as possible. With the creation of the the generator scripts and it's subsequant updates a glaring problem exists in TLML. Because of the design flaw, TLML should be reworked as it will aid in speeding up the script and making TLML more user friendly.

The problem is in how the data is transmitted. With 0.5 (and previous versions) BITprim_type & BITprim_type_chained are close to last to be applied. This is a problem. Take for example that the prim starts out as a basic sphere and the user wants to apply a texture to face 2. A basic sphere only has one face. The command will be ignored. I propose in 0.6 that BITprim_type & BITprim_type_chained be moved to the front. Another issue is we are running out of BITs (currently there are 28 or 32 allocated). The current method for allocating BITs isn't scalable. Most flags make little sence to repeat more then once. Who really needs to call BITprim_type or BITparticle more then once?

TLML 0.6 Proposal B


Proposed Command Layout

This proposal forces all values that require multiple paramaters to use TightLists. This will result in a few characters of extra overhead but will overall reduce errors when writing TLML pages (a good thing, no more weird notecard errors). After more consideration i've rekindled the idea of a config/recycle mask. The reason for this is to keep the main masks clog free.
There is no comment on this page. [Display comments/form]