User:Hishutup/Unofficial Enderal Port: Difference between revisions

From Step Mods | Change The Game
(→‎Recompiling fs.dll from src in x64 from win32: Close to final fs porting instructions)
Line 295: Line 295:
:*Achievements.h
:*Achievements.h
:*Achievements.cpp
:*Achievements.cpp
<br />


:main.cpp:
===== main.cpp =====
Change skse reference
  #include "skse/PluginAPI.h"
  #include "skse/PluginAPI.h"
  #include "skse/skse_version.h"
  #include "skse/skse_version.h"
Change skse reference:
:
  #include "skse64/PluginAPI.h"
  #include "skse64/PluginAPI.h"
  #include "skse64_common/skse_version.h"
  #include "skse64_common/skse_version.h"
<br />
<br />


<br />
We are removing achievements
  #include "Achievements.h"
  #include "Achievements.h"
We are removing achievements
:
  //#include "Achievements.h"
  //#include "Achievements.h"
<br />
<br />


<br />
Change SKSE version reference, which at the time of writing is
  else if (skse->runtimeVersion != RUNTIME_VERSION_1_9_32_0)
  else if (skse->runtimeVersion != RUNTIME_VERSION_1_9_32_0)
Change SKSE version reference, which at the time of writing is
:
  else if (skse->runtimeVersion != RUNTIME_VERSION_1_5_62)
  else if (skse->runtimeVersion != RUNTIME_VERSION_1_5_62)
<br />
<br />


<br />
Change log path
  gLog.OpenRelative(CSIDL_MYDOCUMENTS, "\\My Games\\Skyrim\\SKSE\\FS.log");
  gLog.OpenRelative(CSIDL_MYDOCUMENTS, "\\My Games\\Skyrim\\SKSE\\FS.log");
Change log path
:
  gLog.OpenRelative(CSIDL_MYDOCUMENTS, "\\My Games\\Skyrim Special Edition\\SKSE\\FS.log");
  gLog.OpenRelative(CSIDL_MYDOCUMENTS, "\\My Games\\Skyrim Special Edition\\SKSE\\FS.log");
<br />
<br />


<br />
We are removing achievements, you can remove the message below if you want
  btest = g_papyrus->Register(Achievements::RegisterFuncs);
  btest = g_papyrus->Register(Achievements::RegisterFuncs);
We are removing achievements, you can remove the message below if you want
:
  //btest = g_papyrus->Register(Achievements::RegisterFuncs);
  //btest = g_papyrus->Register(Achievements::RegisterFuncs);
<br />


:exports.def:
===== exports.def =====
Very minor change
  LIBRARY "skaar"
  LIBRARY "skaar"
Very minor change
:
  LIBRARY "fs"
  LIBRARY "fs"
<br />


:CreatePotion.h:
===== CreatePotion.h =====
Change skse references
  #include "skse/PapyrusNativeFunctions.h"
  #include "skse/PapyrusNativeFunctions.h"
  #include "skse/GameReferences.h"
  #include "skse/GameReferences.h"
  #include "skse/GameObjects.h"
  #include "skse/GameObjects.h"
Change skse references
:
  #include "skse64/PapyrusNativeFunctions.h"
  #include "skse64/PapyrusNativeFunctions.h"
  #include "skse64/GameReferences.h"
  #include "skse64/GameReferences.h"
  #include "skse64/GameObjects.h"
  #include "skse64/GameObjects.h"
<br />


:CreatePotion.cpp:
===== CreatePotion.cpp =====
Change SKSE references
  #include "skse\GameObjects.h"
  #include "skse\GameObjects.h"
  #include "skse\GameData.h"
  #include "skse\GameData.h"
Change SKSE references
:
  #include "skse64\GameObjects.h"
  #include "skse64\GameObjects.h"
  #include "skse64\GameData.h"
  #include "skse64\GameData.h"
<br />
<br />


<br />
Change FormHeap and remove arr properties due to SKSE to SKSE64 change
  FormHeap_Free(effectItems.arr.entries);
  FormHeap_Free(effectItems.arr.entries);
Change FormHeap and remove arr properties due to SKSE to SKSE64 change
:
  Heap_Free(effectItems.entries);
  Heap_Free(effectItems.entries);
<br />


<br />
===== PhasmalistInventoryFunctions.h =====
:PhasmalistInventoryFunctions.h:
Change SKSE references
  #include "skse/PapyrusNativeFunctions.h"
  #include "skse/PapyrusNativeFunctions.h"
  #include "skse/GameReferences.h"
  #include "skse/GameReferences.h"
