---
x-masysma-name: fly_spell
section: 34
title: Ma_Sys.ma Fly Spell
keywords: ["mods", "oblivion", "cheat"]
lang: en-US
date: 2014/08/11 18:05:53
x-masysma-version: 0.0.2.7
x-masysma-copyright: |
  Copyright (c) 2013 Ma_Sys.ma.
  For further info send an e-mail to Ma_Sys.ma@web.de.
x-masysma-website: https://masysma.net/34/fly_spell.xhtml
x-masysma-download: https://drive.google.com/uc?export=download&id=1PBQGfHqhbu7r-FLBKFdLEmiHMFnSZVJY
x-masysma-owned: 1
---
Questions and Answers
=====================

What?
:   A spell wich allows the player to fly with full collision in interiors and
    exteriors.
Where?
:   Buy the spell from Thauron (Bosmer) at the Anvil Mages Guild.
Limitations?
:   You may not enter or leave city boundaries flying and you may not fly riding
    or swimming. Also check the “Limitations” section.
Additional requirements?
:   Latest oblivion patch. OBSE is not required.
How to install a mod?
:   Merge the contents of the `Data` folder and your Oblivion `Data` folder and
    activate the mod in the menu before playing the game.

Background
==========

Having downloaded “Alexander's Wings” from
<http://www.nexusmods.com/oblivion/mods/5480> I also wanted to actually be able
to fly and therefore searched for a simple spell to add this functionality.
These were the features I was looking for:

 * Ability to fly
 * No OBSE requirement
 * Collision detection
 * Proper animation for a female charecter – not supported by this mod :(
 * Stability
 * No limitations on where to fly

There were some spells which allowed the player to fly, many of them which also
did not require OBSE. But unfortunately, none of the spells I found supported
proper collision detection. The player was always able to either fly into the
ground or through ceilings. Most of the spells I found did not even work at
all and only one of them seemed to be able to have at least some extent of
animation, but it required OBSE meaning that I could not test it and it looked
highly complex (more than 20 KiB of script code). One good thing about
everything that worked on my machine: All the spells I tested were pretty
stable, none of them ever crashed (but I did not test very long...).

Among the features I did not need were the following:

 * Fighting
 * Automatic wing switching
 * Quests
 * Measures to prevent cheat-like usage

As a result, none of these were implemented in this mod. Although there is some
sort of limited fighting support, it was not explicitely added and therefore is
not supported and will not be maintained if one of the features I actually
wanted can be improved by removing that ability. Also, I did not need automatic
enabling and disabling of wings, i.e. wings which only appear while flying
because I found that (a) rather unrealistic (but that is not the problem), (b)
unnecessary as I wanted to see also see the wings while I was not flying and
(c) prone to all sorts of problems.

A quest might be nice to have for some people but on the other hand I find it
annoying if I need to complete a quest just to test something I expect not to
work anyway (I sometimes test a lot of mods at once and those with quests are
often not tested because it would take too much time for too little results).
Apart from that I have seen mods wich contain quests around a new feature and
the quests were often bigger than the actual feature which would certainly
happen as well, if I added a quest to this spell. Therefore, if I ever decide
to create a quest for a flying ability (which I most probably will not) I would
separate quest and ability into at least two different ESP files if not two
different mods at all.

The last thing I also did not need were additional features to prevent
cheat-like usage. I consider a fly-spell a cheat by definition (as is any other
mod except for those which provide cosmetic changes only) and therefore would
never prevent the player from doing something he/she could do with the spell.
As a result, this spell enables you to also save a great amount of “work”
completing some quests – decide for yourself if you want to solve them using
the flying ability or if you rather take the official, complicated way. When
playing for the second (or Nth time | N > 1) I myself do not care if I shorten
some quests' steps by flying part of the way...

Dissatisfied by all of the spells I had tested, I got the idea to create an own
spell, but I was sure I could not fulfil the fourth requirement “Proper
animation”, because I was sure this required custom animation files to be
created and I neither had the right software equipment, nor (and that was the
limiting factor) the skills to create such animations. This assumption was
unfortunately correct, wich means that this spell does not have any custom or
proper animation at all. See “Limitations” for further details.

However, the rest of the points still remained valid and I still considered it
to be a major improvement over the other spells that I was able to create a
spell that supports at least the first three requirements and, to some extent,
the fifth as well. Stability is hard to measure objectively here, because my
Game sometimes crashes, but I can never tell why and therefore can not exclude
this mod being one of the sources of the problem. Also, I did not bother to
measure something like crashes per day or such. Furthermore, it is not clearly
defined what affects “Stability”: Are game-crashes the only means of
measurement or is there other factors like 1 second pauses for no visible
reason or such...

Till all of the points are implemented, I do not consider this mod to be
complete and therefore will not go to version 1.0.0.0. If anybody can help by
either adding animation or telling me how to use something more suitable, e.g.
the swim-animation (which I found difficult to do), I would appreciate the help
or tips very much! In the meantime:

Enjoy this mod as it is!

Navigation
==========

Navigate as you would normally run. Stop/Pause running to fall at increasing
speed. Be careful: Whenever you stop “running” for too long, you will
eventually fall till you hit the ground and not be able to rise again without
casting the spell again, because this is a second (and preferred) way of
terminating the spell, i.e. stopping to fly. To get higher in the air just jump
(might be [SPACE] or [E] depending on your configuration).

Limitations
===========

As any other fly-spell I have seen so far (correct me _immediately_ if I have
overlooked something, check the requirements from the “Background” section),
this one also has its drawbacks and limitations. Many of them are of technical
nature and I do not consider them very problematic, others are sort of
limitations by design, meaning that they are rather “features” than limitations
and of course there are also a few problems which are not yet solved but would
certainly be nice to have. I will start telling you about the technical
limitations.

First, you may not fly mounted or swimming because this could cause severe bugs
and therefore terminates the script (before anything bad happenes). This also
means that you can not leave water flying, you will have to find a little free
space to start flying again. However, flying above water is safe. Also, the
spell does not handle water and lava differently.

It is not possible to enter or leave cities by just flying over their walls
because they are not the real city cells but just some dummies which look
similar from far distance instead. As far as I can tell, there will not be any
solution to this in the future.

Some limitations are related to my goals (check the requirements in the
“Background” section for my initial goals). The spell was mainly designed to
_be able_ to fly, not to be able to _fight and fly_. For instance, when
blocking while flying, you start falling, because you are “not running”. When
shooting arrows from above your enemy, they might just hit the air as if there
was a stone between you and your opponent (it actually is, check “The Script”
for further details). Also, I did not bother to do anything about the
inability to swim while flying, because the spell was not mainly designed to
escape every dangerous situation, but rather just an ability to see the world
from another perspecitve.

The spell was designed to be useable from interiors as well as exteriors
meaning that it might seem to be too slow when used outside and too fast when
used inside. I personally found it acceptable for both tasks but you are of
course free to disagree and to _change_ the spell and script to support your
needs.

A rather technical limitation which might also be related to me doing something
wrong with the scripting is the problem of falling for no reason. Actually when
I tested the spell, I sometimes just fell down to earth with the script still
running which is why I introduced a special check to check when the player is
falling. Unfortunately, this requires some of the falling to be already
happened before my script can react.

The biggest drawback in my opinion is that this mod does not support suitable
animation. You just “run” and “jump” in the air as if there was a floor below
you. This is actually the idea behind the script, but I was unable to hide it
and have a better (or ideally custom) animation instead.

The Script
==========

The fly-spell is the first script I have ever created for The Elder Scrolls IV
Oblivion. I have written scripts and programs for computers and websites before
(compare “Redistribution”) but never scripted anything as part of a game-mod.
Some of my problems might therefore be easily solveable for an
Oblivion-scripting-guru – if that is the case and you have an idea of what I
have done wrong, immediately mail me (see the copyright-line for my address).

To ensure proper collision detection, I used one little principle:

> Never move the player.

This is actually the basic idea behind the script. The player always moves
him-/herself – my script never interfers. Therefore, the game's
collision-detection mechanisms remain intact for such complicated things like
ceiling and floor detection as well as for everything else.

Instead of moving the player, I only move an invisible “flight plane” (the idea
has been derived from Saiden Storm's “Mounted Flight Script”) whenever the
player changes position. By jumping, the player's height-coordinate changes and
the plane follows. Instead of falling back to the floor, the player lands on
the plane. Apart from following the player, the plane's height coordinate can
be lowered “manually” by stopping to run. The game's gravity mechanism then
lets the player fall and catch up with the plane.

If you really want to know, how this works in detail, feel free to check the
sourcecode inside the ESP file (script name `MaFlySpellBScript`).

Files
=====

`Data/`
:   Mod files. These are all required to use the spell.
`MaFlySpellScreenshot.png`
:   A basic screenshot (just to have one). Does not tell very much.
`LICENSE.txt`
:   A copy of the GPL v3.
`MaFlySpellReadme.txt`
:   This file. It might be advisable to keep this for reference.
`Makefile`
:   Used to generate archives ready for upload. You do not need this.

![A screenshot from above.](fly_spell_att/MaFlySpellScreenshot.png)

Changelog
=========

The first entries are not very detailed, because the whole thing was still very
unstable and under constant development.

0.0.1.0, 0.0.1.1
:   Dirty
0.0.1.8
:   Untested
0.0.1.9
:   Basic
0.0.2.0
:   Basic + Comments
0.0.2.1
:   Scaled the plane correctly.
0.0.2.2
:   Blindly cleaned.
0.0.2.3
:   When the player changes the cell the spell quits working. Before this
    version you could not reset it by stopping and casting again. Now this
    is possible. Still the issue with changing the cell while casting should be
    addressed.
0.0.2.4
:   Removed underscores from file structure.
0.0.2.5
:   Cell switching enabled.
0.0.2.6
:   Fall prevention I
0.0.2.7
:   Fall prevention II

Redistribution
==============

I have decided to release this mod under GPL. Although it is designed to be
used for programs, it may also be used for other work – quoting from the GPL:
“"The Program" refers to any copyrightable work licensed under this License.”

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

TODO
====

 * User Story: make animation work (not possible w/o OBSE?)
 * Defect: Improve screenshot
 * Defect: Termination does not always occur (try before Leafroot Cavern)
 * Defect: Negative delta z detected
