[WIP] A Possible Solution to Levitation Issues.

59 replies [Last post]
Dragon_Knight X
Dragon_Knight X's picture
Offline
Newbie
Joined: 03/01/2011
Posts: 6

Greetings, this is, obviously, my first post on these forums. I've just started playing Morroblivion within the past 6 hours, and so far I am very pleased. There are the occasional little bugs and missing textures (most notably textures missing on the candlestick of the Bamboo Candle)

 

In any case, I've been scanning over the boards and I've noticed that so far no one has found a way to impliment levitation in a way that allows for collision and interiors. There may be a way though.

http://www.tesnexus.com/downloads/file.php?id=36903

That is a link to VipCxjs' Air Fight System.  It impliments flight abilities that are collision based and still work in interiors. (I've tested this even in Telvanni Towers and it works fairly well. It is not quite as good for interiors as levitation was in Morrowind, however, it does work and it might be a viable way to include a proper levitation effect into Morroblivion. 

If the developers are already aware of this mod, then I apologize for suggesting something allready known, as it is pretty new though, I thought it might be worthwhile to suggest it.

brutal7
brutal7's picture
Offline
Contributor
Joined: 11/11/2010
Posts: 425
Flying cliff racers

I have talked about this before. But about flying cliff racers. Basically, if we could remove the model and still keep the effects i think we could make cliff racers able to fly to the skys.

Dragon_Knight X
Dragon_Knight X's picture
Offline
Newbie
Joined: 03/01/2011
Posts: 6
Although you have a good

Although you have a good point, I'd say that enabling cliffracers to genuinely fly should be second to enabling players to be able to have real working levitation spells/scrolls/effects. 

Thanks to the newer windows Operation Systems such as Vista and 7, many people have issues with accessing their console. There are fixes and workarounds but those don't work for everyone. There are times in Morrowind that levitation is more or less essential, and without the console and the ability to type in "TCL" many people will be stuck and unable to complete some quests, even the main quest requires levitation to complete. So making a working levitation effect should be a higher priority than cliff racers, although I do agree with you it would be nice to have real flying cliff racers, they are actually more annoying now that they can't really fly >.<

Dave B
Dave B's picture
Offline
Project Lead
Joined: 09/04/2010
Posts: 1692
Levitation

The subject of levitation has come up MANY times.

The air-combat system is new since we arrived at our workaround, but I simply do not understand everybody's preoccupation with Levitation. Levitation is a Very small part of the game, there is SO much else to do, and we do have a workable solution that is 100% reliable.

I personally am never going to spend any more time on it ever again.

However, if somebody else would care to get permission and send me a mod that really does work, I will be happy to include it.

Dragon_Knight X
Dragon_Knight X's picture
Offline
Newbie
Joined: 03/01/2011
Posts: 6
Well then, David, I think I

Well then, David, I think I may take you up on that challenge. It may be awhile till I can get you something, but I shall look into it myself. 

While I'm at it, Brutal, I shall see if I can't make the flying cliffracers work as well.

 

As I said though, It may take me awhile to get something working, but I shall do my best. I'd love to be able to say I contributed something to this project.

dcooper1
dcooper1's picture
Offline
Newbie
Joined: 02/20/2011
Posts: 1
Making Levitation irrelevant

I think we should look at this a different way.  Why not make levitaion irrelevent?  After all, there are only a few places where Levitation is needed such as the Telvanni Towers.

Instead of trying to find a way to levitate, why not just modify places like the Telvanni Towers with stairs, teleports, door markers, etc. to the areas that cannot be reached on foot?

Mooncat
Mooncat's picture
Offline
Contributor
Joined: 04/05/2011
Posts: 190
That is the workaround. When

That is the workaround. When you cast a levitation spell, MorrOB opens the console and nicely asks you to use the tcl command.

I would like a better solution, but it's not high on my list of priorities, either. Best of luck, Dragon Knight.

Orifice
Orifice's picture
Offline
Member
Joined: 05/03/2011
Posts: 22
I found another possible

I found another possible candidate for the solution!

http://www.tesnexus.com/downloads/file.php?id=23030

Looks good and it shouldn't be a problem to get permission.

And before anbody says otherwise,  YES IT IS NEEDED!!!!!!

Anyone who has explored morrowind rather than just rushing the main storyline will know this.

