Jump to content

Row Boat to Ports (Scripting?)


kamenai

Recommended Posts

Hello, Nexus!

 

I'm working on a no-load-doors cabin home which is mostly complete now! What I'm trying to do now is add a row boat outside of the cabin (since the cabin sits on a pond) that the player can activate and then fast travel to one of these places: Morthal, Solitude, Dawnstar, or Windhelm. And then I'd like to add the option to travel back to the cabin via the ferrymen at those same ports.

 

Unfortunately, I'm a novice when it comes to modding. Everything I've done so far has been with the aid of forum or video tutorials. My guess is that I need to put a red trigger box (or activator box??) around the boat and tack some kind of script on to it, but I don't know where to go from there.

 

I use the mod Better Fast Travel which adds more carriage and ferry options to Skyrim, so I tried to kind of "reverse engineer" that to see how they did it, but I wasn't able to figure it out. I also looked at the row boat that transports the player to and from Castle Volikar and there is some kind of script on it, but I wasn't able to open the source to see how it works.

 

What I have managed to do, however, is make it so the player can actually sit down in the boat. There is a map marker for the cabin and it works as intended.

 

If anyone could help me out, that would be great!

 

To note, the cabin in the screenshot is actually one of two resources by trinityfang! Check it out!

Link to comment
Share on other sites

Yeah this is relatively simple. I have an airship that has about 18 or so stops all over Skyrim and Solsthiem that functions the same way. Luckily your boat doesn't have an interior, otherwise that gets more tricky :tongue:

 

Basically what you do is create a new activator object and choose the row boat as the model for it. This will let the player click on the boat to activate the function.

 

Place the boat in each of the spots you want it to be parked, and set them all to initially disabled (except the one at the cabin which I assume will start enabled). You can also place static like crates, fishing poles, oars, whatever and just have them all link to the boat with Enable State Parent on the object's editor tab.

 

On the BASE form of the boat activator (not the render window instances) attach this script:

ObjectReference Property Boat1 Auto
ObjectReference Property Boat2 Auto
ObjectReference Property Boat3 Auto
 
ObjectReference Property Boat1Mark Auto
ObjectReference Property Boat2Mark Auto
ObjectReference Property Boat3Mark Auto
 
Message Property BoatList Auto
 
Event OnActivate (ObjectReference akActionRef)
       if akActionRef == Game.GetPlayer()
       int BTN = BoatList.show()
             if BTN == 0   ; location 1
                    ResetShipRefs()
                    Boat1.Enable()
                    Game.GetPlayer().MoveTo(Boat1Mark)
             elseif BTN == 1 ; location 2
                    ResetShipRefs()
                    Boat2.Enable()
                    Game.GetPlayer().MoveTo(Boat2Mark)
             elseif BTN == 2 ; location 3
                    ResetShipRefs()
                    Boat2.Enable()
                    Game.GetPlayer().MoveTo(Boat3Mark)
             Endif
       endif
EndEvent
 
Function ResetShipRefs()
Boat1.Disable()
Boat2.Disable()
Boat3.Disable()
EndFunction

Putting it on your base boat will make all instances have the same script on it. Then you have to place an XmarkerHeading static object at each of the boats which will mark where the player goes when you select the option.

 

next you need to edit the properties on the script for the boat and point to each of the boats (boat1, etc) and each of the marks (boat1mark, etc)

 

lastly you need to make a message form in the editor window and add each boat location to the list. These will match what you chose as the property marks. So if you start with Danwstar as the first location, you make Dawnstar be index 0 on the message list. Title is unimportant but enter whatever text you want. Then assign the BoatList message property in the script to point to this message form you just made.

 

That should about do it.

 

And if you are completely new to scripting, check out my Scripting 101 article: https://arcadiamgames.wordpress.com/2015/05/29/scripting-101/

Link to comment
Share on other sites

Thank you SO much for this! I had just about given up on this project.

 

Just for clarification though: when you said "point to each of the boats", I do that by going the to script's properties > edit value > pick object reference in render window, right?

 

And yeah, I am 100% completely new to scripting. But yesterday I figured out how to set a door to automatically close after 3secs, so I got that going for me! c:

Edited by kamenai
Link to comment
Share on other sites

Yes, the best way is to put an Xmarker heading on each boat which are the boatXmarkers in the script and set the relevant property to each. The player will arrive facing in the direction of the Xmarker heading if that matters to you.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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