Advertisement
Kesta

Untitled

Aug 11th, 2019
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.92 KB | None | 0 0
  1. Cross Province Travel - Documentation
  2.  
  3. The cross province travel framework is split in 3 parts:
  4.  
  5. The main framework live in BSAssets, the shared data between all BS projects.
  6. The potential destinations, wether they are port or border gates (or sometyhing else ? everything can be supported), which need to be setup properly by the province owning the destination.
  7. The trigger, i.e. what the player activate, in order to move to a set destination. This would typically be an activator (border gate) or a dialogue (ship travel).
  8.  
  9.  
  10. The main cross framework is currently maintained by Kesta, so if you have any issues or concern, reach to him on Discord.
  11. You don't need to understand how the framework work to set up new destination or new triggers, so don't worry too much about that, IT JUST WORKS ^_^
  12.  
  13. ========Adding new destinations =======================================================================================================
  14. To add a new destination:
  15.  
  16. Load BSAssets.esm alone in the CreationKit. Create a new plugin, and in here, add a new keyword that will represent your destination.
  17. The current convention for such Keywords is the following:
  18. ------------------------------------------------ STEP 1: BSAssets.esm -----------------------------------------------------------------
  19. For Border gates:
  20. BSKTravelAAABorderBBBxxxxxx
  21. Where:
  22. AAA is "your" province tag, such as CYR for Cyrodiil.
  23. BBB is the other province tagwhere the player is coming from.
  24. xxxxx is the name of the area.
  25.  
  26. For instance, the keyword representing the Border gate that will allow players to travel into Cyrodiil, from Morrowind, which is named "canopy road", would be:
  27. BSKTravelCYRBorderBSMCanopyRoad, which is to be created by the Cyrodiil team.
  28. And it would need it's counterpart, the destination to allow player to travel into Morrowind from Cyrodiil, created by the MW team:
  29. BSKTravelBSMBorderCYRCanopyRoad
  30.  
  31.  
  32. For Ports:
  33. BSKTravelAAAPortxxxxx
  34. Where:
  35. AAA is "your" province tag, such as CYR for Cyrodiil.
  36. xxxxx is the name of the area.
  37.  
  38. For instance, the keyword representing the Anvil port in Cyrodiil, that would allow players to travel by boat into Cyrodiil, would be BSKTravelCYRPortAnvil. To be created by the Cyrodiil team.
  39.  
  40.  
  41. Setting up those keywords, with the proper convention, is the only thing that need to be done in BSAssets in order to setup a new destination.
  42. Once this is complete, save the plugin and send it for merge on the BSAssets repository.
  43. You then need to wait for a merge on BSAssets. Feel free to ping 1ShoedPunk, Claire, Kesta, or anyone you know who have the capability and permissions to do so to speed up the process.
  44. Note that if you know before hands all of your border gates and ports, it would be a good thing to make a single plugin containing all of the keywords and send it once and for all.
  45.  
  46.  
  47. -------------------------------------------- STEP 2: YourProvince.esm -----------------------------------------------------------------
  48. Then the "real" work start:
  49. Load your province .esm alongside the BSAssets.esm as for any content addition.
  50. Create a proper location for the destination. Most will already should already have one setup anyway if your implementation is advanced enough.
  51. If not, create it. (Location is what is used to hold data used in the radiant system, as well as controlling the reach of the AI behavior, so they're needed for anything that's not just pretty landscape).
  52.  
  53. Add the keyword previously created in BSAssets to your location in the "Location Keywords" list, and assign it the value 1.0
  54.  
  55. Add this location to the formlist of travel locations for your province (these formlist live in BSAssets). The formlist can be found under <ProvinceTag>TravelLocations.
  56. For instance, all CYR locations will be added to CYRTravelLocations.
  57. Fair warning: From a CK perspective, only the list of the province you're currently working on will have entries! The formlists are empty in BSAssets, and meant to stay empty there.
  58.  
  59. Assign the location to the relevant cell(s), at least the one hat will contains the destination markers. (In the cell menu, right click and select Edit, then go to the Location tab and assign the location).
  60.  
  61. Drag and drop 3 xmarkers: 1 for the player, 1 for the follower, and 1 for the mount. Ideally, give them meaningful EditorID.
  62. Assign LocRefType to each xMarker (right click on the object -> edit, and go to LocRefType)
  63.  
  64. For the player marker, assign BSKTravelPlayerMarker
  65. For the follower marker, assign BSKTravelFollowerMarker
  66. For the mount marker, assign BSKTravelPlayerMountMarker
  67.  
  68. Save your plugin, and send it for merge to your province: Once it's done, this destination will now be ready to be used by other provinces to send the player there.
  69.  
  70. === Adding triggers to new destinations ===============================================================================================
  71. This bit really is an implementer thing, so will contains a few less details.
  72. To add a travel trigger:
  73.  
  74. You will need to check with the province you're trying to setup a trigger to that they indeed performed the previous step for said location. Once this is confirmed:
  75.  
  76. Create a new plugin. If you're setting a borde gate:
  77. Attach a script to the activator that will act as the border (an unlinked door is probably the ideal, check with LD what they want to do). If t's supposed to be "the player just walk through here and travel", this
  78. will be a bit trickier as you'll need a trigger box, but it won't desplay the usual <To Destination> on the player's HUD without extra SKSE/SkyUI trickery.
  79.  
  80. If you're setting a dialogue-based travel like for boat travel, just create your lines.
  81.  
  82. Whatever script / fragment that's supposed to send the player somewhere only need the following:
  83. A "BSKTravelQuest" Property pointing to the BSKTravelQuest quest (which is part of the framework and live in BSAssets). Ideally, make it a BSTravel property (this is the script that will be used), instead of just Quest for nicer looking script.
  84. A "DestinationKeyword" Property pointing to the Keyword of the destination the script should send you to (the one mentioned in the first part of the documentation, that exist in BSAssets).
  85.  
  86. Then this single line will initiate the travel if the destination is available:
  87. BSKTravelQuest.TravelTo(DestinationKeyword)
  88.  
  89. If for stylistic reason, you only want to assign base types to properties (i.e. BSKTravelQuest will be a Quest Property rather than a BSTravel Property), simply cast before the call:
  90. (BSKTravelQuest as BSKTravelQuest).TravelTo(DestinationKeyword)
  91.  
  92. And this is it This would typically take place in the OnActivate event of a door activator for cross-province, or in the dialogue fragment of topic info in response to "Take me to XXX" in your sailor's dialogues.
  93. The framework will take care of the rest, including displaying a message that it's impossible to travel there if no suitable destination have been found.
  94. (Meaning the STEP 2 of "Setting up a new destination" haven't been done/merged yet on the target province, or the province is not available in this game session, so not installd, or plugin not enabled).
  95.  
  96.  
  97. For consistency reason, you will obviously want to prevent the player to even have access to the possibility of triggering the interaction if the destination is not available:
  98.  
  99. For triggers / activators, in their script, add an OnCellAttach event, with code that will check that the target province is installed, through the use of the BSKInstalled_<Province> Globals. These globals are "constants" (i.e. not baked in player's savegame),
  100. and set to 0 in BSAssets. They are ooverriden by each province .esm and set to 1. Meaning they're value is 0 if a province is not installed, and 1 if it is.
  101. If target province is not installed, simply call Self.Disable()on the activator. If it is, call Self.Enable()
  102.  
  103. For dialogues, add a condition checking against the same variable, so that the topic won't be available topic won't be available to the player if the target province is not installed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement