Difference between pages "Template:Tmbox/doc" and "Global Mod Link System"

< Template:Tmbox(Difference between pages)
imported>NelsonJenkins
m (1 revision)
 
m
 
Line 1: Line 1:
{{documentation subpage}}
+
The '''Global Mod Link System (GMLS)''' is a free, full-permission script system provided by the NTBI Group. Anyone can implement GMLS into their modifiable vehicle, and anyone can build mods that automatically position themselves when linked to a GMLS-compatible vehicle.
{{high-risk| 1,000,000+ }}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
{{mbox templates}}
 
This is the {{tl|tmbox}}, or '''talk page message box''', meta-template.  This template is called by other templates to give a consistent structure and appearance to boilerplate messages used on talk pages across the project. It ''may'' be called directly on a talk page in order to present a one-off message in the same format as boilerplate messages, but this is non-standard (if a message is important enough to be presented in this form, you should consider creating a separate template so that it is easily available to other editors).  Tmbox offers several different colors for different purposes, provides default images if no image parameter is given, and has some other pleasant features. This template works similarly to {{tl|ambox}} and uses the same parameters.
 
  
This template should not be used for WikiProject banners. Such banners have special programming constraints that merit their own meta-templates. See the "See also" section below for links.
+
==Overview==
 +
GMLS is a set of full-permissions scripts. It is intended for use in modifiable vehicles to simplify the installation of prebuilt modifications. For example, the NTBI Factory Lightbar Package uses GMLS to automatically position lightbars when linked to compatible vehicles.
  
=== Suggested style standard ===
+
Aftermarket modification manufacturers can set up GMLS by linking a copy of the modification to the desired vehicle and using the Calibration Tool to set up the Alignment Tool. Then, when an end-user links the modification to a compatible vehicle, the modification will reposition itself (and, if necessary, rescale itself) automatically. GMLS can also unlink certain prims from the vehicle for factory prim replacements.
The types of talkpage messageboxes follow the same naming convention as the boxes for all other namespaces, but the type of any particular talkpage messagebox may not be as obvious as in other namespaces. When deciding on the type to use for a talkpage messagebox, please consider the following guidelines:
 
* '''speedy''' should ''only'' be used for [[:Category:Speedy deletion templates|speedy deletion templates]].
 
* '''delete''' should ''only'' be used for templates relating to ''ongoing'' deletion discussions.  Please do ''not'' use this type just to get a red border for a messagebox.
 
* '''content''' and '''style''' should be used for warnings and alerts.  Use '''content''' (which has an orange border) for more important and immediate alerts, and '''style''' (yellow border) for less important warnings.  Messageboxes of these types should ideally be ''transitory'': they should not be expected to remain on a talkpage indefinitely. 
 
* '''move''' and '''protection''' should only be used for messageboxes relating to moves and merges, and page protection, respectively.  
 
* The '''notice''' type should be used for the majority of talkpage messageboxes; those that are intended to convey or summarise information.  If a talkpage messagebox does not obviously fit into one of the other types, it is probably a notice type.
 
  
=== Usage ===
+
GMLS comes with three scripts:
Simple usage example:
 
  
<pre>
+
* '''NTBI GMLS Alignment Tool''' - Inserted into aftermarket modifications and edited by the modification manufacturer to program alignment positions and other options.
{{tmbox | text = Some text.}}
+
* '''NTBI GMLS Calibration Tool''' - Used to calibrate alignment positions; outputs alignment data to be placed in the Alignment Tool.
</pre>
+
* '''NTBI GMLS Vehicle Sample Script''' - Inserted into vehicles and edited by the vehicle manufacturer to define vehicle information for use by modifications.
  
{{tmbox | text = Some text.}}
+
The NTBI Group does not maintain a list of compatible vehicles or modifications. GMLS-compatible products should clearly label themselves as such. The NTBI Group does not provide any warranty for third-party GMLS implementations.
  