Change SKSE references
:
  #include "skse64/PapyrusNativeFunctions.h"
  #include "skse64/PapyrusNativeFunctions.h"
  #include "skse64/GameReferences.h"
  #include "skse64/GameReferences.h"


<br />
===== PhasmalistInventoryFunctions.cpp =====
:PhasmalistInventoryFunctions.cpp:
Change SKSE references
  #include "skse\GameExtraData.h"
  #include "skse\GameExtraData.h"
  #include "skse\GameBSExtraData.h"
  #include "skse\GameBSExtraData.h"
Line 378: Line 377:
  #include "skse\PapyrusBook.h"
  #include "skse\PapyrusBook.h"
  #include "skse\PapyrusSpell.h"
  #include "skse\PapyrusSpell.h"
Change SKSE references
:
  #include "skse64\GameExtraData.h"
  #include "skse64\GameExtraData.h"
  #include "skse64\GameBSExtraData.h"
  #include "skse64\GameBSExtraData.h"
Line 390: Line 389:
<br />
<br />


<br />
Namespace changes with SKSE64
  ExtraContainerChanges::EntryDataList
  ExtraContainerChanges::EntryDataList
Namespace changes with SKSE64
:
  EntryDataList
  EntryDataList
<br />
<br />


<br />
Namespace and structure changes with SKSE64
  ExtraContainerChanges::EntryData
  ExtraContainerChanges::EntryData
Namespace and structure changes with SKSE64
:
  InventoryEntryData
  InventoryEntryData
<br />
<br />

Revision as of 21:06, March 5, 2019

Unofficial Enderal Port[edit | edit source]

This is going to be a collection of step or a process in order to port Enderal into SSE. There are a few files that are required that cannot be provided and will have to be done manually. This process is fairly straight forward but I'm not all that concerned about pretty-ing up things. If someone want to take on that responsibility, feel free.
Also, do not be that person that asks the SureAI group for any help. You are the one that will ruin the fun.

Keep in mind there are several issues and I would definitely recommend to not use it in a play through as things will break for sure.

Download and configure MO2[edit | edit source]

Basically, the way I have things configured, I am using my vanilla install of SSE and then using some configuration in MO to facilitate the installation of Enderal from the Steam release.

Enderal[edit | edit source]

Download Enderal from the steam page and install it somewhere. We only need this to copy the assets from. Someone can probably put together some sort of symlink system, maybe later.

MO2[edit | edit source]

  1. Do the necessary setup as you would for any SSE modding setup.
  2. Create a mod folder in MO and call it something like "Enderal Base Files".
  3. Copy the Data folder from the Steam install into this folder.

Edit Inis[edit | edit source]

I don't know what all needs to be configured but glancing through the inis and doing a visual comparison there are very few modifications.

Skyrim.ini
[General]
sTestFile1=
sTestFile2=
sTestFile3=
sIntroSequence=1
SLocalSavePath=..\Enderal\Saves\
[MapMenu]
uLockedObjectMapLOD=32
uLockedTerrainLOD=32
fWorldMapDepthBlurScale=0.0000
fMapWorldMaxPanSpeed=80000.0000
fMapWorldCursorMoveArea=0.4000
fMapWorldYawRange=20.0000
fMapWorldMinPitch=90.0000
fMapWorldMaxPitch=90.3000

Remove Extra SSE Files[edit | edit source]

  1. Create, or find an empty plugin, like that of the HD-DLC or by creating an override then deleting the record in xEdit.
  2. In xEdit flag the file as an ESM. Doing so keeps MO happy.
  3. Copy the file two more time and rename the empty esm to the dlc
    • Dawnguard.esm
    • HearthFires.esm
    • Dragonborn.esm
  4. Next create an empty BSA (or use the one from the archive above)
    • I was able to do this by extracting one of the default textures from the BSA and then packing the BSA with the official archive tool.
  5. Create two more copies of the empty BSA.
    • Skyrim - Voices.bsa
    • Skyrim - Voices_en0.bsa
    • Skyrim - VoicesExtra.bsa
  6. Create a new mod folder in MO called "SSE File Remover" or the like.
  7. Move all the created files into that mod.

Activate Enderal BSAs[edit | edit source]

