You are currently browsing the hack tag archives.

Advanced Boat Hacking – Textures

Posted by Atashi at 2015.05.06 12.00 in Customizations

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

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.

The Formula Wai mark 2 (FW-2) boats were set up to make them easy to texture. Most of the work can be done through the menus – click the boat, select Colour, select a colour, and you’re done!

If you want to go beyond the ten pre-set choices though, you can create your own boat texture by following the Template that I posted earlier.

That post and the download files should have enough to get you started on creating your own custom texture for your boat.

To apply your custom texture, click your boat, select Colour from the menu, select UUID, then paste your texture’s UUID into the textbox and click Send. The script will apply the texture to the correct faces for you.

The scripts cover the following prim faces:

Hull Exterior
This is most of the outside of the boat hull – it wraps around from the port side of the cockpit, under the bottom of the boat, and up to the starboard side of the cockpit.
Bow Exterior
This is the outside of the front of the boat – from the ‘point’ of the bow, up to the front of the cockpit. Where the boat number or your logo would be.
Cockpit Front Edge
This is the horizontal edge at the very front of the cockpit. It is part of the Bow prim. The script re-uses the bottom of the hull to colour this area.
Cockpit Port Edge
This is the edge along the left-hand side of the cockpit. It is part of the main Hull prim. The script re-uses the bottom of the hull to colour this area.
Cockpit Starboard Edge
This is the edge along the right-hand side of the cockpit. It is part of the main Hull prim. The script re-uses the bottom of the hull to colour this area.
Port Rudder – Outside
The outer side of the left-hand rudder. The same part of the texture is used for both port and starboard outside rudders, so a symetrical design works best.
(That is, if you have an arrow pointing forward on the left side, it would be pointing backward on the right side.)
Port Rudder – Inside
The inner side of the left-hand rudder. The ‘insides’ of the two rudders face each other, and generally spectators aren’t going to see much of this area.
The same part of the texture is used for both port and starboard outside rudders, so a symetrical design works best.
Starboard Rudder – Outside
The outer side of the right-hand rudder. The same part of the texture is used for both port and starboard outside rudders, so a symetrical design works best.
(That is, if you have an arrow pointing forward on the left side, it would be pointing backward on the right side.)
Starboard Rudder – Inside
The inner side of the right-hand rudder. The ‘insides’ of the two rudders face each other, and generally spectators aren’t going to see much of this area.
The same part of the texture is used for both port and starboard outside rudders, so a symetrical design works best.
Driver & Passenger Seats
These prims are sculpties and have a special texture that fits them. The ten ‘stock’ colours come with pre-selected variations of this seat, and both Driver and Passenger seats are coloured the same.
If one of the stock seat colours suits you, use the colour menu to select the stock colour first, then use the UUID option to add your own texture ‘over’ the stock colour.
This will preserve the seat colour.
Alternatively, the ‘Template’ option or the ‘Smoke’ option will set the seats to completely tintable or black with a white stripe that’s sort of tintable.

Things you might want to texture, that the script does not touch, could be:

  • The narrow edges of the rudders (top, bottom, front, back). Normally these are just a darkish grey.
  • The Centreboard. This is also a sort of textured dark grey. It’s usually underwater anyways but you might want it to match your hull colours.
  • The aft hull section. This is the cylinder at the back of the boat. From the factory, it has a carbon fibre texture at the stern and top, and in the cockpit there is a sort of dark rubber texture.
  • Speaking of the cockpit, the inside faces of the main hull, bow hull, and the cabin floor, could all be retextured as desired.
  • Anything else? Have fun, play around, but keep backup copies of what works, incase you do break something.

About the only thing that won’t re-texture well, is the propeller. Those textures are set and then animated by the scripts, so any changes you make to the propeller texture will be lost.

Likewise, the tail light and the indicator ‘lights’ have many of their texture properties set in the scripts so if you change the textures / tints on those, it may not work out as expected.

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

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

Advanced Boat Hacking – Sounds

Posted by Atashi at 2015.05.06 11.00 in Customizations

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

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.

The Formula Wai mark 2 (FW-2) boats produce a number of noises. Many of them (but not all) can be customized, if you feel so inclined. This post outlines what can be customized, and how to do it.

The following sounds are included inside the boat. They are provided full-perms, so you can take them out and do with them what you wish.

If you want to replace any of them, just delete the one(s) you want to replace, and drop in new sound(s) with the exact same name. Sound names are case sensitive, so Collision_Bump is different from collision_bump.

~collision_bump
This is the sound you hear when you drive your boat into an obstacle – like another boat, or a pier or something. Ideally, it should be short, and loud.
~engine_idle
This is the sound the engine plays when you’re not moving. It needs to be a looped sound.
~engine_drive
This is the sound the engine plays when you’re moving at ‘regular’ speed. It needs to be a looped sound.
~engine_turbo
This is the sound the engine plays when you’re moving at ‘turbo’ speed. It needs to be a looped sound, and ideally should have a higher pitch or ‘faster’ sound than the _drive sound.
~engine_pitlane
This is the sound the engine plays when you’re moving in the pit lane. It needs to be a looped sound, and ideally should have a lower pitch or ‘slower’ sound than the _drive sound. The default pit-lane and reverse sounds are the same.
~engine_reverse
This is the sound the engine plays when you’re moving in reverse. It needs to be a looped sound, and ideally should have a lower pitch or ‘slower’ sound than the _drive sound. The default pit-lane and reverse sounds are the same.
~engine_destroyed
This is the sound you hear when your boat is destroyed (after health goes below zero.) Ideally it should be loud and crunchy.