Complex example:
+
<big>[https://marketplace.secondlife.com/p/GMLS-Development-Kit-Tools-for-Integrating-the-Global-Mod-Link-System/20803262 '''Click here''' for the GMLS developer kit.]</big>
  
<pre>
+
==End-User Instructions==
{{tmbox
+
Refer to your vehicle's owner's guide for instructions on how to install GMLS-compatible equipment.
| type      = style
 
| image    = [[Image:Emblem-question-yellow.svg|40px]]
 
| style    = width: 400px;
 
| textstyle = color: red; font-weight: bold; font-style: italic;
 
| text      = The message body text.
 
}}
 
</pre>
 
  
{{tmbox
+
If the owner's guide does not provide instructions, the following is a general checklist for installing GMLS-compatible modifications:
| type      = style
 
| image    = [[Image:Emblem-question-yellow.svg|40px]]
 
| style    = width: 400px;
 
| textstyle = color: red; font-weight: bold; font-style: italic;
 
| text      = The message body text.
 
}}
 
  
=== Talk page message box types ===
+
# Ensure that the vehicle is turned off, including any lighting or other components that may change any attributes while installing the modification.
The following examples use different '''type''' parameters but use no image parameters thus they use the default images for each type.
+
# Take a copy of your vehicle as-is. Modifications may cause damage or unlink prims accidentally. Save a copy now in case this happens!
 +
# Rez the modification near your vehicle.
 +
# Right click the modification and select "Edit".
 +
# With the Edit window open, hold your SHIFT key and left click the vehicle. This should select both objects at once. Make sure you select the vehicle last.
 +
# Press your CTRL + L keys, or click the "Link" button in the Edit window.
 +
# If prompted, confirm that you want to link the two objects together.
 +
# When linked, the modification should automatically position itself to the recommended position and resize if necessary.
 +
# If prompted, grant link permissions. This may unlink some prims. Make sure to delete them after.
 +
# If desired, you may usually move the equipment once linked.
  
{{tmbox
+
If a modification does not use GMLS, is not compatible with your vehicle's GMLS system, or returns an error when linking using the above procedure, follow steps 1 through 6, then manually reposition the modification as needed.
| type = speedy
 
| text = type=<u>speedy</u> – Speedy deletion templates.
 
}}
 
{{tmbox
 
| type = delete
 
| text = type=<u>delete</u> – Deletion templates.
 
}}
 
{{tmbox
 
| type = content
 
| text = type=<u>content</u> – Major warnings and problems.
 
}}
 
{{tmbox
 
| type = style
 
| text = type=<u>style</u> – Minor warnings and problems.
 
}}
 
{{tmbox
 
| type = notice
 
| text = type=<u>notice</u> – Notices and messages of any kind, both permanent and temporary.
 
}}
 
{{tmbox
 
| type = move
 
| text = type=<u>move</u> – Merge, split, rename and transwiki messages and proposals.
 
}}
 
{{tmbox
 
| type = protection
 
| text = type=<u>protection</u> – Protection templates.
 
}}
 
  
=== Special ===
+
==Aftermarket Modification Manufacturer Instructions==
Some other parameter combinations.
+
Get the Alignment Tool and Calibration Tool from the [https://marketplace.secondlife.com/p/GMLS-Development-Kit-Tools-for-Integrating-the-Global-Mod-Link-System/20803262 GMLS developer kit.]
  
{{tmbox
+
Before continuing, make sure your mod is finished. Do not continue until you are sure you do not need to make any changes to your object.
| text  = No type and no image given ('''default''')
 
}}
 
{{tmbox
 
| image = none
 
| text  = No type and '''image=none''' – No image is used and the '''text''' uses the whole message box area.
 
}}
 
{{tmbox
 
| image = [[Image:Gnome globe current event.svg|42px]]
 
| imageright = [[Image:Nuvola apps bookcase.svg|40px]]
 
| text  = image = <nowiki>[[Image:Gnome globe current event.svg|42px]]</nowiki> <br> imageright = <nowiki>[[Image:Nuvola apps bookcase.svg|40px]]</nowiki>
 
}}
 
  
=== Parameters ===
+
# Make a two copies of your object. One will be used for calibration. The other will be distributed to your end-users.
List of all parameters:
+
# Place the "NTBI GMLS Alignment Tool" script in the distribution object (the one you will keep).
 +
# Place the "NTBI GMLS Calibration Tool" script in the calibration object (the one you will link, then delete).
  
<pre>
+
For each vehicle you want your object to be compatible with:
{{tmbox
 
| type  = speedy / delete / content / style / notice / move / protection
 
| image = none / [[Image:Some image.svg|40px]]
 
| imageright = [[Image:Some image.svg|40px]]
 
| style = CSS values
 
| textstyle = CSS values
 
| text  = The message body text.
 
| small = {{{small|}}} / yes
 
| smallimage = none / [[Image:Some image.svg|30px]]
 
| smallimageright = none / [[Image:Some image.svg|30px]]
 
| smalltext  = A shorter message body text.
 
}}
 
</pre>
 
  
'''type'''
+
# Make a new copy of the calibration object. It should have the "NTBI GMLS Calibration Tool" script already in it.
:If no '''type''' parameter is given the template defaults to type '''notice'''. That means it gets a gray border.
+
# Rez the vehicle. Make sure it is the original size!
 +
# Position the calibration object on the vehicle, exactly where you want it to be once installed by the end-user.
 +
# Link the calibration object to the vehicle.
 +
# Copy the script snippet line sent to local chat.
 +
# Open the "NTBI GMLS Alignment Tool" script in the distribution object.
 +
# Paste the script snippet line between the two marked lines at the top of the script. NOTE: The first part of each line is the GMLS ID of the vehicle you have calibrated to. If you see a line with the same GMLS ID, you have already calibrated to that vehicle, and only the first instance of that vehicle will be used.
 +
# Save the "NTBI GMLS Alignment Tool" script.
  
'''image'''
+
Once finished, delete any calibration objects and vehicles.
:'''No parameter''' = If no '''image''' parameter is given the template uses a default image. Which default image it uses depends on the '''type''' parameter.
 
:'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (But the message box can handle images of any size.) For example:
 
::<code><nowiki>image = [[Image:Crystal package settings.png|40px]]</nowiki></code>
 
:'''none''' = Means that no image is used.
 
  
'''imageright'''
+
If you want the root prim of the object to retain its physics type when linked to the vehicle, change root_no_physics to FALSE. (By default, the root prim of this object will be set to physics type "none" and the physics types of child prims will remain the same.)
:'''No parameter''' = If no '''imageright''' parameter is given then no image is shown on the right side.
 
:'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (But the message box can handle images of any size.) For example:
 
::<code><nowiki>imageright = [[Image:Nuvola apps bookcase.png|40px]]</nowiki></code>
 
:'''Anything''' = Any other object that you want to show on the right side.
 
  
'''style'''
+
If you want to have the GMLS script automatically unlink prims, list their names in the remove_prims list. If you do this, you can also change remove_move_dist to change the distance unlinked prims will move up, and you can change remove_recolor to FALSE if you do not want unlinked prims to be recolored bright red for visibility.
:Optional [[Cascading Style Sheets|CSS]] values used by the entire message box table. Without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. For example:
 
::<code>style = margin-bottom: 0.5em;</code>
 
  
'''textstyle'''
+
If you do not want the object to be set to temporary when unlinking prims in the remove_prims list so that they automatically delete themselves, change make_temp to FALSE.
:Optional [[Cascading Style Sheets|CSS]] values used by the text cell. For example:
 
::<code>textstyle = text-align: center;</code>
 
  
'''text'''
+
When finished, make sure you test your modification on each compatible vehicle to make sure it works correctly.
:The message body text.
 
  
==== The small parameters ====
+
===API===
{{tmbox
+
The Alignment Tool and vehicle script send the following link messages that can be used to trigger additional scripts in your modification:
| small = yes
 
| text = small = yes
 
}}
 
{{tmbox
 
| type = style
 
| small = yes
 
| text = type = style <br> small = yes
 
}}
 
'''small'''
 
:'''yes''' = Makes it a smaller right floating message box. This also makes the default images smaller. Note that any data fed to the '''smallimage''', '''smallimageright''' and '''smalltext''' parameters is only used if "small=yes". To make it so your template also understands the small parameter you can use this code:
 
::<code><nowiki>small = {{{small|}}}</nowiki></code>
 
  
{{tmbox
+
* <code>GMLS_REQUEST</code>
| small = yes
+
** Sent by Alignment Tool once linked. Vehicle responds with <code>GMLS_ID</code> if compatible. You can also send this manually once the GMLS script is finished if you need any information from <code>GMLS_ID</code>.
| image      = [[Image:Nuvola apps bookcase.png|40px]]
+
* <code>GMLS_ID</code>
| smallimage = [[Image:Nuvola apps bookcase.png|30px]]
+
** '''Key''': [gmls_id]|[root scale]|[additional information]
| text =
+
** Sent by vehicle in response to <code>GMLS_REQUEST</code>. Note that [root scale] is not the ''size'' of the root prim of the vehicle, but rather the ratio of the current size of the root to the original size of the root. For example, [root scale] on a vehicle that was upsized to twice its original size would be <2.0, 2.0, 2.0> regardless of its actual size.
small = yes <br> image = <nowiki>[[Image:Nuvola apps bookcase.png|40px]]</nowiki> <br> smallimage = <nowiki>[[Image:Nuvola apps bookcase.png|30px]]</nowiki>
+
* <code>GMLS_SUCCESS</code>
}}
+
** Sent by Alignment Tool if the GMLS operation completed successfully and it is now safe to perform any configuration changes or whatever else on the newly linked-to vehicle.
'''smallimage'''
+
* <code>GMLS_FAIL</code>
:'''No parameter''' = If no '''smallimage''' parameter is given then this template falls back to use the '''image''' parameter. If the '''image''' parameter also is empty then a small default image is used.
+
** Sent by Alignment Tool if the GMLS operation failed either because the object the modification was just linked to is not GMLS-compatible or the vehicle has a gmls_id that the modification was not calibrated for.
:'''An image''' = Should be an image with usual wiki notation. 30px width is usually about right. For example:
+
* <code>GMLS_CANCEL</code>
::<code><nowiki>smallimage = [[Image:Crystal package settings.png|30px]]</nowiki></code>
+
** Sent by Alignment Tool if the GMLS operation was cancelled by the user.
:'''none''' = Means that no image is used. This overrides any image fed to '''image''', when "small=yes".
 
  
{{tmbox
+
==Vehicle Manufacturer Instructions==
| small = yes
+
Get the Alignment Tool and Calibration Tool from the [https://marketplace.secondlife.com/p/GMLS-Development-Kit-Tools-for-Integrating-the-Global-Mod-Link-System/20803262 GMLS developer kit.]
| imageright = [[Image:Nuvola apps bookcase.png|40px]]
 
| text =  
 
small = yes <br> imageright = <nowiki>[[Image:Nuvola apps bookcase.png|40px]]</nowiki>
 
}}
 
{{tmbox
 
| small = yes
 
| imageright = [[Image:Nuvola apps bookcase.png|30px]]
 
| smallimageright = none
 
| text =
 
small = yes <br> imageright = <nowiki>[[Image:Nuvola apps bookcase.png|40px]]</nowiki> <br> smallimageright = none
 
}}
 
  
'''smallimageright'''
+
Before continuing, make sure your vehicle's root prim will not be resized before it is distributed. Do not continue until the root prim is finalized.
:'''No parameter''' = If no '''smallimageright''' parameter is given then this template falls back to use the '''imageright''' parameter. If the '''imageright''' parameter also is empty then no image is shown on the right side.
 
:'''An image''' = Should be an image with usual wiki notation. 30px width is usually about right. For example:
 
::<code><nowiki>smallimageright = [[Image:Nuvola apps bookcase.png|30px]]</nowiki></code>
 
:'''Anything''' = Any other object that you want to show on the right side.
 
:'''none''' = Means that no right side image is used. This overrides any image fed to '''imageright''', when "small=yes".
 
  
'''smalltext'''
+
# Place the "NTBI GMLS Vehicle Sample Script" script in the vehicle. If you prefer, you can also integrate this script into another script in the vehicle to save memory.
:A shorter version of the message body text. If no '''smalltext''' parameter is given then this template falls back to use the '''text''' parameter.
+
# Edit the gmls_id string. You can use any string as long as it does not include the pipe ("|") character, but it should be limited to alphanumeric characters, underscores ("_"), and be up to 32 characters. The gmls_id must be unique for every vehicle that has a different layout of potential modification positions. For example, use different IDs for 2DR and 4DR variations of the same vehicle.
 +
# Edit the gmls_default_root_size vector to be the size of the root prim of the vehicle. On most viewers, you can get this value by opening the Edit window, going to the Object tab, and pushing the "C" button next to Size. WARNING: This is not optional. Failure to set this value will cause GMLS modifications to align improperly.
 +
# Save the "NTBI GMLS Vehicle Sample Script" script. If kept separate, you can [http://wiki.secondlife.com/wiki/LlSetMemoryLimit limit the memory used by the script] if you prefer.
  
=== Technical details ===
+
Perform this procedure for each vehicle variation. Once finished, it is a good idea to test the GMLS settings by creating a simple object and following the Aftermarket Modification Manufacturer Instructions.
If you need to use special characters in the text parameter then you need to escape them like this:
 
  
<pre>
+
==Changelog==
{{tmbox
+
Rev. 2
| text  = <div>
+
* Added make_temp option.
Equal sign = and a start and end brace { } work fine as they are.
+
* Changed unlinking parts procedure so that unlinked prims are set to temporary if make_temp is enabled.
But here is a pipe {{!}} and two end braces &lt;nowiki>}}&lt;/nowiki>.  
+
Rev. 1
And now a pipe and end braces &lt;nowiki>|}}&lt;/nowiki>.
+
* Added GMLS_SUCCESS, GMLS_FAIL, and GMLS_CANCEL link messages.
</div>
+
* Fixed erroring out and refusing to reposition if linked before permissions have been granted.
}}
+
* Fixed unlinking parts check running before checking if vehicle is compatible in the first place.
</pre>
+
* Fixed crosstalk when multiple GMLS modifications are rezzed at once.
 