There is not enough spare characters to add the Enderal BSAs to the sResourceArchiveList or sResourceArchiveList2 inis, therefore we need to use the good ol' esp activators.

  1. Create an empty plugin file, like that of the empty masters.
  2. Don't flag it as an esm
  3. Create eight more copies
    • E - Meshes.esp
    • E - Music.esp
    • E - Scripts.esp
    • E - Textures1.esp
    • E - Textures2.esp
    • E - Textures3.esp
    • L - Textures.esp
    • L - Voice.esp

Porting Assets[edit | edit source]

Packed Files[edit | edit source]

  1. Download SSE Assets Optimizer.
  2. Create a folder somewhere and grab one of the BSAs from the Enderal Base Files folder
  3. Startup the program and tick all the boxes and point the directory to the folder you just created.
  4. Run the application and wait till it finishes.
  5. Return to the folder that the BSA was copied to and where the application was pointed to and rename the new "Dummy" file back to the original name of the BSA.
  6. Move this file into a new mod folder for MO called "Converted BSAs"
  7. Do this for all the BSAs

Loose Files[edit | edit source]

  1. Copy the meshes folder from Enderal Base Files to the temporary folder
  2. Start the SSE Assets Optimizer and untick Optimize BSA
  3. Start and let finish
  4. Copy files to the Converted BSAs folder

Replacing SKSE DLLs[edit | edit source]

~~ DLL SECTION UNDER CONSTRUCTION ~~


The dlls included with Enderal are not only not compatible with the x64 executable but it has to be for a specific version of skyrim.

I have no idea what assets are required from the replacements. I assume Enderal is perfect and the replacements for the DLLs are compatible with the old scripts.

Deleting or Hiding Originals[edit | edit source]

While you follow this section, be sure to remove or delete the old plugin's files as you install the replacement.


AHZmoreHUDPlugin.dll (moreHud)[edit | edit source]

Replacement: moreHud SE

Adds additional information to the HUD, including if a book is read, value by weight, enchantments and if you've already learned them, and more.

Installation[edit | edit source]

- Only install the SKSE\Plugins\AHZmoreHUDPlugin.dll file, replacing the one that came with Enderal.


CrashFixPlugin.dll (Crash Fixes)[edit | edit source]

Replacement: SSE Engine Fixes

There are so many things this plugin does for Oldrim, but where we're going it won't help us, so grab the equivalent for SSE.

Installation[edit | edit source]
  1. Remove the following files:
    • \Data\SKSE\Plugins\CrashFixPlugin.dll
    • \Data\SKSE\Plugins\CrashFixPlugin.ini
    • \Data\SKSE\Plugins\CrashFixPlugin_preload.txt
  2. Install SSE Engine Fixes Part 1
  3. Open SKSE\Plugins\EngineFixes64.ini
    • Edit the following:
INI changes will be added when settings are examined.
For now, leave EngineFixes64.ini at default.
    • Open SKSE\Plugins\EngineFixes64_SNCT.ini
    • Edit the following:
INI changes will be added when settings are examined.
For now, leave EngineFixes64_SNCT.ini at default.
  1. Install SSE Engine Fixes Part 2.
    • Part 2 is installed to SSE's root folder, where SkyrimSE.exe, SkyrimSELauncher.exe, and skse64_loader.exe are.


flat_map_markers.dll (Flat Map Markers)[edit | edit source]

Replacement: Flat Map Markers SSE

This moves all of the map markers onto the same plane, preventing them from moving around based on perspective as you look around the map.

Installation[edit | edit source]
  1. Install entire package
  2. Open SKSE\Plugins\FlatMapMarkersSSE.json
  3. Replace contents with the following:
{
	"whiteListedWorldSpaces": [
		{
			"name": "Vyn, Enderal",
			"editorID": "Vyn",
			"markerHeight": 100000.0,
			"enabled": true
		}
	]
}


fs.dll[edit | edit source]

This is a dll specific to Enderal.
The source is included with Enderal which we will use to rebuild the plugin. I cannot provide the dll directly to you, therefore you need to build it yourself.
I have a tentative guide further down, it should be easy enough to follow. Its also not supposed to be the easiest read because this is for more advanced users to start, sorry.

InsertAttackData.dll[edit | edit source]

Not sure, there is an equivalent. Only install the SKSE\Plugins\InsertAttackData.dll file.


JContainers.dll[edit | edit source]

I'm going to guess this is for JSON, there is a replacer for SSE.


LipSyncFix.dll[edit | edit source]

