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

1.0.2 #22

Merged
merged 8 commits into from
Jul 4, 2024
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
79 changes: 51 additions & 28 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ env:
CARGO_TERM_COLOR: always

jobs:
release:
parser:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Rust stable
uses: actions-rs/toolchain@v1
with:
Expand All @@ -25,74 +26,96 @@ jobs:
working-directory: ./settings-parser

- name: Zip parser
uses: thedoctor0/zip-release@main
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: "TW3_MSF_Parser.zip"
path: "./settings-parser/target/x86_64-pc-windows-msvc/release/settings_parser.exe"

- uses: actions/upload-artifact@v4
with:
name: parser
path: "TW3_MSF_Parser.zip"


scripts:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Remove manifests locally to not include them in released packages
run: find . -type f -name "witcherscript.toml" -delete

- name: Zip modSettingsFramework
uses: thedoctor0/zip-release@main
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: "TW3_MSF_modSettingsFramework.zip"
path: "./modSettingsFramework"
recursive_exclusions: "*/witcherscript.toml"

- name: Zip v1.32 hooks
uses: thedoctor0/zip-release@main
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: "TW3_MSF_Hooks_1.32.zip"
path: "./hooks/v1.32/modSettingsFrameworkHooks"
recursive_exclusions: "*/witcherscript.toml"
- name: Zip v4.00 hooks
uses: thedoctor0/zip-release@main
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: "TW3_MSF_Hooks_4.00.zip"
path: "./hooks/v4.00/modSettingsFrameworkHooks"
recursive_exclusions: "*/witcherscript.toml"
- name: Zip v4.03 hooks
uses: thedoctor0/zip-release@main
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: "TW3_MSF_Hooks_4.03.zip"
path: "./hooks/v4.03/modSettingsFrameworkHooks"
recursive_exclusions: "*/witcherscript.toml"
- name: Zip v4.04 hooks
uses: thedoctor0/zip-release@main
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: "TW3_MSF_Hooks_4.04.zip"
path: "./hooks/v4.04/modSettingsFrameworkHooks"
recursive_exclusions: "*/witcherscript.toml"
- name: Zip v4.04a_REDkit hooks
uses: thedoctor0/zip-release@main
- name: Zip v4.04a_REDkit+ hooks
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: "TW3_MSF_Hooks_4.04a_REDkit.zip"
path: "./hooks/v4.04a_REDkit/modSettingsFrameworkHooks"
recursive_exclusions: "*/witcherscript.toml"
filename: "TW3_MSF_Hooks_4.04a_REDkit+.zip"
path: "./hooks/v4.04a_REDkit+/modSettingsFrameworkHooks"

- name: Zip samples
uses: thedoctor0/zip-release@main
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: "TW3_MSF_Samples.zip"
path: "./samples"
recursive_exclusions: "*/witcherscript.toml"

- uses: actions/upload-artifact@v4
with:
name: scripts
path: "*.zip"

release:
runs-on: ubuntu-latest
needs: [parser, scripts]
if: success()

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: "./artifacts"
merge-multiple: true

- name: Create draft release
uses: ncipollo/release-action@v1
with:
artifacts: >
TW3_MSF_modSettingsFramework.zip,
TW3_MSF_Parser.zip,
TW3_MSF_Samples.zip,
TW3_MSF_Hooks_1.32.zip,
TW3_MSF_Hooks_4.00.zip,
TW3_MSF_Hooks_4.03.zip,
TW3_MSF_Hooks_4.04.zip,
TW3_MSF_Hooks_4.04a_REDkit.zip
artifacts: "artifacts/*.zip"
draft: true
generateReleaseNotes: true
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Framework provides xml parser program. It generates WitcherScript code which mir