+
* Improved vehicle detection in slow regions by extending identification time from 2 seconds to 5 seconds.
{{tmbox
+
Rev. 0
| text  = <div>
+
* Initial public release.
Equal sign = and a start and end brace { } work fine as they are.
 
But here is a pipe {{!}} and two end braces <nowiki>}}</nowiki>.  
 
And now a pipe and end braces <nowiki>|}}</nowiki>.
 
</div>
 
}}
 
 
 
This template uses the tmbox CSS classes in [[MediaWiki:Common.css]] for most of its looks, thus it is fully skinnable.
 
 
 
This template calls {{tl|tmbox/core}} which holds most of the code for {{tl|tmbox}}, while {{tl|tmbox}} itself does parameter preprocessing.  
 
 
 
Internally this meta-template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta-templates since wiki markup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and special characters in parameters.
 
 
 
For more technical details see the [[Template talk:Tmbox|talk page]]. Since this template works almost exactly like {{tl|ambox}}, {{tl|imbox}}, {{tl|cmbox}} and {{tl|ombox}} their talk pages and related pages might also contain more details.
 
 
 
=== See also ===
 
Similar templates: 
 
* {{tl|Notice}}
 
{{Mbox templates see also}}
 
 
 
Other pages:
 
* [[Wikipedia:Talk page templates]] – The guideline specifying the styles for talk page message boxes.
 
 
 
