diff --git a/.github/workflows/docfx.yml b/.github/workflows/docfx.yml index d211337a..7296f508 100644 --- a/.github/workflows/docfx.yml +++ b/.github/workflows/docfx.yml @@ -23,34 +23,29 @@ env: jobs: docfx: - name: DocFX documentation + name: DocFX Documentation runs-on: ubuntu-latest steps: - name: DocFX Setup - uses: butr/actions-docfx-setup@v3.0 + uses: butr/actions-docfx-setup@v3 with: github-token: ${{secrets.GITHUB_TOKEN}} - name: Build Bannerlord.UIExtenderEx - run: >- - dotnet build src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj; + run: dotnet build src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj; shell: pwsh - name: Run DocFX run: >- Copy-Item "README.md" -Destination "docs/index.md"; - if ($${{runner.os == 'Windows'}}) { - docfx.console/tools/docfx.exe metadata docs/docfx.json; - docfx.console/tools/docfx.exe build docs/docfx.json; - } - else { - mono docfx.console/tools/docfx.exe metadata docs/docfx.json; - mono docfx.console/tools/docfx.exe build docs/docfx.json; - } + New-Item -Type dir "docs/images"; + Copy-Item "resources/BUTR48.svg" -Destination "docs/images/BUTR48.svg"; + docfx metadata docs/docfx.json; + docfx build docs/docfx.json; shell: pwsh - name: Deploy DocFX - uses: crazy-max/ghaction-github-pages@v3 + uses: crazy-max/ghaction-github-pages@v4 with: target_branch: gh-pages build_dir: docs/_site diff --git a/.github/workflows/dotnet-format-daily.yml b/.github/workflows/dotnet-format-daily.yml index c6618b10..bf9bf21b 100644 --- a/.github/workflows/dotnet-format-daily.yml +++ b/.github/workflows/dotnet-format-daily.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Code Formatting - uses: butr/actions-code-format-setup@v1.5 + uses: butr/actions-code-format-setup@v1 with: workspace: "src/Bannerlord.UIExtenderEx.sln" github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2580c4c8..a760083d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ jobs: mod_description: ${{ steps.changelog.outputs.mod_description }} steps: - name: Setup - uses: butr/actions-common-setup@v2.1 + uses: butr/actions-common-setup@v2 with: github-token: ${{secrets.GITHUB_TOKEN}} @@ -45,7 +45,7 @@ jobs: echo "::set-output name=mod_description::$desc" - name: Upload Bannerlord folder - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: bannerlord path: ./bannerlord/ @@ -75,8 +75,8 @@ jobs: mod_description: ${{ needs.build-module.outputs.mod_description }} artifact_name: bannerlord secrets: - NEXUSMODS_APIKEY: ${{ secrets.NEXUSMODS_APIKEY }} - NEXUSMODS_COOKIES: ${{ secrets.NEXUSMODS_COOKIES }} + NEXUSMODS_APIKEY: ${{ secrets.ARAGAS_NEXUSMODS_API_KEY }} + NEXUSMODS_COOKIES: ${{ secrets.ARAGAS_NEXUSMODS_COOKIE_SID_DEVELOP }} ########################### # STEAM # diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d631bfaa..5231c3dc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: runs-on: windows-latest steps: - name: Tests Setup - uses: butr/actions-tests-setup@v1.5.6 + uses: butr/actions-tests-setup@v1 with: github-token: ${{secrets.GITHUB_TOKEN}} steam-login: ${{secrets.STEAM_LOGIN}} @@ -61,7 +61,7 @@ jobs: shell: pwsh - name: ReportGenerator - uses: danielpalme/ReportGenerator-GitHub-Action@5.1.19 + uses: danielpalme/ReportGenerator-GitHub-Action@5.2.0 with: reports: 'coverage_uiextenderex_debug.xml;coverage_uiextenderex_release.xml' targetdir: 'coveragereport' @@ -70,13 +70,13 @@ jobs: tag: '${{ github.run_number }}_${{ github.run_id }}' # Optional tag or build version. - name: Upload ReportGenerator to GitHub - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-report path: coveragereport - name: Upload ReportGenerator to CodeCov - uses: codecov/codecov-action@v3.1.1 + uses: codecov/codecov-action@v3.1.4 with: token: ${{secrets.CODECOV_TOKEN}} file: coveragereport/Cobertura.xml diff --git a/README.md b/README.md index 9d799e9d..212ffcb6 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,22 @@
+ + Steam Mod Configuration Menu + + + Steam Downloads + + + Steam Views + + + Steam Subscriptions + + + Steam Favorites + +