Levitation is absolutely essential to morrowind.  There's a whole bunch of good items that can only be reached with levitation, and you can't complete the main quest without it. 

Opal-Eyed Fan
Opal-Eyed Fan's picture
Offline
Member
Joined: 03/07/2011
Posts: 54
I'm sure it is pretty good,

I'm sure it is pretty good, and maybe the best, but when I followed your link I got to this german language page, I didn't really understand anything it said, so why is it so good?  is there an english version somewhere? The only thing I found in english was the bit regarding  permission to use, and that was not so encouraging by the looks of it.

"The Plugin and/or its contents may not be re-used, spread or hostet without the consent (Permission) of the author.
Furthermore, if you use this mod or any part of it, please include me in your mod's credits"

Seems like somebody who doesn't want just anybody using their stuff, made this mod.

 

But even if getting permission to use it in a mod seems unlikely, I assume playing Morroblivion with this mod installed would  mean we'd just have to travel to cyrodiil and get some potions and head back to Morrowind to use them there.

Orifice
Orifice's picture
Offline
Member
Joined: 05/03/2011
Posts: 22
The description is in german

The description is in german and english.  There's a chunk written in one language and then repeated in the other.  You have to look through it to find the understandable bits!

It says may not be redistributed without permission and that he/she/they must be credited, so it doesn't look that bleak!

Also once permission is obtained, it should be relatively easy to convert the potion effect into a spell effect and the potions could be added to the loot lists and trader lists easily so that they would show up in vvardenfell also.

Opal-Eyed Fan
Opal-Eyed Fan's picture
Offline
Member
Joined: 03/07/2011
Posts: 54
OK, tested it. Works really

OK, tested it. Works really well outdoors as long as you don't fly near big rocks on the ground. Impressive. Manouvering inside Tel Naga great Hall, up and down ... well entering the different levels upstairs at the Great Hall using these potions proved a bit difficult. It's almost as if the player is too big. If the potions are to be really usefull there, some adjustements might have to be made. I wish you good luck on getting the permission to fiddle with this mod though. Morrowind/Oblivion needs some good levitation potions, that's for sure.

Orifice
Orifice's picture
Offline
Member
Joined: 05/03/2011
Posts: 22
Apparently the Supreme

Apparently the Supreme Magicka mod: http://www.tesnexus.com/downloads/file.php?id=12466 

Also has a Levitation spell in it!  As well as Mark and Recall,  so that might be more useful.

As for me changing the potion mod to be usable, thats not gonna happen!  I can't script for toffee! I can put together caves and buildings and that sort of thing but I can't script or program.  I'm just putting forth ideas in the hope it will help get this mod finished and released!

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
I have asked for permission

I have asked for permission to use the mark, recall and levitation spells in that mod.

Orifice
Orifice's picture
Offline
Member
Joined: 05/03/2011
Posts: 22
AWESOME!!!!Good luck with the

AWESOME!!!!

Good luck with the permission getting! This mod badly needs them.

EnvyDeveloper
EnvyDeveloper's picture
Offline
Contributor
Joined: 04/07/2011
Posts: 366
Supreme Magicka also has

Supreme Magicka also has Poison, Swift Swim, Jump and even Detect spells. Not just levitation and mark/recall.

Ice
Ice's picture
Offline
Moderator
Joined: 06/13/2011
Posts: 1008
Midas Wings of an Angel

When I play morro and need to levitate I use a spell called "Midas Wings of an Angel" from Midas Magic Spells of Aurum, found here: http://www.tesnexus.com/downloads/file.php?id=9562 

It's like the most popular mod on Tes Nexus, I have to imagine its good. It works for me. However, I think his 'permissions' are default. How do you guys go about getting permision from a mod? Do you just make a comment on their file page at nexus?

And good luck Vivec, it would be sweet if you got permission, then we wouldn't even have to look into midas magic.

Dave B
Dave B's picture
Offline
Project Lead
Joined: 09/04/2010
Posts: 1692
Mark/Recall

I added a functioning Mark/Recall many months ago when I was doing House Telvanni.

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
I'll make my own mod.

I'll make my own mod.

Dave B
Dave B's picture
Offline
Project Lead
Joined: 09/04/2010
Posts: 1692
Need to Tell

If you did not tell him what this is for, then you are not actually getting permission. And under these circumstances, any "permission" you get is worthless and useless.

You need to be clear about what the "permission" is for.

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
I will make a levitation mod