WikiProject banners:
 
* {{tl|WikiProjectBannerShell}} and {{tl|WPBannerMeta}} – A system for collapsing, wrapping and creating WikiProject banners.
 
* {{tl|WikiProjectBanners}} – Another system for collapsing WikiProject banners.
 
 
 
<includeonly>
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
[[Category:Wikipedia metatemplates|{{PAGENAME}}]]
 
[[Category:Talk namespace templates| ]]
 
 
 
[[as:Template:Tmbox]]
 
[[ba:Ҡалып:Tmbox]]
 
[[ca:Plantilla:Metacaixa d'avís discussió]]
 
[[eo:Ŝablono:DiskutaMesaĝokesto]]
 
[[hsb:Předłoha:Tmbox]]
 
[[ia:Patrono:Tmbox]]
 
[[ja:Template:Tmbox]]
 
[[mn:Загвар:Tmbox]]
 
[[no:Mal:Tmbox]]
 
[[fa:الگو:Tmbox]]
 
[[pl:Szablon:Tmbox]]
 
[[pt:Predefinição:Tmbox]]
 
[[ro:Format:Meta-casetămd]]
 
[[sl:Predloga:Polje za pogovorne strani]]
 
[[uk:Шаблон:Tmbox]]
 
[[ur:Template:Tmbox]]
 
[[zh:Template:Tmbox]]
 
</includeonly>
 

Revision as of 22:50, 20 April 2021

The Global Mod Link System (GMLS) is a free, full-permission script system provided by the NTBI Group. Anyone can implement GMLS into their modifiable vehicle, and anyone can build mods that automatically position themselves when linked to a GMLS-compatible vehicle.

Overview

GMLS is a set of full-permissions scripts. It is intended for use in modifiable vehicles to simplify the installation of prebuilt modifications. For example, the NTBI Factory Lightbar Package uses GMLS to automatically position lightbars when linked to compatible vehicles.

Aftermarket modification manufacturers can set up GMLS by linking a copy of the modification to the desired vehicle and using the Calibration Tool to set up the Alignment Tool. Then, when an end-user links the modification to a compatible vehicle, the modification will reposition itself (and, if necessary, rescale itself) automatically. GMLS can also unlink certain prims from the vehicle for factory prim replacements.

GMLS comes with three scripts:

  • NTBI GMLS Alignment Tool - Inserted into aftermarket modifications and edited by the modification manufacturer to program alignment positions and other options.
  • NTBI GMLS Calibration Tool - Used to calibrate alignment positions; outputs alignment data to be placed in the Alignment Tool.
  • NTBI GMLS Vehicle Sample Script - Inserted into vehicles and edited by the vehicle manufacturer to define vehicle information for use by modifications.

The NTBI Group does not maintain a list of compatible vehicles or modifications. GMLS-compatible products should clearly label themselves as such. The NTBI Group does not provide any warranty for third-party GMLS implementations.

Click here for the GMLS developer kit.

End-User Instructions

Refer to your vehicle's owner's guide for instructions on how to install GMLS-compatible equipment.

If the owner's guide does not provide instructions, the following is a general checklist for installing GMLS-compatible modifications:

  1. Ensure that the vehicle is turned off, including any lighting or other components that may change any attributes while installing the modification.
  2. Take a copy of your vehicle as-is. Modifications may cause damage or unlink prims accidentally. Save a copy now in case this happens!
  3. Rez the modification near your vehicle.
  4. Right click the modification and select "Edit".
  5. With the Edit window open, hold your SHIFT key and left click the vehicle. This should select both objects at once. Make sure you select the vehicle last.
  6. Press your CTRL + L keys, or click the "Link" button in the Edit window.
  7. If prompted, confirm that you want to link the two objects together.
  8. When linked, the modification should automatically position itself to the recommended position and resize if necessary.
  9. If prompted, grant link permissions. This may unlink some prims. Make sure to delete them after.
  10. If desired, you may usually move the equipment once linked.

If a modification does not use GMLS, is not compatible with your vehicle's GMLS system, or returns an error when linking using the above procedure, follow steps 1 through 6, then manually reposition the modification as needed.

Aftermarket Modification Manufacturer Instructions

Get the Alignment Tool and Calibration Tool from the GMLS developer kit.

Before continuing, make sure your mod is finished. Do not continue until you are sure you do not need to make any changes to your object.

  1. Make a two copies of your object. One will be used for calibration. The other will be distributed to your end-users.
  2. Place the "NTBI GMLS Alignment Tool" script in the distribution object (the one you will keep).
  3. Place the "NTBI GMLS Calibration Tool" script in the calibration object (the one you will link, then delete).

For each vehicle you want your object to be compatible with:

  1. Make a new copy of the calibration object. It should have the "NTBI GMLS Calibration Tool" script already in it.
  2. Rez the vehicle. Make sure it is the original size!
  3. Position the calibration object on the vehicle, exactly where you want it to be once installed by the end-user.
  4. Link the calibration object to the vehicle.
  5. Copy the script snippet line sent to local chat.
  6. Open the "NTBI GMLS Alignment Tool" script in the distribution object.
  7. Paste the script snippet line between the two marked lines at the top of the script. NOTE: The first part of each line is the GMLS ID of the vehicle you have calibrated to. If you see a line with the same GMLS ID, you have already calibrated to that vehicle, and only the first instance of that vehicle will be used.
  8. Save the "NTBI GMLS Alignment Tool" script.

Once finished, delete any calibration objects and vehicles.

If you want the root prim of the object to retain its physics type when linked to the vehicle, change root_no_physics to FALSE. (By default, the root prim of this object will be set to physics type "none" and the physics types of child prims will remain the same.)

If you want to have the GMLS script automatically unlink prims, list their names in the remove_prims list. If you do this, you can also change remove_move_dist to change the distance unlinked prims will move up, and you can change remove_recolor to FALSE if you do not want unlinked prims to be recolored bright red for visibility.

If you do not want the object to be set to temporary when unlinking prims in the remove_prims list so that they automatically delete themselves, change make_temp to FALSE.

When finished, make sure you test your modification on each compatible vehicle to make sure it works correctly.

API

The Alignment Tool and vehicle script send the following link messages that can be used to trigger additional scripts in your modification:

  • GMLS_REQUEST
    • Sent by Alignment Tool once linked. Vehicle responds with GMLS_ID if compatible. You can also send this manually once the GMLS script is finished if you need any information from GMLS_ID.
  • GMLS_ID
    • Key: [gmls_id]|[root scale]|[additional information]
    • Sent by vehicle in response to GMLS_REQUEST. Note that [root scale] is not the size of the root prim of the vehicle, but rather the ratio of the current size of the root to the original size of the root. For example, [root scale] on a vehicle that was upsized to twice its original size would be <2.0, 2.0, 2.0> regardless of its actual size.
  • GMLS_SUCCESS
    • Sent by Alignment Tool if the GMLS operation completed successfully and it is now safe to perform any configuration changes or whatever else on the newly linked-to vehicle.
  • GMLS_FAIL
    • Sent by Alignment Tool if the GMLS operation failed either because the object the modification was just linked to is not GMLS-compatible or the vehicle has a gmls_id that the modification was not calibrated for.
  • GMLS_CANCEL
    • Sent by Alignment Tool if the GMLS operation was cancelled by the user.

Vehicle Manufacturer Instructions

Get the Alignment Tool and Calibration Tool from the GMLS developer kit.

Before continuing, make sure your vehicle's root prim will not be resized before it is distributed. Do not continue until the root prim is finalized.

  1. Place the "NTBI GMLS Vehicle Sample Script" script in the vehicle. If you prefer, you can also integrate this script into another script in the vehicle to save memory.
  2. Edit the gmls_id string. You can use any string as long as it does not include the pipe ("|") character, but it should be limited to alphanumeric characters, underscores ("_"), and be up to 32 characters. The gmls_id must be unique for every vehicle that has a different layout of potential modification positions. For example, use different IDs for 2DR and 4DR variations of the same vehicle.
  3. Edit the gmls_default_root_size vector to be the size of the root prim of the vehicle. On most viewers, you can get this value by opening the Edit window, going to the Object tab, and pushing the "C" button next to Size. WARNING: This is not optional. Failure to set this value will cause GMLS modifications to align improperly.
  4. Save the "NTBI GMLS Vehicle Sample Script" script. If kept separate, you can limit the memory used by the script if you prefer.

Perform this procedure for each vehicle variation. Once finished, it is a good idea to test the GMLS settings by creating a simple object and following the Aftermarket Modification Manufacturer Instructions.

Changelog

Rev. 2

  • Added make_temp option.
  • Changed unlinking parts procedure so that unlinked prims are set to temporary if make_temp is enabled.

Rev. 1

  • Added GMLS_SUCCESS, GMLS_FAIL, and GMLS_CANCEL link messages.
  • Fixed erroring out and refusing to reposition if linked before permissions have been granted.
  • Fixed unlinking parts check running before checking if vehicle is compatible in the first place.
  • Fixed crosstalk when multiple GMLS modifications are rezzed at once.
  • Improved vehicle detection in slow regions by extending identification time from 2 seconds to 5 seconds.

Rev. 0

  • Initial public release.