story: 完善人物履历与建设设定并迁移小说动画V03
This commit is contained in:
@@ -106,8 +106,8 @@ if (-not $fieldArea.Success -or 4 * [int]$fieldArea.Groups[1].Value -ne [int]$fi
|
||||
}
|
||||
Write-Output 'First-harvest and four-field arithmetic checked (fictional setting, not real yield validation)'
|
||||
|
||||
$scriptText = Read-ProjectText '06_AI动漫制作/01_改编开发/03_动画剧本/S01E01_停不下来的夜_V01.txt'
|
||||
$sceneIds = @([regex]::Matches($scriptText, '(?m)^(01-\d{2})\s') | ForEach-Object { $_.Groups[1].Value })
|
||||
$scriptText = Read-ProjectText '06_AI动漫制作/01_改编开发/03_动画剧本/S01E01_留给你的那一碗_V03.fountain'
|
||||
$sceneIds = @([regex]::Matches($scriptText, '(?m)^(?:INT\.|EXT\.|INT\./EXT\.)[^\r\n]*#(01-\d{2})#\s*$') | ForEach-Object { $_.Groups[1].Value })
|
||||
$expectedSceneIds = @(1..16 | ForEach-Object { '01-{0:D2}' -f $_ })
|
||||
if (($sceneIds -join ',') -ne ($expectedSceneIds -join ',')) { $failures.Add('Script scenes must be ordered 01-01 through 01-16') }
|
||||
|
||||
@@ -136,7 +136,7 @@ for ($index = 0; $index -lt $shots.Count; $index++) {
|
||||
}
|
||||
if ($cumulative -ne 75) { $failures.Add("Expected 75 seconds, got $cumulative") }
|
||||
|
||||
$bodyStart = $scriptText.IndexOf('01-01 ')
|
||||
$bodyStart = $scriptText.IndexOf('INT. ')
|
||||
$scriptChars = if ($bodyStart -ge 0) { [regex]::Replace($scriptText.Substring($bodyStart), '\s', '').Length } else { 0 }
|
||||
$novelFiles = Get-ChildItem -LiteralPath (Join-Path $projectRoot '05_小说创作/03_正文/第一卷') -Filter '*.md' -File | Where-Object { $_.Name -match '^\d{2}_' }
|
||||
$novelChars = ($novelFiles | ForEach-Object { [regex]::Replace((Get-Content -LiteralPath $_.FullName -Raw -Encoding UTF8), '\s', '').Length } | Measure-Object -Sum).Sum
|
||||
@@ -229,6 +229,77 @@ if (($mappedSpecies | Sort-Object) -join ',' -ne (($expectedAgeNames | Sort-Obje
|
||||
}
|
||||
Write-Output "Demon taxonomy: $($taxonRows.Count) groups; $($branchRows.Count) branches/cultures; age-source mapping checked"
|
||||
|
||||
function Year-Index([string]$yearText) {
|
||||
if ($yearText -match '^历前(\d+)$') { return 1 - [int]$Matches[1] }
|
||||
return [int]$yearText
|
||||
}
|
||||
|
||||
$ageText = Read-ProjectText '01_角色卡/主要角色年龄表.md'
|
||||
$characterRows = @([regex]::Matches($ageText, '(?m)^\| ([^|]+) \| ([^|]+) \| (历前\d+|\d+) \| (\d+) \|\r?$'))
|
||||
if ($characterRows.Count -ne 24) { $failures.Add('Expected 24 named humanoid age rows') }
|
||||
foreach ($row in $characterRows) {
|
||||
$name = $row.Groups[1].Value
|
||||
$species = $row.Groups[2].Value
|
||||
$age = [int]$row.Groups[4].Value
|
||||
if ($age -ne (874 - (Year-Index $row.Groups[3].Value))) {
|
||||
$failures.Add("Character birth/age mismatch: $name")
|
||||
}
|
||||
if (-not $speciesAdults.ContainsKey($species)) {
|
||||
$failures.Add("Unknown age species for: $name")
|
||||
} elseif ($name -ne '艾达·梅洛' -and $age -lt $speciesAdults[$species]) {
|
||||
$failures.Add("Unexpected underage character: $name")
|
||||
}
|
||||
}
|
||||
$biography = Read-ProjectText '01_角色卡/人物履历与代际.md'
|
||||
$careerSection = ($biography -split '## 家庭锚点', 2)[0]
|
||||
$careerRows = @([regex]::Matches($careerSection, '(?m)^\| ([^|]+) \| (历前\d+|\d+) \| (\d+) \| (历前\d+|\d+) \| ([^|]+) \| (\d+)[^|]+ \| (\d+) \|\r?$'))
|
||||
if ($careerRows.Count -ne 11) { $failures.Add('Expected 11 career chronology rows') }
|
||||
foreach ($row in $careerRows) {
|
||||
$name = $row.Groups[1].Value
|
||||
$birth = Year-Index $row.Groups[2].Value
|
||||
$adultYear = Year-Index $row.Groups[4].Value
|
||||
$careerStart = [regex]::Match($row.Groups[5].Value, '^(历前\d+|\d+)').Value
|
||||
$roleStart = [int]$row.Groups[6].Value
|
||||
if ((874 - $birth) -ne [int]$row.Groups[3].Value -or (874 - $roleStart) -ne [int]$row.Groups[7].Value -or (Year-Index $careerStart) -lt $adultYear -or $roleStart -lt $adultYear) {
|
||||
$failures.Add("Career arithmetic mismatch: $name")
|
||||
}
|
||||
$match = @($characterRows | Where-Object { $_.Groups[1].Value.StartsWith($name) })
|
||||
if ($match.Count -ne 1 -or ($adultYear - $birth) -ne $speciesAdults[$match[0].Groups[2].Value] -or $row.Groups[3].Value -ne $match[0].Groups[4].Value) {
|
||||
$failures.Add("Career/adult source mismatch: $name")
|
||||
}
|
||||
}
|
||||
$cycleRows = @([regex]::Matches($biography, '(?m)^\| (874|883|884|887|902) \| (\d+) \| (\d+) \| (\d+) \|\r?$'))
|
||||
if ($cycleRows.Count -ne 5) { $failures.Add('Expected five Nefra cycle anchors') }
|
||||
foreach ($row in $cycleRows) {
|
||||
$age = [int]$row.Groups[2].Value
|
||||
$cycle = [math]::Floor(($age - 8) / 9) + 1
|
||||
$stage = [math]::Floor(($cycle - 1) / 3) + 1
|
||||
if ($age -ne ([int]$row.Groups[1].Value - 788) -or $cycle -ne [int]$row.Groups[3].Value -or $stage -ne [int]$row.Groups[4].Value) {
|
||||
$failures.Add("Nefra cycle mismatch: $($row.Value)")
|
||||
}
|
||||
}
|
||||
|
||||
$chapterOutline = Read-ProjectText '05_小说创作/02_章节大纲/第一卷_章节大纲.md'
|
||||
$chapterIds = @([regex]::Matches($chapterOutline, '(?m)^\| (\d+) \|') | ForEach-Object { [int]$_.Groups[1].Value })
|
||||
if (($chapterIds -join ',') -ne ((1..24) -join ',')) { $failures.Add('Expected 24 ordered V03 chapter rows') }
|
||||
$episodeText = Read-ProjectText '06_AI动漫制作/01_改编开发/02_分集大纲/第一季_12集分集大纲.md'
|
||||
$episodeIds = @([regex]::Matches($episodeText, '(?m)^\| (\d+) \|') | ForEach-Object { [int]$_.Groups[1].Value })
|
||||
if (($episodeIds -join ',') -ne ((1..12) -join ',')) { $failures.Add('Expected 12 ordered V03 episode rows') }
|
||||
$expectedDrafts = @('00_序章_下班以后.md','01_留给你的那一碗.md','02_灰片留下的事.md','03_贤者之席.md')
|
||||
if (($novelFiles.Name | Sort-Object) -join ',' -ne (($expectedDrafts | Sort-Object) -join ',')) {
|
||||
$failures.Add('Active novel opening must contain only the four V03 drafts')
|
||||
}
|
||||
foreach ($legacy in @(
|
||||
'06_AI动漫制作/03_分镜与镜头/01_镜头表/S01E01_SC12_75秒试片镜头表.md',
|
||||
'06_AI动漫制作/04_生成方案/01_图像提示词/S01E01_SC12_关键帧提示词.md',
|
||||
'06_AI动漫制作/04_生成方案/02_视频提示词/S01E01_SC12_运动提示词.md'
|
||||
)) {
|
||||
if (-not (Read-ProjectText $legacy).Contains('历史V01技术包')) {
|
||||
$failures.Add("Legacy storyboard lacks a history warning: $legacy")
|
||||
}
|
||||
}
|
||||
Write-Output "Characters: $($characterRows.Count); careers: $($careerRows.Count); Nefra cycles: $($cycleRows.Count); chapters: $($chapterIds.Count); episodes: $($episodeIds.Count)"
|
||||
|
||||
Write-Output "Links checked: $linkCount; timeline rows: $timelineRows; scenes: $($sceneIds.Count); scene budget: $sceneTotal sec"
|
||||
Write-Output "Shots: $($shots.Count); shot budget: $cumulative sec; script body non-whitespace chars: $scriptChars"
|
||||
Write-Output "Novel draft files: $($novelFiles.Count); draft non-whitespace chars including headings: $novelChars; PNG references: $pngCount"
|
||||
|
||||
Reference in New Issue
Block a user