Q-Sims - Goodies

From QNAPedia
Jump to: navigation, search
by AdNovea - June 2009
Q-Sims Homepage

Freebies

RTENOTITLE   There is a common habit in metaverses to share items. When you cross metaverses, you will find boxes left on the ground. These are items free to take (left click > More > Take a copy) - the Freebies. When meeting someone for the first time, he/she will probably offer you some items too. You can accept or reject them. While your are developing your Sims, you will create new items. As the item owner, it would be a good thing to share them with the community.

To share an item, rez (build) a box and add your item from your Inventory in the Content folder of the box.
Only do this with items that you have created yourself. Place also in the Content folder a small script to display above the box the use of the item. If needed, you can add a notecard with the instructions.
Some WebSims (regions) or parcels called "Freebies" collect user items.

As a beginner, you can really quickly start to create your Sims and customize your avatar by using the work of the other users (look for the Freebies regions and the Freebies shelves in the shops). Once familiar with the metavers, you are welcomed to share back your own creations.

Some freebies left on a landing platform


Write text on Prims

You can display text on a Prim without to generate first an image to texture the prim. The text to be displayed will be converted into graphic using fonts. This allows to provide boards where visitors can leave messages visible by everybody or to offer a blackboard application in V-Learning environments.
You will find (see snapshot below) some advanced scripts that listens to one channel and retreives the texts to be displayed.
Graffiti board application
Here is below the basis to use the text-to-graphic capability:
string stText = "This is a text";

default
{
    state_entry()
    {     
        string drawList = "PenColour BLACK; MoveTo 40,40; FontSize 32; FontName FreeSans; FontProp B,I; Text " + stText + ";";
        osSetDynamicTextureData("", "vector", drawList, "1024", 0); 
    }
}

With the default Free fonts available with the Mono QPKG (FontName params):

  • FreeMono
  • FreeMonoBold
  • FreeMonoBoldOblique
  • FreeMonoOblique
  • FreeSans
  • FreeSansBold
  • FreeSansBoldOblique
  • FreeSansOblique
  • FreeSerif
  • FreeSerifBold
  • FreeSerifBoldItalic
  • FreeSerifItalic


Styles (FontProp params) - not all styles are supported by the fonts listed above:

  • B - Bold
  • I - Italic
  • U - Underline
  • S - Strikeout
  • R - Regular


Font color is set with the PenColour params:

  • avoid using WHITE which is the default background color


and locate the start position of the text with MoveTo params.

NOTE: This is a script and you must keep in mind that scripts are loaded at startup, take some time to be all loaded and requires time to be executed too.


Chat Language translator

On worldwide grid you may have some difficulties to talk with some users whose the native language is not your. Hopefully, there are Chat automatic translators that convert the Chat messages into your native language. The LT have reached a good level of performance to enable most of the language's translation. You may want to try them (search for Freebies and LT - Language Translators).
To install a LT you will use the HUD - Head Up Display.

The HUD - Head Up Display

The HUD is like an invisible screen placed between the camera objective and the scene. You can attach up to 8 objects to the HUD to get information superimposed on the camera image.

  • Center: may be used for weapon's sights
  • Center 2:
  • Top: the recommended place selected to attach the LT
  • Top Right:
  • Top Left:
  • Bottom:
  • Bottom Right:
  • Bottom Left:


Running the LT

Once attached, the LT will automatically starts the Chat translation. You must set your native language (e.g. >fr for French)
NOTE: If you teleport your avatar into a region where the script are not allowed, the the LT will not be running.


Language translator attached at the Top of the HUD

Adding interactivities

All scripts here below are free and can be found on the Internet or as Freebies (free objects created and left in boxes on regions)
  1. MONETARY SYSTEM: There is a Basic monetary system enabled on some public grid. There are scripts for purchasing items and also to tip (reward an item creator). NOTE: You must understand the monetary system and its link to real economy before using it
  2. INSTANT MESSAGE: You can send Instant Messages to the region owner. If the owner is online, wherever he/she is on the grid, he/she will received the message. If the owner is offline, the message will be recorder and deliver during the next login.
  3. MAIL: There is not yet a complete Mailing system implemented in OpenSim. Nevertheless, there is the possibility to leave a message (or items) into a mailbox
  4. SYSTEM INFORMATION: You can access to System information such as the time and version. Here is the script (to place in the Content tab of a prims) to display OS version:
string version;
string message;

string strReplace(string str, string search, string replace) {
    return llDumpList2String(llParseStringKeepNulls(str, [search], []), replace);
}

display()
{
    version = osGetSimulatorVersion();
    string OSversion = strReplace(version,"Chil","\nChil");
    llSetText(message + OSversion, <0.0,0.0,1.0>,1);
    llShout(0, version); 
}

default
{
    state_entry()
    {
        message  = "We are currently running on a QNAP NAS server TS-639\n";
        message  += "the Q-Sims v1.0 implementation using\n";
        display();
    }
    
    touch_start(integer total_number) // Update if touched
    {
        display();
    }
}

From left to right: Tip box (1), IM to owner (2), Mailbox (3), System information (4)