I will make a levitation mod myself. He'll ask for more information and when I tell him the mod is Morroblivion he will almost definitely say no. So I'm making my own mod just incase.

EDIT: My mod is coming along nicely but I need to know what the name of Morrowind's worldspace is or else it won't work in Morrowind which this is primarely for. For the test version I am making it a "PC Start Spell" so it can be tested straight away. But I need some help. For Telvanni towers I need to allow Levitation to be used in interiors but in some Oblivion interiors that may be problematic. I am also not a very good scripter so I would also apprieciate someone telling me how to stop it being used in Oblivion cities but still allow it to be used in interiors so people can get up Telvanni towers. If nobody can help me with that then I would have to stop it from being used in the Tamriel worldspace completely(which I obviously know how to do). Which would be annoying for some.

 

Ice
Ice's picture
Offline
Moderator
Joined: 06/13/2011
Posts: 1008
okay, so the worldspace for

okay, so the worldspace for morro is wrldmorrowind. As far as not flying in cities, you could use 'if player.getincell anvilexterior04 == 1' and replace 'anvilexterior04' with with the cells of each city. Basically your script would check to make sure the player isn't in the cell of any city: if he is, then don't let him levitate. This is kind of a clumsy solution, but its the best I can think of if you don't want to be able to fly in cities.

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
I'll have to use it. I don't

For the testing esp I have taken the shortcut and stopped it being used in the Tamriel worldspace. This is the file.

I have made it so you have it from the start of the game for testing purposes.

Ice
Ice's picture
Offline
Moderator
Joined: 06/13/2011
Posts: 1008
That sounds like a lot easier

That sounds like a lot easier solution. Cool. Did the file not upload?

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
Sorry I clicked the upload

Ok thankfully at least this time it showed an error message and told me why it didn't work. Here is the MediaFire link:

http://www.mediafire.com/?hc2c6u77xdxxbyp

EDIT: I'm not updating the script for Shivering Isles. I don't want to make i require Shivering Isles but I will make another esp for Shivering Isles if I am requested to do so. Please test the above file.

Seferoth
Seferoth's picture
Offline
Contributor
Joined: 05/18/2010
Posts: 93
I tested the spell and it

I tested the spell and it works...sort of. The flying is very clumsy,way too fast and i hardly had any control over my flying. It is very dangerous to use it indoors, but it atleast works interiors. Spell worked in Morrowind,but not in Cyrodiil, if this was intented then there is no problem, allthough it would be great if that spell would work in Morrowind and Cyrodiil. Good start for good levitation spell, but needs more polishing.

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
For the testing version I

For the testing version I stopped us in Cyrodiil as a quick way to prevent flying over the walls in cities. I will add levitation to Cyrodiil in later releases. Thanks for testing and I will edit the speed of the levitation now.

EDIT: Sadly due to my very poor scripting abilities I can't seem to slow the leevitation down. Could anybody help? All I need is a way to slow it down and then it should be easier to control too.

Ice
Ice's picture
Offline
Moderator
Joined: 06/13/2011
Posts: 1008
Do you mind posting you're

Do you mind posting you're script here, then I could take a look at it and maybe give you some suggestions.

Regarding levitateing in Cyrodiil: What if you just turned it completly on. Then people could fly over city walls, but knowing that that's worthless, perhaps people would use discrescion. I've been using midas' levitate, and I don't ever find a need to levitate over city walls, it's like 'tcl'ing for no reason, it ruins the game, so I just don't. What do you think?

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
 I'm thinking about your

 

I'm thinking about your request. I just wish I could stop it from being used in every worldspace but Tamriel and wrldmorrowind so it could still be used in interiors and the 2 worldspaces we need it to work in but not in cities(which each have a worldspace of their own except the imperial city which has a different worldspace for each district).

Here is the script: 

 

scn zLevitation

 

float angleZ

float X

float Y

float Z

float DX

float DY

float DZ

float oldX

float oldY

float oldZ

float oldDX

float oldDY

float oldDZ

float maxDXY

float t1

float t2

float t5

float t6

float sina

float turbo

 

begin ScriptEffectStart

if ( GetInWorldSpace Tamriel == 1 || IsSwimming == 1 )

message "Levitation magic doesn't work here..."

dispel zLevitation

RETURN

endif

 

set oldX to getPos x

set oldY to getPos y

set oldZ to getPos z

 

