ALGOHOL_v011 by entim
Oblivion » Utilities
Added: 01/10/2007 - 05:58PM
Updated: 18/04/2008 - 12:39AM

179 Endorsements

0.11 Latest version

7,219 Unique D/Ls

10,368 Total D/Ls

34,182 Total Views

Uploaded by entim


Last updated at 0:39, 18 Apr 2008 Uploaded at 17:58, 1 Oct 2007

[19:53] entim: wz, i'd need your Awesome Software Name Generator (TM) :)
[19:53] wz: Did I have one?
[19:53] wz: Let's try :)
[19:54] entim: input: vector3 and quaternion algebra plugin for oblivion script extender
[19:55] wz: ...
[19:56] wz: ALGebraic Operations Helper Oblivion Library - ALGOHOL

Unzip the contents of the downloaded archive into your data folder (C:\Program Files\Bethesda Softworks\Oblivion\Data by default)

The latest version of OBSE is required. You can download it from here: http://obse.silverlock.org/download/index.html

Everyone is encouraged to discuss the commands, the code, request new commands, and contribute to the source code.
The OBSE team assigned opcode range 0x2310 to 0x232F for the project, so there's plenty of room for new commands.
You can browse the source at the obse-plugins project's sourceforge.net SVN repository:
Send me (entim) a personal message at the official ElderScrolls forum, if you'd like to add to the code:


(For syntax format, see OBSE command documentation: http://obse.silverlock.org/obse_command_doc.html#Function_Syntax_Format

* V3Length - returns length of a vector3
(length:float) V3Length vector_x:float vector_y:float vector_z:float

* V3Normalize - returns normalized vector3
(nothing) V3Normalize out_x:string out_y:string out_z:string vector_x:float vector_y:float vector_z:float

* V3Crossproduct - returns crossproduct of two vector3s
(nothing) V3Crossproduct out_x:string out_y:string out_z:string vectorA_x:float vectorA_y:float vectorA_z:float vectorB_x:float vectorB_y:float vectorB_z:float

* QFromEuler - converts euler angles to quaternion (two euler rotation sequences are available, becouse actors use different sequence than other objects. The default is XYZ, and optionally ZX for actors)
(nothing) QFromEuler out_w:string out_x:string out_y:string out_z:string elevation:float bank:float heading:float flag:bool

* QFromAxisAngle - converts rotation axis and angle to quaternion
(nothing) QFromAxisAngle out_w:string out_x:string out_y:string out_z:string axis_x:float axis_y:float axis_z:float angle:float

* QNormalize - returns normalized quaternion
(nothing) QNormalize out_w:string] out_x:string out_y:string out_z:string quat_w:float quat_x:float quat_y:float quat_z:float

* QMultQuat - multiplies two quaternions (Grossmann product)
(nothing) QMultQuat out_w:string out_x:string out_y:string out_z:string quatA_w:float quatA_x:float quatA_y:float quatA_z:float quatB_w:float quatB_x:float quatB_y:float

* QMultVector3 - multiplies a vector3 with a quaternion
(nothing) QMultVector3 out_x:string out_y:string out_z:string quat_w:float quat_x:float quat_y:float quat_z:float vector_x:float vector_y:float vector_z:float

* QInterpolate - interpolates between two given quaternions (two methods are available: the default is normalized linear interpolation, and optionally spherical linear interpolation)
(nothing) QInterpolate out_w:string out_x:string out_y:string out_z:string quatA_w:float quatA_x:float quatA_y:float quatA_z:float quatB_w:float quatB_x:float quatB_y:float quatB_z:float ratio:float flag:bool

* QToEuler - converts a given quaternion to euler angles (again, two different euler rotation sequences available)
(nothing) QToEuler elevation:string bank:string heading:string quat_w:float quat_x:float quat_y:float quat_z:float flag:bool


float vX
float vY
float vZ
V3Normalize "vX" "vY" "vZ" vX vY vZ
The result will be the normalized (vX; vY; vZ) vector.

Check demo video:

Demo esp: http://tesnexus.com/downloads/file.php?id=13251

Changes since v0.1

-fixed handling of actor angles in QFromEuler
-fixed gimbal lock handling in QToEuler

Big thanks to the OBSE team, for OBSE
Thanks to the NPC With Jobs team, who inspired me to create the plugin
Thanks to the NifTools team, who inspired me to learn maths and programming
Thanks to Martin Baker, and the www.euclideanspace.com community, for building a very rich source of information
Thanks to the whole modder community, I learned so much from you

Kalocsa Gábor