1. Go to the [releases page](https://github.com/SpontanCombust/tw3-settings-framework/releases)
2. Download `TW3_MSF_Hooks_vX.XX.zip` appropriate for you game version and copy to the `Mods` directory

:information_source: *With the addition of code annotations introoduced in hotfix patch 4.04a_REDkit on 06.06.2024 all future game versions can use `v4.04a_REDkit+` hooks*

3. Download `TW3_MSF_modSettingsFramework.zip` and copy to the `Mods` directory
4. Use Script Merger to solve any conflicts
5. (Optional) See [remarks](#remarks)
Expand Down
2 changes: 1 addition & 1 deletion doc/cli_specification.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```
TW3 Settings Framework Parser 1.0.1
TW3 Settings Framework Parser 1.0.2
Parses a mod menu XML file and outputs witcher script code representing settings of this menu

USAGE:
Expand Down
2 changes: 1 addition & 1 deletion doc/mod-menu.ws
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated using Mod Settings Framework v1.0.1 by SpontanCombust & Aeltoth
// Code generated using Mod Settings Framework v1.0.2 by SpontanCombust & Aeltoth

class MyModSettings extends ISettingsMaster
{
Expand Down
2 changes: 1 addition & 1 deletion hooks/v1.32/modSettingsFrameworkHooks/witcherscript.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[content]
name = "modSettingsFrameworkHooks"
description = "Vanilla hooks for modSettingsFramework"
version = "1.0.1"
version = "1.0.2"
authors = []
game_version = "1.32"
scripts_root = "content/scripts"
Expand Down
2 changes: 1 addition & 1 deletion hooks/v4.00/modSettingsFrameworkHooks/witcherscript.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[content]
name = "modSettingsFrameworkHooks"
description = "Vanilla hooks for modSettingsFramework"
version = "1.0.1"
version = "1.0.2"
authors = []
game_version = "4.00"
scripts_root = "content/scripts"
Expand Down
2 changes: 1 addition & 1 deletion hooks/v4.03/modSettingsFrameworkHooks/witcherscript.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[content]
name = "modSettingsFrameworkHooks"
description = "Vanilla hooks for modSettingsFramework"
version = "1.0.1"
version = "1.0.2"
authors = []
game_version = "4.03"
scripts_root = "content/scripts"
Expand Down
2 changes: 1 addition & 1 deletion hooks/v4.04/modSettingsFrameworkHooks/witcherscript.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[content]
name = "modSettingsFrameworkHooks"
description = "Vanilla hooks for modSettingsFramework"
version = "1.0.1"
version = "1.0.2"
authors = []
game_version = "4.04"
scripts_root = "content/scripts"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// +++ game/r4Game.ws +++

@addField(CR4Game)
public var m_settingsMasterRegistry : CSettingsMasterRegistry;

// --- game/r4Game.ws ---


// +++ game/gui/commonMainMenuBase.ws +++

@wrapMethod(CR4CommonMainMenuBase)
function OnConfigUI() {
wrappedMethod();

GetSettingsMasterRegistry().ReadAllSettings();
}

// --- game/gui/commonMainMenuBase.ws ---


// +++ game/gui/main_menu/ingameMenu.ws +++

@wrapMethod(CR4IngameMenu)
function SaveChangedSettings() {
var shouldUpdate: bool;

shouldUpdate = this.hasChangedOption;

wrappedMethod();

if (shouldUpdate) {
LogChannel('ModSettingsFramework', "Detected some changes.");
GetSettingsMasterRegistry().ReadAllSettings();
}
}

// --- game/gui/main_menu/ingameMenu.ws ---
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[content]
name = "modSettingsFrameworkHooks"
description = "Vanilla hooks for modSettingsFramework"
version = "1.0.1"
version = "1.0.2"
authors = []
game_version = "4.04a_REDkit"
game_version = "^4.04a_REDkit"
scripts_root = "content/scripts"

# Any dependencies that this project might need
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CSettingsMasterRegistry
{
public const var FRAMEWORK_VERSION : name;
default FRAMEWORK_VERSION = '1.0.0';
default FRAMEWORK_VERSION = '1.0.2';

private var m_settingsEntries : array<ISettingsMaster>;

Expand Down
4 changes: 2 additions & 2 deletions modSettingsFramework/witcherscript.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ description = """
Framework for modding Witcher 3 that simplifies the pipeline of using mod settings by generating code
based directly on mod menu XML and providing extendible interface for reacting to changes of settings.
"""
version = "1.0.1"
version = "1.0.2"
authors = []
game_version = "4.04"
scripts_root = "content/scripts"

# Any dependencies that this project might need
[dependencies]
content0 = true
modSettingsFrameworkHooks = { path = "../hooks/v4.04a_REDkit/modSettingsFrameworkHooks" }
modSettingsFrameworkHooks = { path = "../hooks/v4.04a_REDkit+/modSettingsFrameworkHooks" }

# For details check the manual
# https://spontancombust.github.io/witcherscript-ide/user-manual/project-system/#manifest-format
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated using Mod Settings Framework v1.0.1 by SpontanCombust & Aeltoth
// Code generated using Mod Settings Framework v1.0.2 by SpontanCombust & Aeltoth

class ModDifficultySettingsBase extends ISettingsMaster
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Basic information about this project
[content]
name = "modSampleDifficultyMod"
version = "1.0.1"
version = "1.0.2"
authors = []
game_version = "4.04"
scripts_root = "content/scripts"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated using Mod Settings Framework v1.0.1 by SpontanCombust & Aeltoth
// Code generated using Mod Settings Framework v1.0.2 by SpontanCombust & Aeltoth

class MonsterOfTheWeekSettings extends ISettingsMaster
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Basic information about this project
[content]
name = "modSampleMonsterOfTheWeek"
version = "1.0.1"
version = "1.0.2"
authors = []
game_version = "4.04"
scripts_root = "content/scripts"
Expand Down
2 changes: 1 addition & 1 deletion settings-parser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tw3-mod-settings-framework-parser"
version = "1.0.1"
version = "1.0.2"
edition = "2021"

[[bin]]
Expand Down
Loading