end

 

 

begin ScriptEffectUpdate

 

if ( GetInWorldSpace Tamriel == 1 || IsSwimming == 1 )

message "Levitation magic doesn't work here..."

dispel zLevitation

RETURN

endif

 

set X to getPos x

set Y to getPos y

set Z to getPos z

set DZ to Z - oldZ

 

; Levitation 

 

set DX to x - oldX

set DY to y - oldY

 

if (DX*DX)>(DY*DY)

set maxDXY to DX

else

set maxDXY to DY

endif

if maxDXY < 0

set maxDXY to -maxDXY

endif

 

set Z to oldZ

 

if ( IsSneaking == 0 )

set turbo to  16

else

set turbo to 4

endif

 

 

if (DX*DX+DY*DY>8)

 

set X to oldX + turbo*DX/maxDXY

set Y to oldY + turbo*DY/maxDXY

 

setPos x , X

setPos y , Y 

 

set angleZ to GetAngle x

 

if angleZ < -180

set angleZ to angleZ + 360

elseif angleZ > 180

set angleZ to angleZ - 360

endif

 

set t1 to angleZ / 57.29577951    ; precalculate powers of "angle"

set t2 to t1*t1 

set t5 to t2*t2*t1

set t6 to t5*t1

set sina to t1 - t1*t2/6 + t5/120 - t5*t2/5040 + t6*t2*t1/362880 

 

set Z to Z - turbo*(sina)

 

endif

 

setPos z , Z

 

set oldX to X

set oldY to Y

set oldZ to Z

set oldDZ to DZ

 

resetFallDamageTimer

 

end

Hashmi1
Hashmi1's picture
Offline
Project Lead
Joined: 03/10/2010
Posts: 983
Can someone confirm that

Can someone confirm that collision detection works with the ceiling in an interior ... especially in an interior with a more or less flat ceiling.

 

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
I don't have Morroblivion so

I don't have Morroblivion so I can't really test. Why do you want to know?

EDIT: Silly me. I might be able to test this.

Ice
Ice's picture
Offline
Moderator
Joined: 06/13/2011
Posts: 1008
Oh geesh

Okay, so I've forgotten how to do 'and' or 'or' commands, *blush* and I can't seem to find a page anywhere explaining CS logic functions anywhere, so if that first 'if' line doesn't mean 'and', then I forget how to, and it should. If anyone can point me to a page with logic function explination, that would be great.

Basically The majority of your script sailed over my head, but what I was thinking was that you could say something like: if the person isn't either in tamriel or morrowind (aka a city worldspace), then to cancel the spell. So, you could put this on the begeining of your script.

 

begin ScriptEffectStart

if (GetInWorldSpace Tamriel == (GetInWorldSpace wrldmorrowind == 0) 

message "Levitation magic doesn't work here..."

dispel zLevitation

RETURN

else (isswimming == 1)

message "Levitation magic doesn't work here..."

dispel zLevitation

RETURN

endif

and then go on with your script. I have no idea if that would help, and right now my confidence isn't very high, but maybe it will help you.

Regarding the speed, I don't understand well your script, its beyond my ability, but it looks to me like you're manually adjusting the player's position every time the script updates. If that's the case then uping or downing the amount of times the script runs should speed it up or slow it down. So could you use a timer feature (like a set timer to gettimepassed), or change how often the script runs/ updates (This is possible according to the wiki, but I don't know how). Maybe by updating less often the speed would go down? It's a guess, but maybe me rambling might give you an idea or something. hope so!

 

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
"begin ScriptEffectStartif

 

"begin ScriptEffectStart

if (GetInWorldSpace Tamriel ==  (GetInWorldSpace wrldmorrowind == 0) 

message "Levitation magic doesn't work here..."

dispel zLevitation

RETURN"

If I did that it wouldn't work in Telvanni towers. And I am more clueless than you at the moment. I was just allowed to change this script and reupload it without permission as long as I didn't upload it to tes nexus. I would have added permission anyway but the file was gone(and I forgot his username) when I checked for his username to add to credits. I just edited a couple of things to allow levitation in interiors and stuff. I actually suck at scripting. I only know a couple of things that I learned by changing this script.

EDIT: For inspiration(not to steal) I downloaded Midas magic and I can't find any levitation spell or script in the CS. What is the spells ingame name? That might help me find the ID of the spell so I can see the script and see how Xilver made it work in interiors and to something similar.

Ice
Ice's picture
Offline
Moderator
Joined: 06/13/2011
Posts: 1008
haha. I have no idea why both

haha. I have no idea why both of us have an 'innocent' face in that script, oh well, lol.

His spell is called 'midas wings of an angel', and its a spell spell, not an ability or lesser power or anything.

Are Telvanni towers in their own worldspace?

It makes me feel a little better to here you didn't just whip that script up on the spot. I was like: man, this guy really knows whats up.

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
Hah. I could never do

Hah. I could never do anything like this from scratch. Anyway I can't understand anything from this script because almost all of the script has got to do with wings. I' mainly just trying to find out how they made it so...controllable.

HeWhoWatches
HeWhoWatches's picture
Offline
Contributor
Joined: 06/25/2011
Posts: 93
code...

Quote:
haha. I have no idea why both of us have an 'innocent' face in that script, oh well, lol.

That's the BBcode changing zero-closingbracket into a graphical smiley... I think the only way you can stop that is to wrap your text with the code tags. The best way to do this is to have your code in a text editor first, then add the leading and closing code tags, then copy and paste the lot into the message with rich text disabled. You can then re-enable rich text afterwards...

The layout of code is not very good for some reason, it kind of runs off the page if you have a limited screen width (or it does for me when previewing this message anyway)... so you'd may want to use it only on lines with problem characters...

Example:

"begin ScriptEffectStart if (GetInWorldSpace Tamriel == 0) (GetInWorldSpace wrldmorrowind == 0) message "Levitation magic doesn't work here..." dispel zLevitation RETURN"

Hope this helps

HeWhoWatches
HeWhoWatches's picture
Offline
Contributor
Joined: 06/25/2011
Posts: 93
Also, I don't know if this is

Also, I don't know if this is of any use, but there are a couple of versions of a levitation script here and here, which looks to have originally been created by a modder called Saltare in 2006. The code specifically states:

You may alter, rip, crush & destroy this piece of script as much as you want ^_~

Sounds pretty unequivocal to me

Might be useful as inspiration at least...?

Edit:

The original mod is here... I loaded up the esp in CS and checked out the LevitationEffectScript just to confirm it states the script may be used/edited as per the two pages mentioned above. It does, so the script should be ok to use if anyone fancies taking a look at it. There are videos of Saltare's version here, obviously you wouldn't want the wings so the script will likely not be usable without modification. Looks like the script requires OBSE, which may also have a bearing on its usability (i.e. at present Morroblivion doesn't require OBSE, though Silent Voices does).

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
OBSE isn't as much of a

OBSE isn't as much of a problem as getting rid of all the parts of the scripts that have got to do with wings.

HeWhoWatches
HeWhoWatches's picture
Offline
Contributor
Joined: 06/25/2011
Posts: 93
On closer inspection...

On closer inspection, there's two esp files:

  • RingOfWings_Switcher.esp
  • RingOfWings_Wingless.esp

I started CS using obse_loader -editor

Loaded the RingOfWings_Wingless.esp
Only lines 105 / 155 aren't necessary:

short switchWings
set switchWings to 199

So I removed these... and as far as removing the stuff to do with wings, that's it...

Then I set about changing the default keys to activate / deactivate the script:

Comments on mod page, page 8:

Quote:
Ah yes i'm sorry about that. I'm still struggling a bit with good keys.
Currently the R and T keys are also the default keys for R=switching view and T = waiting
Well i have those keys changed and RT where for me free to use.

To customize the keys use the Construction Set, select the ROW ( and make sure it is activated)
open the script editor, open script LevitationEffectScript.

In the block ScriptEffectStart
There is a part saying keyBindings .. well it should be clear now how to do it
simply change set activateFlying to 19 with another number
19 is the key R
see http://cs.elderscrolls.com/constwiki/index.php/IsKeyPressed2 for more information (key codes).

I decided to change activate to U and deactivate to J...
Wiki pages states:
0x16    22  U
0x24    36  J

Changed the script to use the new keys:
set activateFlying to 22
set deactivateFlying to 36

Saved the changes, loaded the esp and got a message stating a flying ring had been added to the inventory.
Tested levitation with ring equipped and it works, but collision detection is a problem as expected.

I did note that someone has released a newer version of the mod here. From the mod description, they appear to be using a collison mesh to work around the problem, but this is problematic too:

1. The author of the mod didn't get permission from SaidenStorm to use his collision mesh (besides, I think that mesh was for a flying dragon or similar so will be massive - it states as much on the mod page).

2. This...

Quote:
the collision the player is riding on is not the right size, but I'm no good with meshes so will have to fix that eventually (ie. get someone to make me one the right size), this means:
don't try shooting spells/arrows while flying as they will hit the collision
NPCs may run into the collision if you are low or jump on it and be air born with you.


However if anyone's a dab hand at making collision meshes, perhaps one the right size might not have these problems...

If anyone wants to play about with this, the modified esp is here, and a text file of the modified script is here.

Hashmi1
Hashmi1's picture
Offline
Project Lead
Joined: 03/10/2010
Posts: 983
From what I can understand of

From what I can understand of these scripts (*and I can be terribly wrong) ... but the basic idea is to allow the player to move on his own in the XY plane and to manually push him up in the Z plane when he looks up (angle to the X axis is used to deterime that).

However the game's gravity tends to pull the player back down, when his feet are above the ground ... so an invisile collision mesh is placed and constantly  repositioned under his feet.

Litetrally anything could be used as the collision mesh ... there are some invisible collision meshes packed with oblivion itself that can be scaled to fit. However these meshes do not control "collision detection" with the environment ... they just give an invisible platform for the player to stand on so that he doesn't fall down when up in the air ...

Now as far as I can understand Collision Detection in these mods,  if you think about it there really isn't any need for seperate collision detection.  Remember that the player moves on his own in the XY plane where Oblivion's built-in collision detection will prevent him from going through walls ...

The problem however is movement in the Z plane ... movement in this direction is not possible in the game itself ... so it is emulated by scripts manually pushing the player up (SetPos Z) ... but SetPos does not take any collision into account ... and so its quite possible to move through an object right above the player (ceiling, TreeCanopy, Bridge or even a tilted wall etc. etc.)

Btw, maybe we should try to find a way to purposely trigger the "swimming on land" glitch when levitation is needed.

 

 

Hashmi1
Hashmi1's picture
Offline
Project Lead
Joined: 03/10/2010
Posts: 983
Here is Midas Magic's script

Here is Midas Magic's script modified to remove the wings.

Remember that you need to replace the text in script named MidasWingsScript with this one.

http://www.mediafire.com/?ne063qzkf1vd9lb

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
Brilliant. I'll look for

Brilliant. I'll look for points of interest since we can't just copy and paste or else we would have stolen the script.

EDIT: I think you might have left in bits got to do with wings. Like I found a line saying "ref myWings" near the very start of the script. But maybe I'm wrong and that is supposed to be left in. EDIT: The script refers to so many items included in Midas Magic so we will need to be careful about that.

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
I can't do this. I'm not a

I can't do this. I'm not a very good scripter so I don't have a clue what might help our script and what won't.

Hashmi1
Hashmi1's picture
Offline
Project Lead
Joined: 03/10/2010
Posts: 983
Here is my own modification

Here is my own modification of Midas's script which uses the Physics engine instead of forcing a position ... if it works it might be better at collisiopn detection in interiors {requires to be compiled with OBSE 20 or later}.

With the spell active press L to fly upwards.

Please do test and tell me if it works (speed can later be adjusted).

 

 

Scn MidasWingsScript float LevitationSpeed float pcZheight ref myWalk begin ScriptEffectStart Set LevitationSpeed to 200 ; Speed in Game units/second ... set myWalk to MidasActivatorWingWalkRef ;Platform to prevent fall myWalk.Enable resetfalldamagetimer end begin ScriptEffectUpdate Set pcZheight to GetPos z mywalk.Setpos z pcZheight If (IsKeyPressed3 38) SetVerticalVelocity to (LevitateSpeed) EndIF end begin ScriptEffectFinish resetfalldamagetimer end

Hashmi1
Hashmi1's picture
Offline
Project Lead
Joined: 03/10/2010
Posts: 983
vivec wrote: Brilliant. I'll

vivec wrote:
Brilliant. I'll look for points of interest since we can't just copy and paste or else we would have stolen the script.

We can and do use things by other modders, with their permission. First we need to make something work ... later we can deal with permissions or create an original "inspired" version.

 

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
The problem is only the Midas

The problem is only the Midas Magic mod has things like "MidasActivatorWingWalkRef" so what are we going to do with that? I'nm almost definitely wrong here but as far as I know referencing to things in Midas Magic would cause problems unless the user had Midas Magic enabled as well.

Hashmi1
Hashmi1's picture
Offline
Project Lead
Joined: 03/10/2010
Posts: 983
Oh my God ... 

Scripts do not accept Base Object Ids so you need to make a unique copy of an object, place it in a cell and assign it a name to identify it in scripts ... its called a Persistent Reference and  MidasActivatorWingWalkRef is just that ... a name used to identify a unique instance of an invisible collision box that can be used in scripts.

Once we can get a workling script we can and will make a seperate script with  seperate references ... but first we need to actually get something started.

Ice
Ice's picture
Offline
Moderator
Joined: 06/13/2011
Posts: 1008
We should be able to replace

We should be able to replace that ref with our own object that has collision. It shouldn't be too hard. Look up that ref: see what nif file it is. Make our own nif file, or if Midas allows us to, we just include that ref / file in our support files, after removing it from his mod. We probably could just create a ref from a modified collision box (you know, change the scale).

This looks like this might really be coming together, which would add a lot to the game. Great job people! It's crazy how smart and resourceful the people on this site are. I dig it!

 

EDIT: oh woops, didn;t see that last post there. What he said, lol.

 

So the ref references a .nif called 'midaswingwalk' in meshes\magiceffects. It's just an invisible collision box.  Man poking around in midas' mod files makes me respect this guy, hey know what he was doing.

HeWhoWatches
HeWhoWatches's picture
Offline
Contributor
Joined: 06/25/2011
Posts: 93
Ok, I'm afraid I couldn't get

Ok, I'm afraid I couldn't get SetVerticalVelocity to (LevitateSpeed) to work, the script engine wouldn't accept it. It would accept either of the following though:

player.SetVerticalVelocity LevitationSpeed

myWalk.SetVerticalVelocity LevitationSpeed

However the L key did nothing when pressed.
I did some further testing in the console...

player.SetVerticalVelocity 200 does nothing unless you bring up the console just after starting a jump. I have a feeling it only affects an object when in motion, but I could be wrong...

For reference, a value of 200 is barely distinguishable from a normal jump, 750 will take you up high enough to knock some health off, and 2000 is high up enough to kill you!

So, I went back to the original midas script and edited out all the stuff relating to wings. There's some crazy maths in there related to XYZ co-ordinates (maths is not my strong point), and it even restricts the angle of climb to 30 degrees (I think). It's very nifty.

Anyway, long story short, that works. Basically you're doing an extended jump so collision appears to be all good as well. Have only tested it in an interior cell so far. It's late and I want to go to bed

No need to download the full Midas mod (it's hefty, 70+ MB) - I have added a file with the esp, the single nif file required and some text files with brief notes on what I did including the trial scripts that didn't work.

The Levitation Test spell is available from Sharn gra-Muzgob in Balmora Mages Guild.

The download is here (you'll need 7zip)
**Now updated with Hashmi's nif file**
**Please note, found old esp file was in the archive by mistake. Fixed as of 23/07/2011 14:00 GMT**

Please test and let me know if it works for you too.
It's a start, eh?

Good luck
Rob

Hashmi1
Hashmi1's picture
Offline
Project Lead
Joined: 03/10/2010
Posts: 983
Our own Nif
HeWhoWatches
HeWhoWatches's picture
Offline
Contributor
Joined: 06/25/2011
Posts: 93
Wow, quick work, thank you

Wow, quick work, thank you sir!

I have tried swapped out the original mesh for the new one - unfortunately I just seem to be hovering slightly above the ground, but can't actually go any higher, so not sure if there's a problem there.

Test 2 here

I'm going to be at work for most of the day now, so if someone else can test to confirm the issue that'd be great....

Vivec
Vivec's picture
Offline
Frequent Poster
Joined: 06/30/2011
Posts: 151
Firstly I would like to

Firstly I would like to appologize for beung such and idiot with the refs. It was late and I somehow got mixed up with nifs and refs(don't ask me how)so when it said things like "ref myWings" I thought the mod must have wings with the levitation(like in some mods)and that wouldn't fit into Morrowind so that is why I was urging for them to be deleted, I thought they were nifs

Thanks for the nif Hasmi! We know it sadly isn't perfect because of what HWW said but it is much better than nothing.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Syndicate content