This file was specific for oldrim, it adjusted the lip sync. Again, not needed.


MDX_NoPoisonDialogs.dll[edit | edit source]

Removed the poison dialogue box, there is a replacer


MfgConsole.dll[edit | edit source]

I believe this enhances the console. I don't know if there is a replacer, I don't really care though.


OneTweak.dll[edit | edit source]

I was never a fan. There is a replacement but I don't care.


SkyrimRedirector.dll[edit | edit source]

This plugin redirects the ini location, not needed as we have mo.


StorageUtil.dll[edit | edit source]

I have no idea, there is a replacer though. Only install the SKSE\Plugins\StorageUtil.dll file.


tkplugin.dll[edit | edit source]

Not sure, but there is a replacer. Only install the SKSE\Plugins\tkplugin.dll file.


WIP Recompiling an skse dll as skse 64[edit | edit source]

This is a generic guide to compile very basic plugins to x64.
Honestly, I have some idea of what I am doing, but I am quite literally figuring it out as I go.
I'll work on something a bit later to verify the functionality of the plugin.

Visual Studio 2017 Community[edit | edit source]

As far as I know, it doesn't really matter which version of VS(Visual Studio) you use.
I barely know how to use this very powerful tool and all I can recommend is install it and attempt to follow the guide.

Steam API[edit | edit source]

This api is required to allow achievements. For some reason Skyrim or the plugin does not like the latest version.
We'll end up removing the achievements code to allow the project to successfully build.

skse64[edit | edit source]

Grab this and install it for the base game if you haven't already, you only need the exe and dlls. You'll need the src folder, rather what is inside of it.

Recompiling fs.dll from src in x64 from win32[edit | edit source]

This guide is mainly focused around fs.dll. The only reason I was even able to figure this out was because there are no memory offsets, making this plugin easier to build for x64.
This guide will not apply for all skse plugins.

Solution Configuration[edit | edit source]

  1. Navigate to the Enderal files\SKSE\Plugins\Source\fs_skse_plugin
    1. Delete the following folders:
      • common
      • skse
    2. Open the solution file
  2. If you get a dialogue about retargeting, click OK
  3. Remove the following projects from the solution:
    • common
    • skse
  4. From the SKSE64 archive move the following folders to fs_skse_plugin folder:
    • src\common
    • src\skse64
  5. Add "Existing Project..." for the following projects:
    • fs_skse_plugin\common\common_vc14.vcxproj
    • fs_skse_plugin\skse64\skse64_common\skse64_common.vcxproj
    • fs_skse_plugin\skse64\skse64\skse64.vcxproj
  6. For the fs project, add the following references:
    • common_vc14
    • skse64_common
    • skse64
  7. For the solution "Retarget Solution", click OK
  8. For the solution "Configuration Manager..."
    • Change the solution configuration to Release
    • Change the solution platform to x64
    • For fs create a new platform, x64 and copy from Win32, don't create new solution platforms
    • Check all the build boxes
  9. For skse64 project, Properties:
    • General\Configuration Type, set to Static Library
    • Build Events\Post-Build Event, remove the Command Line
  10. For every project:
    • C/C++\General\Additional Include Directories, add the following:
      • $(SolutionDir)common
      • $(SolutionDir)skse64

fs project fixes[edit | edit source]

Project properties
    • Linker\Input\Additional Dependencies, remove skse.lib
Remove the following files from project:
  • Achievements.h
  • Achievements.cpp
main.cpp[edit | edit source]

Change skse reference

#include "skse/PluginAPI.h"
#include "skse/skse_version.h"
#include "skse64/PluginAPI.h"
#include "skse64_common/skse_version.h"


We are removing achievements

#include "Achievements.h"
//#include "Achievements.h"


Change SKSE version reference, which at the time of writing is

else if (skse->runtimeVersion != RUNTIME_VERSION_1_9_32_0)
else if (skse->runtimeVersion != RUNTIME_VERSION_1_5_62)


Change log path

gLog.OpenRelative(CSIDL_MYDOCUMENTS, "\\My Games\\Skyrim\\SKSE\\FS.log");
gLog.OpenRelative(CSIDL_MYDOCUMENTS, "\\My Games\\Skyrim Special Edition\\SKSE\\FS.log");


We are removing achievements, you can remove the message below if you want

btest = g_papyrus->Register(Achievements::RegisterFuncs);
//btest = g_papyrus->Register(Achievements::RegisterFuncs);
exports.def[edit | edit source]

