Lorhin

--------------------------------------------------------
What is Lorhin?
--------------------------------------------------------
Lorhin is a tool that lets the user show and animate textures, almost every aspect of the animation and how the texture is shown is possible to affect in some way.
Lorhin started out as a personal experiment and a try to fix some of the issues I felt Power auras and Avion have.

So what functionality do Lorhin that is uniqe as of yet?
Lorhin have the ability to let the user completly (well, almost, due to how the syntax is interpretated) control how to animate the frame, move it, size it, recolor it, you name it. The user is also in complete control over what events trigger the check if to start or end the animation, which is also usersupplied. And as far as I know, Lorhin is yet the only avaliable addon of this type that can change the texture during the animation.

What Lorhin cannot do.
Lorhin will most probably never be able to trigger sounds like it triggers animations, why? Actually this is due to a personal dislike of sounds, while I understand that there is probably users out there that like this possibility, I will not add this functionality, you are free to do so yourself though.

Why are there so few textures in the release?
There are a few reasons, bandwidth is one, what's the point of adding textures that most probably won't be used? And there is also the copyright that makes me refrain from adding textures I've not made myself, or where I have recieved an ok from the author. The textures packed in the release are 1.tga through 5.tga and Example.tga , it is also possible to use any texture provided by wow, just give the full pathname to it.

How to use your own textures?
You have two options, either add them to the Texturefolder for Lorhin (Interface\Addons\Lorhin\Textures) or add them anywhere in your interfacefolder. Of the two I recommend the first due to simplicity in the usage ingame, if they are added to the texturefolder you can just give the name of the texture, Lorhin does the rest, otherwise you have to specify the full pathname to the texture, both ways work but I prefer the shorter names.

--------------------------------------------------------
The Interface.
--------------------------------------------------------
The gui is accessible through the slashcommand /lorhin

To select more than one animation at a time, hold down ctrl, while clicking on each individual animation.
NOTE: If you have more than one animation selected, the values that are not identical on all the selected animations will be emtied out, this is done to indicate that the values are different.

The settings for each individual animation are not actually checking what data you give them, odd data will have odd and usually not liked effects.
Texture is given as just the name of the file (if it's in the texturefolder) or the full pathname.
Intro, Active, Outro and Restart are given as strings exaplined further below.
Events are given as a string, each event should be separated by a space.
And the big boxes are for the function, simply type in the code as a string, the functions are always called with the params (event, ...) in case you want to use any of the params from the eventcall.

What are the different animationstates, Intro, active and so on?
Simply described as, they are what part of the frame is currently doing, say if you for example want to have a different animation when it starts from inactive and starts from active, that's what Intro and Restart are for, Active is the main animationloop, but you can if you want write the entire animation in any of the fields, Outro is as it says, the outro.

--------------------------------------------------------
The syntax and the commands.
--------------------------------------------------------
The syntax:
All commands are written in the format of [command params time], params differ from command to command and time is given in the format t=N in seconds, all commands require a time unless specified otherwise.
Params labeled as 'number' can be written as arbitary values enclosed in paranthesis, Lorhin will then calculate that value EACH frame the animation is animated, use sparingly unless you need it for a certain effect.

The commands:
[Alpha]
Changes the alphavalue of the animation.
values: number, time.
example: [Alpha 1.0 t=4]

[Anchor]
Change the anchor of your animation.
values: [string[ string[ string [number [number]]]]]
name [anchorpoint [anchor to point[ x-offset [y-offset]]]]
Note: the values for Anchor is very sensitive to errors, and will state that Lorhin is the cause, use with caution.
Example: [Anchor MainMenuBar]
Example: [Anchor UIParent CENTER CENTER 200 -600]

[Color]
Change the color of the animation, can change the alpha at the same time.
values: number, number, number[, number], time.
Example: [Color 1.0 0.0 0.0 t=3]
Example: [Color 1.0 0.0 0.0 0.5 t=3]

[Move]
Changes the position of the animation.
Values: number, number, time.
Example: [Move 260 -140 t=6]

[R]
Repeat the commands enclosed in this command.
If no time is given repeat indefinitely.
Values: commands[, time]
Example: [R[commands...]]
Example: [R[commands...] t=12]

[Rotate]
Rotates the animation around the center of the texture. Angle given in degrees.
Tries to always take the shortest direction to the targetvalue.
This command overrides any previous set texcoords, and Texcoords overrides any previous set angle.
Values: number, time.
Example: [Rotate 170 t=2]

[S]
Run enclosed commands once then do nothing.
If no time is given hold indefinitely.
If time defined is shorter than what the subcommands are they will end when S's time is up.
values: [commands[, time]]
Example: [S]
Example: [S t=14]
Example: [S[command]]

[Size]
Change the size of the animation.
Values: number, number, time.
Example: [Size 300 300 t=1]

[Texcoords]
Change the texcoords of the animation.
This command overrides any previous set angle, and Rotate overrides any previous set texcoords.
Values: 8 numbers, time.

[Texture]
Change the texture of this animation. Filename given as a string.
Note: [Texture] do NOT use a time.
values: string

The slashcommands:
Using /lorhin will as previously stated open up the configuration, but it is also possible to use a few paramters on this to something else with the command.
Using the parameter "begin" and then values will trigger the animation on for any animation specified in the values. The paramter "end" stops any active animation that you specify in the values, and the paramter "Reset" loads the startvalues of the specified animations (does NOT stop them from running though).
The values can be given in the following formats, "n n2 ... nN", "n-n2" and "all", all will trigger all the currently previewed or enabled animations.

Another comand is the /lorhin rename ID NewName, (new in 1.5.2) which lets you place your own names on the animations to easier distinguish what animation is doing what.

--------------------------------------------------------
Things you might want to avoid doing:
--------------------------------------------------------
[rotate 0 t=N][Rotate 360 T=N2] do not rotate (or 360 instead of 0), why?
This is due to the fact that the previous rotate may not have stopped over or on exactly 0 or 360, and thus the next one will animate what remains between those two degrees.
This can be corrected by using a [rotate 0 t=0] before any rotate you want to go a full 360 degrees.

Using an endless loop in the start or end condtions code may have undesired effects.

It won't lock up the addon or throw an error, but you will have a severe resourceleak as the function never terminates but keep getting called. As far as I know there is no way I can prevent this kind of errors, so it's up to you as a user to not make any of those loops.

Lorhin throws an error after a change or addition to the code to check start/end-condition of a function.
Try to see if it is the function you've supplied that is the cause, as this is quite common.
Lorhin can't prevent these kinds of errors so there will most probably not be a "fix" for it, it's not Lorhin's fault anyway, usually.

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
01 Jul 2008
Last updated
11 May 2009

Author