Monday, January 9, 2017

Update to the blindfolds

Hi there and Happy New Year !

As you might know, the RealRestraint blindfolds can block your vision either by using a big HUD prim (a cube with a tiny hole in the middle to let you click through, that's the "RealRestraint_HUD" object it makes you wear), or black vision spheres if your RLV is 2.9 or above. The choice of method has been automatic until now.

However some time ago Firestorm (and other viewers using the RLVa implementation of the RLV API) was updated to a new version that now reports a wrong RLV version number to the scripts. As a result, the RR blindfolds believe they can use RLV 2.9 vision spheres (what makes the world black except your avatar and your immediate surroundings), while they can't because FS does not implement them yet. So your world would look grey but you wouldn't be blind and you would think your RR blindfold is broken.

Since Firestorm does not update very often, to mitigate this issue I needed to include a "fix" (to a bug that isn't mine) so that the user can now choose between HUD and RLV methods. This "fix" is two-fold :

- Turn the base script into a plugin named "Blindfold" to give the user a menu on which they can choose whether to use the old-school HUD or the RLV 2.9 features (provided their viewer DOES really implement the RLV API 2.9, which is not the case for FS). This was also a request from some people who actually prefer the HUD to the vision spheres.

- To not get fooled by FS and its reported version. If the version is less than 2.9 or greater or equal to 3.0, then it will use the old-school HUD method.

You do not need to have your blindfold replaced for this change to take effect. All you have to do is go to any of these locations :

My Little Shop
Chorazin's Shop
Roper's Dark Playground
Dark Wishes

Then click on the updater there, rez the update orb, start an update on your blindfold and request a soft update (choose "UPDATE" on the menu instead of "REPLACE"). You will then see a new "Blindfold" button in the "Plugins" menu that will let you switch between HUD and RLV methods at will. It is designed in way that prevents cheating while switching, by the way.

The blindfolds I am talking about are the Deluxe Blindfold, the Scarf Blindfold, the Isolation Blindfold, the Pretty Mummy Blindfold and the Tape Blindfold. I hope I did not forget any.

Very important : After updating, detach your RealRestraint_HUD object (if you were wearing any, and if it is not locked), and let your updated blindfold rez its own. This is because the "fix" also required some significant changes in the HUD itself, not only in the blindfold, and you need the updated HUD for it to work.

Also, please note that this is not a new version of the whole system, so if your blindfold is already 1.29, it will remain 1.29. If you see a "Blindfold" button in your "Plugins" menu, then you know the update is successful. You will still need to save and load your times though, if you don't want to lose them

Here is a more detailed explanation about the problem, if you want to know everything.

Without being too technical, an object using RLV features needs to know the version of the RLV API (*) the user's viewer implements. For example, if the object needs to restrict the user's ability to hear emotes from one particular avatar around, it will need to use the @recvemotefrom RLV command, which requires a viewer that implements the RLV API v2.4 or above.

The same thing goes for the RealRestraint blindfolds, because they need to know whether to use the old-school HUD prim to block the vision, or the "new" RLV 2.9 vision restriction commands. If the user's viewer implements RLV 2.9 or above then vision spheres are used, otherwise the HUD is used. Simple, except that the latest version of Firestorm reports a wrong version. It pretends to implement the RLV API v3.1.4 which does not even exist. What's more, FS does not implement the vision restriction RLV commands yet, so it confuses the RR blindfolds by telling them they can issue RLV 2.9 restrictions, while the viewer is not actually capable of displaying them. As a result, people believe that RR blindfolds are now broken because they do not blind the user at all.

I need to point out that the bug does not come from the RR blindfolds, they rely on an information that is not sent correctly by the FS viewer (and others using RLVa). And that information is incorrect because the RLV API explicitly says that the version to send to a script is the version of the RLV API that it implements. This is different from the version of the code which must not be a concern for scripts, which I believe FS' "RLVa v3.1.4" stands for.

Have fun !


(*) Application Programming Interface, the document that specifies what commands are available at which version, what they do and how to use them.