floating script?

Post » Wed Jun 20, 2012 2:46 pm

Is there any floating script that could be applied to a boat to make it move floating ? like when the ships are harbored ?
User avatar
Scared humanity
 
Posts: 3470
Joined: Tue Oct 16, 2007 3:41 am

Post » Thu Jun 21, 2012 1:53 am

Is there any floating script that could be applied to a boat to make it move floating ? like when the ships are harbored ?

There's a mod that adds a floating ship on the Nexus, you can probably see how its done over there :)
User avatar
krystal sowten
 
Posts: 3367
Joined: Fri Mar 09, 2007 6:25 pm

Post » Wed Jun 20, 2012 11:24 pm

I was totally tricked by that mod. I thought it was an actual flying airship, and wanted to take a look at how it manages to move everything smoothly together. But it's just a player home that happens to be a couple hundred feet in the air.
User avatar
Gwen
 
Posts: 3367
Joined: Sun Apr 01, 2007 3:34 am

Post » Wed Jun 20, 2012 9:06 pm

I've looked into this as well and haven't come up with a way to do it. The Dragon Priests and Wisp Mothers are floating mobs, but there isn't a script attached to them that makes them float like that. Perhaps it's just how their mesh is set up..
User avatar
Mariaa EM.
 
Posts: 3347
Joined: Fri Aug 10, 2007 3:28 am

Post » Thu Jun 21, 2012 12:42 am

the floating airship I guess you mean the Asteria? that's just a static stuck into Air nothing floating ... I meant something that coudl physcally move up or down ... or basculating a bit ... to give the feeling of moving water u know ...
User avatar
CORY
 
Posts: 3335
Joined: Sat Oct 13, 2007 9:54 pm

Post » Wed Jun 20, 2012 9:42 pm

If I had access to some local rotation functions, I could write one fairly easily. But since we only have access to successive Z>Y>X rotations, making a ship rock realistically like it's on waves is ridiculously difficult.
User avatar
Sophie Miller
 
Posts: 3300
Joined: Sun Jun 18, 2006 12:35 am

Post » Wed Jun 20, 2012 11:14 am

http://www.creationkit.com/TranslateTo_-_ObjectReference

If you want it to look like "idle" movement, you could use this function with random variables for one second, then generate new random ones and repeat. You could set up a system to check the boat's position and limit the random numbers so that it doesn't move "out" of the water.
User avatar
N3T4
 
Posts: 3428
Joined: Wed Aug 08, 2007 8:36 pm

Post » Wed Jun 20, 2012 6:14 pm

If I had access to some local rotation functions, I could write one fairly easily. But since we only have access to successive Z>Y>X rotations, making a ship rock realistically like it's on waves is ridiculously difficult.

TranslateTo has rotation as well.

I'm also assuming the movement speed is in units/second, since the wiki page says a speed of 1 is almost imperceptible. that could be determined with some testing, and then you could know exactly how long to wait until starting the next idle movement.

Edit: If you want it to be a easier to code, you can move it on fixed paths (like just up and down) without using random numbers.
User avatar
brandon frier
 
Posts: 3422
Joined: Wed Oct 17, 2007 8:47 pm

Post » Thu Jun 21, 2012 1:00 am

If I had access to some local rotation functions, I could write one fairly easily. But since we only have access to successive Z>Y>X rotations, making a ship rock realistically like it's on waves is ridiculously difficult.

Oh, I remember you talking about yaw, pitch, and roll a couple weeks ago. At the time I didn't understand what you meant, and I thought that SetAngle() sets an object's local rotation. Well I wrote a function for http://www.creationkit.com/Setting_Local_Rotation and put it on the wiki. You can work backwards from it to calculate world rotation from local if needed.
User avatar
Haley Merkley
 
Posts: 3356
Joined: Sat Jan 13, 2007 12:53 pm

Post » Wed Jun 20, 2012 2:47 pm

Oh, I remember you talking about yaw, pitch, and roll a couple weeks ago. At the time I didn't understand what you meant, and I thought that SetAngle() sets an object's local rotation. Well I wrote a function for http://www.creationkit.com/Setting_Local_Rotation and put it on the wiki. You can work backwards from it to calculate world rotation from local if needed.

That's quite useful. :)
User avatar
chirsty aggas
 
Posts: 3396
Joined: Wed Oct 04, 2006 9:23 am

Post » Wed Jun 20, 2012 8:44 pm

Well if you have that working, then making an object move like it's floating is pretty simple. Just create three invisible objects to act as references to the positions you want the boat to wind up in at the extremes of each "wave", and use TranslateToRef to each one in succession, capping the rotation speed based on the size of the boat (Large ships don't rock very fast, while small boats can rock quite quickly). Set the rotations of the two "left" and "right objects based on the ship's current heading, and catch the "OnTranslationComplete" events to switch to the next one in the cycle, which should go Left, Center, Right, Center, Left (repeat)

To simulate waves hitting the boat at an angle, you would pitch the invisible refrences a bit as well as rolling them.
User avatar
Honey Suckle
 
Posts: 3425
Joined: Wed Sep 27, 2006 4:22 pm

Post » Wed Jun 20, 2012 12:55 pm

There are some ships/boats in the meshes bsa that come with a rocking animation:

ShipLarge01Anim01.nif
ShipLongBoatAnim01.nif
ShipRowBoatAnim01.nif

Maybe you could get someone to extract the animations for you and apply it to your ships?
User avatar
Ells
 
Posts: 3430
Joined: Thu Aug 10, 2006 9:03 pm

Post » Wed Jun 20, 2012 10:25 pm

do they move / float?
User avatar
adame
 
