You are currently browsing the Customizations category archives.

Advanced Boat Hacking – Scripts

Posted by Atashi at 2015.05.06 9.00 in Customizations

Here is more information than you ever wanted to know, about hacking the Formula Wai racing boats. This edition covers the scripts.

The boats are Mod / Copy (*) so you can play around and customize your boat. However, be warned that the only support available for broken boats is a new un-modified one.

Ok, the scripts are actually not Mod, just Copy only. So you’re not really going to be going in and tweaking my scripts. Sorry.

This post is more to explain what the scripts are for / what they do, and if you are into scripting and enjoy playing with things and breaking them, then you may find this interesting.

Boat Updates

Often, when the boats are updated, all that has actually changed is the scripts. So if you have highly customized your boat, rather than having to start all over again with the customizations, it is often faster to just move the new scripts to the existing boat.

To do this, just rez your current boat, and the new boat. Delete the scripts from your current boat. Copy the scripts from the new boat into your inventory. Drop the new scripts into your existing boat. Take the existing boat into inventory. Done.

If there is a significant update where this is not possible, it will be mentioned or posted that the update is ‘prims and all’.

Script Functions

The Formula Wai mark 2 (FW-2) boats contain three scripts, described as follows:

_fw2_main_a
This script handles all the boat physics, collision detection, and the skipper’s animation, control, and camera functions, along with the required permissions.
It is not a big script, and it is compiled as an LSL script, to improve handling and performance on region crossings.
In simple terms, this script handles the bare minimums of ‘being a boat’, as quickly and efficiently as possible.
_fw2_main_b
This script handles all the prim and texture animations, all the communications between the boat and the race course, the boat and the skipper’s HUD, and manages the menu dialog boxes, and responds to touch events.
This script also manages most of the sounds and all of the particle effects.
With all the things going on in the boat, this is a big, busy script.
Consequently it is compiled as a Mono script, both for the memory advantage of Mono, and to reduce region lag when there are many boats in the same region.
In simple terms, this script is what makes the boats look, sound, and act ‘pretty’.
_fw2_main_c
This script does just one thing – it retextures the boat when you want to change colours. It’s a small script and mostly does nothing at all.
When you do want to re-colour your boat though, this script handles the various texture assignments, so that the new texture is applied to the correct faces of the correct prims.
This is the only script that can safely be removed.

The A and B scripts work together as a team – if you remove one or the other, the boat will completely cease to function. Further, the two scripts must always be of the same version and build number.

The C script is the expendable one. If you don’t intend on changing your boat’s colour, you can safely delete or remove this script. The other two scripts won’t mind. The only change you’ll notice is the Colour option will disappear from the menu, when you click your boat.

Hacking

This last bit is for the scripters who want to take things apart and break them.

The three scripts in the boat all communicate with each other via link messages. Usually restricted to the prim containing the scripts (LINK_THIS) instead of the whole object (LINK_ALL).

The (integer) num part of the message tends to be a ‘command’ or ‘variable name’ reference.

The (string) str and (key) id parts tend to be used to carry the ‘data’ or ‘values’ that the ‘command’ relates to.

The messages are mostly from A to B or from B to A. Sometimes from B to C.

Caveat: scripters / hackers are going to figure this stuff out regardless so I don’t see any harm in sharing it. What you do with your boat is your business.

However, if people find some exploit and start using that to cheat at racing or cheat at time trials, we reserve the right to ban them from the races and remove them from the scoreboards. Have fun, but play nice.

Better still, if you find some cheaty exploit, let me know so it can be patched!

Have fun modding your boats, and remember to make backups of your boat!

(* Freebie boats are given away as Copy only.)

FW2 Template Files [U]

Posted by Atashi at 2015.05.03 10.31 in Customizations

The linked zip file below contains Gimp (xcf), Photoshop (psd) files of the new hull texture template for the new FW-2 boats.

The Gimp and Photoshop files contain all separate layers for the various areas you can include in the single texture:

  • Hull Base Colour
  • Lower Hull Colour (also used for cockpit trim)
  • Port & Starboard Text Areas
  • Bow / Logo Area
  • Outer & Inner Rudder Areas

You can include all of these details in a single texture, and retexture the whole boat at once using the boat’s menu system.

Just click the boat for the menu, select Colour, then select UUID from the colour menu. Paste the UUID of your new texture into the text-box and the boat applies the texture to all the relevant surfaces.

Click to download: FW2 Hull Template Files.zip (Updated)

  • The templates use layers – each layer’s name is descriptive of what the layer represents.
  • The rudder areas have text on them to illustrate which direction is ‘up’ for the inside and outside surfaces.
  • I have added an (unused) layer which is a 32×32 grid of coloured checkered squares, divided into an 8×8 numbered grid, that can be used to figure out precise positioning. You’ll need to upload the grid inworld and apply it to the boat, but it will help illustrate where all the pixels go.

This is what the completed template texture looks like – it’s also available as an option on the boat’s colour menu so you don’t have to upload it yourself in order to see how the various areas are applied to the boat.

FW2 Texture Template