3 Commits

Author SHA1 Message Date
b50a6a2f95 Зафиксировать изменения meta.lsx из BG3 Toolkit и правило релизного тега
All checks were successful
Build Mod Package / build (push) Successful in 2s
2026-04-09 07:29:24 +03:00
4646b51459 Подготовить версию v0.2.1 в meta.lsx
All checks were successful
Build Mod Package / build (push) Successful in 3s
2026-04-09 07:03:15 +03:00
a72b7bc1e1 Добавить скрипт обновления версии meta.lsx перед выпуском 2026-04-09 07:00:35 +03:00
3 changed files with 129 additions and 41 deletions

View File

@@ -91,6 +91,12 @@ Current behavior:
Do not manually hardcode release versions in the committed `meta.lsx` for each release if CI can derive them from tags. Do not manually hardcode release versions in the committed `meta.lsx` for each release if CI can derive them from tags.
Release preparation rule:
- before creating a release tag, run `scripts/set-version.ps1 -VersionTag <tag>` to update repository `Mods/DnD 5.5e AIO Russian/meta.lsx`
- only after that commit the change and create/push the release tag
- if `meta.lsx` version was changed manually (for example via BG3 Toolkit), publish using a tag that matches that exact version and do not use a different tag
## info.json Expectations ## info.json Expectations
`info.json` is generated during build and should remain aligned with BG3/BG3ModManager expectations. `info.json` is generated during build and should remain aligned with BG3/BG3ModManager expectations.

View File

@@ -1,40 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<save> <save>
<version major="4" minor="8" revision="0" build="500"/> <version major="4" minor="8" revision="0" build="500"/>
<region id="Config"> <region id="Config">
<node id="root"> <node id="root">
<children> <children>
<node id="Conflicts"/>
<node id="Dependencies"> <node id="Dependencies">
<children> <children>
<node id="ModuleShortDesc"> <node id="ModuleShortDesc">
<attribute id="Folder" type="LSString" value=""/> <attribute id="Folder" type="LSString" value="DnD2024_897914ef-5c96-053c-44af-0be823f895fe"/>
<attribute id="MD5" type="LSString" value=""/> <attribute id="MD5" type="LSString" value="4bd42ca93f895d1ec521a286bea09ef2"/>
<attribute id="Name" type="LSString" value="DnD 5.5e All-in-One BEYOND"/> <attribute id="Name" type="LSString" value="DnD 5.5e All-in-One BEYOND"/>
<attribute id="PublishHandle" type="uint64" value="0"/> <attribute id="PublishHandle" type="uint64" value="4419649"/>
<attribute id="UUID" type="guid" value="897914ef-5c96-053c-44af-0be823f895fe"/> <attribute id="UUID" type="guid" value="897914ef-5c96-053c-44af-0be823f895fe"/>
<attribute id="Version64" type="int64" value="36028797018963968"/> <attribute id="Version64" type="int64" value="144396675937468416"/>
</node> </node>
</children> </children>
</node> </node>
<node id="ModuleInfo"> <node id="ModuleInfo">
<attribute id="Author" type="LSString" value="MikhailRaw"/> <attribute id="Author" type="LSString" value="MikhailRaw"/>
<attribute id="CharacterCreationLevelName" type="FixedString" value=""/> <attribute id="CharacterCreationLevelName" type="FixedString" value=""/>
<attribute id="Description" type="LSString" value="Русская локализация мода, который добавляет и обновляет контент в соответствии с правилами DnD 5.5e и другими источниками, включая предыстории, классы, таланты, расы, заклинания и многое другое. Это отдельный мод локализации и он требует установленный оригинальный мод."/> <attribute id="Description" type="LSString" value="Русская AI локализация мода DnD 5.5e All-in-One BEYOND."/>
<attribute id="FileSize" type="uint64" value="0"/> <attribute id="FileSize" type="uint64" value="0"/>
<attribute id="Folder" type="LSString" value="DnD 5.5e AIO Russian"/> <attribute id="Folder" type="LSString" value="DnD 5.5e AIO Russian"/>
<attribute id="LobbyLevelName" type="FixedString" value=""/> <attribute id="LobbyLevelName" type="FixedString" value=""/>
<attribute id="MD5" type="LSString" value=""/> <attribute id="MD5" type="LSString" value="c0a8f3412870277331306e0719fc6f77"/>
<attribute id="MenuLevelName" type="FixedString" value=""/> <attribute id="MenuLevelName" type="FixedString" value=""/>
<attribute id="Name" type="LSString" value="DnD 5.5e All-in-One BEYOND Russian Localization"/> <attribute id="Name" type="LSString" value="DnD 5.5e All-in-One BEYOND Russian Localization"/>
<attribute id="NumPlayers" type="uint8" value="4"/> <attribute id="NumPlayers" type="uint8" value="4"/>
<attribute id="PhotoBooth" type="FixedString" value=""/> <attribute id="PhotoBooth" type="FixedString" value=""/>
<attribute id="PublishHandle" type="uint64" value="0"/> <attribute id="PublishHandle" type="uint64" value="5965149"/>
<attribute id="StartupLevelName" type="FixedString" value=""/> <attribute id="StartupLevelName" type="FixedString" value=""/>
<attribute id="UUID" type="FixedString" value="6401e84d-daf2-416d-adeb-99c03a2487a6"/> <attribute id="UUID" type="FixedString" value="6401e84d-daf2-416d-adeb-99c03a2487a6"/>
<attribute id="Version64" type="int64" value="36028797018963968"/> <attribute id="Version64" type="int64" value="281477124194306"/>
<children> <children>
<node id="PublishVersion"> <node id="PublishVersion">
<attribute id="Version64" type="int64" value="36028797018963968"/> <attribute id="Version64" type="int64" value="281477124194304"/>
</node>
<node id="Scripts">
<children>
<node id="Script">
<attribute id="UUID" type="FixedString" value="1953f77d-a201-45d7-a194-9b84c34b8461"/>
<children>
<node id="Parameters">
<children>
<node id="Parameter">
<attribute id="MapKey" type="FixedString" value="HardcoreOnly"/>
<attribute id="Type" type="int32" value="1"/>
<attribute id="Value" type="LSString" value="0"/>
</node>
</children>
</node>
</children>
</node>
<node id="Script">
<attribute id="UUID" type="FixedString" value="0d6510f5-50a3-4ecd-83d8-134c9a640324"/>
<children>
<node id="Parameters">
<children>
<node id="Parameter">
<attribute id="MapKey" type="FixedString" value="HardcoreOnly"/>
<attribute id="Type" type="int32" value="1"/>
<attribute id="Value" type="LSString" value="0"/>
</node>
</children>
</node>
</children>
</node>
</children>
</node> </node>
</children> </children>
</node> </node>