Posts: 3454
Joined: Wed Aug 29, 2007 2:57 am

Post » Wed Jun 20, 2012 9:49 pm

No, but they rock in place.
User avatar
james kite
 
Posts: 3460
Joined: Sun Jul 22, 2007 8:52 am

Post » Wed Jun 20, 2012 8:52 pm

ahh yeh that's right what I was looking for :) ...
User avatar
Cayal
 
Posts: 3398
Joined: Tue Jan 30, 2007 6:24 pm

Post » Wed Jun 20, 2012 9:20 pm

Well the "Invisible Rocking Reference Objects" will do the trick too...you just need to add a script to the Boat like this:

ObjectReference property RockLeft Auto ; Select the "Left" orientation referenceObjectReference property RockCenter Auto ; Select the "Center" orientation referenceObjectReference property RockRight Auto ; Select the "Right" rock orientation referencebool Property Left=False Auto ; Are we rocking to the left?bool Property Center = True ; Are we at our center position?bool Property Rocking=False AutoSound property RockSound Auto ; What sound to play when starting to rock?float Property RotateCap=1.0 Auto ; Set based on ship size.Function TranslateChoice() ; Picks a node and starts rotation, setting the booleans appropriately.    if Left ; Going left        if Center ; We're at the center point.            Center = False            Left = False            TranslateToRef(RockLeft,1.0,RotateCap)        else            Center = True            TranslateToRef(RockCenter,1.0,RotateCap)        endif    else ; Going Right        if Center ; We're at the center point.            Center = False            Left = True            TranslateToRef(RockRight,1.0,RotateCap)        else            Center = True            TranslateToRef(RockCenter,1.0,RotateCap)        endif    endifEndFunctionevent OnActivate() ; Have something activate the boat to start it rocking. It will go Right first.    if GetDistance(RockLeft) != 0.0        RockLeft.MoveTo(Self,0.0,0.0,0.0,False) ; Move it to us, but don't rotate it.    endif    if GetDistance(RockCenter) != 0.0        RockCenter.MoveTo(Self,0.0,0.0,0.0,True) ; Move it to us, and rotate it. Center reference saves our "Start" position.    endif    if GetDistance(RockRight) != 0.0        RockRight.MoveTo(Self,0.0,0.0,0.0,False) ; Move it to us, but don't rotate it.    endif    if !Rocking ; Start Rocking        Rocking = True        TranslateChoice()    else ; Stop Rocking        Rocking = False    endifEndEventEvent OnTranslationComplete()    if Rocking        RockSound.Play(Self) ; Wood creaking sound or water splashing or whatever sound to use for rocking.        TranslateChoice()    endifEndEvent
User avatar
FirDaus LOVe farhana
 
Posts: 3369
Joined: Thu Sep 13, 2007 3:42 am

Post » Wed Jun 20, 2012 5:49 pm

Btw I opened those animated ships and they look fine with the movement but they seem to be unfinished meshes , like objects there without a texture or the like ... or may be the niftool dont open them well? Are they used ingame? is there any referenced use of the animated boats / ships?
User avatar
Samantha Jane Adams
 
Posts: 3433
Joined: Mon Dec 04, 2006 4:00 pm

Post » Wed Jun 20, 2012 3:46 pm

I don't know if they're used in the game, you'll have to check for yourself. But I have placed them inside myself, and they work fine. Just filter for 'Ship' under statics and moveable statics, and choose the ones with 'Anim' in the name.
User avatar
Matt Bee
 
Posts: 3441
Joined: Tue Jul 10, 2007 5:32 am

Post » Wed Jun 20, 2012 11:06 pm

inside where? I see they have attached some weird stuff ...
User avatar
courtnay
 
Posts: 3412
Joined: Sun Nov 05, 2006 8:49 pm

Post » Wed Jun 20, 2012 10:59 am

I have placed them inside the game myself, and they have worked fine.
User avatar
Jack Bryan
 
Posts: 3449
Joined: Wed May 16, 2007 2:31 am

Post » Wed Jun 20, 2012 3:29 pm

but you edited them?

I actually had to make a heavy edition to implement my kind of ship ...
User avatar
Nick Swan
 
Posts: 3511
Joined: Sat Dec 01, 2007 1:34 pm

Post » Wed Jun 20, 2012 6:30 pm

I have used those ship models (I'm also workin on a sailing mod), and they didn't show any visula oddity. I already edited them to remove the animation ( I preffer to implement it myself). So, there is no problem with those models.
User avatar
Charleigh Anderson
 
Posts: 3398
Joined: Fri Feb 02, 2007 5:17 am

Post » Wed Jun 20, 2012 3:27 pm

Well I see a side ship thing , thats the problem and the side ship thing is incomplete ... at least for the larger one I mean ...
User avatar
No Name
 
Posts: 3456
Joined: Mon Dec 03, 2007 2:30 am

Post » Wed Jun 20, 2012 11:22 am

Well I see a side ship thing , thats the problem and the side ship thing is incomplete ... at least for the larger one I mean ...
It looks fine in game though.
User avatar
Jodie Bardgett
 
Posts: 3491
Joined: Sat Jul 29, 2006 9:38 pm

Post » Wed Jun 20, 2012 7:16 pm

Oh I realize why , becasue the flag is set to 15 so it looks not visible , but the model shape ispresent , weird touch ....

Here is instead my ship customized with severall add ons , and nicely rolling on the sea , I want touse this for simulating a travel ....

http://img843.imageshack.us/img843/6276/shipl.jpg
User avatar
Scotties Hottie
 
Posts: 3406
Joined: Thu Jun 08, 2006 1:40 am

Next

Return to V - Skyrim