Very minor change

LIBRARY "skaar"
LIBRARY "fs"
CreatePotion.h[edit | edit source]

Change skse references

#include "skse/PapyrusNativeFunctions.h"
#include "skse/GameReferences.h"
#include "skse/GameObjects.h"
#include "skse64/PapyrusNativeFunctions.h"
#include "skse64/GameReferences.h"
#include "skse64/GameObjects.h"
CreatePotion.cpp[edit | edit source]

Change SKSE references

#include "skse\GameObjects.h"
#include "skse\GameData.h"
#include "skse64\GameObjects.h"
#include "skse64\GameData.h"


Change FormHeap and remove arr properties due to SKSE to SKSE64 change

FormHeap_Free(effectItems.arr.entries);
Heap_Free(effectItems.entries);
PhasmalistInventoryFunctions.h[edit | edit source]

Change SKSE references

#include "skse/PapyrusNativeFunctions.h"
#include "skse/GameReferences.h"
#include "skse64/PapyrusNativeFunctions.h"
#include "skse64/GameReferences.h"
PhasmalistInventoryFunctions.cpp[edit | edit source]

Change SKSE references

#include "skse\GameExtraData.h"
#include "skse\GameBSExtraData.h"
#include "skse\GameRTTI.h"
#include "skse\PapyrusWornObject.h"
#include "skse\PapyrusEnchantment.h"
#include "skse\PapyrusWeapon.h"
#include "skse\PapyrusArmor.h"
#include "skse\PapyrusBook.h"
#include "skse\PapyrusSpell.h"
#include "skse64\GameExtraData.h"
#include "skse64\GameBSExtraData.h"
#include "skse64\GameRTTI.h"
#include "skse64\PapyrusWornObject.h"
#include "skse64\PapyrusEnchantment.h"
#include "skse64\PapyrusWeapon.h"
#include "skse64\PapyrusArmor.h"
#include "skse64\PapyrusBook.h"
#include "skse64\PapyrusSpell.h"


Namespace changes with SKSE64

ExtraContainerChanges::EntryDataList
EntryDataList


Namespace and structure changes with SKSE64

ExtraContainerChanges::EntryData
InventoryEntryData



Extra Mods[edit | edit source]

I guess this is where mods will be added to alleviate some of the issues that SSE has.

Caliente's Beautiful Bodies Enhancer -CBBE-[edit | edit source]

There is an issue with female feet glitching out horrifically, this solves and doesn't leave a horrible seam. Manually install the following files from the Core folder

meshes\actors\character\character assets\femalefeet_*

SkyUI[edit | edit source]

The system menu crashes when it is accessed. The skyui file alleviates the crash but leaves two unsightly missing translations. Toggle "BSA Extractor" in mo and then install, confirming to extract. Delete all files except

interface\quest_journal.swf

SSE Character Specular Lighting Fix[edit | edit source]

Install this, Ignore on the box for mo. I think this is relevant...

Realistic Water Two[edit | edit source]

If you look at the waterfalls in enderal you can see a green glowing mesh, this kind of helps, by eliminating it. Use the default options on the installer. Only install the meshes and textures folder, no plugins.

Issues with SSE and Enderal[edit | edit source]

Critical[edit | edit source]

Things that actually impact gameplay.

Required binary file[edit | edit source]

You need fs.dll to play actually play enderal. Without there are a few things that will break.


Objects have distorted texture mapping[edit | edit source]

Not sure how to fix this. The texture appears to be corrupt in some manner. One object that has this is

meshes\enderal\clutter\miscellaneous\cart.nif

Meshes glitching out all over the screen[edit | edit source]

Only affect the game when looking in the direction but can case shadows with the glitching parts. Some objects are fixed by using the Nif Optimizer and ticking the Smooth Normals box.

Objects that have this issue and can be resolved

meshes\enderal\armor\wanderer\

Minor[edit | edit source]

Can live with, but annoying

Extra options without translations on system page[edit | edit source]

The skyui file for sse was required to workaround a crash, but leaves two unsightly options that are missing translation strings.

Shadows and reflections flicker on water[edit | edit source]

Some shadows or maybe invalid reflections flicker on the water. Kind of distracting.

Weathers have too much bloom[edit | edit source]

Not sure if its normal or a side effect of the differences between Enderal an SSE. Should be possible to have a weather replacer that addresses minor issues and add SSE features.