Getting Started with SKSE Plugin Development: Difference between revisions
Jump to navigation
Jump to search
no edit summary
imported>ThighNookNoodel No edit summary |
imported>ThighNookNoodel No edit summary |
||
| Line 10: | Line 10: | ||
===Update 10.05.2019=== | ===Update 10.05.2019=== | ||
The | The following instructions are based on a Reddit discussion [https://www.reddit.com/r/skyrimmods/comments/bmg1z7/finally_aiming_for_my_first_skse_plugin_been/ over here]. The first section will cover proper setup of the Visual Studio enviroment, and the corresponding toolset, as well as a FAQ. All of the content of downloaded files, this Wiki page, and any information resources, will need to have credits dirrected towards Diens, Ryan/Fuggyduff, the SKSE-Team, and Bethesda. I'm merely trying to condense information in one place. Also, pay attention to legacy information in regard to SKSE plugin creation[https://github.com/xanderdunn Xanderdunn]. This page still gets frequented with new updates, and sometimes answering error reports. | ||
===Preamble=== | ===Preamble=== | ||
| Line 20: | Line 18: | ||
===Requirements:=== | ===Requirements:=== | ||
*Windows 10, Skyrim Special Edition, [https://visualstudio.microsoft.com/de/downloads/ Visual Studio 2019], [https://skse.silverlock.org/ SKSE64 Source], [https://github.com/Ryan-rsm-McKenzie/ExamplePlugin-SKSE64 Ryan's Plugin Example Source] | *Windows 10, Skyrim Special Edition, [https://visualstudio.microsoft.com/de/downloads/ Visual Studio 2019], [https://skse.silverlock.org/ SKSE64 Source], [https://github.com/Ryan-rsm-McKenzie/ExamplePlugin-SKSE64 Ryan's Plugin Example Source] | ||
*If you had previously installed a Visual Studio SDK, | *Optional: If you had previously installed a Visual Studio SDK, you can deinstall it with using the [https://github.com/Microsoft/VisualStudioUninstaller/releases Visual Studio Uninstaller Tool]. Additionally you can manually browse your hard drive folders, to scan for any dead remnants of older VS versions, and delete them. You may also scan the registration for any remnants, and have them deleted. It has come to my attention, that there might be problems with remnants of older VS SDK's | ||
===Installing Visual Studio 2019=== | ===Installing Visual Studio 2019=== | ||
* | [https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio?view=vs-2019 Official Microsoft Install Instructions] | ||
* | *Installing on system drive C: is personal preference, and primarly done for convenience during install procedure | ||
*Refer to [https://imgur.com/0orcc3K this image], for an example on | *Depending on your choice of install range, Visual Studio 2019 may need disk space ranging from anything of 600MB to 25GB, depending on the components you want to install. Installing on a SSD, or any faster equivalent, is recommended | ||
* | *Refer to [https://imgur.com/0orcc3K this image], for an example on personal preference | ||
* | *If you are not on a native English OS, make sure to additionally select and install the English language pack for VS2019, if you want to stay consistent with general coding language | ||
*Make sure to install/run VS2019 as administrator! | |||
===Setting up SKSE64 Source=== | ===Setting up SKSE64 Source=== | ||
*Most, if not all the instructions on this article, is based on the users's [https://github.com/Ryan-rsm-McKenzie/CommonLibSSE/wiki/Getting-Started Ryan instructions] | *Most, if not all the instructions on this article, is based on the users's [https://github.com/Ryan-rsm-McKenzie/CommonLibSSE/wiki/Getting-Started Ryan instructions] | ||
#Download [https://skse.silverlock.org/ SKSE64 Source], and [https://imgur.com/9gp8fwv unpack the .zip] to a folder of your choice. Make sure to backup/seperate, if you also utilize SKSE64 for your game | #Download [https://skse.silverlock.org/ SKSE64 Source], and [https://imgur.com/9gp8fwv unpack the .zip] to a folder of your choice. Make sure to backup/seperate, if you also utilize SKSE64 for your game | ||
#Open up the file '''src\skse64\skse64.sln''', by double clicking, then [https://imgur.com/95b5KXK permanently removing source control] | #Open up the file '''src\skse64\skse64.sln''', by double clicking, then [https://imgur.com/95b5KXK permanently removing source control] | ||
| Line 39: | Line 38: | ||
#Direct quote of Ryan: [https://imgur.com/GFcfIJT "Disable SKSE's post-build events] by selecting all projects, right click -> Properties -> Configuration Properties -> Build Events -> Post-Build Event -> Use In Build -> No. SKSE's build events are configured for their environment, however ours is different, so we won't be using them"...you can select all by using CTRL+left click | #Direct quote of Ryan: [https://imgur.com/GFcfIJT "Disable SKSE's post-build events] by selecting all projects, right click -> Properties -> Configuration Properties -> Build Events -> Post-Build Event -> Use In Build -> No. SKSE's build events are configured for their environment, however ours is different, so we won't be using them"...you can select all by using CTRL+left click | ||
#Make sure these changes apply to [https://imgur.com/4DWpnzP all configurations] | #Make sure these changes apply to [https://imgur.com/4DWpnzP all configurations] | ||
# | From here the original instructions of Ryans tutorial differed for me. That may not be the case for you. I encountered a problem, when trying to build the SKSE64 .dll, that resultet in [https://imgur.com/9jpNjtK 3275 error messages]. A trace to why this is happening can be found [https://www.reddit.com/r/skyrimmods/comments/bmg1z7/finally_aiming_for_my_first_skse_plugin_been/emym7d9?utm_source=share&utm_medium=web2x here]. Basically this happens, because the latest SKSE source did not include a particular string library, which you will have to add manually, after upgrading SKSE64 to VS2019. So this means from here I assume you will stay with VS2017. Don't be worried, since the following instructions will apply to both VS versions. | ||
#After confirmation open properties again for all projects, and make sure to->Configuration Properties->General->Platform Toolset->set to '''Visual Studio 2017(v141)''' | |||
#Now the essential | #Multi select all projects with CTRL+ left click, then right click->Properties->Configuration Properties->C/C++->Language and make sure to select the correct [https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019 C++ ISO standard(v17)] | ||
#After confirmation open properties again for all projects, and make sure to->Configuration Properties->General->Platform Toolset->set to '''Visual Studio 2017(v141)''' | |||
#Optional: set to Visual Studio 2019(v142), if you've already gone ahead, upgraded to VS2019, and fixed the previously mentioned SKSE64 string problem | |||
#Now the essential trouble fixing part: this information depends on if you either have VS2017, or VS2019 installed. In the Configuration Properties->General section make sure to <u>not</u> use the latest Windows SDK Verion, which is clearly labeled with "latest/updated". You want to use the SDK with version ID: '''10.0.18362.0''' for VS2017. This might not be true when using VS2019. | |||
If you deliberately want to use the most up to date SDK, there's traces either on any of the Nexus pages, or Github pages for SKSE64 .dll content creators, that have gone through upgrading SKSE64 for VS2019. You might want to contact [https://www.nexusmods.com/users/2025634 Aers], or Ryan in order to get closer information on this, and maybe even obtain a SKSE64 source for VS2019? I'm also uncertain if the SKSE team did already update the latest SKSE64 source to use the latest SDK update, or plan to do so for the next SKSE64 update. As it stands now, due to my findings, it's entirely possible SKSE team did not even upgrade to VS2017 yet, and were using VS2015 for the latest SKSE64 update. | |||
===FAQ=== | ===FAQ=== | ||
'''Why should I use VS2019/2017 | '''Why should I use VS2019/2017?''' | ||
According to Ryan, the intern versioning does not really matter. What matters, is the amount of bugs you'll have to fix when upgrading to any new VS version, if you haven't previously updated. Also, any new VS version will be more powerful and user friendly to utilize. So it's basically just a question of convenience, to improve workflow. On the topic of SKSE64 potentially created with VS2015: It's just what I assume, since that's what the files tell me. If you know it better, let me know, so I stand corrected. | |||
'''You're constantly hopping in between the different VS versions, in your instructions. You are confusing me!?''' | '''You're constantly hopping in between the different VS versions, in your instructions. You are confusing me!?''' | ||
Guess what. That's because the whole setup of VS was nothing but a giant and thoroughly confusing pita on my end | Guess what. That's because the whole setup of VS was nothing but a giant and thoroughly confusing pita on my end. But getting the SKSE64 source to run and compile with VS2019 made me tear out my hair. However, for you the following things are important: | ||
*Visual Studio 2019 | *Visual Studio 2019 | ||
| Line 62: | Line 66: | ||
**Windows SDK 10.0(10.0.18362.0) | **Windows SDK 10.0(10.0.18362.0) | ||
***Platform Toolset Visual Studio 2017(v141) | ***Platform Toolset Visual Studio 2017(v141) | ||
****C/C++ ISO standard v17 | ****C/C++ ISO standard v17 | ||
*Visual Studio 2015 | *Visual Studio 2015 | ||
**Windows SDK 8.1(???) | **Windows SDK 8.1(???) | ||
***Platform Toolset Visual Studio 2015(v140) | ***Platform Toolset Visual Studio 2015(v140) | ||
****C/C++ ISO standard v14 | ****C/C++ ISO standard v14 | ||
'''Why do you keep mentioning different versions of Visual Studio? I do have VS2019 installed, right?''' | '''Why do you keep mentioning different versions of Visual Studio? I do have VS2019 installed, right?''' | ||
| Line 75: | Line 79: | ||
'''What's with the initial article made by Dienes, and why don't you make your own article?''' | '''What's with the initial article made by Dienes, and why don't you make your own article?''' | ||
The original info is outdated, but links back to the very beginnings in 2012. So you might still want to follow the provided link to learn something additional. | The original info is outdated, but links back to the very beginnings in 2012. So you might still want to follow the provided link to learn something additional. Also, the create article button simply doesn't show up on any of the Wiki's pages, for me. | ||
''' | '''Any more relevant discussions happening?''' | ||
Yes: [https://www.reddit.com/r/skyrimmods/comments/bmg1z7/finally_aiming_for_my_first_skse_plugin_been/ here], [https://www.reddit.com/r/skyrimmods/comments/bmwjjt/tutorialcreating_skse_dll_plugin_setting_up_the/ here], and on the [https://discord.gg/fmEKvBN Discord] | |||
'''I still get various error reports, even after successful compiling the SKSE64 source!!!''' | '''I still get various error reports, even after successful compiling the SKSE64 source!!!''' | ||
Refer to [https://github.com/Ryan-rsm-McKenzie/CommonLibSSE/wiki/Getting-Started Ryan's instructions] to solve or ignore | Refer to [https://github.com/Ryan-rsm-McKenzie/CommonLibSSE/wiki/Getting-Started Ryan's instructions] to solve or ignore. | ||
'''Can I find any trace inside source files, on which version was used to compile?''' | '''Can I find any trace inside source files, on which version was used to compile?''' | ||
Nope, haven't found any. However, Github actually provides this information inside the '''.gitignore''' file, and most of the sources are actually provided on Github | Nope, haven't found any. However, Github actually provides this information inside the '''.gitignore''' file, and most of the sources are actually provided on Github. However, there's usually info provided inside the '''.vcxproj''' files, which toolset has been used, which in return might provide the info which version of Visual Studio was used. | ||
===Addendum=== | ===Addendum=== | ||
Section two will cover on working with a [https://github.com/Ryan-rsm-McKenzie/ExamplePlugin-SKSE64 plugin example] based on the install posted upside. Until I'm going to update this article, you should use Ryan's tutorial over on Github as resource. It's probably best practice anyways, since he's not as much a chatterbox, than I am. Pay special attention to the Debugger section. Without this, you will never be successful. | |||