A library that enables multiple mods to alter standard game interface. @@ -60,3 +76,20 @@ This mod is a dependency mod that does not provide anything by itself. You need ## Usage Check the [``Articles``](https://butr.github.io/Bannerlord.UIExtenderEx/articles/v2/Overview.html) section of our documentation! + +## Current State of AutoGens +The game uses two Prefab systems - static (pre-compiled XML) C# prefabs and dynamically serialized XML prefabs. +The XML prefabs were introduced with the Early Access. +The C# prefabs were introduced in the middle of Early Access. Most likely for Console releases, since they use the `Mono` runtime. + +We call AutoGens the XML prefabs that are pre-compiled into C# prefabs. The pre-compilation is achieved by using `TaleWorlds.MountAndBlade.GauntletUI.CodeGenerator.exe`. +It generates C# code based on the XML file. The C# code can then be compiled into an assembly (`.dll` file) that can be loaded by the game. +This has the following benefits: +* We have ready-to-use prefabs at the very start of the game, removing the serialization step of the XML prefabs, which reduces the load time. +* We have static (typed) access to anything within the prefab. We do not need to use reflection to get/set data, which, again, speeds up the game. This is particularly noticeable on the `Mono` runtime. + +In summary, AutoGens are faster than the raw XML prefabs. The most performance is gained on the `Mono` runtime. On .NET (Core) the difference is more or less neglectable. + +UIExtenderEx modifies the raw XML prefabs. Since the game does not use XML prefabs and instead relies on the AutoGens, our modifications will not affect the game. +Currently, we just disable AutoGens globally. We are not able to do the pre-compilation at runtime. The issues are mostly not at our side - the `CodeGenerator` that the game provides doesn't support +such scenarios. diff --git a/build/common.props b/build/common.props index 523ccd95..0f3a29fe 100644 --- a/build/common.props +++ b/build/common.props @@ -4,17 +4,18 @@ - 2.8.0 + 2.8.1 2.2.2 3.2.0.77 - 1.0.1.44 - 1.0.1.92 - 3.0.0.135 - 5.0.198 + 1.0.1.50 + 1.1.0.104 + 3.0.0.138 + 5.0.221 5.5.3 1.0.0 + v$(GameVersion) $(BANNERLORD_STABLE_DIR) $(BANNERLORD_BETA_DIR) @@ -52,7 +53,7 @@ - + diff --git a/changelog.txt b/changelog.txt index 98cdb74d..dd5d2aa2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.8.1 +Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.6,v1.2.8 +* Added UpdateInfo +* Added Japanese translation +--------------------------------------------------------------------------------------------------- Version: 2.8.0 Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2 * Switched back to Lib.Harmony diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 00000000..9952ea8f --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +uiextenderex.butr.link diff --git a/docs/articles/toc.yml b/docs/articles/toc.yml index 6c14b454..826b4db0 100644 --- a/docs/articles/toc.yml +++ b/docs/articles/toc.yml @@ -1,3 +1,4 @@ +items: - name: APIv2 href: v2/toc.yml homepage: v2/Overview.md diff --git a/docs/docfx.json b/docs/docfx.json index 08dfaffa..fe87a04d 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -21,46 +21,33 @@ ], "content": [ { - "files": [ - "api/**.yml", - "api/index.md" - ] - }, - { - "files": [ - "articles/**.md", - "articles/**/toc.yml", - "toc.yml", - "*.md" - ] + "files": [ "**/**.{md,yml}" ], + "exclude": [ "_site/**", "obj/**" ] } ], "resource": [ { - "files": [ - "langwordMapping.yml", - "images/**" - ] - }, - { - "src": "../", - "files": [ "resources/**" ] + "files": [ "**/images/**", "codesnippet/**", "CNAME" ], + "exclude": [ "_site/**", "obj/**" ] } ], - "overwrite": [ ], "dest": "_site", "globalMetadata": { "_enableSearch": "true", "_appTitle": "UIExtenderEx Documentation", - "_appFooter": "© 2020 BUTR", + "_appName": "UIExtenderEx", + "_appLogoPath": "images/BUTR48.svg", + "_appFooter": "© 2020-2023 Bannerlord's Unofficial Tools & Resources", }, - "globalMetadataFiles": [], - "fileMetadataFiles": [], "template": [ "default", - "_template/dark-theme" + "modern", + // https://github.com/dotnet/docfx/issues/8578 + // "_template/last-modified" ], - "postProcessors": ["ExtractSearchIndex"], - "markdownEngineName": "markdig" + "postProcessors": [ + "ExtractSearchIndex", + // "LastModifiedPostProcessor" + ] } } diff --git a/docs/filterConfig.yml b/docs/filterConfig.yml index da98d0a3..32d736a6 100644 --- a/docs/filterConfig.yml +++ b/docs/filterConfig.yml @@ -1,3 +1,4 @@ +### YamlMime:ManagedReference apiRules: - exclude: uidRegex: ^HarmonyLib\.BUTR\.Extensions$ diff --git a/docs/langwordMapping.yml b/docs/langwordMapping.yml deleted file mode 100644 index 9ddd00ca..00000000 --- a/docs/langwordMapping.yml +++ /dev/null @@ -1,61 +0,0 @@ -references: -- uid: langword_csharp_null - name.csharp: "null" - name.vb: "Nothing" -- uid: langword_vb_Nothing - name.csharp: "null" - name.vb: "Nothing" -- uid: langword_csharp_static - name.csharp: static - name.vb: Shared -- uid: langword_vb_Shared - name.csharp: static - name.vb: Shared -- uid: langword_csharp_virtual - name.csharp: virtual - name.vb: Overridable -- uid: langword_vb_Overridable - name.csharp: virtual - name.vb: Overridable -- uid: langword_csharp_true - name.csharp: "true" - name.vb: "True" -- uid: langword_vb_True - name.csharp: "true" - name.vb: "True" -- uid: langword_csharp_false - name.csharp: "false" - name.vb: "False" -- uid: langword_vb_False - name.csharp: "false" - name.vb: "False" -- uid: langword_csharp_abstract - name.csharp: abstract - name.vb: MustInherit -- uid: langword_vb_MustInherit - name.csharp: abstract - name.vb: MustInherit -- uid: langword_csharp_sealed - name.csharp: sealed - name.vb: NotInheritable -- uid: langword_vb_NotInheritable - name.csharp: sealed - name.vb: NotInheritable -- uid: langword_csharp_async - name.csharp: async - name.vb: Async -- uid: langword_vb_Async - name.csharp: async - name.vb: Async -- uid: langword_csharp_await - name.csharp: await - name.vb: Await -- uid: langword_vb_Await - name.csharp: await - name.vb: Await -- uid: langword_csharp_async/await - name.csharp: async/await - name.vb: Async/Await -- uid: langword_vb_Async/Await - name.csharp: async/await - name.vb: Async/Await \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml index 6b31c852..393d2a90 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -1,9 +1,5 @@ -- name: UIExtenderEx - href: index.md - - name: Articles href: articles/ - homepage: articles/index.md - name: API Documentation href: api/ @@ -12,6 +8,6 @@ dropdown: true items: - name: Official Documentation - href: http://docs.modding.bannerlord.com/ + href: https://docs.modding.bannerlord.com/ - name: Community Documentation - href: https://docs.bannerlordmodding.com + href: https://docs.bannerlordmodding.com/ diff --git a/resources/BUTR48.svg b/resources/BUTR48.svg new file mode 100644 index 00000000..0ea7e850 --- /dev/null +++ b/resources/BUTR48.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj b/src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj index f6a99887..fc064ebe 100644 --- a/src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj +++ b/src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj @@ -3,7 +3,7 @@ netstandard2.0 - 10.0 + latest enable x64 true @@ -37,8 +37,9 @@ - + + @@ -60,4 +61,4 @@ - \ No newline at end of file + diff --git a/src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj.DotSettings b/src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj.DotSettings deleted file mode 100644 index 923585eb..00000000 --- a/src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - True \ No newline at end of file diff --git a/src/Bannerlord.UIExtenderEx/Properties/launchSettings.json b/src/Bannerlord.UIExtenderEx/Properties/launchSettings.json index 8886ae60..7204c3b8 100644 --- a/src/Bannerlord.UIExtenderEx/Properties/launchSettings.json +++ b/src/Bannerlord.UIExtenderEx/Properties/launchSettings.json @@ -2,13 +2,13 @@ "profiles": { "Bannerlord": { "commandName": "Executable", - "executablePath": "$(GameFolder)\\bin\\Win64_Shipping_Client\\Bannerlord.exe", + "executablePath": "$(GameFolder)\\bin\\Win64_Shipping_Client\\Bannerlord.BLSE.Standalone.exe", "commandLineArgs": "/singleplayer _MODULES_*Bannerlord.Harmony*$(ModuleId)*Native*SandBoxCore*Sandbox*StoryMode*CustomBattle*_MODULES_", "workingDirectory": "$(GameFolder)\\bin\\Win64_Shipping_Client" }, "BannerlordWithMCM": { "commandName": "Executable", - "executablePath": "$(GameFolder)\\bin\\Win64_Shipping_Client\\Bannerlord.exe", + "executablePath": "$(GameFolder)\\bin\\Win64_Shipping_Client\\Bannerlord.BLSE.Standalone.exe", "commandLineArgs": "/singleplayer _MODULES_*Bannerlord.Harmony*Bannerlord.ButterLib*$(ModuleId)*Bannerlord.MBOptionScreen*Native*SandBoxCore*Sandbox*StoryMode*CustomBattle*_MODULES_", "workingDirectory": "$(GameFolder)\\bin\\Win64_Shipping_Client" } diff --git a/src/Bannerlord.UIExtenderEx/SubModule.cs b/src/Bannerlord.UIExtenderEx/SubModule.cs index 1c738518..1c40fa3e 100644 --- a/src/Bannerlord.UIExtenderEx/SubModule.cs +++ b/src/Bannerlord.UIExtenderEx/SubModule.cs @@ -1,6 +1,8 @@ using Bannerlord.BUTR.Shared.Helpers; using Bannerlord.UIExtenderEx.Utils; +using BUTR.MessageBoxPInvoke.Helpers; + using System; using System.Linq; using System.Reflection; @@ -52,9 +54,9 @@ private static void ValidateLoadOrder() sb.AppendLine(report); sb.AppendLine(); sb.AppendLine(new TextObject(SMessageContinue)?.ToString() ?? "ERROR"); - switch (MessageBoxWrapper.Show(sb.ToString(), new TextObject(SWarningTitle)?.ToString() ?? "ERROR", MessageBoxButtons.YesNo)) + switch (MessageBoxDialog.Show(sb.ToString(), new TextObject(SWarningTitle)?.ToString() ?? "ERROR", MessageBoxButtons.YesNo)) { - case DialogResult.Yes: + case MessageBoxResult.Yes: Environment.Exit(1); break; } diff --git a/src/Bannerlord.UIExtenderEx/_Module/ModuleData/Languages/JP/sta_strings.xml b/src/Bannerlord.UIExtenderEx/_Module/ModuleData/Languages/JP/sta_strings.xml new file mode 100644 index 00000000..5908f507 --- /dev/null +++ b/src/Bannerlord.UIExtenderEx/_Module/ModuleData/Languages/JP/sta_strings.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/Bannerlord.UIExtenderEx/_Module/SubModule.xml b/src/Bannerlord.UIExtenderEx/_Module/SubModule.xml index 180d8203..14928aee 100644 --- a/src/Bannerlord.UIExtenderEx/_Module/SubModule.xml +++ b/src/Bannerlord.UIExtenderEx/_Module/SubModule.xml @@ -8,6 +8,7 @@ + @@ -19,15 +20,15 @@ - + - - - - - + + + + + @@ -49,6 +50,7 @@ + @@ -57,6 +59,7 @@ + diff --git a/src/nuget.config b/src/nuget.config new file mode 100644 index 00000000..eb3fc3b2 --- /dev/null +++ b/src/nuget.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/Bannerlord.UIExtenderEx.Tests/Bannerlord.UIExtenderEx.Tests.csproj b/tests/Bannerlord.UIExtenderEx.Tests/Bannerlord.UIExtenderEx.Tests.csproj index b429dc8a..53d1b800 100644 --- a/tests/Bannerlord.UIExtenderEx.Tests/Bannerlord.UIExtenderEx.Tests.csproj +++ b/tests/Bannerlord.UIExtenderEx.Tests/Bannerlord.UIExtenderEx.Tests.csproj @@ -16,10 +16,10 @@ - - + + - + @@ -62,4 +62,4 @@ - \ No newline at end of file +