Thanks for this mod! I was wondering: you have compass, map, correct date and time while being in jail. You get right north direction even when fighting. This mod adds real compass, but there's still on-HUD one. To remove it I use Vanilla HUD Compass Vanish. The minus is, as mentioned a post before, it shows sides only when dropped. I was imaging it as active item or spell, maybe another tab in menu. By the way, your mod inspires to make clock (watches). And such mods exist! Hourglass - Show Time. HUD mechanic clock. They're not such realistic, but if you could make clock that way you created compass, thank you.
I'm definitively going to test them! Any chance you make a usable item compass? So you can use it in your hand instead of putting it down? Great mod, tks a lot for it!
This is something I was also already thinking about, as right now the only way you can "use" the compass is by having it constantly dangle in your "grab" in front of your eyes. But sadly, while you have something equipped or in your hand, it's inside your inventory and doesn't exist inside the world. You cannot obtain its position nor its rotation, and as such you also cannot align the needle to point north. Whatever animation you're using, and how it interacts with your 1st/3rd-person view, will further affect its position and rotation, too.
The only way I could think of how it might work, is to make it scriptedly hover somewhere in front of your body so you only need to look down on it. Sadly this isn't exactly a smooth, visibly pleasing or even useful solution much. But it could be a start to something worthwhile in the end.
How dose the on screen compass work? Could it be possible to have the needle turn and keep the arrow pointed north as you turn, in hand; much like how the on screen compass kinda works?
That would be something. You can even make it *magical* with a little aura effect. Like it's really hovering over your hands in front of you. In any case, it's a great mod you have there :).
I'm afraid, no, it's not that easy. Like I said, as long as the compass is inside your inventory, not out there in the world, you cannot obtain its position or orientation by any means.
Just think about it. The equipment model when worn of just about every wearable item always has its origin point where exactly when you look at it in NifSkope? At "0, 0, 0", right under the actor's feet. Granted, some PRN-controlled equipment items are different, but when it's controlled by PRN where at the actor it's worn, the origin inside the NIF doesn't count anymore either.
Or more technically thinking, if you obtain the position and orientation of an item inside inventory through script, you'll always get position and orientation of the actor wearing it instead. If you equip a torch and yield it around, its position and orientation never changes unless your's does, no matter where your hand is at in the currently playing animation.
Or in other words, animation doesn't move the "item", just its visual representation. And the last one's position and rotation cannot be queried through script.
There's no way technically to align the needle to the compass "while worn".
The in-game compass is a HUD element. I don't know how it works exactly, but it works completely differently from the geometry inside the world. But orientation of the compass itself in this case is irrelevant. It just obtains the player's angle towards north (difference between player's Z-angle and north-angle of the current cell basically) and simply rotates the needle, display, or whatever else shape the compass has, towards it.
The math in my scripts is dimensions more complex, because the compass can be at 360°s around 3 different axes, while the needle can only turn around its local Z, and still has to point towards north at the end, no matter in which way the compass itself is rotated around.
But like I said, one can script the compass, so it always moves with the actor and remains at its local position and rotation relative to him/her, while it's technically no longer inside the inventory but without it actually lying on ground.
The thing is just, this requires constant updating of the compass' position while moving and/or turning around and will inevitably stutter, jump and lag like the needle right now already does. However, if visually presented with a magical floating effect like proposed, one just might be able to not notice it at all.
The key is the compass must not be inside the inventory anymore, cannot be worn or otherwise equipped, but it must still move and turn around as the player does just by means of scripts, and if one wants to have a holding animation, especial care must be taken for the relative offset of the compass to always align with the animation-produced position of the hand... which is almost entirely impossible to achieve under regular gaming conditions. So the magical floating would be the next best approach.
But that's all just thought-play now. However, those are some mightily intriguing ideas.
No it dose not do that, but it dose show north in the ground model, however as I understand it the script can be made to show it's way to something other than north. It might be cool for a plot device.
That! What a great idea for a quest mod, collectors quest, or even to spice up a simple fetch quest (like where you need to first obtain a particular compass to get to the right location). And also a possibility of a red herring compass leading you to certain death... Sky's the limit, innit? :D
Yes, you did. You didn't go into any details though as to what it'd be like, what it's supposed to do, and what it'd need scripting for. If it's just an ordinary music box, like click it, music plays and some art piece animates, until it's done, then that sounds like just a rather simple 2 lines of code script to me. But I've got no idea what exactly you have in mind here, so... it could also be much more complex than that.
Alright, I picture it like this in my mind: imagine a vintage jewelry box, you click it and when it opens it reveals a figurine (being it a ballerina or anything) that starts spinning while the music plays. And when the music stops the lids closes. As "simple" as that.
Yes, that's indeed rather simple in the scripting department. The difficulty will be making the animations.
It'd need 3 animations, one for opening, one for spinning and one for closing again, could be assigned to anim-groups "forward", "idle" and "backward" respectively (but I don't know enough about animating statics to tell if these are the correct groups or one of them won't be causing issues rather), all baked into the NIF directly.
The script will then simply be a timed toggle switch. On activate "PlayGroup forward 1", after a proper time (the lid is open) "PlayGroup idle 1" (make it spin) and I think "PlaySound3D" (for the music) or some such, and after enough time for the music to end, or when it's activated again prematurely, "PlayGroup backward 1" (closing the lid).
I already made a sarcophagus which can open and close, so I know a little how animating statics with KFs, then baking them into the NIFs is done, but I'm not an expert in that area at all. But in this particular case, the scripting part would only be devising the fitting timing.
I was thinking that maybe we would only need one animation. You click it, the box opens, the thing spins while the music plays and when the music's over the box closes. Is there a way to stop the background music?
Ah, yeah, doing all in one animation will work, too. You just won't be able to abort it half-way through. You can add special keys to animations at any point, for example to play a sound like the music here.
But I think in this case maybe the "StreamMusic" Vanilla command would be a better idea. It comes with some drawbacks and hickups, but mostly should do the job regardless. And unlike any other means to get music to play, it will also interrupt the currently playing one.
I couldn't find any command for changing music volume on a quick search, or any volume at all for that matter, surprisingly, but with one of the music control related OBSE plugins available one would be able to also do that.
I'm a little on the edge about which approach I myself would use. StreamMusic would insert it neatly into the game and silence all distraction. But PlaySound3D or it being part of the animation would make it feel more real like an actual music box play. You would have to turn down the volume yourself though in the latter case, or depend on an OBSE plugin to do it automatically.
The "StreamMusic" command seems like the best option to me. I think we cam do without the volum control so we won't have a dependency os some OBSE plugin. After all it's a just a music box, not the mod of the year.
42 comments
XX000ED3
XX000ED4
Replace XX with the modindex in your load order.
I was wondering: you have compass, map, correct date and time while being in jail. You get right north direction even when fighting.
This mod adds real compass, but there's still on-HUD one. To remove it I use Vanilla HUD Compass Vanish.
The minus is, as mentioned a post before, it shows sides only when dropped. I was imaging it as active item or spell, maybe another tab in menu.
By the way, your mod inspires to make clock (watches). And such mods exist! Hourglass - Show Time.
HUD mechanic clock. They're not such realistic, but if you could make clock that way you created compass, thank you.
The only way I could think of how it might work, is to make it scriptedly hover somewhere in front of your body so you only need to look down on it. Sadly this isn't exactly a smooth, visibly pleasing or even useful solution much. But it could be a start to something worthwhile in the end.
Just think about it. The equipment model when worn of just about every wearable item always has its origin point where exactly when you look at it in NifSkope? At "0, 0, 0", right under the actor's feet. Granted, some PRN-controlled equipment items are different, but when it's controlled by PRN where at the actor it's worn, the origin inside the NIF doesn't count anymore either.
Or more technically thinking, if you obtain the position and orientation of an item inside inventory through script, you'll always get position and orientation of the actor wearing it instead. If you equip a torch and yield it around, its position and orientation never changes unless your's does, no matter where your hand is at in the currently playing animation.
Or in other words, animation doesn't move the "item", just its visual representation. And the last one's position and rotation cannot be queried through script.
There's no way technically to align the needle to the compass "while worn".
The in-game compass is a HUD element. I don't know how it works exactly, but it works completely differently from the geometry inside the world. But orientation of the compass itself in this case is irrelevant. It just obtains the player's angle towards north (difference between player's Z-angle and north-angle of the current cell basically) and simply rotates the needle, display, or whatever else shape the compass has, towards it.
The math in my scripts is dimensions more complex, because the compass can be at 360°s around 3 different axes, while the needle can only turn around its local Z, and still has to point towards north at the end, no matter in which way the compass itself is rotated around.
But like I said, one can script the compass, so it always moves with the actor and remains at its local position and rotation relative to him/her, while it's technically no longer inside the inventory but without it actually lying on ground.
The thing is just, this requires constant updating of the compass' position while moving and/or turning around and will inevitably stutter, jump and lag like the needle right now already does. However, if visually presented with a magical floating effect like proposed, one just might be able to not notice it at all.
The key is the compass must not be inside the inventory anymore, cannot be worn or otherwise equipped, but it must still move and turn around as the player does just by means of scripts, and if one wants to have a holding animation, especial care must be taken for the relative offset of the compass to always align with the animation-produced position of the hand... which is almost entirely impossible to achieve under regular gaming conditions. So the magical floating would be the next best approach.
But that's all just thought-play now. However, those are some mightily intriguing ideas.
The compass is a real work of art. So many intricate details really make it one of a kind.
If it's just an ordinary music box, like click it, music plays and some art piece animates, until it's done, then that sounds like just a rather simple 2 lines of code script to me. But I've got no idea what exactly you have in mind here, so... it could also be much more complex than that.
It'd need 3 animations, one for opening, one for spinning and one for closing again, could be assigned to anim-groups "forward", "idle" and "backward" respectively (but I don't know enough about animating statics to tell if these are the correct groups or one of them won't be causing issues rather), all baked into the NIF directly.
The script will then simply be a timed toggle switch. On activate "PlayGroup forward 1", after a proper time (the lid is open) "PlayGroup idle 1" (make it spin) and I think "PlaySound3D" (for the music) or some such, and after enough time for the music to end, or when it's activated again prematurely, "PlayGroup backward 1" (closing the lid).
I already made a sarcophagus which can open and close, so I know a little how animating statics with KFs, then baking them into the NIFs is done, but I'm not an expert in that area at all. But in this particular case, the scripting part would only be devising the fitting timing.
You can add special keys to animations at any point, for example to play a sound like the music here.
But I think in this case maybe the "StreamMusic" Vanilla command would be a better idea. It comes with some drawbacks and hickups, but mostly should do the job regardless. And unlike any other means to get music to play, it will also interrupt the currently playing one.
I couldn't find any command for changing music volume on a quick search, or any volume at all for that matter, surprisingly, but with one of the music control related OBSE plugins available one would be able to also do that.
I'm a little on the edge about which approach I myself would use. StreamMusic would insert it neatly into the game and silence all distraction. But PlaySound3D or it being part of the animation would make it feel more real like an actual music box play. You would have to turn down the volume yourself though in the latter case, or depend on an OBSE plugin to do it automatically.
Also I'm sorry I have to be annoying for a second but I must ask about how you made your character in the screenshots because he is just LOVELY ;_;!!!
By the way, any special update instructions?
This is such beautiful work! I love that it is a necklace as well as a functioning compass, this is such a neat idea!