As is so often the case, the butterfly nature of my mind has led to me completely forgetting to continue work on any of my past projects, and I have, instead, been working on something completely different today - a power distribution system. Clearly if one needs to have such large items as a lighthouse lamp working, one needs a power source, and as of the current moment, it is powered by a windmill.

The windmill itself generates electrical power which is then transmitted to, and stored in, a battery of my own design. (All power connections are safely buried underground or otherwise well insulated, do not be concerned.) The lighthouse then takes energy from the battery whilst it is lit.
Windmills do not actually generate an awful lot of power, but I take advantage of the peculiar cycle of day and night in Second Life here. Astronomers have calculated that a day lasts for three hours, whereas night lasts for only one - thus the windmill has three times the length of the nighttime when it is not required to power the lamp, and can therefore charge the battery.
For any parties interested in how this particular arrangement is scripted, it is a fairly simple three-part arrangement of shouts and listens. Only one permanent active listen is required, in the battery itself, on channel -70809.
Generator objects such as the windmill send energy to the battery by shouting a positive number on this channel. The battery then adds a number of OEUs (Ordinal Energy Units) to its store. At the moment, it is limited in capacity to 100,000 OEUs - more than this is released as a harmless shower of particles, though I would not expect it to ever get there.

The windmill’s script is more complicated as it also alters the speed of the rotation according to the current wind velocity, and produces different amounts of power depending again on wind velocity, but a simple example of this sort of object would be the Etheric Generator, a fairly simple device producing energy through ambient ether flow (unfortunately, not powerful enough to light the lamp).
Consumer objects such as the lamp request energy from the battery by shouting both a negative number and a randomised channel for a response, for example “-300,-2379845″. They then start to listen on their randomised channel for the battery’s reply, because the battery might not actually have enough energy to fulfil their request. The battery removes either the given number of OEUs from its store, or all of the remaining ones, whichever is less, and shouts back the number of OEUs provided.

Again, the lighthouse lamp itself is rather more complicated than is necessary to illustrate this point, seeing as how it must also rotate and check for sunset and sunrise, but I have constructed a simple and inefficient Flare Bulb which takes power and wastes it by merely spitting out particles.
At this point, you, the reader may or may not be curious as to the scripting of these things, and in case of the latter you may see relevant scripts in the “Power System” category of my “Ordinalpedia”.
So relatively simple, but more interesting things could perhaps be done with these basic principles. Note how the Flare Bulb only requests power once per minute usually, for efficiency, but if it does not receive its maximum, it will request more power once that has run out. On the matter of efficiency, as long as we do not have dozens of these devices or ones running at high timers, there is only one open listen, and the system should have relatively little impact on sim performance I would judge.
- - -
What is the purpose of this, I hear the gentleman at the back ask? Yes, you, sir. You look to me like some sort of clerk or other man of business, possibly even an accountant. Where is your soul, sir? Do you have no appreciation of the joys of simple creative activity? Begone with you, and run through the park with no shoes on until you have re-united yourself with the pleasures of experience rather than commerce, or until you tread on a squirrel, at which point you may stop so as not to cause further harm.
Recent Comments