Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release(skyrim-platform): version 2.6 #1074

Merged
merged 4 commits into from
Apr 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/release/dev/sp-commonlib-update.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/release/dev/sp-cpp20-vs2022.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/release/dev/sp-drop-skse.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/release/dev/sp-fileinfo.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/release/dev/sp-fix-utf-text.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/release/dev/sp-http-client-error.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/release/dev/sp-logging.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/release/dev/sp-offsets.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/release/dev/sp-platform-settings.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/release/dev/sp-runtime-sinks.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/release/dev/sp-security-fixes.md

This file was deleted.

88 changes: 88 additions & 0 deletions docs/release/sp-2.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# SP 2.6.0 Release Notes


This document includes changes made since SP 2.5.0

**Hey! This is a very important update that adds AE/1.6 support, improves FPS, and generally fixes lots of crashes and issues. It's quite reasonable to update instead of keep using 2.5 or even older versions.**

Remember that unfortunately updating SP break save games on *some* modlists. There are still many things to be implemented or fixed. See [issues](https://github.com/skyrim-multiplayer/skymp/issues?q=is%3Aopen+is%3Aissue+label%3Aarea%3Askyrim-platform).

SP supports both Steam version of Skyrim SE (1.6+) and legacy 1.5.97.

If you're enjoying Skyrim Platform, please star this repo. It helps ⭐

## `error` in HTTP client's response

Added `error` field to `HttpResponse`. This allows checking for more detailed info
why your HTTP request failed. Currently, it can be
[one of these](https://github.com/yhirose/cpp-httplib/blob/b80aa7fee31a8712b1d3cae05c1d9e7f5c436e3d/httplib.h#L771-L785):
* Empty string, if successful
* `Unknown`
* `Connection`
* `BindIPAddress`
* `Read`
* `Write`
* `ExceedRedirectCount`
* `Canceled`
* `SSLConnection`
* `SSLLoadingCerts`
* `SSLServerVerification`
* `UnsupportedMultipartBoundaryChars`
* `Compression`

## Add more events

* `buttonEvent`
* `mouseMove`
* `thumbstickEvent`
* `kinectEvent`
* `deviceConnect`
* `actorKill`
* `criticalHit`
* `disarmedEvent`
* `dragonSoulsGained`
* `itemHarvested`
* `levelIncrease`
* `locationDiscovery`
* `shoutAttack`
* `skillIncrease`
* `soulsTrapped`
* `spellsLearned`

## FileInfo API

Now you can get info about files directly inside of Skyrim's Data directory.

```ts
sp.printConsole(JSON.stringify(sp.getFileInfo('Skyrim.esm')));
// {"filename": "Skyrim.esm", "size": ..., "crc32": ...}
```


## Other changes

- Fixed a few security issues related to local file paths checking.


- Skyrim Platform now have settings file located at `Data\SKSE\Plugins\SkyrimPlatform.ini`.


- Fixed displaying of non-ASCII text: fixed working with UTF-8 (from JS) text and recompiled font to include Cyrillic symbols. In case you wish to update the font to use something else, please see [SP Texts API docs](../skyrim_platform/texts.md#compiling-font).


- The project now complies with C++20 and compiles with VS 2022 without errors.


- CommonlibSSE updated to latest version.


- Runtime event sink handling introduced. Except for some custom events that fire from within the code, events now will not be processed if there are no plugins that are subscribed to them. In theory this should provide more execution performance since there are less calls that need to be processed.


- Logging introduced. Platform now uses skse runtime logging capabilities to provide users more feedback about its execution succession. Log file is located at `User\Documents\My Games\Skyrim Special Edition\SKSE.`


- All raw offsets for hooks and game classes were replaced with Address Library IDs to support future game version changes.


- SKSE64 is no longer a build dependency (Still required to run the plugin).
2 changes: 1 addition & 1 deletion skymp5-client/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Utility, Debug, getPlatformVersion, on, Game, Ui } from 'skyrimPlatform';

const requiredVersion = '2.5.0';
const requiredVersion = '2.6.0';

const realVersion = typeof getPlatformVersion === 'function' ? getPlatformVersion() : 'unknown';

Expand Down
2 changes: 1 addition & 1 deletion skyrim-platform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@skymp/skyrim-platform",
"version": "2.5.0",
"version": "2.6.0",
"description": "A modding tool for Skyrim allowing writing scripts with JavaScript/TypeScript",
"license": "GPL-3.0"
}
2 changes: 1 addition & 1 deletion skyrim-platform/src/platform_se/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project(platform_se VERSION 2.5.0 LANGUAGES CXX)
project(platform_se VERSION 2.6.0 LANGUAGES CXX)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/Version.h @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)

Expand Down
2 changes: 1 addition & 1 deletion skyrim-platform/src/platform_se/skyrim_platform/DevApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ JsValue DevApi::WritePlugin(const JsFunctionArguments& args)

JsValue DevApi::GetPlatformVersion(const JsFunctionArguments& args)
{
return "2.5.0";
return "2.6.0";
}

JsValue DevApi::GetJsMemoryUsage(const JsFunctionArguments& args)
Expand Down