Editing Arcane University:World space synchronization
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 8: | Line 8: | ||
You need two world spaces, one containing the landscape to copy (henceforth '''origin world space''') and one to copy to ('''destination world space'''). For clarity's sake, this article will assume that they are contained in '''masters''' (.esm) to distinguish them from '''plugins''' (.esp), but the process is the same if they are in plugins. The two world spaces may be part of the same master file, which makes the process a bit simpler, but often will be in separate masters. | You need two world spaces, one containing the landscape to copy (henceforth '''origin world space''') and one to copy to ('''destination world space'''). For clarity's sake, this article will assume that they are contained in '''masters''' (.esm) to distinguish them from '''plugins''' (.esp), but the process is the same if they are in plugins. The two world spaces may be part of the same master file, which makes the process a bit simpler, but often will be in separate masters. | ||
− | The copy happens in two passes that are independent and can be done in any order: copying of '''landscape''', and copying of '''references'''. Both methods work on rectangular regions in a world space, so you must figure out what those rectangular regions are (there can be multiple that combine into a more complex shape, even just one cell large if necessary). It helps to have something like a grid map on hand. | + | The copy happens in two passes that are independent and can be done in any order: copying of '''landscape''', and copying of '''references'''. Both methods work on rectangular regions in a world space, so you must figure out what those rectangular regions are (there can be multiple that combine into a more complex shape, even just one cell large if necessary). It helps to have something like a grid map on hand. Write down the cell coordinates of the northeast and southwest corners of every rectangle according to the origin world space's coordinate system. Then, also calculate what those coordinates amount to in [https://www.creationkit.com/index.php?title=Unit '''Units''']. You will need the southwest corner of the southwest cell, which you can find by multiplying the X and Y cell coordinates by 4096. You will also need the northeast corner of the northeast cell, for which you must multiply the X and Y cell coordinates by 4096 plus an extra 4096 (this formula is untested). |
− | + | Next, find out the difference between the coordinate systems of the two world spaces. Pick a location that can be pinpointed in both world spaces, note its cell coordinates in the origin world spaces, and its cell coordinates in the destination world space. Subtract the X and Y coordinates in the origin world space from the X and Y coordinates in the destination world space, respectively. This will give you the '''offset''', or the number of cells to move the copy by along the X and Y axes. Also calculate the X and Y offsets in units by multiplying them with 4096 (as that is the number of units comprising the edge of a Skyrim world space cell). If the offset is not a clean multiple of a cell, then the method for copying landscape will not work, as the method for that works cell by cell. The method for copying references is unit-based, but will be of little use if the landscape cannot be accurately copied. Lastly, if the sea level is not at the same height in the two world spaces, write down the difference between them in units (this does not have to be a multiple of 4096). | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
If the two world spaces belong to different masters, and the destination world space's file is not a master of the origin world space's file, then the copied area must be free of land textures and references whose base objects come from the origin world space's file. This can be resolved in advance (such as by re-implementing any non-vanilla assets in a shared master, and switching all references to use those shared base objects; for Beyond Skyrim, this is BSAssets) but can also be arranged at the end of the process; this article will show how to contain the copy in a patch plugin which can be tweaked before being sent off to be merged into the destination world space's master. If it is too difficult to integrate land textures, these can optionally not be copied as detailed further below. | If the two world spaces belong to different masters, and the destination world space's file is not a master of the origin world space's file, then the copied area must be free of land textures and references whose base objects come from the origin world space's file. This can be resolved in advance (such as by re-implementing any non-vanilla assets in a shared master, and switching all references to use those shared base objects; for Beyond Skyrim, this is BSAssets) but can also be arranged at the end of the process; this article will show how to contain the copy in a patch plugin which can be tweaked before being sent off to be merged into the destination world space's master. If it is too difficult to integrate land textures, these can optionally not be copied as detailed further below. | ||
Line 51: | Line 45: | ||
Once you are done with all rectangles, and you had "Create patch plugin" checked, then you have a bunch of different plugins that you will now have to merge together. If you didn't have "Create patch plugin" checked, then the destination .esm was edited directly and you will now probably want to extract those edits into a patch plugin after all. Save and close xEdit just in case so you can make a back-up of your destination esm. Put a fresh copy of your destination esm in your data folder, one free of any land copying. In xEdit, load only this fresh esm. Once loaded, right click it, select "Compare to..." and select your modified esm. This will make a new load order in xEdit where the modified esm appears to override the records of the fresh one. Right click anywhere and select "Apply filter"; in the pop-up, check "by Base record signature" and check "LAND". Also make sure "by conflict status overall" is still checked, and deselect the top three options. Also check "Flatten Blocks/Sub-Blocks" and "Flatten Cell Children" further below. Run the filter and wait a (long) while. After it's done, only the changed LAND records should still be visible in xEdit. In your modified esm, Alt+Click the expand icon next to the destination world space to instantly open all cells, select one LAND record, press Ctrl+A to select all other LAND records as well, right click and select "Copy as override into...". Make it a new plugin. This plugin now contains all the results of the process, and you can test it alongside the fresh esm. | Once you are done with all rectangles, and you had "Create patch plugin" checked, then you have a bunch of different plugins that you will now have to merge together. If you didn't have "Create patch plugin" checked, then the destination .esm was edited directly and you will now probably want to extract those edits into a patch plugin after all. Save and close xEdit just in case so you can make a back-up of your destination esm. Put a fresh copy of your destination esm in your data folder, one free of any land copying. In xEdit, load only this fresh esm. Once loaded, right click it, select "Compare to..." and select your modified esm. This will make a new load order in xEdit where the modified esm appears to override the records of the fresh one. Right click anywhere and select "Apply filter"; in the pop-up, check "by Base record signature" and check "LAND". Also make sure "by conflict status overall" is still checked, and deselect the top three options. Also check "Flatten Blocks/Sub-Blocks" and "Flatten Cell Children" further below. Run the filter and wait a (long) while. After it's done, only the changed LAND records should still be visible in xEdit. In your modified esm, Alt+Click the expand icon next to the destination world space to instantly open all cells, select one LAND record, press Ctrl+A to select all other LAND records as well, right click and select "Copy as override into...". Make it a new plugin. This plugin now contains all the results of the process, and you can test it alongside the fresh esm. | ||
− | N.B.: The "Worldspace copy landscape area to another worldspace" xEdit script only takes into account the plugin file (.esm or .esp) which the origin world space is from; it does not incorporate overrides to the landscape from subsequent plugins in the load order. If you have such edits, you will therefore have to merge them into master first. If you are copying from a vanilla world space (from Skyrim.esm) and need to incorporate edits, then lord help you, because xEdit will not let you modify Skyrim.esm. You will need to create a copy of Skyrim.esm and rename it to something else, for example Skyrim2.esm; launch xEdit with the launch parameters <code>-IKnowWhatImDoing</code> and <code>-AllowMasterFilesEdit</code>; change the file header of the editing plugin so that its master is Skyrim2. | + | N.B.: The "Worldspace copy landscape area to another worldspace" xEdit script only takes into account the plugin file (.esm or .esp) which the origin world space is from; it does not incorporate overrides to the landscape from subsequent plugins in the load order. If you have such edits, you will therefore have to merge them into master first. If you are copying from a vanilla world space (from Skyrim.esm) and need to incorporate edits, then lord help you, because xEdit will not let you modify Skyrim.esm. You will need to create a copy of Skyrim.esm and rename it to something else, for example Skyrim2.esm; launch xEdit with the launch parameters <code>-IKnowWhatImDoing</code> and <code>-AllowMasterFilesEdit</code>; change the file header of the editing plugin so that its master is Skyrim2.exe instead of Skyrim.exe; merge the edits (for instance, right click and "copy as override (with overwriting)", and if that causes issues, clicking and dragging from right to left, one record at a time); save and quit xEdit, and rename Skyrim2.esm back to Skyrim.esm, replacing the original. You can then run the "Worldspace copy landscape area to another worldspace" script. |
=== References === | === References === | ||
Line 138: | Line 132: | ||
Alt+Click the expand icon next to the world space, select one reference, press Ctrl+Alt to select all references in the world space, and "Copy as override into" a new plugin. This may take a while. If you have more rectangles, then right click and Remove filter, and run the script again. This time, "copy as override" into the plugin you previously created for convenience's sake. | Alt+Click the expand icon next to the world space, select one reference, press Ctrl+Alt to select all references in the world space, and "Copy as override into" a new plugin. This may take a while. If you have more rectangles, then right click and Remove filter, and run the script again. This time, "copy as override" into the plugin you previously created for convenience's sake. | ||
− | '''This paragraph pertains to copying references for LOD only''' | + | '''This paragraph pertains to copying references for LOD only.''' Areas that are far enough away from the playable border to never be in the loaded area, may still be visible from a distance and thus will have to be copied over to be included in LOD that is generated for the destination world space. Here, you may like to exclude references that won't be visible in LOD. Once you have your .esp from the previous step, apply a Filter for Base record signature "Tree" (shrubs and other small flora will also be lumped in). Copy these as override from your previous .esp into a new one. Remove the filter. Then do another filter by running the below script by Zilav, which retains only references whose base object has LOD meshes configured (the built-in "visible when distant" filter options are not effective). Copy all remaining references from the same previous .esp into the same second .esp you created. You may now discard the first .esp and continue with the second one. |
− | |||
− | Areas that are far enough away from the playable border to never be in the loaded area, may still be visible from a distance and thus will have to be copied over to be included in LOD that is generated for the destination world space. Here, you may like to exclude references that won't be visible in LOD. Once you have your .esp from the previous step, apply a Filter for Base record signature "Tree" (shrubs and other small flora will also be lumped in). Copy these as override from your previous .esp into a new one. Remove the filter. Then do another filter by running the below script by Zilav, which retains only references whose base object has LOD meshes configured (the built-in "visible when distant" filter options are not effective). Copy all remaining references from the same previous .esp into the same second .esp you created. You may now discard the first .esp and continue with the second one. | ||
<nowiki>unit ApplyCustomScripted; | <nowiki>unit ApplyCustomScripted; | ||
Line 198: | Line 190: | ||
end.</nowiki> | end.</nowiki> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
Once your patch .esp has all the needed references from all rectangles, save and close xEdit and make a backup. Load it again, apply a filter that only does "Flatten blocks/sub-blocks" and "flatten cell children", select all references in the plugin using the Alt+Click/Ctrl+Click method, right click, and "Change FormID". Select the current plugin. This will change all the overrides into new references, but it will take some time. | Once your patch .esp has all the needed references from all rectangles, save and close xEdit and make a backup. Load it again, apply a filter that only does "Flatten blocks/sub-blocks" and "flatten cell children", select all references in the plugin using the Alt+Click/Ctrl+Click method, right click, and "Change FormID". Select the current plugin. This will change all the overrides into new references, but it will take some time. | ||
Line 309: | Line 296: | ||
end.</nowiki> | end.</nowiki> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:Arcane University-Implementation]] [[Category:Arcane University-Level Design]] [[Category:Arcane University-Project Management]] | [[Category:Arcane University-Implementation]] [[Category:Arcane University-Level Design]] [[Category:Arcane University-Project Management]] |