ZeroCore Posted March 25, 2017 Share Posted March 25, 2017 Hi. I am at it again when it comes to essentially flying. I'm still trying to learn about AI packages to see if the packages that let dragons fly can be given and executed on non-dragon NPC's and the player. I'm getting skeptical again of it though given that dragons have specific flight animations, and even if the movement packages work, I'm worried that if I try to execute it that it'll cause a crash-to-desktop considering how only dragons have an actual set of flight animations, and other races of NPCS, and the character, do not. In the mean time, I'm trying to once again consider merely increasing the player's jump height, or the "invisible stepping stone" method of spawning in a pair of invisible platforms that move, one at a time, underneath the player/NPC that allow for the caster to walk over them, effectively creating an ever-moving pair of stepping stones that continuously follow the caster around until the spell stops or is cancelled. I'm not sure exactly how jump height works in Skyrim though. I know that in Oblivion, increasing your jump height was merely a matter of fortifying your acrobatics skill. In Skyrim, however, jump height seems to fixed throughout the game. If there is a way to modify jump height, I'd like to hear it. As goes the stepping stones, what I've found is this; it CAN be done, but it's not terribly stable, especially when in an exterior cell. The one issue that I occasionally have is the "stepping stone" not wanting to move from its source, and then even if the spell is re-cast, and a new one is summoned, its position stays, effectively, locked. And I'm not sure why, even though I use the "moveTo" command instead of the "setPosition" command, as "moveTo" should move the called refence to the target regardless of what cell it's in. The thing is that I wanted this to be a spell that other NPC's could use as well, not just the player, and to that extent I didn't want to have only a limited number of these "invisible stepping stones" pre-set into the game. To that end, I made the game spawn in a new "stepping stone", which is an inivisible activator, whenever the spell is cast, and then disable and delete it whenever the spell ends, namely when the player/caster NPC crouches. It sort of works, but is prone to bugging up. I imagine this is because of the rather complex script attached to it, and the constant spawning in/deleting of an activator reference probably doesn't sit too well with the game either. That said, what I would like to see go on is that ANYONE who casts the spell has 2 invisible platforms spawn in, PERMANENTLY, for them, which are then enabled, moved, and then disabled as the spell is cast, used, and then ended, respectively. What I want to know is this; can a static object or activator be spawned in, given essentially "ownership" to an NPC/The player, or at least an original name or something of the like, and then, from that point on, be called to the NPC/Player that they are "assigned to" whenever the spell is used? The only other thing that I can think of besides this to make a flight/levitation-style spell is to, essentially, have a way to make the game think the player is swimming underwater without actually having them swim underwater. The swimming animations would still play, I know, but at the very least, the player would, functionally, be able to move in 3 dimensions of space (up-down, left-right, forward-backward) as if they were swimming underwater. Other than that, perhaps water currents. I know that these only work when the player is in water, and is swimming, but if there's a way to push the player through the air using something similar to current markers, that would work too. Is there a way to make the character "swim" without being actually in water, or make a water current that still pushes the player in a given direction even if they're not submerged in water? Apply havok impulse might work, if you don't mind the comedic effect of being ragdolled and watching your character fly haplessly through the air like a discarded toy thrown across a room by a spoiled child, but this is not the effect that I'm going for. If there's a way to keep the player from being ragdolled whilst a havok impulse is applied to them, I'd like to hear it. I thought about making them undergo an animation first, and then seeing about using a havok impulse, but I don't know if havok impulses automatically override any animations that the affected character may be doing. If anyone could offer any help on this matter, I'd greatly appreciate it, as personally I still think that Morrowind-style levitation magic should be something that Bethesda had kept in the Elder Scrolls series, and not discarded back during the days of Oblivion just for the sake of having closed cities in different cells to save on world space data. Link to comment Share on other sites More sharing options...
fore Posted March 26, 2017 Share Posted March 26, 2017 There are a few options:I doubt that the dragon functionality is feasible. I have never seen any mod making use of these type of packages. Or has implemented flights like this before. There is a way though to simulate the dragon's lift off, and there was a discussion here or at the Bethesda forum. But that's more than 5 years ago, and I just can't remember. Maybe when you search. THere was a guy named Saidenstorm who brought that information. Maybe you can find it. You don't need step-stones. You can attach an actor to (invisible) object with setvehicle(), and then move that object to your liking You can move the character with TranslateTo(), and then fix the Havok confustion with a little ApplyHavokImpulse(). That's how almost all Flying mods work. You can use FNIS animations and add motion data to them (per txt file). That's how I have implemented the FNIS Flyer. I use swimming animations, because they are very fluid, and activate direction/speed/turn and so on with SINGLE keystrokes.However the last 2 options have a big disadvantage (probably the first 2 as well). As soon as you are in the air all collision is switched off. That's why in the FNIS Flyer I have even implement sort of an "echo sounder" to avoid going through obstacles. Link to comment Share on other sites More sharing options...
ZeroCore Posted March 26, 2017 Author Share Posted March 26, 2017 (edited) There are a few options:I doubt that the dragon functionality is feasible. I have never seen any mod making use of these type of packages. Or has implemented flights like this before. There is a way though to simulate the dragon's lift off, and there was a discussion here or at the Bethesda forum. But that's more than 5 years ago, and I just can't remember. Maybe when you search. THere was a guy named Saidenstorm who brought that information. Maybe you can find it. You don't need step-stones. You can attach an actor to (invisible) object with setvehicle(), and then move that object to your liking You can move the character with TranslateTo(), and then fix the Havok confustion with a little ApplyHavokImpulse(). That's how almost all Flying mods work. You can use FNIS animations and add motion data to them (per txt file). That's how I have implemented the FNIS Flyer. I use swimming animations, because they are very fluid, and activate direction/speed/turn and so on with SINGLE keystrokes.However the last 2 options have a big disadvantage (probably the first 2 as well). As soon as you are in the air all collision is switched off. That's why in the FNIS Flyer I have even implement sort of an "echo sounder" to avoid going through obstacles. I know about Saidenstorm; he made the dragon mount mod for Oblivion, which used the invisible stepping stone method. My attempts at reverse-engineering that mod led me to a semi-stable stepping stone method of my own, but I stress the "semi" part of "semi-stable". As goes "setVehicle", I'm not sure how that actually works. I've never used it before. Also, how does one then get said object to move? Without custom animations, I don't see how it's possible to allow for flight along any controlled axis (axes), and custom animations is something I do not know how to do, and is something I'm trying to avoid anyway as I'd prefer to do this WITHOUT SKSE functions (they're more trouble than they're worth, crash a lot, and I just personally prefer to make mods that do not require anything than just the base, vanilla Skyrim to work). Also, applyHavokImpulse doesn't work on actors unless the actor is ragdolled. That's not the situation that I'm looking to do. The only other alternative is to just use "pushActorAway" which automatically ragdolls the actor and then applies a havok force to them, but again since ragdolling the actor isn't an option, that won't do. Flinging a small object with said command also won't work as the small object will just bounce around when it hits something. If it can't stay in one spot, and not bounce at all, when moved, it won't work. As goes using a long series of "translateTo" commands, the custom-built collision system on those rarely works correctly for me; even on a clean, vanilla install with the proper version of SKSE, I keep clipping through terrain with those mods. The collision system ALWAYS fails. To make a long story short: using havok force is out of the question at this point unless I can figure out a way to use it without ragdolling the actor. translateToRef being used on the caster has the issue of clipping through terrain, so that's also out, as is ANYTHING that uses SKSE functions (I don't want to use SKSE, please do not try to convince me otherwise), as SKSE requires, well, SKSE as a third-party program and I prefer to keep mods vanilla (for those out there who don't have anything else for Skyrim and either don't know how, or don't want to use it) and all the custom collision data that exists for flight mods rarely every works correctly all the time (if it works at all). So, no havok forces, translateToRef, SKSE, or custom animations, please. Half of them (custom animations and SKSE) are things I don't even know how to make, in the case of animations, or use effectively (in the case of SKSE, which I am not only unsure of how to use, but am completely unwilling to use). The only other thing that I can think of, at this point, is the stepping stone trick, but I don't know how to make this work effectively unless the only character I plan on having flying is the player and that's not the case, as I want to be able to teach this spell to NPC's as well, but I don't want to have to spawn in a limited set of invisible platforms for them to walk on. The Vehicle method has me intrigued, but I don't know a thing about it, and after reading your post I did try to look up tutorials on it but to no avail. If you could provide more information as to how that can be used, and how the vehicle can be moved, I'd appreciate it, but a "translateToRef" method really isn't ideal because of collision issues and the seemingly ever-present requirement of SKSE (both of which I'm trying to avoid). Edited March 26, 2017 by ZeroCore Link to comment Share on other sites More sharing options...
fore Posted March 26, 2017 Share Posted March 26, 2017 I doubt that after 5 1/2 years of Skyrim you will find the philosopher's stone. UNLESS you can really decipher and use the system that Skyrim uses for dragons. :smile: Everything else is based on TranslateTo, not HavokImpulse. HavokImpulse is for DEAD objects. I only mentioned it in my previous post since it is a way to fix the possible animation lockup after you used TranslateTo. And yes, TranslateTo is ignoring collision, the big issue on ALL Flying mods. I have implemented the FNIS Motion Data and the FNIS Flyer mod because I thought I could avoid the collision issue this way. I'm not an animator myself, so I'm using the vanilla swimming animations, augmented with motion data. That had worked perfectly as long as I stayed on the ground. But as soon as I added motion to the z-axis, all collision was gone. So I assume, the engine translates the motion data into the same internal function as does TranslateTo(). For the setvehicle() you don't need a tutorial. Just look up the CK Wiki. In the FNIS Zoo I have used an IdleMarker to elevate a dragon while doing his wing flips. And for all I did (FNIS Motion Data, FNIS Flyer, FNIS Zoo) there is no need to use any SKSE for the flying functionality. Only for the MCM. And one more way to simulate Flying could be the system that Anton uses for his hot air balloon, where you are restrained to the balloon's platform (forgot the mod name). But as I remember that one even required an SKSE plugin. Link to comment Share on other sites More sharing options...
ZeroCore Posted March 26, 2017 Author Share Posted March 26, 2017 I doubt that after 5 1/2 years of Skyrim you will find the philosopher's stone. UNLESS you can really decipher and use the system that Skyrim uses for dragons. :smile: Everything else is based on TranslateTo, not HavokImpulse. HavokImpulse is for DEAD objects. I only mentioned it in my previous post since it is a way to fix the possible animation lockup after you used TranslateTo. And yes, TranslateTo is ignoring collision, the big issue on ALL Flying mods. I have implemented the FNIS Motion Data and the FNIS Flyer mod because I thought I could avoid the collision issue this way. I'm not an animator myself, so I'm using the vanilla swimming animations, augmented with motion data. That had worked perfectly as long as I stayed on the ground. But as soon as I added motion to the z-axis, all collision was gone. So I assume, the engine translates the motion data into the same internal function as does TranslateTo(). For the setvehicle() you don't need a tutorial. Just look up the CK Wiki. In the FNIS Zoo I have used an IdleMarker to elevate a dragon while doing his wing flips. And for all I did (FNIS Motion Data, FNIS Flyer, FNIS Zoo) there is no need to use any SKSE for the flying functionality. Only for the MCM. And one more way to simulate Flying could be the system that Anton uses for his hot air balloon, where you are restrained to the balloon's platform (forgot the mod name). But as I remember that one even required an SKSE plugin. I still have not given up on using dragon flight AI packages to get other creatures to fly. I know that these packages can be added to other NPC's, and I know they can be triggered by a script (as in the Dragon wayfinder mod which lets you cast a spell that controls where the dragon you're riding, with Dragonborn's "Bend Will" shout, by setting waypoints that the dragon will fly to). If they can be manipulated, and induced, then it's really only a matter of finding a way to stick these AI packages to a creature/character/player that they don't usually go onto and then having them executed, while enabling the character to fly via the "isAllowedToFly" Boolean. Anyway, I just had a thought as to how this could work, the levitation script, and STILL have it use "translateToRef". It'd involve reverse-engineering a few old scripts I saw for Oblivion and Fallout 3, but it could probably be done with Papyrus. The idea is this; have an object appear at a spot the player is looking. It's also possible to have an object move to the spot the player is looking at, without passing through the ground. The one thing that I saw this used in for Oblivion and Fallout 3 was a sort of holographic target "target reticule" that would follow the player's cursor around on the ground until a certain spell/weapon was used. In Oblivion, I saw this used in a mod that included a Dwemer Airship, which would then launch a cannon salvo against whatever you had inside the target reticule. In Fallout 3, it was relatively the same thing, only instead of an airship firing cannons, it was a stationary artillery gun on the ground firing shells half-way across the Capital Wasteland, or a Vertibird that would do a flyby of the area and drop bombs on the way out. As goes the distance thing; there was a conditional statement in the scripts for this thing that would prevent the target from going a certain distance away from the player (for a maximum range limitation). I don't know if this was intentional or not, but, as I found out by using these mods, if one looked straight up, the target reticule would also appear in the air above the player's head, but not travel beyond a certain distance away. At the same time though, the rest of the script did not let the reticule pass through the ground, or anything else with a collision mesh. A similar thing can be seen in Fallout New Vegas with the Archimedes II satellite laser cannon (which was buggy but still worked in terms of its targeting system). So, I make something like that which moves a marker (visible or invisible) to a distance away from the player without letting pass through terrain. To allow for other NPC's to use this, I could instead use an activator which WOULD be spawnned in, used, disabled, and deleted after it's used, which would have a script attached to it. Said script would use a "translateTo" script to move its caster to it. Then it would disable and delete itself. This would allow for the player, and NPC's, to use it. Link to comment Share on other sites More sharing options...
fore Posted March 26, 2017 Share Posted March 26, 2017 I would be interested if you find a way in Skyrim. Your examples are all from other games. Except for the waterlevel I found nothing which let me determine any collision. Setpos and translateTo always ignores collision, and there seemed to be no way to do it with scripts. The way I did it was to use what I called an "echo sounder". A zero weight object, which I pushed with Havok impulse, and then checked the position in short frequence. By calculating the trajectory it was possible to approximate the distance of a collision object. The problem sometimes is that there seem to be invisible objects in the air. Sometimes the echo object was deflected without any reason. Way up in the air. And don't frequently destroy objects that have scripts attached. This is the ultimate cause of save bloat. Found that out the hard way with Sexy Move. Link to comment Share on other sites More sharing options...
ZeroCore Posted March 26, 2017 Author Share Posted March 26, 2017 (edited) I would be interested if you find a way in Skyrim. Your examples are all from other games. Except for the waterlevel I found nothing which let me determine any collision. Setpos and translateTo always ignores collision, and there seemed to be no way to do it with scripts. The way I did it was to use what I called an "echo sounder". A zero weight object, which I pushed with Havok impulse, and then checked the position in short frequence. By calculating the trajectory it was possible to approximate the distance of a collision object. The problem sometimes is that there seem to be invisible objects in the air. Sometimes the echo object was deflected without any reason. Way up in the air. And don't frequently destroy objects that have scripts attached. This is the ultimate cause of save bloat. Found that out the hard way with Sexy Move. Is it possible then to summon a mesh-less, invisible creature (that isn't affected by gravity) via a custom summoning spell that then moves the player to it via a spell it then casts and then de-summons itself (banish effect)? Ugh... this is complicated. So help me, if I can get this working I'll see if I can make a mod that turns you into a flying mudcrab. XD Edited March 26, 2017 by ZeroCore Link to comment Share on other sites More sharing options...
fore Posted March 26, 2017 Share Posted March 26, 2017 This IS complicated. Look at the FNIS Flyer sources. :) The problem with the weight-less (not mesh-less) creature, even if you can properly apply the Havok impulse: even after the creature hits an obstacle, it will continue moving. You have to figure that out immediately and stop it (with SetMotionType()). Because otherwise it will continue to move with some different, unpredictable angle. Link to comment Share on other sites More sharing options...
ZeroCore Posted March 26, 2017 Author Share Posted March 26, 2017 (edited) This IS complicated. Look at the FNIS Flyer sources. :smile: The problem with the weight-less (not mesh-less) creature, even if you can properly apply the Havok impulse: even after the creature hits an obstacle, it will continue moving. You have to figure that out immediately and stop it (with SetMotionType()). Because otherwise it will continue to move with some different, unpredictable angle. There is no havok impulse in this situation. The creature is summoned with a summon spell. The player is then moved, via a spell with a script that is cast by the creature (via translateToRef, with the "ref" part filled out as the caster of the spell in this case, the summoned creature) to the creature's location. It won't allow the player to move between walls and such as the creature's summoning spell won't be able to pass through them, like any projectile spell. In short: Summon creature creature casts spell on you spell uses "translateToRef" to move you to the creature, the "ref" part being filled by the creature who casts the spell you move to creature summoning spell wears off and the creature vanishes like all summonings Rinse and repeat. A summon creature spell won't go through walls. If there's something there with a collision script Edited March 26, 2017 by ZeroCore Link to comment Share on other sites More sharing options...
fore Posted March 26, 2017 Share Posted March 26, 2017 I don't understand. Do you just want to go "somewhere"? You have no requirements where the summon will go? Link to comment Share on other sites More sharing options...
Recommended Posts