Jump to content

Can I create a fast travel that acts like a load door?


AlxRam

Recommended Posts

I've created an interior cell that I would like to have companions follow me back out into the Commonwealth. I've finalized the external vanilla navmesh to allow companions to exit with me through a door, but this has caused many other adjacent cell navmeshes to change as well. It works and makes sense, but I don't want to do this. My door is close to a settlement and the affected cells are likely to be edited by other modders, creating conflicts. So for now I can get them to follow me into the cell, just not back out.

 

My idea for a solution is this...

 

1. Create an interior door that activates like normal (says open)

2. Make a script so when the door is activated it fast travels you to the outside of the door, instead of teleporting (must also work in survival mode).

 

Is this even possible? My scripting knowledge is limited, but I'm always willing to try. Or any other ideas that might work. Thanks in advance!

Link to comment
Share on other sites

Yes. Just place an Xmarker/XMarkerHeading(so the followers face the right way, maybe even the player) outside of the door's exterior entrace. MoveTo will act as a load door if the passed in object is in a location other than the cell the calling actor is in(perhaps outside of the 5x5 cell radius for the player).

Link to comment
Share on other sites

Yes. Just place an Xmarker/XMarkerHeading(so the followers face the right way, maybe even the player) outside of the door's exterior entrace. MoveTo will act as a load door if the passed in object is in a location other than the cell the calling actor is in(perhaps outside of the 5x5 cell radius for the player).

Thank you that gives me a start. Sorry I'm such a noob at scripting. I understand the XmarkerHeading but I don't actually understand what MoveTo is or how/where to place it. I'm guessing it has to be a part of a script that I attached to a door's reference?

 

Can you provide a quick example script that I can diagnose?

Link to comment
Share on other sites

 

http://www.creationkit.com/fallout4/index.php?title=MoveTo_-_ObjectReference

 

Quick and dirty example:

ObjectReference property kMarker auto ; Xmarker, etc
 
Function myFunctionName()
Game.GetPlayer().MoveTo(kMarker)
EndFunction

 

Very much appreciated, thank you. I will start tinkering with this. Much to learn!

Link to comment
Share on other sites

Ok I placed an XMarkerHeading and edited the reference ID to "MyXMarkerREFName"



I've opened the door's reference and added a script that extends the ObjectReference. In the Documentation String I've added the following:




ObjectReference property kMarker auto ; Xmarker, etc


Function myFunctionName()

Game.GetPlayer().MoveTo(kMarker)

EndFunction



In the next screen I added an ObjectReference property and named it kMarker

Then I edited the value and selected my XMarker in the Render window.


Nothing happens when I activate the door. Can you see anything in this process I'm messing up?

Link to comment
Share on other sites

You don't put the code in the documentation field.

You select "Add" and a window pops up with a list of vanilla scripts.

You then select [New Script]. After some seconds, another window pops up.

Here you can name your script. Clicking okay and another window pops up. This is the property window. Click "Add property" and ANOTHER window pops up.

There you can choose the "type" the property will be, and give it a name. Uncheck any boxes.

 

Type > ObjectReference

Name > Whatever you want.

Click ok. You're not done yet, now you need to fill the property. This will give you a drop down to pick the cell, the XmarkerHeading is in. To make it easier to find, you can name the XmarkerHeading in it's Reference Window, from the render window. There will be an empty field.

 

Now the close out the property window, and open your script.

 

Then you add that code.

Fun part is how that function is going to be called in the game. There's many ways to call a function.

You could attach said script to the door itself and use an OnActivate Event, which will be sent when the door is activated.

http://www.creationkit.com/fallout4/index.php?title=OnActivate_-_ObjectReference

 

Also reference this from time to time: http://www.creationkit.com/index.php?title=Bethesda_Tutorial_Papyrus_Hello_World

It just tells the basics for setting up a script. NOTE: The CK wiki in general is the absolute worst place to learn papyrus scripting as the geniuses seem to think all modders have python/C#/Java/C++ knowledge. /rant The better way is to look at the vanilla scripts to see how Beth did things(they aren't perfect, a lot of codes written are poorly optimized)

Link to comment
Share on other sites

Awesome

 

You don't put the code in the documentation field.

You select "Add" and a window pops up with a list of vanilla scripts.

You then select [New Script]. After some seconds, another window pops up.

Here you can name your script. Clicking okay and another window pops up. This is the property window. Click "Add property" and ANOTHER window pops up.

There you can choose the "type" the property will be, and give it a name. Uncheck any boxes.

 

Type > ObjectReference

Name > Whatever you want.

Click ok. You're not done yet, now you need to fill the property. This will give you a drop down to pick the cell, the XmarkerHeading is in. To make it easier to find, you can name the XmarkerHeading in it's Reference Window, from the render window. There will be an empty field.

 

Now the close out the property window, and open your script.

 

Then you add that code.

Fun part is how that function is going to be called in the game. There's many ways to call a function.

You could attach said script to the door itself and use an OnActivate Event, which will be sent when the door is activated.

http://www.creationkit.com/fallout4/index.php?title=OnActivate_-_ObjectReference

 

Also reference this from time to time: http://www.creationkit.com/index.php?title=Bethesda_Tutorial_Papyrus_Hello_World

It just tells the basics for setting up a script. NOTE: The CK wiki in general is the absolute worst place to learn papyrus scripting as the geniuses seem to think all modders have python/C#/Java/C++ knowledge. /rant The better way is to look at the vanilla scripts to see how Beth did things(they aren't perfect, a lot of codes written are poorly optimized)

 

This is awesome thanks, I've followed the workflow you've suggested so far. Now I'm stuck on the script itself. I'll keep playing with until it works. Any script examples are greatly appreciated :)

Link to comment
Share on other sites

Phew, I finally got the scripting figured out but it wouldn't fire in game. Turns out I had to add the following to my Fallout4Custom.ini

 

[Archive]

bInvalidateOlderFiles=1

sResourceDataDirsFinal=

Sometimes the simplest things take the longest to diagnose! I'll put together a guide for the next person and post back here.

Thanks for all your help!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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