If you delete a sound and don’t replace it (or replace it with a sound incorrectly named), the boat will continue to function – the script will revert to using hard-coded default sounds.

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

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

Advanced Boat Hacking – Prims

Posted by Atashi at 2015.05.06 10.00 in Customizations

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

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.

  • Always keep a back-up copy of your boat in your inventory when doing modifications.
  • Take copies of your boat into inventory as you are working on it, incase something goes wrong.
  • You can rename your boat – handy for keeping track of which one is modified, or just to give it an unique or personalized name.
  • The (invisible) front and rear bumper prims, and the ring around the propeller cage, must not be unlinked! Further, any changes you make to the size, shape, or position of these prims will be un-done automatically. This is because these three prims make the basic shape and size of the overall boat, and we need to keep all the boats the same in this regard, to keep the races fair.
  • You can add and remove prims (other than the aforementioned ones, and the root prim) but if you remove prims that are used by the scripts, you may get undesirable results. See below for more info.
  • The scripts don’t care what order the prims are linked in (except the root must always be last). Every prim has a descriptive name, and it is the name of the prim which the script uses to determine the function.
  • Don’t rename the two bumpers or the cage ring, the script would perceive that the same as if those prims were removed.

The ‘stock’ boat comes from the factory using 26 prims. Some of them are vital, many are important, and some are just there for looks.

The following list is complete for the Formula Wai mark 2 (FW-2) boats, as of May 4th 2015.

Root Prim (FW-2 Racing Boat)
Cylinder. This prim appears to be a swept-back cylindrical support mount for the engine, but it is actually the heart of the boat. Do not delete, move or rotate this prim. You can resize it and change its shape, make it full alpha, that sort of thing. But if you move or rotate it, your boat will break badly. If you unlink it, your boat won’t be a boat any more. This prim is also the sit target for the skipper.
Rear Bumper
Box. Invisible / full alpha. Do not delete, resize, move, or change in any way. Also acts as the source for the ‘splash’ particles just below / behind the propeller.
Centreboard
Sphere. In M mode, this is visible below/behind the boat. In S mode, the centreboard is retracted out of the way.
Exhaust Pipes
Sculpt. This prim is passive and used for aesthetics only.
Passenger
Sculpt. This is the passenger seat prim, and is the sit target for the passenger. The prim description contains the passenger’s sit target vector. Can be removed, if you do not want to carry a passenger.
Indicator
Torus. Mostly hidden, the two ends are visible as the yellow and cyan indicator ‘lights’.
Lower Hull
Sphere. This forms most of the boat’s visible hull. The textures are set by script.
Bow Hull
Sphere. This is the part of the hull at the bow right infront of the cockpit area. The textures are set by script.
Aft Hull
Cylinder. This forms the stern of the boat, under the engine.
Cabin Floor
Sphere. This is the floor of the cockpit area. It is also the source for the ‘wake’ particle effect.
Engine Intake
Sculpt. This prim is passive and used for aesthetics only.
Control Stick
Sculpt. This prim is passive and used for aesthetics only.
Skipper
Sculpt. This is the skipper’s seat prim, but it is not the sit target for the skipper. The prim description however does contain the skipper’s sit position vector.
Front Bumper
Cylinder. Invisible / full alpha. Do not delete, resize, move, or change in any way.
Light Beacon
Sphere. This is the ‘tail light’ that sits on top of the propeller cage ring. It glows red during hard turns, white when reversing, and if you click it, the boat will try to fix any camera, animation, or physics glitches.
Exhaust
Cylinder. Invisible / full alpha, this prim is the source for the exhaust particle effects.
Propeller Shaft
Cylinder. This prim is passive and used for aesthetics only.
Engine
Sculpt. This prim is passive and used for aesthetics only.
Belt
Sculpt. The prim is passive / aesthetic but the texture is animated by the scripts.
KC1000 Part C
Sculpt. This prim is passive and used for aesthetics only.
KC1000 Part B
Sculpt. This prim is passive and used for aesthetics only.
Cage
Sphere. This prim is passive and used for aesthetics only.
Cage Ring
Torus. Do not delete, move, change, rotate, etc.
RudderPort
Box. This is the left-hand rudder behind the propeller. It is moved around and re-textured by scripts.
RudderStarboard
Box. This is the right-hand rudder behind the propeller. It is moved around and re-textured by scripts.
Propeller
Cylinder. The textures are controlled and animated by the scripts.

One final caveat: The boat is built entirely with ‘normal’ SL prims. The other kind of prim is Mesh. The boats, being non-mesh, have their ‘prim count’ (land impact, physics impact) calculated normally, where 1 prim = 1 prim.

If you add just one single mesh prim to an object, it causes the entire object to be recalculated as a mesh object, and this drives the effective prim count through the roof. The cut toruses and cut spheres etc. suddenly go from 1 prim to 100’s of prims in terms of land impact and physics impact.

So, don’t try and replace any of the prims with Mesh prims. Either the whole boat is mesh (and it isn’t) or none of it is mesh.

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

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

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.)