Projects

  • Disable Password Change Notification

    Simple plugin to disable admin notifications when users change their password. No configuration, activate the plugin and voilà.

  • Bash helpers

    Copyright 2015 Olivier van Helden olivier@van-helden.net. Released under GNU Affero GPL v3.0 license, unless otherwise stated. http://www.gnu.org/licenses/agpl-3.0.html

    A couple of useful tools for bash scripting.

    helpers

    Put this line at the beginning of your script (do not run the file directly, source it):

    . /path/to/helpers

    and use these functions inside the script

    end [errornumber] [message]
    log [errornumber] [message]
    readvar [var]
    yesno [-y] ["message"]
    ucfirst [string]

    ini_parser

    A tool to read .ini config in bash scripts

    let’s say you have a .ini file with this content

    [Default]
        name = "Albert"
    [Smart]
        name = "Einstein"

    Put this line at the beginning of your script (do not run the file directly, source it):

    . /path/to/ini_parser

    And, where you need it

    ini.parse /path/to/config/file.ini
    ini.section.Default
    echo $name

    Output: Albert

    Then, later… (no need to repeat ini.parse /path/to/config/file.ini)

    ini.section.Smart
    echo $name

    Output: Einstein

    Voilà ! (en français dans le texte)

    More details inside ini_parser

  • Band Tools

    Post types and tools for bands. Allow publishing of records with songs list. Easy enough for a single band. Complete enough for several ones.

    Although you can get this plugin for free, buying it will fund development and help providing future features.

  • w4os – OpenSimulator Web Interface (dev)

    Ready to use WordPress interface for OpenSimulator. Provides user registration, default avatar model choice, login info, statistics and a web assets server for grids or standalone simulators.

    Full installation instructions

    Theme compatibility list

    See Features and Roadmap sections for current and upcoming functionalties.

  • Universal Translator (Yandex Edition)

    Important note:

    As noted by sninksnoodle on Oct 27, 2020, Yandex does not provide free API keys anymore (#1). The main goal of this fork was to provide an free alternative to Google Translate, so the project is now obolete.

    However, this code also fixed a couple of bugs in the available version of Hank Hamos Universal Translator (which dates 2015), so it might be worth to catch and bring these fixes to the Google Translate version.

    Original readme

    It is based on the excellent Universal Translator by Hank Ramos. However, the initial version was using Google translation engine API and Google decided to switch to a paid license. So I rewrote some parts of the code to use Yandex engine instead.

    Get the latest version in Speculoos’ grid speculoos.world:8002:Lab or on the git repository https://git.magiiic.com/opensimulator/Universal-Translator-Yandex (and if you make improvements, please share them there)

    New features

    • It’s working! No kidding: the version available on LSL scripts wiki and on other sites like Outworldz is incomplete and not ready to work, even taking apart the Google license issue.
    • Use Yandex translation API. It is not only free (while Google isn’t anymore), but it is easy to get an API key (while it’s quite complicate with Google or Microsoft API’s).
    • The API key is not hardcoded but instead stored in a notecard. This avoids a single key being spread everywhere and causing "maximum allowed requests reached" kind of messages.

    DO NOT DISTRIBUTE THE TRANSLATOR WITH THE API KEY. It could end up being used by dozens of users, and becoming useless.

    Main (and not so new) features

    • Multiplex mode: if several translators are in the same area, one becomes the master and makes actual translation requests for the other ones. This avoid overload when lot of people are present and using it.
    • Speaker language auto detection (though users can also choose their language manually)
    • Translations sent by instant messages, no spam on the public channel
    • Can be used as an object in the parcel or as a HUD.
    • Can use both an object in the parcel and people wearing HUD, without spamming public channel, nor overloading the servers and the API key limits.

    To do

    • Get an updated list of available languages ✓ A (beautiful) texture and logo
    • Detect the most used languages and show them at beginning of the list
    • Allow to set a fixed list of preferred languages to show first (probably before the auto-detected mostly used ones).

    Notes

    We use a dedicated function json2List instead of llJson2List (not compatible with 0.8). It’s a little bit rough, but it works.

  • Scrup – LSL scripts auto-update

    An update ecosystem to allow OpenSimulator scripts to self-update. It should also work in Second Life with a small tweak (see below).

    Installation

    • ScrupServer: the lsl server script, to put inside an in-world object. The object will also contain non-running copies of the latest versions of the scripts to update.
    • ScrupClient: The portions of code to include own script. It is intended to be lightweight, we don’t want it to get bigger than the script itself.
    • Web application: the rest of this repository. It will allow both client and server to register an exchange the needed information for updates.
    • Database: scrup use a sqlite database for efficiency only. It will be created automatically in PHP tmp_dir (or upload_tmp_dir). It stores only runtime data sent by server and client, so it can get deleted or lost without real harm.

    In the client script:

    • copy the variables and the scrup() function as is in your script (also include debug() function if you don’t have one)
    • please include a credit line at the beginning, after yours
    • insert scrup(ACTIVE) at beginning of default state_entry() and on_rez() (the latter only if you don’t use llResetScript)
    • use scrup(FALSE) to stop updates at any time in your script (for example, while executing a task that should not be interrupted). The authorization pin will be revoked and a new one will be generated on scrup(ACTIVE) or scrup(TRUE)
    • use scrup(TRUE) or scrup(ACTIVE) to resume normal operations (value of scrupAllowUpdates is still honored)

    Status

    This is a work in progress and more like a proof of concept. Updates are functional, but…

    • only if the server and the object are in the same region (you can wear the object and TP to the region hosting the server, though, and even wear the server and visit the regions where objects need update)
    • only one client can be present in a prim (several can if each one is in a different prim of the same object, though)
    • there are no verifications (allowed grids, owners, creators), so it should probably not be used at a wide scale. Yet.

    Second Life

    The only OSSL function used in scripts is osGetGridLoginURI(), in , which is useless in SL. So to make the script work in SL, replace the function by a fixed value "secondlife://" (detailed explanation in the scripts comments).

    Roadmap

    • Let ScrupServer script update itself too
    • Let two ScrupServers exchange their latest versions
    • If there are no updater in the same region, send a message notification to the owner
    • Or better: send an updater box to the owner as a workaround to region limitations (wear to update)
    • Allow bundles (all scripts in an object + other inventory items), mix with updater box concept
    • Find a f* way to send updates to other regions (let’s forget other grids for now)
  • PeepingToms

    OpenSim script to let NPCs be attracted when someone sits on an object Made

    by Gudule Lapointe @ speculoos.world:8002

    This is not my best achivement, but I find it quite funny. If you use NPCs in your region, put this script in one of the animated objects, and NPCs passing by will one by one come together to watch when someone sits on it.

    You can fix the scan radius, the distance they keep from the watched avatar, the occuppied angle (360 for all around, smaller to get them more in front), adjust rotation (to get them on the side, on front or rear), and make them change dress when they watch.

    Sometimes, an NPC is too far and cancel its move right before being in place so it disappear and go back to its initial position. It’s a bug, but it adds some randomness, so it sounds fair to me.

    Requirement

    It uses only standard LSL functions, but rely on an NPC server, which means it’s only relevant in a region where OSLL NPC functions are enabled.

    Installation

    1. Have already an NPC rezzer box, "OSW NPC" or "ActiveNPCs"
    2. If you want custom dresses, add correspondig notecards in the NPC box, as
      APP_Npcname_Dressname
    1. Put the script in any object where visitor sit, alongside the original script. You can put custom settings in the object description, in the form:
      searchRadius, minRadius, maxRadius, spreading, orientation, changeDress

    The script is auto-updating (in limited conditions). So either don’t change anything in the script, either disable auto-update to avoid losing your changes.

    Foot notes

    • If you setup a custom dress, ensure that you have a matching NPC notecard for each one in your NPC rezzer, otherwise you will get annoying system errors.
    • This script is intended to work with "OSW NPC" or "ActiveNPCs" (the latter being an enhanced version of the original). I made a fix for the error messages issue mentioned above, its available on https://github.com/GuduleLapointe/active-npcs-ef-Gudz-mods
    • If you distribute this script, include this README and credits
    • If you make changes, please share with me so I can improve the original

    Have fun! (and let me know about it)

  • OpenSimMaps (standalone)

    The web map tool for OpenSimulator, for

    • standalone use
    • or integration with

    Support this project: https://magiiic.com/support/OpenSimMaps

    Features

    • show grid map with region maptiles
    • click to get a choice of teleport methods
    • supports varregions
    • supports multiple maps
    • uses Google Maps v3 API

    New

    • allow standalone use: include minimal settings, independant to other helpers or web interface
    • include settings for integration with Flexible Helper Scripts
    • separate settings file from the rest of the code: one for php (config.php), one for javascript (config.js)
    • distribution now contains only example settings file, to alow smooth update without losing config
    • added hop:// to teleport link choices

    TODO

    • remove old API key probably belonging to one of the original developers
    • … and many other things whose details would be laborious (so much to do, so little time)
    • please use issues to request new features or report bugs

    Installation

    • clone this folder inside your website documentroot, e.g /var/html/opensimmaps/, to make it accessible as https://yourgrid.org/opensimmaps/ (you can rename it)
    • Copy config.php.example as config.php and adjust settings (this helper only needs database credentials OPENSIMDB*)
    • Copy config.js.example as config.js and adjust settings (particularly xlocations, ylocations, mapcenternames, hgdomains and hgports)
    • make a soft link from the OpenSim maptile/00000000-0000-0000-0000-000000000000 folder to data/regions/, for example on linux (adjust to your setup):
      ln -s /opt/opensim-0.9.2.0/bin/maptiles/00000000-0000-0000-0000-000000000000 /var/html/opensimmaps/data/regions

    Alternatively, you can make data/regions/ folder and copy the maptiles in it, but it won’t be updated automatically.

    • Original readme specified to rather use Warp3DImageModule, but it is now the default. Your OpenSim.ini file should contain these settings:
      [Map]
        MapImageModule = "Warp3DImageModule"
        TextureOnMapTile = true
        DrawPrimOnMapTile = true

    Credits

    Based on hawddamor’s opensimmaps (optimized for OpenSim Redux web interface).

    This is a modified version of hawddamor/opensimmaps. The modifications from the original project are mainly related to file locations and some variable names.

    More information on original project and authors in README and LICENSE files.

  • opensim-debian

    OpenSim Debian Distribution

    Version: 2.0.0

    This is an framework to facilitate installation and use of OpenSim with Debian.

    https://www.speculoos.world/opensim-debian-installation-framework/

    Features

    ./install/install.sh

    • create basic directory structure, download OpenSim and other needed libraries
    • read Robust default configuration, ask a few questions and build a working configuration in etc/robust-d

    opensim start

    • Start all instances, first in etc/robust-enabled, then in etc/simulators-enabled

    opensim start instance1 [instance2] [...]

    • Start only specified instances The config will be the first match in etc/robust.d/.ini or etc/opensim.d/.ini

    opensim stop [now] [instance1] [instance2] [...]

    opensim restart [now] [instance1] [instance2] [...]

    • Stop/Restart all instances or matching instances
    • If first parameter is "now", stops the simulator immediately, otherwise send reminders to leave during 2 minutes then stop

    opensim status

    • Show active instances, per instance and global memory and cpu usage

    Installation

    git clone --recursive https://git.magiiic.com/opensimulator/opensim-debian.git
    # use --recursive to download git submodules
    # if you don't use recursive, they will be downloaded during installation
    sudo mv opensim-debian /opt/
    export PATH=$PATH:/opt/opensim-debian/bin
    cd /opt/opensim-debian
    ./install/install.sh

    Answer the common setting questions.

    Configuration should be working as is, but you will probably want to adjust

    • ./etc/opensim/opensim.conf (main database configuration)
    • ./etc/opensim/robust.d/*.ini (robust settings)
    • ./etc/opensim/opensim.d/*.ini (simulators settings)
    opensim start

    To enable bash completion:

    sudo apt update
    sudo apt install bash-completion
    sudo ln -s /opt/opensim-debian/lib/bash_completion.d/opensim /etc/bash_completion.d/

    Main motivation

    In a software application, particularly a complicate one like OpenSim, some thing should never be stored at the same place. Essentially, there is a place for static files (executables, libraries), a place for preferences, and a place for data created by the application (permanent or temporary).

    This way, you can

    • easily update the software without touching preferences and data
    • backup the data without duplicating the software
    • avoid duplicating the application if you need to run several instances…

    So, we reorganised the files and folders, matching the general Linux standards.

    • The whole thing is stored in /opt/opensim-debian (could become /usr/share/opensim if we make a package), refferred as OSDDIR below
    • Scripts and utilities are in /OSDDIR/bin/
    • The main code (latest stable OpenSim release) is located in /OSDDIR/core/opensim (no, not in bin, because they are not directly executable on all OSes, and they rely on lot of other files around them)
    • Preferences are read from /OSDDIR/etc/ /etc/ and ~/etc/, each one overriding the precedent
    • Cache is stored in /OSDDIR/var/cache
    • Logs in /OSDDIR/var/logs
    • Databases (if using sqlite) should be store in var/db (but we don’t use sqlite, so this could be added or not later)
    • Git clone and other works in progress should go in dev/

    It was important to achieve this without altering the main OpenSim code. So we created some scripts which:

    • read the preferences in etc/
    • looks for instances to start in etc/robust.d and etc/opensim.d
    • tells OpenSim where to save data, cache and logs

    We have developed and used this setup for several years in Speculoos Grid and wanted to share. Although this was working for us, we don’t push the whole thing as is, as we want to make sure the methods are as globals as they can.