49
scripts/set-version.ps1 Normal file
View File

@@ -0,0 +1,49 @@
param(
[Parameter(Mandatory = $true)]
[string]$VersionTag,
[string]$MetaPath = "Mods/DnD 5.5e AIO Russian/meta.lsx"
)
$ErrorActionPreference = "Stop"
function Convert-VersionTagToVersion64 {
param(
[string]$Tag
)
$normalized = $Tag
if ($normalized.StartsWith("v")) {
$normalized = $normalized.Substring(1)
}
if ($normalized -notmatch '^\d+(\.\d+){0,3}$') {
throw "Version tag '$Tag' is invalid. Expected format: vX.Y.Z or X.Y.Z"
}
$parts = $normalized.Split(".")
$numbers = @(0, 0, 0, 0)
for ($i = 0; $i -lt $parts.Length; $i++) {
$numbers[$i] = [int]$parts[$i]
}
return ([int64]$numbers[0] -shl 55) -bor ([int64]$numbers[1] -shl 47) -bor ([int64]$numbers[2] -shl 31) -bor [int64]$numbers[3]
}
$resolvedMetaPath = [System.IO.Path]::GetFullPath($MetaPath)
if (-not (Test-Path -LiteralPath $resolvedMetaPath)) {
throw "meta.lsx was not found: '$resolvedMetaPath'."
}
$resolvedVersion64 = Convert-VersionTagToVersion64 -Tag $VersionTag
$metaContent = Get-Content -LiteralPath $resolvedMetaPath -Raw
$versionPattern = '(<attribute id="Version64" type="int64" value=")\d+("/>)'
if ($metaContent -notmatch $versionPattern) {
throw "Version64 attributes were not found in '$resolvedMetaPath'."
}
$updatedMeta = $metaContent -replace $versionPattern, "`${1}$resolvedVersion64`${2}"
$utf8Bom = New-Object System.Text.UTF8Encoding($true)
[System.IO.File]::WriteAllText($resolvedMetaPath, $updatedMeta, $utf8Bom)
Write-Host "[set-version.ps1] Updated '$resolvedMetaPath' to Version64=$resolvedVersion64 (from tag '$VersionTag')."