Jump to content

Boat troubles


LuciferOfAmsterdam

Recommended Posts

Hey everyone

 

I wanted to change out a mesh of a (boat) mount in nifskope for another, but it turns out it's made of many meshes, as is what I want to replace it with. So, fair enough, I delete all the original branches and copy paste in all the new branches. Worked well enough I thought, so I test it ingame.

 

Great progress! But upon further inspection I suddenly realize I'm sailing backwards...

 

So, back to nifskope and turn all those meshes around. But I can't make it work. The translations are all already quite weird and extreme, and I seem unable to do it properly.

 

Instead of making a mod-request, I figure i request some minor nifskope-handholding instead. If anyone could be so kind as help an ol' chap out with his nifskopian troubles, that'd be great. So;

 

-Is there a way to select / rotate several branches at once (preferably an easy way)?

UPDATE 2: the trick was to rotate the parent, and apply transform (right-mouse-click-menu). Weirdly little documentation on this.

-Or, what I figure is the easier way at this point, how do I rotate the way I mount this thing?

UPDATE: I managed to find the mounting-point and rotate it (the mounting point was in the skeleton nif). It just made things worse. Now I'm truly going backward, as both me and the boat are now the wrong way around.

 

I've done the more obvious google-searches, but didn't come up with anything useful. Any assistance will be much appreciated.

 

 

Thanks, L

 

 

UPDATE 2: Seems my calls for aid were premature. Oops. All's been solved, thanks though.

Edited by LuciferOfAmsterdam
Link to comment
Share on other sites

Wait, how are you getting the boat to move? With the TranslateTo() Function? Or with an animation or something? I'm just curious, because I have a moving boat in my current project, but I can't seem to get it to move from one exterior cell into another with the TranslateToRef() Function.

Edited by Roadhouse699
Link to comment
Share on other sites

There are several boatmods out there, using either a mount of a scripted havok-object. I'm using this one atm;

 

https://www.nexusmods.com/skyrim/mods/67727

 

It uses a cow as a mount, because cows can't jump. Works pretty well, assuming you can accept some minor weirdness (like "driving" on land, weird playerpose, etc).

 

What I was trying to do (and have thankfully succeeded in) is change the standard rowboatmesh it uses to the "Breton jollyboat" from here;

 

https://www.nexusmods.com/skyrim/mods/77174

 

https://staticdelivery.nexusmods.com/mods/110/images/77174-9-1492763619.png

 

Not too big, yet a proper little ship. Love it.

 

If you need more detailed instructions on how i nifskoped this, say the word. That is assuming this whole method is even something you want.

Link to comment
Share on other sites

Yeah, I've been trying to use a scripted boat movement, since the scene has 3 NPCs on the boat as well as the player.

I've seen it done here, but can't replicate it in game:

 

I also have a scene planned for my next mod with a much more fleshed-out boat that will have NPCs walking around on.

https://www.youtube.com/watch?v=m97wE_i81ag

Basically, it's in it's own worldspace and the water moves backwards around it.

Edited by Roadhouse699
Link to comment
Share on other sites

Well, the mod I linked to has the ability to take two passengers (is claimed, haven't tested it yet). From messing with the nif though I believe it's done similarly to the cart. It has "passenger-nodes".

 

https://www.nexusmods.com/skyrim/mods/38529

 

The touring carriages mod is nice proof of this though. It's all vanilla, no SKSE or anything, and works well with the cart+horse+driver+player+3 companions. So it can definitely be done (to a degree).

 

As for walking around on the boat... The whole "separate worldspace with moving sea" is how we used to do it in oblivion. There are also mods who claim to make this work with SKSE instead. Couldn't tell you about it though, the CK and such is not my cup of tea. Oblivion was really my thing though, and these days Unity3D. I also have some code left (I think) from FO3.

 

Long story short, these older engines and Unity3D have no framework or anything for things like this. Everything had to (has to) be made from scratch, in hard math. So though I couldn't tell you how to make hard-scripted movement work in "papyrus" (ugh), I can if you'd like give you some code on how to achieve it in general. It's based on some reasonably simple math, and results in allowing you to make fictional coordinates based on relative position of the old one (angles taken into account ofcourse). Or rather, it allows you to move anything anywhere in a relative manner. Works for anything from sexscripts, to creating military formations, to tracking / placing the position for followers on a vehicle.

 

set TargetX to CoorRef.getpos x
set TargetY to CoorRef.getpos y
set CoorRefAngle to CoorRef.getangle z
set TargetX to TargetX + sin CoorRefAngle * DistanceOffset
set TargetY to TargetY + cos CoorRefAngle * DistanceOffset

That's the magic bit of code from FO3 that did all this. In oblivion there weren't even mathfunctions (like sin / sq) and we had to do it with Taylor-expansions. Still worked, so I still believe that where there is a will, there is a way. Anything can be achieved, regardless of what editor or platform... through the power of math! :confused:

 

Good luck though.

Edited by LuciferOfAmsterdam
Link to comment
Share on other sites

I actually figured out what was wrong with it in the past few minutes. I'm using Darkfox127's object mover script, which runs off of an activator (obviously you can change this, but I was too lazy to), so what I did initially was string three of these activators together by putting the "activate()" function at the end of the script.

 

Stupidly, I didn't realize that lines of code at the bottom of the script were delayed by the "Utility.Wait()" function and not by an event that checked to see if the boat was still moving... and I also didn't change the value on the "Utility.Wait()", so immediately after the first activator fired, it'd fire the second one, having two "TranslateToRef()" functions going at once on the same object, which the engine doesn't like for obvious reasons.

 

Also, that horse cart thing, as far as I know, will only work with horse carts. Bethesda literally made a script function just for the opening scene of Skyrim called "TetherToHorse()" which attaches a piece of furniture that must have 4 wheel nodes and a tether node for a horse, and then you can have the tethered horse do whatever AI packages you want it to, while the weird love-child of a furniture and a moveableStatic is pulled along behind it.

It's just too much messing around with creatures and NifSkope for what I'm doing.

 

(I'm just trying to move a boat down this canyon)

Yf6g5Gf.png

Edited by Roadhouse699
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...