Closed lukasaldersley closed 2 years ago
Hi. Thank you so much for submitting this PR. I will give you feedback after review. Before I start, I have a few questions. What is Skyrim Anniversary Edition? Is it going to replace Skyrim SE? If not, it might be proper if I provide several versions of Skyrim Search Plugins for each editions (LE, SE, VR?, AE), right?
Hi, Skyrim Anniversary Edition is an update to SE released on 11.11.2021 by Bethesda. there's two parts to it: a free Update for all SE users and a paid addon that just adds all of the CreationClub stuff. As far as Mods are concerned it doesn't matter if you use the Free version of if you paid for the full thing, the SkyrimSE.exe is the same. The reason it's sort of a big deal to SKSE plugins is: Bethesda changed their compiler and now everyting is different and not even Address library is going to help (at least when transitioning from 1.5.97 [the Version you used] to versions 1.6+ [aka Anniversary Edition]). Skyrim VR hasn't gotten an update as far as I can tell but I don't own Skyrim VR. It may be nice to leave the download for the SE version you created in Febuary alongside the verion for AE as at least for now quite a few people are trying to not install the update until all the SKSE plugins they'd like to use are updated. (though since SE and AE are basically the same game it makes sense to have them on the same page; Nexus doesn't even have a Skyrim AE category). 1.6.318 was the original Anniversary Edition Update and 1.6.323 was a bugfix patch they released about two weeks later.
The build failures github is complaining about are because of detour v0.7.1 as it uses const_fn which apparently was removed and then later on there's a problem in app.rs in fn set_titles
since it uses NoneError
which also was removed. As I have never worked with Rust before I went the easy route of just using the same library versions you did and an older version of Rust which works with NoneError. I tried using a nightly build from when you published the plugin, but Rust warned about NoneError so I used an even older version which doesn't warn about NoneError to build the plugin (see the readme).
In newer Rust versions it should be possible to use this instead of putting hundeds of \0 at the end of the version Checking code. The additional Code in lib.rs is a translation of the new Version checking required by the SKSE builds for AE (see src/skse64/skse64/PluginAPI.h in the SKSE download zip file)
const fn zero_pad_u8<const N: usize, const M: usize>(arr: &[u8; N]) -> [u8; M] {
let mut m = [0; M];
let mut i = 0;
while i < N {
m[i] = arr[i];
i += 1;
}
m
}
name: zero_pad_u8(b"Skyrim Search"),
instead of name: *b"Skyrim Search\0\0\0\0\0\0\..."
@lukasaldersley, I updated master and now we can use the latest stable rust compiler. Also, I tested with your new addresses and it seems to work. Thanks a lot!
I have some requests for you:
rustup install nightly-2020-02-14
partOk, Will do.
We need to update Cargo.toml, too.
I believe I completed the last ToDo list now. is this what you wanted to see?
Great! I’ll update the mod description and add your releases soon.
Thanks
I've updated the code for Skyrim AE (runtimes 1.6.318 and 1.6.323) .dlls for both versions do work and can be found in the releases section
However there's a problem with some of the original code since it uses NoneError which apparently was removed therefore I had to use an older version of Rust because I don't know how to fix that. I have included the IDs for Address Library in the comments but since this is rust I don't think I can implement the address Library.