Import current DEMON v0.19 source, assets and development handoff
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
param([Parameter(Mandatory=$true)][string]$GodotExe)
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$project=Join-Path $repo 'Demon_v0.12'
|
||||
$output=Join-Path $repo 'Demon_v0.12_Windows'
|
||||
$engine=(Resolve-Path -LiteralPath $GodotExe).Path
|
||||
$template=Join-Path $PSScriptRoot 'templates/windows_release_x86_64.exe'
|
||||
if(-not (Test-Path -LiteralPath $template)){throw 'Run tools/fetch_windows_template.py first.'}
|
||||
New-Item -ItemType Directory -Force -Path $output | Out-Null
|
||||
& $engine --headless --path $project --editor --import
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot import failed'}
|
||||
# The enabled EditorExportPlugin embeds a fresh random ID on every export.
|
||||
& $engine --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'Demon.exe')
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot export failed'}
|
||||
Write-Output (Join-Path $output 'Demon.exe')
|
||||
@@ -0,0 +1,13 @@
|
||||
param([string]$GodotExe=(Join-Path $PSScriptRoot 'godot/Godot_v4.3-stable_win64_console.exe'))
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$project=Join-Path $repo 'Demon_v0.13'
|
||||
$output=Join-Path $repo 'Demon_v0.13_Windows'
|
||||
$engine=(Resolve-Path -LiteralPath $GodotExe).Path
|
||||
if(-not (Test-Path -LiteralPath (Join-Path $PSScriptRoot 'templates/windows_release_x86_64.exe'))){throw 'Download the official template with tools/fetch_windows_template.py first.'}
|
||||
New-Item -ItemType Directory -Force -Path $output | Out-Null
|
||||
& $engine --headless --path $project --editor --import --quit
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot import failed'}
|
||||
& $engine --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'Demon.exe')
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot export failed'}
|
||||
Write-Output (Join-Path $output 'Demon.exe')
|
||||
@@ -0,0 +1,13 @@
|
||||
param([string]$GodotExe=(Join-Path $PSScriptRoot 'godot/Godot_v4.3-stable_win64_console.exe'))
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$project=Join-Path $repo 'Demon_v0.13.1'
|
||||
$output=Join-Path $repo 'Demon_v0.13.1_Windows'
|
||||
$engine=(Resolve-Path -LiteralPath $GodotExe).Path
|
||||
if(-not (Test-Path -LiteralPath (Join-Path $PSScriptRoot 'templates/windows_release_x86_64.exe'))){throw 'Download the official template with tools/fetch_windows_template.py first.'}
|
||||
New-Item -ItemType Directory -Force -Path $output | Out-Null
|
||||
& $engine --headless --path $project --editor --import --quit
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot import failed'}
|
||||
& $engine --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'Demon.exe')
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot export failed'}
|
||||
Write-Output (Join-Path $output 'Demon.exe')
|
||||
@@ -0,0 +1,13 @@
|
||||
param([string]$GodotExe=(Join-Path $PSScriptRoot 'godot/Godot_v4.3-stable_win64_console.exe'))
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$project=Join-Path $repo 'Demon_v0.14'
|
||||
$output=Join-Path $repo 'Demon_v0.14_Windows'
|
||||
$engine=(Resolve-Path -LiteralPath $GodotExe).Path
|
||||
if(-not (Test-Path -LiteralPath (Join-Path $PSScriptRoot 'templates/windows_release_x86_64.exe'))){throw 'Download the official template with tools/fetch_windows_template.py first.'}
|
||||
New-Item -ItemType Directory -Force -Path $output | Out-Null
|
||||
& $engine --headless --path $project --editor --import --quit
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot import failed'}
|
||||
& $engine --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'Demon.exe')
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot export failed'}
|
||||
Write-Output (Join-Path $output 'Demon.exe')
|
||||
@@ -0,0 +1,13 @@
|
||||
param([string]$GodotExe=(Join-Path $PSScriptRoot 'godot/Godot_v4.3-stable_win64_console.exe'))
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$project=Join-Path $repo 'Demon_v0.15'
|
||||
$output=Join-Path $repo 'Demon_v0.15_Windows'
|
||||
$engine=(Resolve-Path -LiteralPath $GodotExe).Path
|
||||
if(-not (Test-Path -LiteralPath (Join-Path $PSScriptRoot 'templates/windows_release_x86_64.exe'))){throw 'Download the official template with tools/fetch_windows_template.py first.'}
|
||||
New-Item -ItemType Directory -Force -Path $output | Out-Null
|
||||
& $engine --headless --path $project --editor --import --quit
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot import failed'}
|
||||
& $engine --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'Demon.exe')
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot export failed'}
|
||||
Write-Output (Join-Path $output 'Demon.exe')
|
||||
@@ -0,0 +1,13 @@
|
||||
param([string]$GodotExe=(Join-Path $PSScriptRoot 'godot/Godot_v4.3-stable_win64_console.exe'))
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$project=Join-Path $repo 'Demon_v0.16'
|
||||
$output=Join-Path $repo 'Demon_v0.16_Windows'
|
||||
$engine=(Resolve-Path -LiteralPath $GodotExe).Path
|
||||
if(-not (Test-Path -LiteralPath (Join-Path $PSScriptRoot 'templates/windows_release_x86_64.exe'))){throw 'Download the official template with tools/fetch_windows_template.py first.'}
|
||||
New-Item -ItemType Directory -Force -Path $output | Out-Null
|
||||
& $engine --headless --path $project --editor --import --quit
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot import failed'}
|
||||
& $engine --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'Demon.exe')
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot export failed'}
|
||||
Write-Output (Join-Path $output 'Demon.exe')
|
||||
@@ -0,0 +1,13 @@
|
||||
param([string]$GodotExe=(Join-Path $PSScriptRoot 'godot/Godot_v4.3-stable_win64_console.exe'))
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$project=Join-Path $repo 'Demon_v0.17'
|
||||
$output=Join-Path $repo 'Demon_v0.17_Windows'
|
||||
$engine=(Resolve-Path -LiteralPath $GodotExe).Path
|
||||
if(-not (Test-Path -LiteralPath (Join-Path $PSScriptRoot 'templates/windows_release_x86_64.exe'))){throw 'Download the official template with tools/fetch_windows_template.py first.'}
|
||||
New-Item -ItemType Directory -Force -Path $output | Out-Null
|
||||
& $engine --headless --path $project --editor --import --quit
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot import failed'}
|
||||
& $engine --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'Demon.exe')
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot export failed'}
|
||||
Write-Output (Join-Path $output 'Demon.exe')
|
||||
@@ -0,0 +1,13 @@
|
||||
param([string]$GodotExe=(Join-Path $PSScriptRoot 'godot/Godot_v4.3-stable_win64_console.exe'))
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$project=Join-Path $repo 'Demon_v0.18'
|
||||
$output=Join-Path $repo 'Demon_v0.18_Windows'
|
||||
$engine=(Resolve-Path -LiteralPath $GodotExe).Path
|
||||
if(-not (Test-Path -LiteralPath (Join-Path $PSScriptRoot 'templates/windows_release_x86_64.exe'))){throw 'Download the official template with tools/fetch_windows_template.py first.'}
|
||||
New-Item -ItemType Directory -Force -Path $output | Out-Null
|
||||
& $engine --headless --path $project --editor --import --quit
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot import failed'}
|
||||
& $engine --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'Demon.exe')
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot export failed'}
|
||||
Write-Output (Join-Path $output 'Demon.exe')
|
||||
@@ -0,0 +1,13 @@
|
||||
param([string]$GodotExe=(Join-Path $PSScriptRoot 'godot/Godot_v4.3-stable_win64_console.exe'))
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$project=Join-Path $repo 'Demon_v0.18.1'
|
||||
$output=Join-Path $repo 'Demon_v0.18.1_Windows'
|
||||
$engine=(Resolve-Path -LiteralPath $GodotExe).Path
|
||||
if(-not (Test-Path -LiteralPath (Join-Path $PSScriptRoot 'templates/windows_release_x86_64.exe'))){throw 'Download the official template with tools/fetch_windows_template.py first.'}
|
||||
New-Item -ItemType Directory -Force -Path $output | Out-Null
|
||||
& $engine --headless --path $project --editor --import --quit
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot import failed'}
|
||||
& $engine --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'Demon.exe')
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot export failed'}
|
||||
Write-Output (Join-Path $output 'Demon.exe')
|
||||
@@ -0,0 +1,13 @@
|
||||
param([string]$GodotExe=(Join-Path $PSScriptRoot 'godot/Godot_v4.3-stable_win64_console.exe'))
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$project=Join-Path $repo 'Demon_v0.19'
|
||||
$output=Join-Path $repo 'Demon_v0.19_Windows'
|
||||
$engine=(Resolve-Path -LiteralPath $GodotExe).Path
|
||||
if(-not (Test-Path -LiteralPath (Join-Path $PSScriptRoot 'templates/windows_release_x86_64.exe'))){throw 'Download the official template with tools/fetch_windows_template.py first.'}
|
||||
New-Item -ItemType Directory -Force -Path $output | Out-Null
|
||||
& $engine --headless --path $project --editor --import --quit
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot import failed'}
|
||||
& $engine --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'Demon.exe')
|
||||
if($LASTEXITCODE -ne 0){throw 'Godot export failed'}
|
||||
Write-Output (Join-Path $output 'Demon.exe')
|
||||
@@ -0,0 +1,50 @@
|
||||
extends RefCounted
|
||||
|
||||
func shot(g,name):
|
||||
await g.get_tree().create_timer(.55).timeout
|
||||
await RenderingServer.frame_post_draw
|
||||
var folder="res://captures/v013" if OS.has_feature("editor") else OS.get_executable_path().get_base_dir()+"/captures/v013"
|
||||
DirAccess.make_dir_recursive_absolute(folder)
|
||||
var error=g.get_viewport().get_texture().get_image().save_png(folder+"/"+name+".png")
|
||||
if error!=OK:push_error("Capture failed");g.get_tree().quit(1);return
|
||||
print("CAPTURE: "+name)
|
||||
|
||||
func clear_souls(g):
|
||||
for s in g.souls:s.node.queue_free()
|
||||
g.souls.clear()
|
||||
for d in g.workshop.stations:d.soul=-1;d.ready=false;d.operator=-1;d.bar.hide()
|
||||
|
||||
func soul(g,required):
|
||||
g.workshop.spawn();var s=g.souls.back();s.entering=false;s.entry_time=1;s.required=required;s.served=[]
|
||||
g.set_soul_reveal(s.visual,1);g.workshop.sentences.update_label(s)
|
||||
return s
|
||||
|
||||
func run(g):
|
||||
await g.get_tree().create_timer(.4).timeout
|
||||
g.start_game();clear_souls(g);g.coins=5000;g.development.xp=300
|
||||
var w=g.workshop;w.unlock=5
|
||||
w.add_station(0,Vector3(-1,0,3))
|
||||
w.add_station(2,Vector3(1,0,-1.5))
|
||||
w.add_station(4,Vector3(4.5,0,1.5))
|
||||
w.add_station(5,Vector3(8,0,-1));w.rebuild_nav();w.add_helper();w.helpers[0].state="review";w.refresh()
|
||||
w.toggle_build();w.begin_purchase(4);w.rotate_pending(1)
|
||||
w.pointer_position=g.camera.unproject_position(Vector3(8.5,.18,3.5));w.update_preview()
|
||||
await shot(g,"construction")
|
||||
w.cancel_placement();w.click_station(2);await shot(g,"device-actions")
|
||||
w.toggle_build();w.toggle_tree();await shot(g,"grimoire")
|
||||
w.tree.find_children("*","ScrollContainer",true,false)[0].scroll_vertical=240
|
||||
await shot(g,"grimoire-arsenal");w.toggle_tree()
|
||||
var a=soul(g,[0,2]);w.attach(a,0);w.step_station(w.stations[0],1,false)
|
||||
for i in range(5):w.step_station(w.stations[0],.5,true)
|
||||
var b=soul(g,[4,5]);w.attach(b,2);w.step_station(w.stations[2],1,false);w.step_station(w.stations[2],2,true)
|
||||
var c=soul(g,[5]);w.attach(c,3);w.step_station(w.stations[3],1,false);w.step_station(w.stations[3],3,true)
|
||||
w.dialogue_clock=6;w.announce_soul(a,"Я на два пункта не подписывался!")
|
||||
await shot(g,"sentences-dialogues")
|
||||
g.paused=true;g.camera.size=10;g.camera.position=Vector3(14,13,14);g.camera.look_at(Vector3(6,1.1,.5))
|
||||
await shot(g,"new-apparatus")
|
||||
clear_souls(g);g.paused=false;g.camera.size=20;g.orbit.update(1)
|
||||
for i in range(7):w.spawn()
|
||||
for i in range(720):g.time+=1.0/60;w.update(1.0/60)
|
||||
await shot(g,"queue-pressure")
|
||||
print("CAPTURE_BUILD: "+g.build_id)
|
||||
g.get_tree().quit()
|
||||
@@ -0,0 +1,22 @@
|
||||
from pathlib import Path
|
||||
root=Path(__file__).resolve().parent.parent/'Demon_v0.15'
|
||||
p=root/'endless.gd';s=p.read_text(encoding='utf-8-sig')
|
||||
start=s.index('\td.block(Vector3(0,-0.65,0)');end=s.index('\td.entrance(',start)
|
||||
part=s[start:end]
|
||||
part=part.replace('Vector3(0,-0.65,0),Vector3(16.2,1.25,13.4)','Vector3(2.025,-0.65,0),Vector3(20.25,1.25,13.4)')
|
||||
part=part.replace('range(32)','range(40)').replace('side*7.95','(-7.95 if side<0 else 12.0)').replace('range(-8,8)','range(-8,12)').replace('[-7.9,0,7.9]','[-7.9,0,6.0,11.95]')
|
||||
s=s[:start]+part+s[end:]
|
||||
s=s.replace('range(-7,8):','range(-7,12):').replace('Vector3(7.9,y,6.62)','Vector3(11.95,y,6.62)')
|
||||
s=s.replace('Vector3(8.5,1.8,3)','Vector3(12.55,1.8,3)')
|
||||
s=s.replace('g.set_meta("endless_room_count",room_count+1)','g.set_meta("endless_room_count",room_count+1)\n\tg.set_meta("level_area_scale",1.25)\n\tg.set_meta("main_floor_tiles",1120)')
|
||||
p.write_text(s,encoding='utf-8')
|
||||
p=root/'focus_bokeh.gdshader';s=p.read_text().replace('abs(world.x)-8.25','max(-world.x-8.25,world.x-12.3)');p.write_text(s)
|
||||
p=root/'workshop.gd';s=p.read_text(encoding='utf-8-sig')
|
||||
s=s.replace('["lock","Арсенал бездны","Следующая глава · скоро","future"]','["speaker","Музыкальный стул","300 золота · колонки и попса","unlock4"],["cauldron","Котёл","380 золота · кипящий отвар","unlock5"],["lock","Арсенал бездны","Следующая глава · скоро","future"]')
|
||||
s=s.replace(''' for i in range(spec.nodes.size()):''',''' var scroll=ScrollContainer.new();column.add_child(scroll);scroll.custom_minimum_size=Vector2(376,500);scroll.horizontal_scroll_mode=ScrollContainer.SCROLL_MODE_DISABLED
|
||||
var branch=VBoxContainer.new();scroll.add_child(branch);branch.size_flags_horizontal=Control.SIZE_EXPAND_FILL;branch.add_theme_constant_override("separation",0)
|
||||
for i in range(spec.nodes.size()):''')
|
||||
s=s.replace('column.add_child(link)','branch.add_child(link)').replace('Vector2(370,14)','Vector2(356,14)').replace('Vector2(187,0)','Vector2(178,0)')
|
||||
s=s.replace('action(column,"",func():upgrade(key))','action(branch,"",func():upgrade(key))').replace('Vector2(376,108)','Vector2(356,108)')
|
||||
p.write_text(s,encoding='utf-8')
|
||||
print('Level area +25%, 1120 floor tiles; expanded build zone and scrollable arsenal')
|
||||
@@ -0,0 +1,41 @@
|
||||
"""Fetch only the Windows x64 release entry from the official Godot template ZIP.
|
||||
HTTP ranges avoid downloading the Android/Linux/macOS templates (1 GB total).
|
||||
zipfile verifies the selected member's CRC on read. No downloaded code is run.
|
||||
"""
|
||||
import io, urllib.request, zipfile
|
||||
from pathlib import Path
|
||||
URL='https://github.com/godotengine/godot-builds/releases/download/4.3-stable/Godot_v4.3-stable_export_templates.tpz'
|
||||
class RemoteZip(io.RawIOBase):
|
||||
def __init__(self):
|
||||
self.pos=0
|
||||
req=urllib.request.Request(URL,headers={'Range':'bytes=0-0','User-Agent':'Demon-build/0.4'})
|
||||
with urllib.request.urlopen(req,timeout=60) as r:
|
||||
if r.status!=206: raise RuntimeError('Server did not honor HTTP Range')
|
||||
self.size=int(r.headers['Content-Range'].split('/')[-1])
|
||||
self.url=r.url
|
||||
def seekable(self): return True
|
||||
def readable(self): return True
|
||||
def tell(self): return self.pos
|
||||
def seek(self,offset,whence=0):
|
||||
self.pos=offset if whence==0 else self.pos+offset if whence==1 else self.size+offset
|
||||
return self.pos
|
||||
def read(self,n=-1):
|
||||
if n<0: n=self.size-self.pos
|
||||
n=min(n,self.size-self.pos)
|
||||
if n<=0:return b''
|
||||
req=urllib.request.Request(self.url,headers={'Range':f'bytes={self.pos}-{self.pos+n-1}','User-Agent':'Demon-build/0.4'})
|
||||
with urllib.request.urlopen(req,timeout=120) as r:
|
||||
if r.status!=206: raise RuntimeError('Range response required')
|
||||
start=int(r.headers['Content-Range'].split(' ')[1].split('-')[0])
|
||||
if start!=self.pos:raise RuntimeError('Unexpected range')
|
||||
data=r.read()
|
||||
if len(data)!=n:raise RuntimeError('Incomplete range')
|
||||
self.pos+=n
|
||||
return data
|
||||
with zipfile.ZipFile(RemoteZip()) as z:
|
||||
names=[x for x in z.namelist() if x.endswith('windows_release_x86_64.exe')]
|
||||
if len(names)!=1:raise RuntimeError(str([x for x in z.namelist() if 'windows' in x]))
|
||||
out=Path(__file__).resolve().parent/'templates'/'windows_release_x86_64.exe'
|
||||
out.parent.mkdir(exist_ok=True)
|
||||
out.write_bytes(z.read(names[0]))
|
||||
print(f'Official Windows template: {out} ({out.stat().st_size} bytes), ZIP CRC verified')
|
||||
@@ -0,0 +1,69 @@
|
||||
from pathlib import Path
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.14'
|
||||
readme='''# Demon 0.14 — очередь и поворот орудий
|
||||
|
||||
Godot 4.3 stable, Windows x64, Forward+ / Vulkan. Предыдущие версии сохранены отдельно.
|
||||
|
||||
## Новое в 0.14
|
||||
|
||||
- Очередь занимает один ряд у ворот и вмещает 7 ожидающих душ. Новая душа приходит каждые 3 секунды, пока есть место. При заполнении ворота ждут; после освобождения места приём продолжается. Душа, которую несёт игрок, сохраняет своё место до размещения или возврата в очередь.
|
||||
- При семи ожидающих сцену постепенно затемняет. После сокращения очереди затемнение плавно уходит. Счётчик, предупреждения и интерфейс остаются читаемыми.
|
||||
- При размещении и переносе колесо мыши поворачивает орудие на 90° в обе стороны. Поворачиваются модель, прямоугольник размещения, коллизии и сторона подхода. Помощницы подходят с правильной стороны; положение и угол сохраняются.
|
||||
- Установка, перенос с подтверждением и удаление сопровождаются новыми оригинальными механическими звуками. Они подчиняются общей громкости эффектов и выключению звука. Отмена и запрещённое размещение не издают звук подтверждения.
|
||||
- Шрифт интерфейса стал жирнее. Увеличены подписи, выровнены карточки талантов, отступы, заголовки и подсказки. Длинный текст переносится по ширине.
|
||||
|
||||
## Быстрый старт
|
||||
|
||||
Запустите Demon.exe. Для готовой игры Godot устанавливать не нужно.
|
||||
|
||||
Новая игра выдаёт 240 золота и пустую рабочую зону. B открывает строительство; T — гримуар. Эти режимы останавливают время. Первое орудие стоит 40 золота; эта сумма резервируется, пока в цехе нет орудий, чтобы нельзя было потратить весь стартовый бюджет на свиту и чертежи.
|
||||
|
||||
## Управление
|
||||
|
||||
- WASD / стрелки — движение относительно камеры.
|
||||
- Средняя кнопка с движением мыши — вращение камеры; колесо вне строительства — масштаб.
|
||||
- ЛКМ по близкой душе — следование за игроком. Подведите душу к стороне подхода свободного орудия: она автоматически займёт место. ЛКМ по пустому полу возвращает душу в очередь.
|
||||
- ЛКМ по душе у алтаря плети — удар, нужно пять ударов. Контекстное меню в обычной игре не появляется.
|
||||
- ПКМ рядом со стороной подхода — работать у дыбы, колеса или девы. Интерфейс блокирует действие ПКМ.
|
||||
- B — строительство. Выберите покупку или нажмите на существующее орудие и выберите «Переместить». Модель следует за мышью по клеткам. Зелёный цвет — место свободно, красный — поставить нельзя.
|
||||
- Колесо при выбранном орудии — поворот на 90°. ЛКМ — подтвердить, ПКМ / Esc — отменить. Отмена переноса возвращает исходные позицию и угол.
|
||||
- «Переместить / Удалить» доступны только в строительстве. Занятые и зарезервированные орудия, а также орудия во время сгорания переносить и удалять нельзя.
|
||||
- T — три вертикальные ветки развития. Esc — закрыть окно / отменить выбор / пауза. M — выключить звук.
|
||||
- F5 — тестовый бонус +1000 золота и максимальный уровень без повторного начисления очков.
|
||||
|
||||
## Экономика и развитие
|
||||
|
||||
Экземпляр алтаря стоит 40 золота, дыбы — 80, колеса — 140, девы — 220. Чертежи старших орудий предварительно изучаются за 80 / 140 / 220 золота. Чертёж покупается один раз; экземпляры — отдельно. Перенос бесплатный. Удаление возвращает 50% стоимости, а удаление последнего орудия — 100%, чтобы можно было перестроить цех.
|
||||
|
||||
Награда за душу — 10 золота и 20 опыта. Максимум 7 уровней, 6 очков личных талантов.
|
||||
|
||||
Гримуар разделён на три колонки с иконками:
|
||||
|
||||
1. Орудия — последовательные чертежи за золото.
|
||||
2. Суккуба — скорость движения (+25% за ранг) и действий (+20% за ранг), по три ранга за очки опыта.
|
||||
3. Свита — до трёх помощниц за 80 / 160 / 240 золота; общая скорость за 60 / 120 / 180; «Надсмотрщицы» за 180 золота после первого ранга скорости открывают самостоятельную работу у орудий.
|
||||
|
||||
Без «Надсмотрщиц» помощницы только доставляют души. Они выбирают старшую доступную душу, резервируют отдельное свободное орудие и идут по проходам. После обучения помощница обрабатывает доставленную душу и возвращается за следующей. Будущие узлы развития обозначены и не продаются.
|
||||
|
||||
Дыба требует натяжения 1 секунду и непрерывного удержания 2 секунды. Отпускание сбрасывает обязательное удержание. Колесо требует вращения 5 секунд; дева сначала закрывается, затем нагревается 3 секунды. Обязательное удержание на дыбе не ускоряется навыком.
|
||||
|
||||
## Сохранения и проверка
|
||||
|
||||
Планировка, углы орудий, золото, таланты и свита сохраняются автоматически внутри одной сборки. «Продолжить» восстанавливает обустройство, но очередь и незавершённые действия начинают новую смену. «Новая игра» сбрасывает прогресс. Настройки хранятся отдельно. Новый экспорт получает отдельный build ID.
|
||||
|
||||
Исходники открываются через project.godot в Godot 4.3. Экспорт: tools/build_v14.ps1 -GodotExe <путь к Godot 4.3>. Нужен официальный Windows-шаблон (tools/fetch_windows_template.py). Плагин addons/build_stamp должен быть включён.
|
||||
|
||||
Проверки готового EXE: -- --test-mode, --test-ui, --test-audio. Тесты включают лимит очереди и возврат души, поворот нес квадратного орудия, подход и навигацию, отмену/подтверждение, сохранение угла, звуки и регрессию меню при ударах. Журналы — QA, кадры — captures/v013. Тестовые режимы не меняют пользовательские сохранения.
|
||||
|
||||
Модели, фоновые звуки и шрифты: MODEL_CREDITS.md, AUDIO_CREDITS.md, MODEL_LICENSE_CC0.txt и файлы OFL. Звуки строительства созданы процедурно без сторонних семплов; генератор tools/make_build_sfx.py включён в исходники.
|
||||
'''.replace('нес квадратного','не квадратного')
|
||||
for name in ['README_RU.md','README_0.13.md']:(src/name).write_text(readme,encoding='utf-8')
|
||||
p=src/'AUDIO_CREDITS.md'
|
||||
data=p.read_text(encoding='utf-8-sig')
|
||||
data+='\n\n## Оригинальные эффекты строительства, версия 0.14\n\n`apparatus_place.wav` и `apparatus_remove.wav` созданы процедурно для проекта, без сторонних семплов. Детерминированный генератор: `tools/make_build_sfx.py`. Общая громкость эффектов и master mute применяются к обоим звукам.\n'
|
||||
p.write_text(data,encoding='utf-8')
|
||||
p=root/'tools/package_v14.py'
|
||||
data=p.read_text(encoding='utf-8-sig').replace("'build_v14.ps1','fetch_windows_template.py','package_v14.py'","'build_v14.ps1','fetch_windows_template.py','package_v14.py','make_build_sfx.py'")
|
||||
p.write_text(data,encoding='utf-8')
|
||||
print('Documentation and packaging updated')
|
||||
@@ -0,0 +1,43 @@
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.15'
|
||||
old=(root/'Demon_v0.14/README_RU.md').read_text(encoding='utf-8-sig')
|
||||
old=old[old.index('## Быстрый старт'):]
|
||||
old=old.replace('Demon_v0.14','Demon_v0.15').replace('build_v14.ps1','build_v15.ps1')
|
||||
old=old.replace('Награда за душу — 10 золота и 20 опыта.','Награда за душу — 10 золота и 20 опыта за каждый пункт наказания. Вся награда выдаётся только после завершения полного списка.')
|
||||
old=old.replace('девы — 220.','девы — 220, музыкального стула — 300, котла — 380.')
|
||||
old=old.replace('за 80 / 140 / 220 золота','за 80 / 140 / 220 / 300 / 380 золота')
|
||||
old=old.replace('ЛКМ по пустому полу возвращает душу в очередь.','ЛКМ по пустому полу возвращает новую душу в очередь, а душу с выполненным этапом — к предыдущему орудию.')
|
||||
old=old.replace('переносить и удалять нельзя.','переносить и удалять нельзя. Последний экземпляр орудия также нельзя удалить, пока оно нужно незавершённым наказаниям; использовать перемещение можно.')
|
||||
intro='''# Demon 0.15 — список наказаний
|
||||
|
||||
Godot 4.3 stable, Windows x64, Forward+ / Vulkan. Предыдущие версии сохранены отдельно.
|
||||
|
||||
## Новое в 0.15
|
||||
|
||||
- Над головой каждой души указан список требуемых наказаний. `[ ]` означает невыполненный пункт, `[+]` — завершённый.
|
||||
- На первом уровне у души одно наказание. Со второго уровня появляются варианты с двумя, с четвёртого — с тремя. Варианты различаются; максимум ограничен количеством разных установленных орудий. Задания не назначаются для орудий, которых нет в цехе.
|
||||
- Орудия можно проходить в любом порядке. После промежуточного этапа душа остаётся у орудия и ждёт переноса. ЛКМ по ней рядом со стороной подхода позволяет забрать её. После доставки к следующему подходящему орудию старое место освобождается. Отмена переноса возвращает душу на прежнее место.
|
||||
- Уже выполненное или постороннее наказание повторно не засчитывается. Сгорание и награда происходят один раз, только после выполнения всего списка. Награда за каждый пункт — 10 золота и 20 опыта.
|
||||
- Помощницы выбирают только подходящие свободные орудия и в первую очередь продолжают незаконченные цепочки. С изученными «Надсмотрщицами» они самостоятельно доставляют и обрабатывают душу на всех этапах. Без этого улучшения остаются перевозчицами.
|
||||
- Площадь основной платформы увеличена на 25%: ширина 20,25 вместо 16,2 при прежней глубине 13,4. Плит стало 1120 вместо 896. Рабочая сетка расширена до 12×9 клеток; границы движения, навигация, камера и зона резкости учитывают расширение.
|
||||
- Добавлен музыкальный стул с колонками, оковами и цепями. Наказание длится 6 секунд удержания ПКМ. Звучит оригинальная восьмисекундная поп-петля, созданная без сторонних записей. Мелодия затихает под голосами и останавливается на паузе и после этапа.
|
||||
- Добавлен котёл с кипящим отваром, пузырьками и огнём. Наказание длится 7 секунд удержания ПКМ. Навык скорости действий ускоряет оба новых орудия.
|
||||
- Помощницы окрашены в синий цвет; материалы главной героини остаются прежними.
|
||||
- Реплики душ снова появляются автоматически, при работе и переносе. В облачке указывается говорящий, воспроизводится соответствующий голос. Диалоги замораживаются на паузе. Реплики очереди вынесены в сторону, чтобы не закрывать списки наказаний.
|
||||
- Новые чертежи добавлены в первую колонку гримуара; длинная ветка прокручивается.
|
||||
|
||||
'''
|
||||
for name in ['README_RU.md','README_0.13.md']:(src/name).write_text(intro+old+'\n\nДополнительная проверка цепочек: `Demon.exe -- --test-sentences`. Она проверяет 1/2/3 наказания, промежуточные переносы, ошибочные орудия, итоговую награду, автоматическую цепочку помощницы, цвета и диалоги.\n',encoding='utf-8')
|
||||
p=src/'AUDIO_CREDITS.md';s=p.read_text(encoding='utf-8-sig')
|
||||
s+='\n\n## Оригинальная поп-петля, 0.15\n\n`infernal_pop.wav` — оригинальная процедурная восьмисекундная синтезированная мелодия с басом и ритмом. Сторонние записи, песни, исполнители и семплы не использованы. Генератор `tools/make_infernal_pop.py` включён в исходники.\n'
|
||||
p.write_text(s,encoding='utf-8')
|
||||
p=root/'tools/package_v15.py';s=p.read_text(encoding='utf-8-sig')
|
||||
s=s.replace("'release-tests.log':'ALL WORKSHOP TESTS PASSED',","'release-tests.log':'ALL WORKSHOP TESTS PASSED',\n 'release-sentences.log':'ALL SENTENCE TESTS PASSED',")
|
||||
s=s.replace("'maximum_helpers':3,","'maximum_helpers':3,'apparatus_types':6,'maximum_punishments':3,'level_area_scale':1.25,")
|
||||
s=s.replace("'release_capture':'passed'","'release_capture':'passed','release_sentences':'passed'")
|
||||
s=s.replace("'package_v15.py','make_build_sfx.py'","'package_v15.py','make_infernal_pop.py'")
|
||||
p.write_text(s,encoding='utf-8')
|
||||
p=root/'tools/make_infernal_pop.py';s=p.read_text().replace('(math.sin(TAU*f*t) if False else math.sin(2*math.pi*f*t))','math.sin(2*math.pi*f*t)');p.write_text(s)
|
||||
print('0.15 documentation, music credits and release verification updated')
|
||||
@@ -0,0 +1,35 @@
|
||||
from pathlib import Path
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.16'
|
||||
body=(root/'Demon_v0.15/README_RU.md').read_text(encoding='utf-8-sig')
|
||||
body=body[body.index('## Быстрый старт'):]
|
||||
body=body.replace('Demon_v0.15','Demon_v0.16').replace('build_v15.ps1','build_v16.ps1')
|
||||
intro='''# Demon 0.16 — минимальный интерфейс
|
||||
|
||||
Godot 4.3 stable, Windows x64, Forward+ / Vulkan. Предыдущие версии сохранены отдельно.
|
||||
|
||||
## Интерфейс 0.16
|
||||
|
||||
- В игровом HUD сверху справа остаются только два счётчика: значок монеты с количеством золота и значок души с количеством обработанных душ. Текстовых названий ресурсов нет.
|
||||
- Снизу справа находятся две отдельные кнопки-иконки: строительство и гримуар. Подсказка при наведении показывает название и горячую клавишу. Старые нижние кнопки, их подложка, логотип, боковая статистика, текстовые инструкции и уведомления убраны с игрового экрана. У скрытых областей нет активных зон мыши.
|
||||
- B / T открывают строительство и гримуар; Esc управляет паузой, M отключает звук. Окна строительства, развития и настроек продолжают работать.
|
||||
- Над душой вместо текста показываются до трёх иконок наказаний. Используются точно те же пиктограммы, что в каталоге орудий. Зелёная отметка означает выполненный этап, дуга — прогресс текущего. Иконки не перехватывают нажатия мыши.
|
||||
- Обычные диалоги душ появляются не чаще одного раза в 30 секунд вместо 6. Реплики героини — раз в 100 секунд вместо 20. Ручной подбор и промежуточный этап больше не обходят общий интервал. Пауза останавливает таймеры.
|
||||
|
||||
## Сохранённые механики
|
||||
|
||||
Шесть орудий: плеть, дыба, колесо, железная дева, музыкальный стул и котёл. Со второго уровня встречаются души с двумя наказаниями, с четвёртого — до трёх; задания назначаются только для установленных типов орудий. Сгорание и вся награда происходят только после выполнения полного списка. Между этапами душу можно забрать со старого места; помощницы умеют продолжать подходящие цепочки. Помощницы окрашены в синий цвет.
|
||||
|
||||
Площадь основной платформы увеличена на 25% относительно 0.14. Рабочая зона — 12×9 клеток. Очередь у ворот вмещает семь душ в один ряд. Орудия размещаются и поворачиваются по сетке, установка и удаление озвучены.
|
||||
|
||||
'''
|
||||
for name in ['README_RU.md','README_0.13.md']:(src/name).write_text(intro+body+'\n\nПроверка HUD: `Demon.exe -- --test-hud`. Проверяет два счётчика, две кнопки-иконки, отсутствие старых областей нажатия, соответствие пиктограмм, освобождение карточек и увеличение интервалов диалогов в пять раз.\n',encoding='utf-8')
|
||||
p=root/'tools/package_v16.py';s=p.read_text(encoding='utf-8-sig')
|
||||
s=s.replace("'release-tests.log':'ALL WORKSHOP TESTS PASSED',","'release-tests.log':'ALL WORKSHOP TESTS PASSED',\n 'release-hud.log':'ALL HUD TESTS PASSED',")
|
||||
s=s.replace("'release_sentences':'passed'","'release_sentences':'passed','release_hud':'passed'")
|
||||
s=s.replace("'level_area_scale':1.25,","'level_area_scale':1.25,'minimal_hud':True,'soul_dialogue_interval_seconds':30,'hero_dialogue_interval_seconds':100,")
|
||||
s=s.replace("def sha(path):", "capture_names={line.split('CAPTURE: ',1)[1].strip()+'.png' for line in (qa/'release-capture.log').read_text(encoding='utf-8-sig').splitlines() if line.startswith('CAPTURE: ')}\n\ndef sha(path):")
|
||||
s=s.replace("rel=path.relative_to(folder)","rel=path.relative_to(folder)\n if rel.parts[0]=='captures' and path.name not in capture_names:continue")
|
||||
p.write_text(s,encoding='utf-8')
|
||||
p=root/'tools/make_infernal_pop.py';s=p.read_text().replace('Demon_v0.15/audio','Demon_v0.16/audio');p.write_text(s)
|
||||
print('0.16 documentation and packaging updated')
|
||||
@@ -0,0 +1,84 @@
|
||||
from pathlib import Path
|
||||
root=Path(__file__).resolve().parent.parent/'Demon_v0.15'
|
||||
p=root/'workshop.gd';s=p.read_text(encoding='utf-8-sig')
|
||||
def change(a,b):
|
||||
global s
|
||||
if a not in s:raise RuntimeError('Missing '+a[:100])
|
||||
s=s.replace(a,b)
|
||||
def function(name,body):
|
||||
global s
|
||||
start=s.index('func '+name+'(');end=s.find('\nfunc ',start+1)
|
||||
if end<0:end=len(s)
|
||||
s=s[:start]+body.strip()+'\n'+s[end:]
|
||||
change('const TITLES=["Алтарь плети","Дыба","Колесо","Железная дева"]','const TITLES=["Алтарь плети","Дыба","Колесо","Железная дева","Музыкальный стул","Котёл"]')
|
||||
change('const PRICES=[40,80,140,220]','const PRICES=[40,80,140,220,300,380]')
|
||||
change('Vector2i(3,3)]','Vector2i(3,3),Vector2i(3,3),Vector2i(4,4)]')
|
||||
change('const AREA=Vector2i(9,9)','const AREA=Vector2i(12,9)\nconst EXTRA=preload("res://new_equipment.gd")')
|
||||
change('var g\n','var g\nvar sentences\nvar dialogue_clock=6.0\nvar dialogue_turn=0\n')
|
||||
change('\tg=game\n','\tg=game\n\tsentences=preload("res://judgement.gd").new();sentences.setup(self)\n')
|
||||
change('Vector2(496,490)','Vector2(496,638)')
|
||||
change('for i in range(4):','for i in range(TITLES.size()):')
|
||||
change('unlock=0;helper_speed=0;automation=false;spawn_clock=0;darkness=0','unlock=0;helper_speed=0;automation=false;spawn_clock=0;darkness=0\n\tdialogue_clock=6;dialogue_turn=0')
|
||||
change('elif node is Light3D:node.hide()','elif node is Light3D:node.hide()\n\t\telif node is AudioStreamPlayer3D:node.stop()')
|
||||
change('\tvar removed=selected','\tvar removed=selected\n\tif not sentences.can_remove(s):message("Это орудие ещё нужно душам. Используй перемещение.");return')
|
||||
change('soul.assigned-=1','soul.assigned-=1\n\t\tif soul.get("origin_station",-1)>removed:soul.origin_station-=1')
|
||||
change('Rect2(-7.1,-4.8,14.1,10.5)','Rect2(-7.1,-4.8,18.15,10.5)')
|
||||
change('"operator":-1}','"operator":-1,"ready":false}')
|
||||
change('0,29),clampi','0,37),clampi')
|
||||
change('Rect2i(0,0,30,22)','Rect2i(0,0,38,22)')
|
||||
change('for x in range(30):','for x in range(38):')
|
||||
change('(p.x>4 and p.y< -3.1) or (p.x>5.7 and p.y>3)','(p.x>4 and p.x<7.5 and p.y< -3.1) or (p.x>5.7 and p.x<7.5 and p.y>3)')
|
||||
change('"unlock1","unlock2","unlock3":','"unlock1","unlock2","unlock3","unlock4","unlock5":')
|
||||
change('s.get("state","")=="held").size()','s.get("state","")=="held" and s.get("queue_reserved",true)).size()')
|
||||
change('if i>=0:g.souls[i].state="queue"','if i>=0:sentences.drop(g.souls[i])')
|
||||
change('if d.soul>=0:return false','if d.soul>=0 or not sentences.accepts(s,d.selected):return false\n\tsentences.release_origin(s)\n\ts.queue_reserved=false;d.ready=false')
|
||||
change('elif d.selected==3:s.visual.position=Vector3(0,.22,0)','elif d.selected==3:s.visual.position=Vector3(0,.22,0)\n\telif d.selected==4:s.visual.position=Vector3(0,-.25,0);s.visual.scale=Vector3.ONE*.9\n\telif d.selected==5:s.visual.position=Vector3(0,.45,0);s.visual.scale=Vector3.ONE*.85')
|
||||
change('s["pose_target"]=s.visual.transform;s.node.rotation=Vector3(0,d.turns*PI/2,0)','s["pose_target"]=s.visual.transform;s.node.rotation=Vector3(0,d.turns*PI/2,0)\n\tannounce_soul(s)')
|
||||
function('finish','''func finish(d):
|
||||
var index=g.index_of(d.soul)
|
||||
if index<0:return
|
||||
var soul=g.souls[index]
|
||||
var complete=sentences.complete_stage(d)
|
||||
EXTRA.animate(g,d,0,false)
|
||||
if not complete:return
|
||||
g.life.burn(soul);g.souls.remove_at(index)
|
||||
var count=soul.required.size()
|
||||
g.coins+=10*count;g.done+=1
|
||||
for stage_index in range(count):g.development.reward()
|
||||
g.floating("+%d ЗОЛОТА +%d ОПЫТА" % [10*count,20*count],d.device.position+Vector3(0,2.8,0),Color("c8ae75"))
|
||||
d.soul=-1;d.cooldown=2.6;d.release_clock=2.05;d.operator=-1;d.bar.hide()
|
||||
if d.flame:d.flame.hide()
|
||||
refresh();g.save_progress()
|
||||
''')
|
||||
change('if i<0:\n\t\tif s.selected==3:','if i<0:\n\t\tEXTRA.animate(g,s,dt,false)\n\t\tif s.selected==3:')
|
||||
change('\tvar soul=g.souls[i]\n\tif s.placement>0:','\tvar soul=g.souls[i]\n\tif s.ready:\n\t\tEXTRA.animate(g,s,dt,false)\n\t\ts.bar.visible=soul.state in ["ready","reserved_next"]\n\t\ts.bar.position=g.camera.unproject_position(s.device.position+Vector3(0,3.4,0))-Vector2(48,0)\n\t\treturn\n\tif s.placement>0:')
|
||||
change('elif s.selected==2:s.elapsed+=dt*rate','elif s.selected==2:s.elapsed+=dt*rate\n\t\telif s.selected>=4:s.elapsed+=dt*rate')
|
||||
change('elif s.selected==3:progress=(s.elapsed if s.stage==0 else .35+s.elapsed)/3.35','elif s.selected==3:progress=(s.elapsed if s.stage==0 else .35+s.elapsed)/3.35\n\telif s.selected>=4:progress=s.elapsed/(6.0 if s.selected==4 else 7.0)')
|
||||
change('if s.flame:s.flame.visible=active and s.stage==1','if s.flame:s.flame.visible=active and (s.stage==1 or s.selected==5)')
|
||||
change('s.motion.update(dt,active);g.working=-1','s.motion.update(dt,active);g.working=-1\n\tEXTRA.animate(g,s,dt,active)')
|
||||
change('(s.selected==3 and s.stage==1 and s.elapsed>=3):finish(s)','(s.selected==3 and s.stage==1 and s.elapsed>=3) or (s.selected==4 and s.elapsed>=6) or (s.selected==5 and s.elapsed>=7):finish(s)')
|
||||
change('var waiting=queued().filter(func(s):return not s.entering)','var waiting=g.souls.filter(func(s):return s.state=="ready")+queued().filter(func(s):return not s.entering)')
|
||||
change(''' for si in range(stations.size()):
|
||||
if is_free(stations[si]):free=si;break
|
||||
if waiting.is_empty() or free<0:
|
||||
h.model.set_walking(false);continue
|
||||
var soul=waiting[0];soul.state="reserved";soul.assigned=hi''',''' var soul=null
|
||||
for candidate in waiting:
|
||||
for si in range(stations.size()):
|
||||
if is_free(stations[si]) and sentences.accepts(candidate,stations[si].selected):free=si;soul=candidate;break
|
||||
if soul!=null:break
|
||||
if soul==null:
|
||||
h.model.set_walking(false);continue
|
||||
soul.state="reserved_next" if soul.get("origin_station",-1)>=0 else "reserved";soul.assigned=hi''')
|
||||
change('if move_helper(h,g.souls[index].node.position,dt):h.state="deliver";g.souls[index].state="transit"','''var target=g.souls[index].node.position
|
||||
if g.souls[index].get("origin_station",-1)>=0:target=approach(stations[g.souls[index].origin_station])
|
||||
if move_helper(h,target,dt):
|
||||
h.state="deliver";g.souls[index].state="transit";sentences.float_pose(g.souls[index])''')
|
||||
change('if stations[h.station].soul<0:h.state="idle"','if stations[h.station].soul<0 or stations[h.station].ready:h.state="idle"')
|
||||
change('delete_button.disabled=not is_free(s)','delete_button.disabled=not is_free(s) or not sentences.can_remove(s)')
|
||||
change('clampi(int(saved.get("unlock",0)),0,3)','clampi(int(saved.get("unlock",0)),0,TITLES.size()-1)')
|
||||
change('desired.x=clampf(desired.x,-7.1,7.0)','desired.x=clampf(desired.x,-7.1,11.05)')
|
||||
change('if desired.x>4 and desired.z< -3.1:','if desired.x>4 and desired.x<7.5 and desired.z< -3.1:')
|
||||
change('if desired.x>5.7 and desired.z>3:','if desired.x>5.7 and desired.x<7.5 and desired.z>3:')
|
||||
p.write_text(s,encoding='utf-8')
|
||||
print('Workshop 0.15 integration applied')
|
||||
@@ -0,0 +1,51 @@
|
||||
from pathlib import Path
|
||||
root=Path(__file__).resolve().parent.parent/'Demon_v0.16'
|
||||
p=root/'workshop.gd';s=p.read_text(encoding='utf-8-sig')
|
||||
s=s.replace('var dialogue_clock=6.0','const DIALOGUE_INTERVAL=30.0\nconst HERO_INTERVAL=100.0\nvar dialogue_clock=0.0')
|
||||
s=s.replace('var build_button: Button','var build_button: Button\nvar grimoire_button: Button\nvar buy_labels=[]')
|
||||
s=s.replace('g.development.action_bar.hide()','g.development.action_bar.hide()\n\tg.development.action_bar.reparent(g.ui_compat)\n\tg.development.tree_icon.reparent(g.ui_compat)')
|
||||
start=s.index('func make_ui():');end=s.index('\tcatalogue=make_panel(',start)
|
||||
s=s[:start]+'''func icon_button(kind,tooltip,pos,callback):
|
||||
var b=action(g.hud,"",callback);b.custom_minimum_size=Vector2(64,64);b.size=Vector2(64,64);b.position=pos
|
||||
b.tooltip_text=tooltip;b.toggle_mode=true;b.focus_mode=Control.FOCUS_NONE
|
||||
b.add_theme_stylebox_override("pressed",style(Color("3b2d3e"),Color("d5b878")))
|
||||
var icon=Icon.new();icon.kind=kind;b.add_child(icon);icon.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
||||
icon.offset_left=9;icon.offset_top=9;icon.offset_right=-9;icon.offset_bottom=-9
|
||||
return b
|
||||
|
||||
func make_ui():
|
||||
shade=ColorRect.new();g.hud.add_child(shade);shade.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
||||
shade.color=Color(0.08,0,0.025,0);shade.mouse_filter=Control.MOUSE_FILTER_IGNORE;shade.z_index=-3
|
||||
panel=PanelContainer.new();g.ui_compat.add_child(panel)
|
||||
var hidden=VBoxContainer.new();panel.add_child(hidden)
|
||||
info=text(hidden,"");timer_label=text(hidden,"");pressure=text(hidden,"")
|
||||
help_primary=text(hidden,"");help_secondary=text(hidden,"");notice=text(hidden,"")
|
||||
build_button=icon_button("build","Строительство [B]",Vector2(1432,812),toggle_build)
|
||||
build_button.name="BuildIconButton"
|
||||
grimoire_button=icon_button("book","Гримуар [T]",Vector2(1512,812),toggle_tree)
|
||||
grimoire_button.name="GrimoireIconButton"
|
||||
var v: VBoxContainer
|
||||
var row: HBoxContainer
|
||||
''' +s[end:]
|
||||
old=''' for i in range(TITLES.size()):
|
||||
buy_buttons.append(action(v,"",func():begin_purchase(i)))'''
|
||||
new=''' for i in range(TITLES.size()):
|
||||
var b=action(v,"",func():begin_purchase(i));buy_buttons.append(b)
|
||||
var margin=MarginContainer.new();b.add_child(margin);margin.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT);margin.mouse_filter=Control.MOUSE_FILTER_IGNORE
|
||||
for side in ["left","right"]:margin.add_theme_constant_override("margin_"+side,12)
|
||||
for side in ["top","bottom"]:margin.add_theme_constant_override("margin_"+side,6)
|
||||
var entry=HBoxContainer.new();margin.add_child(entry);entry.mouse_filter=Control.MOUSE_FILTER_IGNORE;entry.add_theme_constant_override("separation",12)
|
||||
var icon=Icon.new();icon.kind=Icon.APPARATUS[i];icon.custom_minimum_size=Vector2(40,40);entry.add_child(icon)
|
||||
var l=text(entry,"",16);l.mouse_filter=Control.MOUSE_FILTER_IGNORE;buy_labels.append(l)'''
|
||||
assert old in s;s=s.replace(old,new)
|
||||
s=s.replace('v=VBoxContainer.new();context.add_child(v);context_title=text(v,"",19,Color("e1bd82"))','v=VBoxContainer.new();context.add_child(v);context_title=text(v,"",19,Color("e1bd82"))')
|
||||
s=s.replace('g.hud.add_child(bar);','g.ui_compat.add_child(bar);')
|
||||
s=s.replace('dialogue_clock=6;dialogue_turn=0','dialogue_clock=0;dialogue_turn=0')
|
||||
s=s.replace('buy_buttons[i].text="%s · %d золота · %d×%d%s"','buy_labels[i].text="%s\\n%d золота · %d×%d%s"')
|
||||
s=s.replace('build_button.text="Завершить [B]" if build_mode else "Строительство [B]"','build_button.text="";build_button.set_pressed_no_signal(build_mode)\n\tgrimoire_button.text="";grimoire_button.set_pressed_no_signal(tree.visible)')
|
||||
s=s.replace('if override_text.is_empty() and dialogue_clock<2:return','if dialogue_clock<DIALOGUE_INTERVAL:return')
|
||||
s=s.replace('if dialogue_clock<6:return','if dialogue_clock<DIALOGUE_INTERVAL:return')
|
||||
s=s.replace('if g.talk_clock>20:','if g.talk_clock>HERO_INTERVAL:')
|
||||
s=s.replace('\tif g.paused:return\n\tif is_instance_valid(g.development.bubble):','\tsentences.update_icons()\n\tif g.paused:return\n\tif is_instance_valid(g.development.bubble):')
|
||||
p.write_text(s,encoding='utf-8')
|
||||
print('Minimal HUD and 5x dialogue throttling applied')
|
||||
@@ -0,0 +1,150 @@
|
||||
from pathlib import Path
|
||||
p=Path('Demon_v0.19/workshop.gd');s=p.read_text();s=s.replace('const TITLES=["Алтарь плети"','const Economy=preload("res://economy.gd")\nconst TITLES=["Колодки"').replace('const PRICES=[40,80,140,220,300,380]','const PRICES=Economy.TOOL_PRICES')
|
||||
s=s.replace('var automation=false','var automation=false\nvar helper_diligence=0\nvar tool_ranks=[0,0,0,0,0,0]\nvar pressure_time=0.0\nvar penalty_clock=0.0\nvar penalty_gold_lost=0\nvar penalty_souls_lost=0\nvar pressure_label: Label\nvar tree_summary: Label\nvar tool_upgrade_button: Button')
|
||||
s=s.replace('make_ui()\n\trebuild_nav()','make_ui()\n\tmake_level_bar()\n\trebuild_nav()',1)
|
||||
s=s.replace('context=make_panel(Vector2.ZERO,Vector2(336,112))','context=make_panel(Vector2.ZERO,Vector2(336,172))')
|
||||
s=s.replace('context.hide()\n\tmake_tree()','tool_upgrade_button=action(v,"",upgrade_selected_tool)\n\ttool_upgrade_button.custom_minimum_size=Vector2(310,44)\n\tcontext.hide()\n\tmake_tree()',1)
|
||||
s=s.replace('text(root,"Чертежи за золото · личные таланты за опыт · развитие свиты",16).horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER','tree_summary=text(root,"",16);tree_summary.horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER')
|
||||
a=s.index('\tvar specs=[');b=s.index('\tfor spec in specs:',a)
|
||||
s=s[:a]+''' var tool_nodes=[]
|
||||
for kind in range(TITLES.size()):
|
||||
if kind>0:tool_nodes.append([Icon.APPARATUS[kind],"Чертёж: "+TITLES[kind],"Открывает покупку в кузне","unlock%d"%kind])
|
||||
tool_nodes.append([Icon.APPARATUS[kind],"Закалка: "+TITLES[kind],"Все орудия типа: +25% скорости и +10% золота за ранг","tool%d"%kind])
|
||||
var specs=[
|
||||
{"title":"I ОРУДИЯ", "subtitle":"Золото · чертежи и закалка", "nodes":tool_nodes},
|
||||
{"title":"II СУККУБА", "subtitle":"1 очко за каждый новый уровень", "nodes":[["boot","Поступь тени","3 ранга · +25% к скорости","speed"],["whip","Владычица боли","3 ранга · +20% к своим действиям","power"],["crown","Хозяйка цеха","3 ранга · +8% к работе всей команды","leadership"],["lock","Крылья госпожи","Будущее развитие","future"]]},
|
||||
{"title":"III СВИТА", "subtitle":"Души · до 3 помощниц", "nodes":[["wings","Призвать помощницу","Доставка душ к свободным орудиям","hire"],["soul","Надсмотрщицы","Самостоятельная работа у орудий","auto"],["boot","Стремительная свита","3 ранга · +25% к скорости движения","haste"],["whip","Усердная свита","3 ранга · +25% к скорости работы","diligence"],["lock","Легион тьмы","Будущее развитие","future"]]}
|
||||
]
|
||||
'''+s[b:]
|
||||
s=s.replace('"rank":rank})','"rank":rank,"description":desc})')
|
||||
s=s.replace('unlock=0;helper_speed=0;automation=false;spawn_clock=0;darkness=0','unlock=0;helper_speed=0;helper_diligence=0;automation=false;tool_ranks=[0,0,0,0,0,0];spawn_clock=0;darkness=0\n\tpressure_time=0;penalty_clock=0;penalty_gold_lost=0;penalty_souls_lost=0')
|
||||
a=s.index('func upgrade(key):');b=s.index('func can_afford_upgrade',a)
|
||||
s=s[:a]+'''func upgrade(key):
|
||||
if key.begins_with("unlock"):
|
||||
var kind=int(key.right(1));var cost=Economy.BLUEPRINT_PRICES[kind]
|
||||
if unlock!=kind-1 or not can_afford_upgrade(cost):return
|
||||
g.coins-=cost;unlock=kind
|
||||
elif key.begins_with("tool"):
|
||||
var kind=int(key.right(1))
|
||||
if kind>unlock or tool_ranks[kind]>=3:return
|
||||
var cost=Economy.tool_cost(kind,tool_ranks[kind])
|
||||
if not can_afford_upgrade(cost):return
|
||||
g.coins-=cost;tool_ranks[kind]+=1
|
||||
elif key in ["speed","power","leadership"]:
|
||||
if g.development.points<1:return
|
||||
if key=="speed":
|
||||
if g.speed_level>=3:return
|
||||
g.speed_level+=1
|
||||
elif key=="power":
|
||||
if g.development.action_level>=3:return
|
||||
g.development.action_level+=1
|
||||
else:
|
||||
if g.development.leadership>=3:return
|
||||
g.development.leadership+=1
|
||||
g.development.points-=1
|
||||
elif key=="hire":
|
||||
if helpers.size()>=3:return
|
||||
var cost=Economy.HIRE_PRICES[helpers.size()]
|
||||
if g.essence<cost:return
|
||||
g.essence-=cost;add_helper()
|
||||
elif key=="haste":
|
||||
if helpers.is_empty() or helper_speed>=3:return
|
||||
var cost=Economy.HASTE_PRICES[helper_speed]
|
||||
if g.essence<cost:return
|
||||
g.essence-=cost;helper_speed+=1
|
||||
elif key=="diligence":
|
||||
if helpers.is_empty() or helper_diligence>=3:return
|
||||
var cost=Economy.DILIGENCE_PRICES[helper_diligence]
|
||||
if g.essence<cost:return
|
||||
g.essence-=cost;helper_diligence+=1
|
||||
elif key=="auto":
|
||||
if helpers.is_empty() or automation or g.essence<Economy.AUTOMATION_PRICE:return
|
||||
g.essence-=Economy.AUTOMATION_PRICE;automation=true
|
||||
refresh();g.save_progress()
|
||||
|
||||
func upgrade_selected_tool():
|
||||
if selected>=0 and selected<stations.size():upgrade("tool%d"%stations[selected].selected)
|
||||
|
||||
func action_rate(d):
|
||||
var skill=helper_diligence*.25 if d.operator>=0 else g.development.action_level*.20
|
||||
return (1.0+skill)*(1.0+tool_ranks[d.selected]*.25)*(1.0+g.development.leadership*.08)/Economy.work_multiplier(g.development.xp)
|
||||
|
||||
'''+s[b:]
|
||||
a=s.index('\tinfo.text=',s.index('func refresh():'));b=s.index('\tbuild_button.text=',a)
|
||||
s=s[:a]+''' info.text="Уровень %d · Орудия %d · Помощницы %d" % [Economy.level(g.development.xp),stations.size(),helpers.size()]
|
||||
if tree_summary:tree_summary.text="ЗОЛОТО %d · ДУШИ %d · УРОВЕНЬ %d · ОЧКИ %d" % [g.coins,g.essence,Economy.level(g.development.xp),g.development.points]
|
||||
for i in range(buy_buttons.size()):
|
||||
buy_labels[i].text="%s · ранг %d\n%d золота · %d×%d%s" % [TITLES[i],tool_ranks[i]+1,PRICES[i],FOOTPRINTS[i].x,FOOTPRINTS[i].y," [закрыто]" if i>unlock else ""]
|
||||
buy_buttons[i].disabled=i>unlock or g.coins<PRICES[i]
|
||||
for n in node_buttons:
|
||||
var enabled=false;var value="";var key=n.key
|
||||
if key.begins_with("unlock"):
|
||||
var kind=int(key.right(1));var cost=Economy.BLUEPRINT_PRICES[kind]
|
||||
enabled=unlock==kind-1 and can_afford_upgrade(cost)
|
||||
value="Изучено" if unlock>=kind else "%d золота · %s"%[cost,"доступно" if unlock==kind-1 else "предыдущий чертёж"]
|
||||
elif key.begins_with("tool"):
|
||||
var kind=int(key.right(1));var rank=tool_ranks[kind]
|
||||
enabled=kind<=unlock and rank<3 and can_afford_upgrade(Economy.tool_cost(kind,rank))
|
||||
value="Ранг %d / 4 · %s"%[rank+1,"максимум" if rank>=3 else "%d золота"%Economy.tool_cost(kind,rank)]
|
||||
if kind>unlock:value="Сначала изучи чертёж"
|
||||
else:
|
||||
match key:
|
||||
"speed","power","leadership":
|
||||
var rank=g.speed_level if key=="speed" else g.development.action_level if key=="power" else g.development.leadership
|
||||
enabled=g.development.points>0 and rank<3;value="Ранг %d / 3 · 1 очко уровня"%rank
|
||||
"hire":
|
||||
enabled=helpers.size()<3 and g.essence>=Economy.HIRE_PRICES[mini(2,helpers.size())]
|
||||
value="Помощниц %d / 3 · %s"%[helpers.size(),"максимум" if helpers.size()>=3 else "%d душ"%Economy.HIRE_PRICES[helpers.size()]]
|
||||
"auto":enabled=not helpers.is_empty() and not automation and g.essence>=Economy.AUTOMATION_PRICE;value="Изучено" if automation else "4 души · нужен призыв"
|
||||
"haste","diligence":
|
||||
var rank=helper_speed if key=="haste" else helper_diligence
|
||||
var prices=Economy.HASTE_PRICES if key=="haste" else Economy.DILIGENCE_PRICES
|
||||
enabled=not helpers.is_empty() and rank<3 and g.essence>=prices[mini(rank,2)]
|
||||
value="Ранг %d / 3 · %s"%[rank,"максимум" if rank>=3 else "%d душ"%prices[rank]]
|
||||
_:value="Будущее развитие"
|
||||
n.button.disabled=not enabled;n.rank.text=value
|
||||
if selected>=0 and selected<stations.size() and tool_upgrade_button:
|
||||
var kind=stations[selected].selected;var rank=tool_ranks[kind]
|
||||
tool_upgrade_button.text="Максимальный ранг" if rank>=3 else "Закалка типа · %d золота"%Economy.tool_cost(kind,rank)
|
||||
tool_upgrade_button.disabled=rank>=3 or not can_afford_upgrade(Economy.tool_cost(kind,rank))
|
||||
'''+s[b:]
|
||||
s=s.replace('g.coins+=10*count;g.done+=1\n\tfor stage_index in range(count):g.development.reward()','var reward=Economy.reward(soul.required,tool_ranks,g.development.xp)\n\tg.coins+=reward.gold;g.essence+=reward.souls;g.done+=1\n\tg.development.reward(reward.xp)')
|
||||
s=s.replace('var rate=1.0+g.development.action_level*.2','var rate=action_rate(s)').replace('s.elapsed+=dt*(rate if s.stage==0 else 1.0)','s.elapsed+=dt*rate')
|
||||
s=s.replace('context.show()\n\tif g.held','context.show();refresh()\n\tif g.held')
|
||||
s=s.replace('spawn_clock=minf(3,spawn_clock+dt)\n\tif spawn_clock>=3 and spawn():spawn_clock=0','spawn_clock=minf(Economy.SPAWN_INTERVAL,spawn_clock+dt)\n\tif spawn_clock>=Economy.SPAWN_INTERVAL and spawn():spawn_clock=0').replace('(3-spawn_clock)','(Economy.SPAWN_INTERVAL-spawn_clock)')
|
||||
s=s.replace('pressure.text="ОЧЕРЕДЬ ЗАПОЛНЕНА\\nУскорь работу цеха" if count>=QUEUE_CAPACITY else ""','pressure.text="ОЧЕРЕДЬ ЗАПОЛНЕНА\\nУскорь работу цеха" if count>=QUEUE_CAPACITY else ""\n\tupdate_pressure(dt,count)')
|
||||
s=s.replace('"automation":automation,"stations":devices','"automation":automation,"diligence":helper_diligence,"tool_ranks":tool_ranks.duplicate(),"pressure_time":pressure_time,"penalty_clock":penalty_clock,"stations":devices')
|
||||
s=s.replace('automation=saved.get("automation",false)==true','automation=saved.get("automation",false)==true\n\thelper_diligence=clampi(int(saved.get("diligence",0)),0,3)\n\tvar ranks=saved.get("tool_ranks",[])\n\tif ranks is Array:\n\t\tfor i in range(mini(6,ranks.size())):tool_ranks[i]=clampi(int(ranks[i]),0,3)\n\tpressure_time=clampf(float(saved.get("pressure_time",0)),0,300)\n\tpenalty_clock=clampf(float(saved.get("penalty_clock",0)),0,Economy.PENALTY_INTERVAL)')
|
||||
s+='''
|
||||
func make_level_bar():
|
||||
var label=g.development.xp_label;var bar=g.development.xp_bar
|
||||
label.reparent(g.hud);label.position=Vector2(24,850);label.size=Vector2(1375,26);label.mouse_filter=Control.MOUSE_FILTER_IGNORE;label.z_index=8
|
||||
label.add_theme_font_size_override("font_size",16);label.show()
|
||||
bar.reparent(g.hud);bar.position=Vector2(24,881);bar.size=Vector2(1552,10);bar.custom_minimum_size=Vector2(0,10);bar.mouse_filter=Control.MOUSE_FILTER_IGNORE;bar.z_index=8;bar.show()
|
||||
pressure_label=g.label("",17,Color("e8ae8b"));g.hud.add_child(pressure_label);pressure_label.position=Vector2(24,820);pressure_label.size=Vector2(1360,25);pressure_label.mouse_filter=Control.MOUSE_FILTER_IGNORE;pressure_label.z_index=8
|
||||
pressure_label.tooltip_text="При полной очереди: 12 секунд на реакцию, затем штраф каждые 5 секунд. Он растёт со временем. Резерв на восстановление: 60 золота и 6 душ. Если у тебя меньше — ничего не начисляется и не списывается."
|
||||
g.development.refresh()
|
||||
|
||||
func update_pressure(dt,count):
|
||||
if g.paused:return
|
||||
var full=count>=QUEUE_CAPACITY
|
||||
pressure_time=clampf(pressure_time+(dt if full else -dt*2),0,300)
|
||||
if full and pressure_time>=Economy.PRESSURE_GRACE:
|
||||
penalty_clock+=dt
|
||||
while penalty_clock>=Economy.PENALTY_INTERVAL:
|
||||
penalty_clock-=Economy.PENALTY_INTERVAL
|
||||
var fee=Economy.penalty(g.development.xp,pressure_time)
|
||||
var gold=mini(fee.gold,maxi(0,g.coins-Economy.GOLD_RESERVE))
|
||||
var essence=mini(fee.souls,maxi(0,g.essence-Economy.SOUL_RESERVE))
|
||||
g.coins-=gold;g.essence-=essence;penalty_gold_lost+=gold;penalty_souls_lost+=essence
|
||||
if gold>0 or essence>0:refresh();g.save_progress()
|
||||
elif not full:penalty_clock=maxf(0,penalty_clock-dt*2)
|
||||
if full:
|
||||
if pressure_time<Economy.PRESSURE_GRACE:pressure_label.text="ОЧЕРЕДЬ 7 / 7 · До штрафов: %d с"%ceili(Economy.PRESSURE_GRACE-pressure_time+Economy.PENALTY_INTERVAL-penalty_clock)
|
||||
else:
|
||||
var fee=Economy.penalty(g.development.xp,pressure_time)
|
||||
pressure_label.text="ПРОСТОЙ · −%d золота / −%d душ каждые 5 с · Освободи очередь"%[fee.gold,fee.souls]
|
||||
else:pressure_label.text=""
|
||||
'''
|
||||
p.write_text(s,encoding='utf-8')
|
||||
p=Path('Demon_v0.19/judgement.gd');s=p.read_text();s=s.replace('var maximum=mini(1+int(g.development.xp>=100)+int(g.development.xp>=300),available.size())\n\tvar count=1+int(s.id/2)%maximum','var count=w.Economy.recipe_size(s.id,g.development.xp,available.size())');p.write_text(s)
|
||||
@@ -0,0 +1,21 @@
|
||||
from pathlib import Path
|
||||
import struct,json,numpy as np
|
||||
b=Path('Demon_v0.19/art/succubus/succubus_v01.glb').read_bytes();n=struct.unpack_from('<I',b,12)[0];j=json.loads(b[20:20+n]);data=b[28+n:]
|
||||
def arr(idx):
|
||||
a=j['accessors'][idx];v=j['bufferViews'][a['bufferView']];t={5126:'<f4',5125:'<u4',5123:'<u2',5121:'u1'}[a['componentType']];size={'SCALAR':1,'VEC2':2,'VEC3':3,'VEC4':4,'MAT4':16}[a['type']];return np.frombuffer(data,t,a['count']*size,v.get('byteOffset',0)+a.get('byteOffset',0)).reshape(-1,size)
|
||||
components={}
|
||||
for p in j['meshes'][1]['primitives']:
|
||||
pos=arr(p['attributes']['POSITION']);idx=arr(p['indices']).ravel();uniq,inv=np.unique(np.round(pos,5),axis=0,return_inverse=True);tri=inv[idx].reshape(-1,3);par=np.arange(len(uniq))
|
||||
def find(x):
|
||||
while par[x]!=x:par[x]=par[par[x]];x=par[x]
|
||||
return x
|
||||
for a,c,d in tri:
|
||||
r=find(a);s=find(c);t=find(d);par[s]=r;par[t]=r
|
||||
roots=np.array([find(i) for i in range(len(uniq))]);labels=roots[inv];out=[]
|
||||
for r in np.unique(labels):
|
||||
v=pos[labels==r]
|
||||
if len(v)>15:out.append((len(v),np.round(v.min(axis=0),3).tolist(),np.round(v.max(axis=0),3).tolist()))
|
||||
components[str(p['material'])]={'labels':labels.tolist(),'components':sorted(out,reverse=True)}
|
||||
if p['material'] in [3,5,6,10]:print('MAT',p['material'],sorted(out,reverse=True)[:15])
|
||||
|
||||
Path('tools/succubus_components.json').write_text(json.dumps(components))
|
||||
@@ -0,0 +1,34 @@
|
||||
"""Original, deterministic mechanical effects; no third-party samples."""
|
||||
from pathlib import Path
|
||||
import math, random, struct, wave
|
||||
out=Path(__file__).resolve().parent.parent/'Demon_v0.14/audio'
|
||||
rate=44100
|
||||
def save(name,kind):
|
||||
rng=random.Random(147+kind)
|
||||
length=.38 if kind==0 else .48
|
||||
samples=[];low=0.0
|
||||
for i in range(int(rate*length)):
|
||||
t=i/rate
|
||||
noise=rng.uniform(-1,1);low=low*.80+noise*.20
|
||||
if kind==0:
|
||||
body=math.sin(2*math.pi*(105*t-55*t*t))*math.exp(-22*t)
|
||||
wood=low*math.exp(-30*t)
|
||||
metal=sum(math.sin(2*math.pi*f*t) for f in [740,1137,1820])/3*math.exp(-18*t)
|
||||
tail=max(0,t-.085)
|
||||
second=(math.sin(2*math.pi*175*tail)+low)*math.exp(-50*tail)*(.14 if t>.085 else 0)
|
||||
sample=.56*body+.36*wood+.17*metal+second
|
||||
else:
|
||||
scrape=(noise-low)*math.exp(-8*t)*min(1,t/.012)
|
||||
ring=sum(math.sin(2*math.pi*f*t) for f in [410,673,921])/3*math.exp(-10*t)
|
||||
end=max(0,t-.14)
|
||||
thud=math.sin(2*math.pi*82*end)*math.exp(-24*end)*(.36 if t>.14 else 0)
|
||||
sample=.28*scrape+.25*ring+thud
|
||||
sample*=min(1,t/.002)*min(1,(length-t)/.025)
|
||||
samples.append(sample)
|
||||
peak=max(abs(s) for s in samples)
|
||||
with wave.open(str(out/name),'wb') as w:
|
||||
w.setnchannels(1);w.setsampwidth(2);w.setframerate(rate)
|
||||
w.writeframes(b''.join(struct.pack('<h',int(s/peak*.70*32767)) for s in samples))
|
||||
print(name,len(samples),'samples')
|
||||
save('apparatus_place.wav',0)
|
||||
save('apparatus_remove.wav',1)
|
||||
@@ -0,0 +1,16 @@
|
||||
from pathlib import Path
|
||||
from PIL import Image
|
||||
import shutil
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
source=root/'Demon_v0.18_Windows/captures/v018'
|
||||
target=root/'Demon_v0.18/captures/v018'
|
||||
target.mkdir(parents=True,exist_ok=True)
|
||||
for prefix,count,name in [('catwalk-',48,'catwalk-preview.webp'),('catwalk-side-',24,'catwalk-side-preview.webp')]:
|
||||
frames=[]
|
||||
for i in range(count):
|
||||
with Image.open(source/f'{prefix}{i:02}.png') as image:frames.append(image.convert('RGB').resize((960,540),Image.Resampling.LANCZOS))
|
||||
frames[0].save(source/name,save_all=True,append_images=frames[1:],duration=42,loop=0,quality=82,method=4)
|
||||
with Image.open(source/name) as image:assert image.n_frames==count
|
||||
shutil.copy2(source/name,target/name)
|
||||
print(name,(source/name).stat().st_size)
|
||||
for name in ['catwalk-06.png','catwalk-side-12.png']:shutil.copy2(source/name,target/name)
|
||||
@@ -0,0 +1,23 @@
|
||||
from pathlib import Path
|
||||
import math,random,struct,wave
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
rate=22050;seconds=8;data=[];rng=random.Random(150)
|
||||
melody=[76,76,79,83,81,79,76,74,76,79,81,79,74,76,72,74]
|
||||
for i in range(rate*seconds):
|
||||
t=i/rate;beat=t*2;phase=beat%1;note=melody[int(beat)%16]
|
||||
f=440*2**((note-69)/12)
|
||||
synth=math.sin(2*math.pi*f*t)*.15*min(1,phase*30)*max(0,1-phase/.85)
|
||||
synth+=math.sin(2*math.pi*f*2*t)*.035*math.exp(-phase*5)
|
||||
bass_note=[48,43,45,41][int(beat)//4%4];bass_f=440*2**((bass_note-69)/12)
|
||||
bass=math.sin(2*math.pi*bass_f*t)*.15*math.exp(-phase*4)
|
||||
kick=math.sin(2*math.pi*(70*phase-23*phase*phase))*.28*math.exp(-phase*18)
|
||||
noise=rng.uniform(-1,1)
|
||||
hat=noise*.055*math.exp(-(beat*2%1)*22)
|
||||
clap=noise*.12*math.exp(-phase*28) if int(beat)%2 else 0
|
||||
data.append(synth+bass+kick+hat+clap)
|
||||
peak=max(map(abs,data))
|
||||
out=root/'Demon_v0.16/audio/infernal_pop.wav'
|
||||
with wave.open(str(out),'wb') as f:
|
||||
f.setnchannels(1);f.setsampwidth(2);f.setframerate(rate)
|
||||
f.writeframes(b''.join(struct.pack('<h',int(s/peak*.62*32767)) for s in data))
|
||||
print('Original 8-second pop loop generated:',out)
|
||||
@@ -0,0 +1,54 @@
|
||||
from pathlib import Path
|
||||
import hashlib, json, shutil, zipfile
|
||||
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.13'
|
||||
win=root/'Demon_v0.13_Windows'
|
||||
qa=root/'qa'
|
||||
markers={
|
||||
'release-tests.log':'ALL WORKSHOP TESTS PASSED',
|
||||
'release-ui.log':'PASS: actual mouse input',
|
||||
'release-audio.log':'22 nonverbal voice variants',
|
||||
'release-capture.log':'CAPTURE_BUILD:',
|
||||
'probe.log':'BUILD_PROBE:',
|
||||
}
|
||||
for name,marker in markers.items():
|
||||
log=(qa/name).read_text(encoding='utf-8-sig')
|
||||
assert marker in log,name
|
||||
assert not any(word in log for word in ['ERROR:','Assertion failed','QA check failed']),name
|
||||
|
||||
probe=json.loads(next(line.split('BUILD_PROBE: ',1)[1] for line in (qa/'probe.log').read_text(encoding='utf-8-sig').splitlines() if 'BUILD_PROBE: ' in line))
|
||||
assert probe['id'].startswith('0.13-') and probe['id']!='0.13-editor'
|
||||
assert 'CAPTURE_BUILD: '+probe['id'] in (qa/'release-capture.log').read_text(encoding='utf-8-sig')
|
||||
def sha(path):return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
for name in ['README_RU.md','README_0.13.md','AUDIO_CREDITS.md','MODEL_CREDITS.md','MODEL_LICENSE_CC0.txt','GODOT_LICENSE.txt']:
|
||||
shutil.copy2(src/name,win/name)
|
||||
for name in ['KellySlab-OFL.txt','RuslanDisplay-OFL.txt']:
|
||||
shutil.copy2(src/'art/fonts'/name,win/name)
|
||||
(win/'QA').mkdir(exist_ok=True)
|
||||
for name in markers:shutil.copy2(qa/name,win/'QA'/name)
|
||||
for shot in (win/'captures/v013').glob('*.png'):shutil.copy2(shot,src/'captures/v013'/shot.name)
|
||||
manifest={
|
||||
'version':'0.13','date':'2026-10-27','build_id':probe['id'],
|
||||
'engine':'Godot 4.3.stable.official.77dcf97d8',
|
||||
'binary_sha256':sha(win/'Demon.exe'),
|
||||
'validation':{'release_gameplay':'passed','release_mouse_ui':'passed','release_audio':'passed','release_capture':'passed'},
|
||||
'starting_gold':240,'arrival_interval_seconds':3,'queue_warning_threshold':10,
|
||||
'skill_columns':3,'maximum_helpers':3,
|
||||
}
|
||||
(win/'BUILD_MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
for folder,label in [(win,'Windows'),(src,'Source')]:
|
||||
dest=root/f'Demon_v0.13_{label}.zip'
|
||||
with zipfile.ZipFile(dest,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as archive:
|
||||
for path in sorted(folder.rglob('*')):
|
||||
if not path.is_file() or '.godot' in path.parts:continue
|
||||
if path.suffix=='.log' and path.parent!=win/'QA':continue
|
||||
rel=path.relative_to(folder)
|
||||
if label=='Source' and rel.parts[0]=='captures' and 'v013' not in rel.parts:continue
|
||||
archive.write(path,Path(folder.name)/rel)
|
||||
if label=='Source':
|
||||
for name in ['build_v13.ps1','fetch_windows_template.py','package_v13.py']:
|
||||
archive.write(root/'tools'/name,Path('tools')/name)
|
||||
with zipfile.ZipFile(dest) as archive:assert archive.testzip() is None
|
||||
print(f'VERIFIED {dest.name} {dest.stat().st_size} bytes SHA256 {sha(dest)}')
|
||||
print('BUILD_ID '+probe['id'])
|
||||
@@ -0,0 +1,54 @@
|
||||
from pathlib import Path
|
||||
import hashlib, json, shutil, zipfile
|
||||
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.13.1'
|
||||
win=root/'Demon_v0.13.1_Windows'
|
||||
qa=root/'qa_v131'
|
||||
markers={
|
||||
'release-tests.log':'ALL WORKSHOP TESTS PASSED',
|
||||
'release-ui.log':'PASS: actual mouse input',
|
||||
'release-audio.log':'22 nonverbal voice variants',
|
||||
'release-capture.log':'CAPTURE_BUILD:',
|
||||
'probe.log':'BUILD_PROBE:',
|
||||
}
|
||||
for name,marker in markers.items():
|
||||
log=(qa/name).read_text(encoding='utf-8-sig')
|
||||
assert marker in log,name
|
||||
assert not any(word in log for word in ['ERROR:','Assertion failed','QA check failed']),name
|
||||
|
||||
probe=json.loads(next(line.split('BUILD_PROBE: ',1)[1] for line in (qa/'probe.log').read_text(encoding='utf-8-sig').splitlines() if 'BUILD_PROBE: ' in line))
|
||||
assert probe['id'].startswith('0.13.1-') and probe['id']!='0.13-editor'
|
||||
assert 'CAPTURE_BUILD: '+probe['id'] in (qa/'release-capture.log').read_text(encoding='utf-8-sig')
|
||||
def sha(path):return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
for name in ['README_RU.md','README_0.13.md','AUDIO_CREDITS.md','MODEL_CREDITS.md','MODEL_LICENSE_CC0.txt','GODOT_LICENSE.txt']:
|
||||
shutil.copy2(src/name,win/name)
|
||||
for name in ['KellySlab-OFL.txt','RuslanDisplay-OFL.txt']:
|
||||
shutil.copy2(src/'art/fonts'/name,win/name)
|
||||
(win/'QA').mkdir(exist_ok=True)
|
||||
for name in markers:shutil.copy2(qa/name,win/'QA'/name)
|
||||
for shot in (win/'captures/v013').glob('*.png'):shutil.copy2(shot,src/'captures/v013'/shot.name)
|
||||
manifest={
|
||||
'version':'0.13.1','date':'2026-10-27','build_id':probe['id'],
|
||||
'engine':'Godot 4.3.stable.official.77dcf97d8',
|
||||
'binary_sha256':sha(win/'Demon.exe'),
|
||||
'validation':{'release_gameplay':'passed','release_mouse_ui':'passed','release_audio':'passed','release_capture':'passed'},
|
||||
'starting_gold':240,'arrival_interval_seconds':3,'queue_warning_threshold':10,
|
||||
'skill_columns':3,'maximum_helpers':3,
|
||||
}
|
||||
(win/'BUILD_MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
for folder,label in [(win,'Windows'),(src,'Source')]:
|
||||
dest=root/f'Demon_v0.13.1_{label}.zip'
|
||||
with zipfile.ZipFile(dest,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as archive:
|
||||
for path in sorted(folder.rglob('*')):
|
||||
if not path.is_file() or '.godot' in path.parts:continue
|
||||
if path.suffix=='.log' and path.parent!=win/'QA':continue
|
||||
rel=path.relative_to(folder)
|
||||
if label=='Source' and rel.parts[0]=='captures' and 'v013' not in rel.parts:continue
|
||||
archive.write(path,Path(folder.name)/rel)
|
||||
if label=='Source':
|
||||
for name in ['build_v131.ps1','fetch_windows_template.py','package_v131.py']:
|
||||
archive.write(root/'tools'/name,Path('tools')/name)
|
||||
with zipfile.ZipFile(dest) as archive:assert archive.testzip() is None
|
||||
print(f'VERIFIED {dest.name} {dest.stat().st_size} bytes SHA256 {sha(dest)}')
|
||||
print('BUILD_ID '+probe['id'])
|
||||
@@ -0,0 +1,54 @@
|
||||
from pathlib import Path
|
||||
import hashlib, json, shutil, zipfile
|
||||
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.14'
|
||||
win=root/'Demon_v0.14_Windows'
|
||||
qa=root/'qa_v14'
|
||||
markers={
|
||||
'release-tests.log':'ALL WORKSHOP TESTS PASSED',
|
||||
'release-ui.log':'PASS: actual mouse input',
|
||||
'release-audio.log':'original placement and deletion effects',
|
||||
'release-capture.log':'CAPTURE_BUILD:',
|
||||
'probe.log':'BUILD_PROBE:',
|
||||
}
|
||||
for name,marker in markers.items():
|
||||
log=(qa/name).read_text(encoding='utf-8-sig')
|
||||
assert marker in log,name
|
||||
assert not any(word in log for word in ['ERROR:','Assertion failed','QA check failed']),name
|
||||
|
||||
probe=json.loads(next(line.split('BUILD_PROBE: ',1)[1] for line in (qa/'probe.log').read_text(encoding='utf-8-sig').splitlines() if 'BUILD_PROBE: ' in line))
|
||||
assert probe['id'].startswith('0.14-') and probe['id']!='0.14-editor'
|
||||
assert 'CAPTURE_BUILD: '+probe['id'] in (qa/'release-capture.log').read_text(encoding='utf-8-sig')
|
||||
def sha(path):return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
for name in ['README_RU.md','README_0.13.md','AUDIO_CREDITS.md','MODEL_CREDITS.md','MODEL_LICENSE_CC0.txt','GODOT_LICENSE.txt']:
|
||||
shutil.copy2(src/name,win/name)
|
||||
for name in ['KellySlab-OFL.txt','RuslanDisplay-OFL.txt']:
|
||||
shutil.copy2(src/'art/fonts'/name,win/name)
|
||||
(win/'QA').mkdir(exist_ok=True)
|
||||
for name in markers:shutil.copy2(qa/name,win/'QA'/name)
|
||||
for shot in (win/'captures/v013').glob('*.png'):shutil.copy2(shot,src/'captures/v013'/shot.name)
|
||||
manifest={
|
||||
'version':'0.14','date':'2026-10-27','build_id':probe['id'],
|
||||
'engine':'Godot 4.3.stable.official.77dcf97d8',
|
||||
'binary_sha256':sha(win/'Demon.exe'),
|
||||
'validation':{'release_gameplay':'passed','release_mouse_ui':'passed','release_audio':'passed','release_capture':'passed'},
|
||||
'starting_gold':240,'arrival_interval_seconds':3,'queue_warning_threshold':7,'queue_capacity':7,
|
||||
'skill_columns':3,'maximum_helpers':3,
|
||||
}
|
||||
(win/'BUILD_MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
for folder,label in [(win,'Windows'),(src,'Source')]:
|
||||
dest=root/f'Demon_v0.14_{label}.zip'
|
||||
with zipfile.ZipFile(dest,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as archive:
|
||||
for path in sorted(folder.rglob('*')):
|
||||
if not path.is_file() or '.godot' in path.parts:continue
|
||||
if path.suffix=='.log' and path.parent!=win/'QA':continue
|
||||
rel=path.relative_to(folder)
|
||||
if label=='Source' and rel.parts[0]=='captures' and 'v013' not in rel.parts:continue
|
||||
archive.write(path,Path(folder.name)/rel)
|
||||
if label=='Source':
|
||||
for name in ['build_v14.ps1','fetch_windows_template.py','package_v14.py','make_build_sfx.py']:
|
||||
archive.write(root/'tools'/name,Path('tools')/name)
|
||||
with zipfile.ZipFile(dest) as archive:assert archive.testzip() is None
|
||||
print(f'VERIFIED {dest.name} {dest.stat().st_size} bytes SHA256 {sha(dest)}')
|
||||
print('BUILD_ID '+probe['id'])
|
||||
@@ -0,0 +1,55 @@
|
||||
from pathlib import Path
|
||||
import hashlib, json, shutil, zipfile
|
||||
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.15'
|
||||
win=root/'Demon_v0.15_Windows'
|
||||
qa=root/'qa_v15'
|
||||
markers={
|
||||
'release-tests.log':'ALL WORKSHOP TESTS PASSED',
|
||||
'release-sentences.log':'ALL SENTENCE TESTS PASSED',
|
||||
'release-ui.log':'PASS: actual mouse input',
|
||||
'release-audio.log':'original placement and deletion effects',
|
||||
'release-capture.log':'CAPTURE_BUILD:',
|
||||
'probe.log':'BUILD_PROBE:',
|
||||
}
|
||||
for name,marker in markers.items():
|
||||
log=(qa/name).read_text(encoding='utf-8-sig')
|
||||
assert marker in log,name
|
||||
assert not any(word in log for word in ['ERROR:','Assertion failed','QA check failed']),name
|
||||
|
||||
probe=json.loads(next(line.split('BUILD_PROBE: ',1)[1] for line in (qa/'probe.log').read_text(encoding='utf-8-sig').splitlines() if 'BUILD_PROBE: ' in line))
|
||||
assert probe['id'].startswith('0.15-') and probe['id']!='0.15-editor'
|
||||
assert 'CAPTURE_BUILD: '+probe['id'] in (qa/'release-capture.log').read_text(encoding='utf-8-sig')
|
||||
def sha(path):return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
for name in ['README_RU.md','README_0.13.md','AUDIO_CREDITS.md','MODEL_CREDITS.md','MODEL_LICENSE_CC0.txt','GODOT_LICENSE.txt']:
|
||||
shutil.copy2(src/name,win/name)
|
||||
for name in ['KellySlab-OFL.txt','RuslanDisplay-OFL.txt']:
|
||||
shutil.copy2(src/'art/fonts'/name,win/name)
|
||||
(win/'QA').mkdir(exist_ok=True)
|
||||
for name in markers:shutil.copy2(qa/name,win/'QA'/name)
|
||||
for shot in (win/'captures/v013').glob('*.png'):shutil.copy2(shot,src/'captures/v013'/shot.name)
|
||||
manifest={
|
||||
'version':'0.15','date':'2026-10-27','build_id':probe['id'],
|
||||
'engine':'Godot 4.3.stable.official.77dcf97d8',
|
||||
'binary_sha256':sha(win/'Demon.exe'),
|
||||
'validation':{'release_gameplay':'passed','release_mouse_ui':'passed','release_audio':'passed','release_capture':'passed','release_sentences':'passed'},
|
||||
'starting_gold':240,'arrival_interval_seconds':3,'queue_warning_threshold':7,'queue_capacity':7,
|
||||
'skill_columns':3,'maximum_helpers':3,'apparatus_types':6,'maximum_punishments':3,'level_area_scale':1.25,
|
||||
}
|
||||
(win/'BUILD_MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
for folder,label in [(win,'Windows'),(src,'Source')]:
|
||||
dest=root/f'Demon_v0.15_{label}.zip'
|
||||
with zipfile.ZipFile(dest,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as archive:
|
||||
for path in sorted(folder.rglob('*')):
|
||||
if not path.is_file() or '.godot' in path.parts:continue
|
||||
if path.suffix=='.log' and path.parent!=win/'QA':continue
|
||||
rel=path.relative_to(folder)
|
||||
if label=='Source' and rel.parts[0]=='captures' and 'v013' not in rel.parts:continue
|
||||
archive.write(path,Path(folder.name)/rel)
|
||||
if label=='Source':
|
||||
for name in ['build_v15.ps1','fetch_windows_template.py','package_v15.py','make_infernal_pop.py']:
|
||||
archive.write(root/'tools'/name,Path('tools')/name)
|
||||
with zipfile.ZipFile(dest) as archive:assert archive.testzip() is None
|
||||
print(f'VERIFIED {dest.name} {dest.stat().st_size} bytes SHA256 {sha(dest)}')
|
||||
print('BUILD_ID '+probe['id'])
|
||||
@@ -0,0 +1,59 @@
|
||||
from pathlib import Path
|
||||
import hashlib, json, shutil, zipfile
|
||||
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.16'
|
||||
win=root/'Demon_v0.16_Windows'
|
||||
qa=root/'qa_v16'
|
||||
markers={
|
||||
'release-tests.log':'ALL WORKSHOP TESTS PASSED',
|
||||
'release-hud.log':'ALL HUD TESTS PASSED',
|
||||
'release-sentences.log':'ALL SENTENCE TESTS PASSED',
|
||||
'release-ui.log':'PASS: actual mouse input',
|
||||
'release-audio.log':'original placement and deletion effects',
|
||||
'release-capture.log':'CAPTURE_BUILD:',
|
||||
'probe.log':'BUILD_PROBE:',
|
||||
}
|
||||
for name,marker in markers.items():
|
||||
log=(qa/name).read_text(encoding='utf-8-sig')
|
||||
assert marker in log,name
|
||||
assert not any(word in log for word in ['ERROR:','Assertion failed','QA check failed']),name
|
||||
|
||||
probe=json.loads(next(line.split('BUILD_PROBE: ',1)[1] for line in (qa/'probe.log').read_text(encoding='utf-8-sig').splitlines() if 'BUILD_PROBE: ' in line))
|
||||
assert probe['id'].startswith('0.16-') and probe['id']!='0.16-editor'
|
||||
assert 'CAPTURE_BUILD: '+probe['id'] in (qa/'release-capture.log').read_text(encoding='utf-8-sig')
|
||||
capture_names={line.split('CAPTURE: ',1)[1].strip()+'.png' for line in (qa/'release-capture.log').read_text(encoding='utf-8-sig').splitlines() if line.startswith('CAPTURE: ')}
|
||||
|
||||
def sha(path):return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
for name in ['README_RU.md','README_0.13.md','AUDIO_CREDITS.md','MODEL_CREDITS.md','MODEL_LICENSE_CC0.txt','GODOT_LICENSE.txt']:
|
||||
shutil.copy2(src/name,win/name)
|
||||
for name in ['KellySlab-OFL.txt','RuslanDisplay-OFL.txt']:
|
||||
shutil.copy2(src/'art/fonts'/name,win/name)
|
||||
(win/'QA').mkdir(exist_ok=True)
|
||||
for name in markers:shutil.copy2(qa/name,win/'QA'/name)
|
||||
for shot in (win/'captures/v013').glob('*.png'):shutil.copy2(shot,src/'captures/v013'/shot.name)
|
||||
manifest={
|
||||
'version':'0.16','date':'2026-10-27','build_id':probe['id'],
|
||||
'engine':'Godot 4.3.stable.official.77dcf97d8',
|
||||
'binary_sha256':sha(win/'Demon.exe'),
|
||||
'validation':{'release_gameplay':'passed','release_mouse_ui':'passed','release_audio':'passed','release_capture':'passed','release_sentences':'passed','release_hud':'passed'},
|
||||
'starting_gold':240,'arrival_interval_seconds':3,'queue_warning_threshold':7,'queue_capacity':7,
|
||||
'skill_columns':3,'maximum_helpers':3,'apparatus_types':6,'maximum_punishments':3,'level_area_scale':1.25,'minimal_hud':True,'soul_dialogue_interval_seconds':30,'hero_dialogue_interval_seconds':100,
|
||||
}
|
||||
(win/'BUILD_MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
for folder,label in [(win,'Windows'),(src,'Source')]:
|
||||
dest=root/f'Demon_v0.16_{label}.zip'
|
||||
with zipfile.ZipFile(dest,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as archive:
|
||||
for path in sorted(folder.rglob('*')):
|
||||
if not path.is_file() or '.godot' in path.parts:continue
|
||||
if path.suffix=='.log' and path.parent!=win/'QA':continue
|
||||
rel=path.relative_to(folder)
|
||||
if rel.parts[0]=='captures' and path.name not in capture_names:continue
|
||||
if label=='Source' and rel.parts[0]=='captures' and 'v013' not in rel.parts:continue
|
||||
archive.write(path,Path(folder.name)/rel)
|
||||
if label=='Source':
|
||||
for name in ['build_v16.ps1','fetch_windows_template.py','package_v16.py','make_infernal_pop.py']:
|
||||
archive.write(root/'tools'/name,Path('tools')/name)
|
||||
with zipfile.ZipFile(dest) as archive:assert archive.testzip() is None
|
||||
print(f'VERIFIED {dest.name} {dest.stat().st_size} bytes SHA256 {sha(dest)}')
|
||||
print('BUILD_ID '+probe['id'])
|
||||
@@ -0,0 +1,60 @@
|
||||
from pathlib import Path
|
||||
import hashlib, json, shutil, zipfile
|
||||
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.17'
|
||||
win=root/'Demon_v0.17_Windows'
|
||||
qa=root/'qa_v17'
|
||||
markers={
|
||||
'release-tests.log':'ALL WORKSHOP TESTS PASSED',
|
||||
'release-visuals.log':'ALL VISUAL TESTS PASSED',
|
||||
'release-hud.log':'ALL HUD TESTS PASSED',
|
||||
'release-sentences.log':'ALL SENTENCE TESTS PASSED',
|
||||
'release-ui.log':'PASS: actual mouse input',
|
||||
'release-audio.log':'original placement and deletion effects',
|
||||
'release-capture.log':'CAPTURE_BUILD:',
|
||||
'probe.log':'BUILD_PROBE:',
|
||||
}
|
||||
for name,marker in markers.items():
|
||||
log=(qa/name).read_text(encoding='utf-8-sig')
|
||||
assert marker in log,name
|
||||
assert not any(word in log for word in ['ERROR:','Assertion failed','QA check failed']),name
|
||||
|
||||
probe=json.loads(next(line.split('BUILD_PROBE: ',1)[1] for line in (qa/'probe.log').read_text(encoding='utf-8-sig').splitlines() if 'BUILD_PROBE: ' in line))
|
||||
assert probe['id'].startswith('0.17-') and probe['id']!='0.17-editor'
|
||||
assert 'CAPTURE_BUILD: '+probe['id'] in (qa/'release-capture.log').read_text(encoding='utf-8-sig')
|
||||
capture_names={line.split('CAPTURE: ',1)[1].strip()+'.png' for line in (qa/'release-capture.log').read_text(encoding='utf-8-sig').splitlines() if line.startswith('CAPTURE: ')}
|
||||
|
||||
def sha(path):return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
for name in ['README_RU.md','VISUAL_REFERENCES.md','README_0.13.md','AUDIO_CREDITS.md','MODEL_CREDITS.md','MODEL_LICENSE_CC0.txt','GODOT_LICENSE.txt']:
|
||||
shutil.copy2(src/name,win/name)
|
||||
for name in ['KellySlab-OFL.txt','RuslanDisplay-OFL.txt']:
|
||||
shutil.copy2(src/'art/fonts'/name,win/name)
|
||||
(win/'QA').mkdir(exist_ok=True)
|
||||
for name in markers:shutil.copy2(qa/name,win/'QA'/name)
|
||||
for shot in (win/'captures/v013').glob('*.png'):shutil.copy2(shot,src/'captures/v013'/shot.name)
|
||||
manifest={
|
||||
'version':'0.17','date':'2026-10-27','build_id':probe['id'],
|
||||
'engine':'Godot 4.3.stable.official.77dcf97d8',
|
||||
'binary_sha256':sha(win/'Demon.exe'),
|
||||
'validation':{'release_gameplay':'passed','release_mouse_ui':'passed','release_audio':'passed','release_capture':'passed','release_sentences':'passed','release_hud':'passed','release_visuals':'passed'},
|
||||
'overhead_icon_scale':1.2,'water_vertices_per_surface':18432,'chair_skeletons_tested':10,'starting_gold':240,'arrival_interval_seconds':3,'queue_warning_threshold':7,'queue_capacity':7,
|
||||
'skill_columns':3,'maximum_helpers':3,'apparatus_types':6,'maximum_punishments':3,'level_area_scale':1.25,'minimal_hud':True,'soul_dialogue_interval_seconds':30,'hero_dialogue_interval_seconds':100,
|
||||
}
|
||||
(win/'BUILD_MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
for folder,label in [(win,'Windows'),(src,'Source')]:
|
||||
dest=root/f'Demon_v0.17_{label}.zip'
|
||||
with zipfile.ZipFile(dest,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as archive:
|
||||
for path in sorted(folder.rglob('*')):
|
||||
if not path.is_file() or '.godot' in path.parts:continue
|
||||
if path.suffix=='.log' and path.parent!=win/'QA':continue
|
||||
rel=path.relative_to(folder)
|
||||
if rel.parts[0]=='captures' and path.name not in capture_names:continue
|
||||
if label=='Source' and rel.parts[0]=='captures' and 'v013' not in rel.parts:continue
|
||||
archive.write(path,Path(folder.name)/rel)
|
||||
if label=='Source':
|
||||
for name in ['build_v17.ps1','fetch_windows_template.py','package_v17.py','make_infernal_pop.py']:
|
||||
archive.write(root/'tools'/name,Path('tools')/name)
|
||||
with zipfile.ZipFile(dest) as archive:assert archive.testzip() is None
|
||||
print(f'VERIFIED {dest.name} {dest.stat().st_size} bytes SHA256 {sha(dest)}')
|
||||
print('BUILD_ID '+probe['id'])
|
||||
@@ -0,0 +1,65 @@
|
||||
from pathlib import Path
|
||||
import hashlib, json, shutil, zipfile
|
||||
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.18'
|
||||
win=root/'Demon_v0.18_Windows'
|
||||
qa=root/'qa_v18'
|
||||
markers={
|
||||
'release-tests.log':'ALL WORKSHOP TESTS PASSED',
|
||||
'release-gait.log':'ALL GAIT TESTS PASSED',
|
||||
'release-capture-gait.log':'GAIT_CAPTURE_BUILD:',
|
||||
'release-visuals.log':'ALL VISUAL TESTS PASSED',
|
||||
'release-hud.log':'ALL HUD TESTS PASSED',
|
||||
'release-sentences.log':'ALL SENTENCE TESTS PASSED',
|
||||
'release-ui.log':'PASS: actual mouse input',
|
||||
'release-audio.log':'original placement and deletion effects',
|
||||
'release-capture.log':'CAPTURE_BUILD:',
|
||||
'probe.log':'BUILD_PROBE:',
|
||||
}
|
||||
for name,marker in markers.items():
|
||||
log=(qa/name).read_text(encoding='utf-8-sig')
|
||||
assert marker in log,name
|
||||
assert not any(word in log for word in ['ERROR:','Assertion failed','QA check failed']),name
|
||||
|
||||
probe=json.loads(next(line.split('BUILD_PROBE: ',1)[1] for line in (qa/'probe.log').read_text(encoding='utf-8-sig').splitlines() if 'BUILD_PROBE: ' in line))
|
||||
assert probe['id'].startswith('0.18-') and probe['id']!='0.18-editor'
|
||||
assert 'CAPTURE_BUILD: '+probe['id'] in (qa/'release-capture.log').read_text(encoding='utf-8-sig')
|
||||
assert 'GAIT_CAPTURE_BUILD: '+probe['id'] in (qa/'release-capture-gait.log').read_text(encoding='utf-8-sig')
|
||||
capture_names={line.split('CAPTURE: ',1)[1].strip()+'.png' for line in (qa/'release-capture.log').read_text(encoding='utf-8-sig').splitlines() if line.startswith('CAPTURE: ')}
|
||||
|
||||
def sha(path):return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
for name in ['README_RU.md','VISUAL_REFERENCES.md','README_0.13.md','AUDIO_CREDITS.md','MODEL_CREDITS.md','MODEL_LICENSE_CC0.txt','GODOT_LICENSE.txt']:
|
||||
shutil.copy2(src/name,win/name)
|
||||
for name in ['KellySlab-OFL.txt','RuslanDisplay-OFL.txt']:
|
||||
shutil.copy2(src/'art/fonts'/name,win/name)
|
||||
(win/'QA').mkdir(exist_ok=True)
|
||||
for name in markers:shutil.copy2(qa/name,win/'QA'/name)
|
||||
for shot in (win/'captures/v013').glob('*.png'):shutil.copy2(shot,src/'captures/v013'/shot.name)
|
||||
manifest={
|
||||
'version':'0.18','date':'2026-10-27','build_id':probe['id'],
|
||||
'engine':'Godot 4.3.stable.official.77dcf97d8',
|
||||
'binary_sha256':sha(win/'Demon.exe'),
|
||||
'validation':{'release_gameplay':'passed','release_mouse_ui':'passed','release_audio':'passed','release_capture':'passed','release_sentences':'passed','release_hud':'passed','release_visuals':'passed','release_gait':'passed','release_gait_capture':'passed'},
|
||||
'locomotion':'distance-driven catwalk with world-space foot planting','gait_actors_tested':4,'gait_speeds_tested':[1.0,2.5,3.3,4.375,5.775],'overhead_icon_scale':1.2,'water_vertices_per_surface':18432,'chair_skeletons_tested':10,'starting_gold':240,'arrival_interval_seconds':3,'queue_warning_threshold':7,'queue_capacity':7,
|
||||
'skill_columns':3,'maximum_helpers':3,'apparatus_types':6,'maximum_punishments':3,'level_area_scale':1.25,'minimal_hud':True,'soul_dialogue_interval_seconds':30,'hero_dialogue_interval_seconds':100,
|
||||
}
|
||||
(win/'BUILD_MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
for folder,label in [(win,'Windows'),(src,'Source')]:
|
||||
dest=root/f'Demon_v0.18_{label}.zip'
|
||||
with zipfile.ZipFile(dest,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as archive:
|
||||
for path in sorted(folder.rglob('*')):
|
||||
if not path.is_file() or '.godot' in path.parts:continue
|
||||
if path.suffix=='.log' and path.parent!=win/'QA':continue
|
||||
rel=path.relative_to(folder)
|
||||
if rel.parts[0]=='captures':
|
||||
if 'v018' in rel.parts:
|
||||
if path.name not in ['catwalk-preview.webp','catwalk-side-preview.webp','catwalk-06.png','catwalk-side-12.png']:continue
|
||||
elif path.name not in capture_names or 'v013' not in rel.parts:continue
|
||||
archive.write(path,Path(folder.name)/rel)
|
||||
if label=='Source':
|
||||
for name in ['build_v18.ps1','fetch_windows_template.py','package_v18.py','make_infernal_pop.py']:
|
||||
archive.write(root/'tools'/name,Path('tools')/name)
|
||||
with zipfile.ZipFile(dest) as archive:assert archive.testzip() is None
|
||||
print(f'VERIFIED {dest.name} {dest.stat().st_size} bytes SHA256 {sha(dest)}')
|
||||
print('BUILD_ID '+probe['id'])
|
||||
@@ -0,0 +1,44 @@
|
||||
from pathlib import Path
|
||||
import hashlib,json,shutil,zipfile
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.18.1';win=root/'Demon_v0.18.1_Windows';qa=root/'qa_v181'
|
||||
markers={
|
||||
'release-posture.log':'ALL POSTURE TESTS PASSED',
|
||||
'release-gait.log':'ALL GAIT TESTS PASSED',
|
||||
'release-tests.log':'ALL WORKSHOP TESTS PASSED',
|
||||
'release-ui.log':'PASS: actual mouse input',
|
||||
'release-sentences.log':'ALL SENTENCE TESTS PASSED',
|
||||
'release-capture.log':'POSTURE_CAPTURE_BUILD:',
|
||||
'probe.log':'BUILD_PROBE:',
|
||||
}
|
||||
for name,marker in markers.items():
|
||||
log=(qa/name).read_text(encoding='utf-8-sig')
|
||||
assert marker in log,name
|
||||
assert not any(s in log for s in ['ERROR:','Assertion failed','QA check failed']),name
|
||||
probe=json.loads(next(s.split('BUILD_PROBE: ',1)[1] for s in (qa/'probe.log').read_text(encoding='utf-8-sig').splitlines() if 'BUILD_PROBE: ' in s))
|
||||
assert probe['version']=='0.18.1' and probe['id']!='0.18.1-editor'
|
||||
assert 'POSTURE_CAPTURE_BUILD: '+probe['id'] in (qa/'release-capture.log').read_text(encoding='utf-8-sig')
|
||||
def sha(p):return hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
for name in ['README_RU.md','VISUAL_REFERENCES.md','AUDIO_CREDITS.md','MODEL_CREDITS.md','MODEL_LICENSE_CC0.txt','GODOT_LICENSE.txt']:
|
||||
shutil.copy2(src/name,win/name)
|
||||
for name in ['KellySlab-OFL.txt','RuslanDisplay-OFL.txt']:shutil.copy2(src/'art/fonts'/name,win/name)
|
||||
(win/'QA').mkdir(exist_ok=True)
|
||||
for name in markers:shutil.copy2(qa/name,win/'QA'/name)
|
||||
(src/'captures/v0181').mkdir(parents=True,exist_ok=True)
|
||||
for shot in (win/'captures/v0181').glob('*.png'):shutil.copy2(shot,src/'captures/v0181'/shot.name)
|
||||
manifest={'version':'0.18.1','build_id':probe['id'],'engine':'Godot 4.3.stable.official.77dcf97d8','binary_sha256':sha(win/'Demon.exe'),'fix':'Restore sampled animation pose before procedural gait; remove accumulating lateral bone rotation','validation':{'release_posture':'passed','release_gait':'passed','release_gameplay':'passed','release_mouse_ui':'passed','release_sentences':'passed','release_capture':'passed'},'posture_actors_tested':4,'posture_simulated_seconds':480,'maximum_tested_lateral_tilt_degrees':2}
|
||||
(win/'BUILD_MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
for folder,label in [(win,'Windows'),(src,'Source')]:
|
||||
destination=root/f'Demon_v0.18.1_{label}.zip'
|
||||
with zipfile.ZipFile(destination,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as archive:
|
||||
for path in sorted(folder.rglob('*')):
|
||||
if not path.is_file() or '.godot' in path.parts:continue
|
||||
rel=path.relative_to(folder)
|
||||
if path.suffix=='.log' and path.parent!=win/'QA':continue
|
||||
if rel.parts[0]=='captures' and ('v0181' not in rel.parts or path.suffix!='.png'):continue
|
||||
archive.write(path,Path(folder.name)/rel)
|
||||
if label=='Source':
|
||||
for name in ['build_v181.ps1','package_v181.py','fetch_windows_template.py']:archive.write(root/'tools'/name,Path('tools')/name)
|
||||
with zipfile.ZipFile(destination) as archive:assert archive.testzip() is None
|
||||
print('VERIFIED',destination.name,destination.stat().st_size,'SHA256',sha(destination))
|
||||
print('BUILD_ID',probe['id'])
|
||||
@@ -0,0 +1,62 @@
|
||||
from pathlib import Path
|
||||
import hashlib,json,shutil,zipfile
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.19';win=root/'Demon_v0.19_Windows';qa=root/'qa_v19'
|
||||
markers={
|
||||
'release-economy.log':'ALL ECONOMY TESTS PASSED',
|
||||
'release-tests.log':'ALL WORKSHOP TESTS PASSED',
|
||||
'release-ui.log':'PASS: actual mouse input',
|
||||
'release-sentences.log':'ALL SENTENCE TESTS PASSED',
|
||||
'release-hud.log':'ALL HUD TESTS PASSED',
|
||||
'release-gait.log':'ALL GAIT TESTS PASSED',
|
||||
'release-posture.log':'ALL POSTURE TESTS PASSED',
|
||||
'release-visuals.log':'ALL VISUAL TESTS PASSED',
|
||||
'release-audio.log':'PASS: real Ogg playback wraps',
|
||||
'release-exit.log':'QUIT: main-menu exit action',
|
||||
'release-capture.log':'ECONOMY_CAPTURE_BUILD:',
|
||||
'release-probe.log':'BUILD_PROBE:',
|
||||
'balance-simulation.log':'"policy":"invest"',
|
||||
}
|
||||
for name,marker in markers.items():
|
||||
log=(qa/name).read_text(encoding='utf-8-sig')
|
||||
assert marker in log,name
|
||||
assert not any(s in log for s in ['ERROR:','Assertion failed','QA check failed']),name
|
||||
probe=json.loads(next(s.split('BUILD_PROBE: ',1)[1] for s in (qa/'release-probe.log').read_text(encoding='utf-8-sig').splitlines() if 'BUILD_PROBE: ' in s))
|
||||
assert probe['version']=='0.19' and probe['id']!='0.19-editor'
|
||||
assert 'ECONOMY_CAPTURE_BUILD: '+probe['id'] in (qa/'release-capture.log').read_text(encoding='utf-8-sig')
|
||||
assert probe['id'] in (qa/'build.log').read_text(encoding='utf-8-sig')
|
||||
def sha(p):return hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
for name in ['README_RU.md','BALANCE.md','VISUAL_REFERENCES.md','AUDIO_CREDITS.md','MODEL_CREDITS.md','MODEL_LICENSE_CC0.txt','GODOT_LICENSE.txt']:
|
||||
shutil.copy2(src/name,win/name)
|
||||
for name in ['KellySlab-OFL.txt','RuslanDisplay-OFL.txt']:shutil.copy2(src/'art/fonts'/name,win/name)
|
||||
(win/'QA').mkdir(exist_ok=True)
|
||||
for name in [*markers,'balance_simulation.json']:shutil.copy2(qa/name,win/'QA'/name)
|
||||
(src/'captures/v019').mkdir(parents=True,exist_ok=True)
|
||||
shots=list((win/'captures/v019').glob('*.png'))
|
||||
assert len(shots)==5
|
||||
for shot in shots:shutil.copy2(shot,src/'captures/v019'/shot.name)
|
||||
manifest={
|
||||
'version':'0.19','build_id':probe['id'],'engine':'Godot 4.3.stable.official.77dcf97d8',
|
||||
'binary_sha256':sha(win/'Demon.exe'),
|
||||
'economy':{'spawn_interval_seconds':5,'queue_capacity':7,'level_cap':10,'tool_currency':'gold','helper_currency':'souls','heroine_currency':'level_points','penalty_grace_seconds':12,'penalty_interval_seconds':5,'protected_gold':60,'protected_souls':6,'penalty_removes_xp_or_upgrades':False},
|
||||
'validation':{k:'passed' for k in markers},'economy_assertions':240,
|
||||
'balance_model':{'policies':5,'seconds_per_policy':1200,'travel_approximation':True},
|
||||
'source_sha256':{p.relative_to(src).as_posix():sha(p) for p in sorted(src.rglob('*')) if p.is_file() and '.godot' not in p.parts and p.suffix in ['.gd','.godot','.tscn','.tres','.gdshader','.cfg']},
|
||||
}
|
||||
(win/'BUILD_MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
for folder,label in [(win,'Windows'),(src,'Source')]:
|
||||
destination=root/f'Demon_v0.19_{label}.zip'
|
||||
with zipfile.ZipFile(destination,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as archive:
|
||||
for path in sorted(folder.rglob('*')):
|
||||
if not path.is_file() or '.godot' in path.parts:continue
|
||||
rel=path.relative_to(folder)
|
||||
if path.suffix=='.log' and path.parent!=win/'QA':continue
|
||||
if rel.parts[0]=='captures' and ('v019' not in rel.parts or path.suffix!='.png'):continue
|
||||
archive.write(path,Path(folder.name)/rel)
|
||||
if label=='Source':
|
||||
for name in ['build_v19.ps1','verify_v19.ps1','package_v19.py','fetch_windows_template.py']:archive.write(root/'tools'/name,Path('tools')/name)
|
||||
with zipfile.ZipFile(destination) as archive:
|
||||
assert archive.testzip() is None
|
||||
if label=='Windows':assert hashlib.sha256(archive.read('Demon_v0.19_Windows/Demon.exe')).hexdigest()==manifest['binary_sha256']
|
||||
print('VERIFIED',destination.name,destination.stat().st_size,'SHA256',sha(destination),flush=True)
|
||||
print('BUILD_ID',probe['id'],flush=True)
|
||||
@@ -0,0 +1,55 @@
|
||||
from pathlib import Path
|
||||
root=Path(__file__).resolve().parent.parent/'Demon_v0.16'
|
||||
p=root/'judgement.gd';s=p.read_text(encoding='utf-8-sig')
|
||||
start=s.index('func update_label(');end=s.index('\nfunc complete_stage(',start)
|
||||
s=s[:start]+'''func update_label(s):
|
||||
s.label.text="";s.label.hide()
|
||||
if not s.has("task_badge") or not is_instance_valid(s.task_badge):
|
||||
var badge=PanelContainer.new();g.hud.add_child(badge);badge.name="PunishmentIcons";badge.z_index=3
|
||||
badge.mouse_filter=Control.MOUSE_FILTER_IGNORE
|
||||
var style=StyleBoxFlat.new();style.bg_color=Color(.07,.055,.09,.90);style.border_color=Color("796749");style.set_border_width_all(1)
|
||||
style.content_margin_left=3;style.content_margin_right=3;style.content_margin_top=3;style.content_margin_bottom=3
|
||||
badge.add_theme_stylebox_override("panel",style)
|
||||
var row=HBoxContainer.new();badge.add_child(row);row.mouse_filter=Control.MOUSE_FILTER_IGNORE;row.add_theme_constant_override("separation",3)
|
||||
s["task_badge"]=badge;s["task_row"]=row;s["task_icon_nodes"]=[]
|
||||
s.node.tree_exiting.connect(func():
|
||||
if is_instance_valid(badge):badge.queue_free()
|
||||
)
|
||||
var rebuild=s.task_icon_nodes.size()!=s.required.size()
|
||||
if not rebuild:
|
||||
for i in range(s.required.size()):
|
||||
if s.task_icon_nodes[i].kind!=w.Icon.APPARATUS[s.required[i]]:rebuild=true
|
||||
if rebuild:
|
||||
for icon in s.task_icon_nodes:s.task_row.remove_child(icon);icon.queue_free()
|
||||
s.task_icon_nodes.clear()
|
||||
for kind in s.required:
|
||||
var icon=w.Icon.new();icon.kind=w.Icon.APPARATUS[kind];icon.custom_minimum_size=Vector2(24,24);s.task_row.add_child(icon)
|
||||
s.task_icon_nodes.append(icon)
|
||||
for i in range(s.required.size()):
|
||||
var done=s.required[i] in s.served
|
||||
s.task_icon_nodes[i].completed=done;s.task_icon_nodes[i].tint=Color("a1dfa9") if done else Color("ddbd7b")
|
||||
|
||||
func update_icons():
|
||||
for s in g.souls:
|
||||
if not s.has("task_badge") or not is_instance_valid(s.task_badge):continue
|
||||
var show=not g.paused and not s.entering and not g.camera.is_position_behind(s.node.position)
|
||||
s.task_badge.visible=show
|
||||
if not show:continue
|
||||
var size=s.task_badge.get_combined_minimum_size()
|
||||
s.task_badge.size=size
|
||||
var point=g.camera.unproject_position(s.node.position+Vector3(0,3.15,0))
|
||||
s.task_badge.position=point-Vector2(size.x/2,size.y+5)
|
||||
for i in range(s.required.size()):
|
||||
var progress=-1.0
|
||||
if s.state=="mounted" and s.assigned>=0 and s.assigned<w.stations.size():
|
||||
var d=w.stations[s.assigned]
|
||||
if d.selected==s.required[i] and not s.required[i] in s.served:progress=d.bar.value/100.0
|
||||
if not is_equal_approx(s.task_icon_nodes[i].progress,progress):s.task_icon_nodes[i].progress=progress
|
||||
''' + s[end:]
|
||||
p.write_text(s,encoding='utf-8')
|
||||
p=root/'workshop.gd';s=p.read_text(encoding='utf-8-sig')
|
||||
s=s.replace('\tg.life.burn(soul);g.souls.remove_at(index)','\tif soul.has("task_badge"):soul.task_badge.hide()\n\tg.life.burn(soul);g.souls.remove_at(index)')
|
||||
start=s.index('\tg.floating("+%d ЗОЛОТА');end=s.index('\n',start)
|
||||
s=s[:start]+s[end:]
|
||||
p.write_text(s,encoding='utf-8')
|
||||
print('Shared punishment badges and progress rings implemented')
|
||||
@@ -0,0 +1,12 @@
|
||||
extends SceneTree
|
||||
func _initialize():call_deferred("probe")
|
||||
func probe():
|
||||
var actor=preload("res://soul_actor.gd").new(0);root.add_child(actor);actor.rotation=Vector3.ZERO
|
||||
actor.animator.play(actor.clips["Idle"]);actor.animator.advance(0);actor.animator.pause()
|
||||
var sk=actor.find_children("*","Skeleton3D",true,false)[0]
|
||||
for i in range(sk.get_bone_count()):
|
||||
var n=sk.get_bone_name(i)
|
||||
if n in ["root","hips","spine01","spine02","head","jaw"] or n.begins_with("upperleg01") or n.begins_with("lowerleg01") or n.begins_with("foot") or n.begins_with("upperarm01") or n.begins_with("lowerarm01") or n.begins_with("wrist") or n.begins_with("hand"):
|
||||
print(n," world=",sk.to_global(sk.get_bone_global_pose(i).origin)," parent=",sk.get_bone_parent(i))
|
||||
print("skeleton transform=",sk.global_transform)
|
||||
quit()
|
||||
@@ -0,0 +1,23 @@
|
||||
const fs=require('fs');
|
||||
const root=require('path').join(__dirname,'../Demon_v0.13');
|
||||
function edit(file,fn){const p=root+'/'+file;fs.writeFileSync(p,fn(fs.readFileSync(p,'utf8')).replace(/\r\n/g,'\n'));}
|
||||
edit('main.gd',s=>s
|
||||
.replace('const STATION =','var STATION =')
|
||||
.replace('var life\n','var life\nvar workshop\n').replace('var life\r\n','var life\r\nvar workshop\r\n')
|
||||
.replaceAll('0.12','0.13')
|
||||
.replace('\tapply_settings()\n','\tapply_settings()\n\tworkshop=preload("res://workshop.gd").new()\n\tadd_child(workshop)\n\tworkshop.setup(self)\n')
|
||||
.replace('\tapply_settings()\r\n','\tapply_settings()\r\n\tworkshop=preload("res://workshop.gd").new()\r\n\tadd_child(workshop)\r\n\tworkshop.setup(self)\r\n')
|
||||
.replace('func reset_shift():','func reset_shift():\n\tif workshop:workshop.reset()')
|
||||
.replace('coins=0;done=0;uid=0;','coins=240;done=0;uid=0;')
|
||||
.replace('development.tree_panel.hide();development.rebuild_device()','development.tree_panel.hide();development.rebuild_device()\n\tdevelopment.device.hide()')
|
||||
.replace('if not game_started or not souls.is_empty() or next_spawn_delay>0: return','if not game_started: return')
|
||||
.replace('\tdevelopment.speak(souls.back())','\tsouls.back()["state"]="queue"\n\tsouls.back()["assigned"]=-1')
|
||||
.replace('func _unhandled_input(event):','func _unhandled_input(event):\n\tif workshop and workshop.input(event):return')
|
||||
.replace('\tfor gear in moving_gears: gear.rotation.z+=dt*0.65','\tfor gear in moving_gears: gear.rotation.z+=dt*0.65\n\tif workshop:\n\t\tworkshop.update(dt)\n\t\treturn')
|
||||
.replace('"development":development.snapshot() if development else {}}','"development":development.snapshot() if development else {},"workshop":workshop.snapshot() if workshop else {}}')
|
||||
.replace('preload("res://tests.gd").new().run(self)','preload("res://workshop_tests.gd").new().run(self)')
|
||||
.replace('preload("res://tests.gd").new().run_ui(self)','preload("res://workshop_tests.gd").new().run_ui(self)'));
|
||||
edit('endless.gd',s=>s.replace(/\t# A fixed processing bay[\s\S]*?\t# Hundreds of cheap repeated cells/,'\tg.zone=g.torus(g,Vector3.ZERO,1,Color("746348"));g.zone.hide()\n\tg.ring=g.torus(g,Vector3.ZERO,.62,Color("b0b9ac"));g.ring.hide()\n\t# Hundreds of cheap repeated cells'));
|
||||
edit('addons/build_stamp/plugin.gd',s=>s.replaceAll('0.12','0.13'));
|
||||
edit('export_presets.cfg',s=>s.replaceAll('0.12','0.13'));
|
||||
console.log('Prepared 0.13 integration');
|
||||
@@ -0,0 +1,16 @@
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.13.1'
|
||||
if src.exists():raise SystemExit('0.13.1 already exists')
|
||||
shutil.copytree(root/'Demon_v0.13',src)
|
||||
for name in ['main.gd','addons/build_stamp/plugin.gd','export_presets.cfg','workshop_tests.gd','README_RU.md','README_0.13.md']:
|
||||
p=src/name
|
||||
p.write_text(p.read_text(encoding='utf-8-sig').replace('0.13','0.13.1'),encoding='utf-8')
|
||||
for original,new in [('build_v13.ps1','build_v131.ps1'),('package_v13.py','package_v131.py')]:
|
||||
data=(root/'tools'/original).read_text(encoding='utf-8-sig')
|
||||
data=data.replace('Demon_v0.13','Demon_v0.13.1').replace("'0.13'","'0.13.1'").replace("'0.13-'","'0.13.1-'")
|
||||
data=data.replace('build_v13.ps1','build_v131.ps1').replace('package_v13.py','package_v131.py').replace("root/'qa'","root/'qa_v131'")
|
||||
(root/'tools'/new).write_text(data,encoding='utf-8')
|
||||
(root/'qa_v131').mkdir(exist_ok=True)
|
||||
print('Prepared Demon 0.13.1')
|
||||
@@ -0,0 +1,17 @@
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.14'
|
||||
if src.exists():raise SystemExit('Demon_v0.14 already exists')
|
||||
shutil.copytree(root/'Demon_v0.13.1',src)
|
||||
for name in ['main.gd','addons/build_stamp/plugin.gd','export_presets.cfg','workshop_tests.gd','README_RU.md','README_0.13.md']:
|
||||
p=src/name
|
||||
p.write_text(p.read_text(encoding='utf-8-sig').replace('0.13.1','0.14'),encoding='utf-8')
|
||||
for old,new in [('build_v131.ps1','build_v14.ps1'),('package_v131.py','package_v14.py')]:
|
||||
data=(root/'tools'/old).read_text(encoding='utf-8-sig')
|
||||
data=data.replace('Demon_v0.13.1','Demon_v0.14').replace("'0.13.1'","'0.14'").replace("'0.13.1-'","'0.14-'")
|
||||
data=data.replace('build_v131.ps1','build_v14.ps1').replace('package_v131.py','package_v14.py').replace("root/'qa_v131'","root/'qa_v14'")
|
||||
data=data.replace("'queue_warning_threshold':10","'queue_warning_threshold':7,'queue_capacity':7")
|
||||
(root/'tools'/new).write_text(data,encoding='utf-8')
|
||||
(root/'qa_v14').mkdir(exist_ok=True)
|
||||
print('Prepared 0.14')
|
||||
@@ -0,0 +1,22 @@
|
||||
from pathlib import Path
|
||||
import shutil,struct,json
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.15'
|
||||
if src.exists():raise SystemExit('Demon_v0.15 already exists')
|
||||
shutil.copytree(root/'Demon_v0.14',src)
|
||||
for name in ['main.gd','addons/build_stamp/plugin.gd','export_presets.cfg','workshop_tests.gd','README_RU.md','README_0.13.md']:
|
||||
p=src/name
|
||||
s=p.read_text(encoding='utf-8-sig')
|
||||
s=s.replace('"0.14','"0.15').replace('Demon_v0.14','Demon_v0.15').replace('DEMON 0.14','DEMON 0.15').replace('Demon 0.14','Demon 0.15')
|
||||
p.write_text(s,encoding='utf-8')
|
||||
for old,new in [('build_v14.ps1','build_v15.ps1'),('package_v14.py','package_v15.py')]:
|
||||
data=(root/'tools'/old).read_text(encoding='utf-8-sig')
|
||||
data=data.replace('Demon_v0.14','Demon_v0.15').replace("'0.14'","'0.15'").replace("'0.14-'","'0.15-'").replace("'0.14-editor'","'0.15-editor'")
|
||||
data=data.replace('build_v14.ps1','build_v15.ps1').replace('package_v14.py','package_v15.py').replace("root/'qa_v14'","root/'qa_v15'")
|
||||
(root/'tools'/new).write_text(data,encoding='utf-8')
|
||||
(root/'qa_v15').mkdir(exist_ok=True)
|
||||
data=(src/'art/souls/soul_00.glb').read_bytes()
|
||||
size=struct.unpack_from('<I',data,12)[0]
|
||||
doc=json.loads(data[20:20+size])
|
||||
print('BONES',[(i,n['name']) for i,n in enumerate(doc['nodes']) if any(t in n.get('name','').lower() for t in ['leg','arm','pelvis','spine'])][:65])
|
||||
print('Prepared 0.15')
|
||||
@@ -0,0 +1,17 @@
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.16'
|
||||
if src.exists():raise SystemExit('Demon_v0.16 already exists')
|
||||
shutil.copytree(root/'Demon_v0.15',src)
|
||||
for name in ['main.gd','addons/build_stamp/plugin.gd','export_presets.cfg','workshop_tests.gd','sentence_tests.gd','README_RU.md','README_0.13.md']:
|
||||
p=src/name;s=p.read_text(encoding='utf-8-sig')
|
||||
s=s.replace('"0.15','"0.16').replace('Demon_v0.15','Demon_v0.16').replace('DEMON 0.15','DEMON 0.16').replace('Demon 0.15','Demon 0.16')
|
||||
p.write_text(s,encoding='utf-8')
|
||||
for old,new in [('build_v15.ps1','build_v16.ps1'),('package_v15.py','package_v16.py')]:
|
||||
s=(root/'tools'/old).read_text(encoding='utf-8-sig')
|
||||
s=s.replace('Demon_v0.15','Demon_v0.16').replace("'0.15'","'0.16'").replace("'0.15-'","'0.16-'").replace("'0.15-editor'","'0.16-editor'")
|
||||
s=s.replace('build_v15.ps1','build_v16.ps1').replace('package_v15.py','package_v16.py').replace("root/'qa_v15'","root/'qa_v16'")
|
||||
(root/'tools'/new).write_text(s,encoding='utf-8')
|
||||
(root/'qa_v16').mkdir(exist_ok=True)
|
||||
print('Prepared 0.16')
|
||||
@@ -0,0 +1,17 @@
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
src=root/'Demon_v0.17'
|
||||
if src.exists():raise SystemExit('Demon_v0.17 exists')
|
||||
shutil.copytree(root/'Demon_v0.16',src)
|
||||
for name in ['main.gd','addons/build_stamp/plugin.gd','export_presets.cfg','workshop_tests.gd','sentence_tests.gd','hud_tests.gd','README_RU.md','README_0.13.md']:
|
||||
p=src/name;s=p.read_text(encoding='utf-8-sig')
|
||||
s=s.replace('"0.16','"0.17').replace('Demon_v0.16','Demon_v0.17').replace('DEMON 0.16','DEMON 0.17').replace('Demon 0.16','Demon 0.17')
|
||||
p.write_text(s,encoding='utf-8')
|
||||
for old,new in [('build_v16.ps1','build_v17.ps1'),('package_v16.py','package_v17.py')]:
|
||||
s=(root/'tools'/old).read_text(encoding='utf-8-sig')
|
||||
s=s.replace('Demon_v0.16','Demon_v0.17').replace("'0.16'","'0.17'").replace("'0.16-'","'0.17-'").replace("'0.16-editor'","'0.17-editor'")
|
||||
s=s.replace('build_v16.ps1','build_v17.ps1').replace('package_v16.py','package_v17.py').replace("root/'qa_v16'","root/'qa_v17'")
|
||||
(root/'tools'/new).write_text(s,encoding='utf-8')
|
||||
(root/'qa_v17/references').mkdir(parents=True,exist_ok=True)
|
||||
print('Prepared 0.17')
|
||||
@@ -0,0 +1,51 @@
|
||||
from pathlib import Path
|
||||
import sys, shutil, json, hashlib, zipfile
|
||||
ROOT=Path(__file__).resolve().parent.parent
|
||||
SRC=ROOT/'Demon_v0.12'; WIN=ROOT/'Demon_v0.12_Windows'
|
||||
def sha(p):return hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
if sys.argv[1]=='prepare':
|
||||
assert not SRC.exists() and not WIN.exists(),'Do not overwrite an existing release'
|
||||
shutil.copytree(ROOT/'Demon_v0.11',SRC,ignore=shutil.ignore_patterns('.godot','*.log','qa','export_templates','feature_profiles','script_templates','text_editor_themes'))
|
||||
WIN.mkdir()
|
||||
for name in ['main.gd','tests.gd','addons/build_stamp/plugin.gd','export_presets.cfg']:
|
||||
p=SRC/name;s=p.read_text(encoding='utf-8-sig')
|
||||
s=s.replace('"0.11-','"0.12-').replace('"version":"0.11"','"version":"0.12"').replace('Demon_v0.11_Windows','Demon_v0.12_Windows').replace('DEMON 0.11','DEMON 0.12')
|
||||
p.write_text(s,encoding='utf-8')
|
||||
p=SRC/'README_RU.md';s=p.read_text(encoding='utf-8-sig')
|
||||
s=s.replace('# Demon 0.11 — бесконечный цех','# Demon 0.12 — души и левитация')
|
||||
s=s.replace('Текущая папка — рабочие исходники после релиза 0.11 (27 октября 2026), Godot 4.3, Forward+ / Vulkan. Новые изменения ещё не экспортированы в EXE. Старые архивы 0.11 содержат предыдущую версию.','Релиз 0.12, 27 октября 2026. Распакуйте Windows-архив и запустите Demon.exe. Godot 4.3, Forward+ / Vulkan. Включены все изменения персонажей, механик, голосов и интерфейса после 0.11.')
|
||||
s=s.replace('Текущие кадры captures сняты из исходного проекта, без сборки EXE','Кадры captures сняты из готового EXE')
|
||||
s=s.replace('godot --path Demon_v0.11','godot --path Demon_v0.12').replace('tools/build_v11.ps1','tools/build_v12.ps1')
|
||||
p.write_text(s,encoding='utf-8')
|
||||
build=(ROOT/'tools/build_v11.ps1').read_text().replace('Demon_v0.11','Demon_v0.12')
|
||||
(ROOT/'tools/build_v12.ps1').write_text(build,encoding='utf-8')
|
||||
print('PREPARED',SRC,WIN)
|
||||
elif sys.argv[1]=='package':
|
||||
logs={p.name:p.read_text(encoding='utf-8') for p in WIN.glob('*.log')}
|
||||
for name,marker in [('release-tests.log','ALL TESTS PASSED'),('release-ui.log','QUIT: main-menu exit action'),('release-audio.log','22 nonverbal voice variants'),('release-capture.log','CAPTURE_BUILD:')]:
|
||||
assert marker in logs[name],name
|
||||
assert not any(word in logs[name] for word in ['ERROR:','Assertion failed']),name
|
||||
probe=json.loads(next(s.split('BUILD_PROBE: ',1)[1] for s in logs['probe.log'].splitlines() if s.startswith('BUILD_PROBE: ')))
|
||||
assert probe['id'].startswith('0.12-') and probe['id']!='0.12-editor'
|
||||
assert 'CAPTURE_BUILD: '+probe['id'] in logs['release-capture.log']
|
||||
for name in ['README_RU.md','AUDIO_CREDITS.md','GODOT_LICENSE.txt','MODEL_CREDITS.md','MODEL_LICENSE_CC0.txt']:
|
||||
shutil.copy2(SRC/name,WIN/name)
|
||||
for name in ['KellySlab-OFL.txt','RuslanDisplay-OFL.txt']:shutil.copy2(SRC/'art/fonts'/name,WIN/name)
|
||||
qa=WIN/'QA';qa.mkdir(exist_ok=True)
|
||||
for name in ['release-tests.log','release-ui.log','release-audio.log','release-capture.log','probe.log']:shutil.copy2(WIN/name,qa/name)
|
||||
for p in (WIN/'captures').glob('*'):shutil.copy2(p,SRC/'captures'/p.name)
|
||||
manifest={'version':'0.12','date':'2026-10-27','build_id':probe['id'],'engine':'Godot 4.3 stable official','binary_sha256':sha(WIN/'Demon.exe'),'validation':{'exported_gameplay':'passed','exported_mouse_ui':'passed','exported_audio':'passed','exported_capture':'passed'},'soul_models':10,'dialogue_variants':22,'new_game_resets_progress':True,'models':{p.name:sha(p) for p in (SRC/'art').rglob('*.glb')}}
|
||||
(WIN/'BUILD_MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
for folder,suffix in [(WIN,'Windows'),(SRC,'Source')]:
|
||||
dest=ROOT/f'Demon_v0.12_{suffix}.zip'
|
||||
with zipfile.ZipFile(dest,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as z:
|
||||
for p in sorted(folder.rglob('*')):
|
||||
if not p.is_file() or '.godot' in p.parts:continue
|
||||
if p.parent==folder and p.suffix=='.log':continue
|
||||
if suffix=='Source' and p.suffix=='.import' and not p.name.endswith('.glb.import'):continue
|
||||
z.write(p,Path(folder.name)/p.relative_to(folder))
|
||||
if suffix=='Source':
|
||||
for name in ['build_v12.ps1','fetch_windows_template.py','release_v12.py']:z.write(ROOT/'tools'/name,Path('tools')/name)
|
||||
with zipfile.ZipFile(dest) as z:assert z.testzip() is None
|
||||
print('VERIFIED',dest.name,dest.stat().st_size,'SHA256',sha(dest))
|
||||
print('BUILD_ID',probe['id'])
|
||||
@@ -0,0 +1,69 @@
|
||||
from pathlib import Path
|
||||
import struct,json,copy,numpy as np
|
||||
src=Path('Demon_v0.19/art/succubus/succubus_v01.glb');raw=src.read_bytes();length=struct.unpack_from('<I',raw,12)[0];doc=json.loads(raw[20:20+length]);blob=bytearray(raw[28+length:]);components=json.loads(Path('tools/succubus_components.json').read_text())
|
||||
types={5126:'<f4',5125:'<u4',5123:'<u2',5121:'u1'}; sizes={'SCALAR':1,'VEC2':2,'VEC3':3,'VEC4':4,'MAT4':16}
|
||||
def read(i):
|
||||
a=doc['accessors'][i];v=doc['bufferViews'][a['bufferView']];return np.frombuffer(blob,types[a['componentType']],a['count']*sizes[a['type']],v.get('byteOffset',0)+a.get('byteOffset',0)).reshape(-1,sizes[a['type']]).copy()
|
||||
def accessor(data,typ,component=5126):
|
||||
data=np.asarray(data,dtype=types[component]);blob.extend(b'\0'*((-len(blob))%4));offset=len(blob);blob.extend(data.tobytes());view=len(doc['bufferViews']);doc['bufferViews'].append({'buffer':0,'byteOffset':offset,'byteLength':data.nbytes});a={'bufferView':view,'componentType':component,'count':len(data),'type':typ}
|
||||
if typ=='VEC3':a.update(min=data.min(axis=0).tolist(),max=data.max(axis=0).tolist())
|
||||
doc['accessors'].append(a);return len(doc['accessors'])-1
|
||||
skin_mat=len(doc['materials']);doc['materials'].append({'name':'Bare thighs - warm skin','pbrMetallicRoughness':{'baseColorFactor':[.60,.36,.28,1],'metallicFactor':0,'roughnessFactor':.64}})
|
||||
boot_mat=len(doc['materials']);doc['materials'].append({'name':'Thigh high oxblood black leather','pbrMetallicRoughness':{'baseColorFactor':[.032,.015,.022,1],'metallicFactor':.14,'roughnessFactor':.31}})
|
||||
# Shoulder narrowing deforms the real mesh, leaving facial features and wings intact.
|
||||
def narrow(v,mat):
|
||||
v=v.copy()
|
||||
if mat in [2,11,12,13,14,15]:return v
|
||||
x=v[:,0];y=v[:,1];weight=np.clip((np.abs(x)-.105)/.14,0,1)*np.clip((1.52-y)/.13,0,1)*np.clip((y-.92)/.26,0,1)
|
||||
v[:,0]-=np.sign(x)*.037*weight
|
||||
return v
|
||||
new=[];stats={}
|
||||
for original in doc['meshes'][1]['primitives']:
|
||||
p=copy.deepcopy(original);mat=p['material'];v=read(p['attributes']['POSITION']);faces=read(p['indices']).reshape(-1,3).astype(np.int64);keep=np.ones(len(faces),bool)
|
||||
labels=np.array(components[str(mat)]['labels']);drop=set()
|
||||
for root in np.unique(labels):
|
||||
part=v[labels==root];lo=part.min(axis=0);hi=part.max(axis=0)
|
||||
if mat==5:drop.add(root) # broad metal shoulder pads
|
||||
if mat in [3,10] and hi[1]<1.05 and lo[1]>.90 and max(abs(lo[0]),abs(hi[0]))<.3:drop.add(root)
|
||||
if mat==0 and lo[1]>.11 and hi[1]<.66 and max(abs(lo[0]),abs(hi[0]))<.3:drop.add(root) # replace knee boots with fitted thigh shafts
|
||||
if drop:keep&=~np.isin(labels[faces[:,0]],list(drop))
|
||||
v=narrow(v,mat)
|
||||
if mat==3:
|
||||
center=np.abs(v[:,0])<.25
|
||||
# Keep the fitted garment outside the original torso shell.
|
||||
upper=center&(v[:,1]>1.33);v[upper,1]-=.025*np.clip((v[upper,1]-1.33)/.05,0,1)
|
||||
if mat in [0,10]:
|
||||
foot=(v[:,1]<.17)&(np.abs(v[:,0])<.3)
|
||||
v[foot,1]+=.087*np.clip((.14-v[foot,2])/.14,0,1)*np.clip((.17-v[foot,1])/.13,0,1)
|
||||
p['attributes']['POSITION']=accessor(v,'VEC3')
|
||||
faces=faces[keep]
|
||||
# Stable normals for the deformed bind mesh.
|
||||
normals=np.zeros_like(v);cross=np.cross(v[faces[:,1]]-v[faces[:,0]],v[faces[:,2]]-v[faces[:,0]])
|
||||
for k in range(3):np.add.at(normals,faces[:,k],cross)
|
||||
normals/=np.maximum(np.linalg.norm(normals,axis=1,keepdims=True),1e-12);p['attributes']['NORMAL']=accessor(normals,'VEC3');p['attributes'].pop('TANGENT',None)
|
||||
if len(faces)==0:continue
|
||||
if mat==1:
|
||||
y=v[faces].mean(axis=1)[:,1];x=v[faces].mean(axis=1)[:,0]
|
||||
skin=(y>.72)&(y<.86)&(np.abs(x)<.3)
|
||||
boots=(y>.115)&(y<=.72)&(np.abs(x)<.3)
|
||||
for mask,material in [(skin,skin_mat),(boots,boot_mat),(~(skin|boots),mat)]:
|
||||
part=copy.deepcopy(p);part['material']=material;part['indices']=accessor(faces[mask].astype('<u4').ravel().reshape(-1,1),'SCALAR',5125);new.append(part)
|
||||
body=p;body_v=v
|
||||
else:p['indices']=accessor(faces.astype('<u4').ravel().reshape(-1,1),'SCALAR',5125);new.append(p)
|
||||
stats[mat]=int(len(faces))
|
||||
# Real tapered heels, skinned to the same foot weights as the original model.
|
||||
body_j=read(body['attributes']['JOINTS_0']);body_w=read(body['attributes']['WEIGHTS_0'])
|
||||
for sign in [-1,1]:
|
||||
center=np.array([sign*.175,.085,-.009]);nearest=np.argmin(np.sum((body_v-center)**2,axis=1));verts=[];faces=[]
|
||||
for y,r in [(.012,.011),(.025,.012),(.095,.027),(.116,.030)]:
|
||||
for i in range(24):a=i*np.pi*2/24;verts.append([center[0]+np.cos(a)*r,y,center[2]+np.sin(a)*r])
|
||||
for ring in range(3):
|
||||
for i in range(24):a=ring*24+i;b=ring*24+(i+1)%24;c=b+24;d=a+24;faces.extend([[a,b,c],[a,c,d]])
|
||||
verts=np.array(verts);faces=np.array(faces);normals=np.zeros_like(verts);cross=np.cross(verts[faces[:,1]]-verts[faces[:,0]],verts[faces[:,2]]-verts[faces[:,0]])
|
||||
for k in range(3):np.add.at(normals,faces[:,k],cross)
|
||||
normals/=np.maximum(np.linalg.norm(normals,axis=1,keepdims=True),1e-12)
|
||||
attrs={'POSITION':accessor(verts,'VEC3'),'NORMAL':accessor(normals,'VEC3'),'JOINTS_0':accessor(np.tile(body_j[nearest],(len(verts),1)),'VEC4',5123),'WEIGHTS_0':accessor(np.tile(body_w[nearest],(len(verts),1)),'VEC4')}
|
||||
new.append({'attributes':attrs,'material':boot_mat,'indices':accessor(faces.astype('<u4').ravel().reshape(-1,1),'SCALAR',5125)})
|
||||
doc['meshes'][1]['primitives']=new;doc['meshes'][1]['name']='Succubus - narrow shoulders, corset, thigh high heels';doc['buffers'][0]['byteLength']=len(blob)
|
||||
j=json.dumps(doc,separators=(',',':'),ensure_ascii=True).encode();j+=b' '*((-len(j))%4);blob.extend(b'\0'*((-len(blob))%4));out=struct.pack('<III',0x46546c67,2,12+8+len(j)+8+len(blob))+struct.pack('<II',len(j),0x4e4f534a)+j+struct.pack('<II',len(blob),0x004e4942)+blob
|
||||
Path('Demon_v0.19/art/succubus/succubus_v02.glb').write_bytes(out);print('Saved v02',len(out),'bytes; unchanged skin, skeleton and animation channels; materials',len(doc['materials']))
|
||||
@@ -0,0 +1,22 @@
|
||||
from pathlib import Path
|
||||
import struct,json,numpy as np,hashlib
|
||||
outdir=Path('Demon_v0.19/art/souls_v04');outdir.mkdir(exist_ok=True);report=[]
|
||||
for kind in range(5,10):
|
||||
raw=Path(f'Demon_v0.19/art/souls_v03/soul_{kind:02}.glb').read_bytes();length=struct.unpack_from('<I',raw,12)[0];doc=json.loads(raw[20:20+length]);blob=bytearray(raw[28+length:]);changed=0
|
||||
def read(i):
|
||||
a=doc['accessors'][i];v=doc['bufferViews'][a['bufferView']];return np.frombuffer(blob,{5126:'<f4',5125:'<u4',5123:'<u2',5121:'u1'}[a['componentType']],a['count']*{'SCALAR':1,'VEC2':2,'VEC3':3,'VEC4':4,'MAT4':16}[a['type']],v.get('byteOffset',0)+a.get('byteOffset',0)).reshape(a['count'],-1).copy()
|
||||
def add(v):
|
||||
v=np.asarray(v,dtype='<f4');blob.extend(b'\0'*((-len(blob))%4));offset=len(blob);blob.extend(v.tobytes());doc['bufferViews'].append({'buffer':0,'byteOffset':offset,'byteLength':v.nbytes});doc['accessors'].append({'bufferView':len(doc['bufferViews'])-1,'componentType':5126,'count':len(v),'type':'VEC3','min':v.min(axis=0).tolist(),'max':v.max(axis=0).tolist()});return len(doc['accessors'])-1
|
||||
for mesh in doc['meshes']:
|
||||
for p in mesh['primitives']:
|
||||
original=read(p['attributes']['POSITION']);v=original.copy();y=v[:,1]
|
||||
upper=np.clip((y-.94)/.22,0,1)*(1-np.clip((y-1.42)/.12,0,1));v[:,0]*=1-.14*upper
|
||||
v[:,2]=.025+(v[:,2]-.025)*(1-.12*upper)
|
||||
if np.max(np.abs(v-original))<1e-6:continue
|
||||
p['attributes']['POSITION']=add(v);p['attributes'].pop('TANGENT',None)
|
||||
faces=read(p['indices']).reshape(-1,3).astype(int) if 'indices' in p else np.arange(len(v)).reshape(-1,3)
|
||||
n=np.zeros_like(v);cross=np.cross(v[faces[:,1]]-v[faces[:,0]],v[faces[:,2]]-v[faces[:,0]])
|
||||
for k in range(3):np.add.at(n,faces[:,k],cross)
|
||||
n/=np.maximum(np.linalg.norm(n,axis=1,keepdims=True),1e-12);p['attributes']['NORMAL']=add(n);changed+=len(v)
|
||||
doc['buffers'][0]['byteLength']=len(blob);j=json.dumps(doc,separators=(',',':')).encode();j+=b' '*((-len(j))%4);blob.extend(b'\0'*((-len(blob))%4));out=struct.pack('<III',0x46546c67,2,28+len(j)+len(blob))+struct.pack('<II',len(j),0x4e4f534a)+j+struct.pack('<II',len(blob),0x004e4942)+blob;p=outdir/f'soul_{kind:02}.glb';p.write_bytes(out);report.append({'kind':kind,'modified_vertices':changed,'chest_width_factor':.86,'chest_depth_factor':.88,'sha256':hashlib.sha256(out).hexdigest()})
|
||||
(outdir/'manifest.json').write_text(json.dumps(report,indent=2));print(report)
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,20 @@
|
||||
extends RefCounted
|
||||
const Icon=preload("res://talent_icon.gd")
|
||||
func build(g):
|
||||
g.hud=CanvasLayer.new();g.add_child(g.hud)
|
||||
# Compatibility nodes keep gameplay references valid without any visible or clickable legacy panels.
|
||||
g.ui_compat=Control.new();g.hud.add_child(g.ui_compat);g.ui_compat.name="InactiveLegacyUI"
|
||||
g.ui_compat.mouse_filter=Control.MOUSE_FILTER_IGNORE;g.ui_compat.hide()
|
||||
for key in ["stats","task","dossier","quote","status"]:
|
||||
var l=g.label("");g.ui_compat.add_child(l);g.set(key,l)
|
||||
var box=PanelContainer.new();g.hud.add_child(box);box.name="CurrencyHUD";box.position=Vector2(1270,24);box.size=Vector2(306,64)
|
||||
box.mouse_filter=Control.MOUSE_FILTER_IGNORE
|
||||
box.grow_horizontal=Control.GROW_DIRECTION_BEGIN;box.z_index=15
|
||||
var style=StyleBoxFlat.new();style.bg_color=Color("131019");style.border_color=Color("806442");style.set_border_width_all(1)
|
||||
style.content_margin_left=16;style.content_margin_right=16;style.content_margin_top=10;style.content_margin_bottom=10
|
||||
box.add_theme_stylebox_override("panel",style)
|
||||
var row=HBoxContainer.new();box.add_child(row);row.alignment=BoxContainer.ALIGNMENT_CENTER;row.add_theme_constant_override("separation",12);row.mouse_filter=Control.MOUSE_FILTER_IGNORE
|
||||
var coin=Icon.new();coin.kind="coin";coin.custom_minimum_size=Vector2(36,36);row.add_child(coin)
|
||||
g.gold_value=g.label("0",22,Color("efcf89"));row.add_child(g.gold_value);g.gold_value.custom_minimum_size=Vector2(75,36);g.gold_value.vertical_alignment=VERTICAL_ALIGNMENT_CENTER;g.gold_value.name="GoldValue"
|
||||
var soul=Icon.new();soul.kind="soul";soul.tint=Color("a1d2df");soul.custom_minimum_size=Vector2(36,36);row.add_child(soul)
|
||||
g.souls_value=g.label("0",22,Color("b9dce3"));row.add_child(g.souls_value);g.souls_value.custom_minimum_size=Vector2(60,36);g.souls_value.vertical_alignment=VERTICAL_ALIGNMENT_CENTER;g.souls_value.name="SoulsValue"
|
||||
@@ -0,0 +1,28 @@
|
||||
from pathlib import Path
|
||||
p=Path(__file__).resolve().parent.parent/'Demon_v0.19'
|
||||
f=p/'workshop_tests.gd';s=f.read_text(encoding='utf-8')
|
||||
s=s.replace('w.upgrade("hire");w.upgrade("hire")\n\tcheck(w.helpers.size()==1 and g.coins==160)','w.upgrade("hire");check(w.helpers.is_empty())\n\tg.essence=6;w.upgrade("hire");w.upgrade("hire")\n\tcheck(w.helpers.size()==1 and g.coins==240 and g.essence==0)')
|
||||
s=s.replace('tick(g,22.1)','tick(g,32.1)').replace('PASS: 3-second arrivals','PASS: 5-second arrivals')
|
||||
s=s.replace('g.coins=1000;w.upgrade("hire");w.upgrade("hire")','g.coins=1000;g.essence=24;w.upgrade("hire");w.upgrade("hire")')
|
||||
s=s.replace('w.helpers.size()==2 and g.coins==760','w.helpers.size()==2 and g.coins==1000 and g.essence==0')
|
||||
s=s.replace('g.coins==780','g.coins==1024').replace('g.coins==800','g.coins==1044')
|
||||
s=s.replace('for kind in [1,2,3]:\n','for kind in [1,2,3]:\n\t\tg.development.xp=0\n')
|
||||
s=s.replace('w.upgrade("haste");w.upgrade("auto")','g.essence=9;w.upgrade("haste");w.upgrade("auto")')
|
||||
s=s.replace('node_buttons.size()==14','node_buttons.size()==20').replace('PASS: gold helper upgrades','PASS: soul-funded helper upgrades')
|
||||
s=s.replace('g.coins==250','g.coins==232') # 240-40+12+20 half refund
|
||||
s=s.replace('g.workshop.toggle_tree();await g.get_tree().process_frame','g.essence=6;g.workshop.toggle_tree();await g.get_tree().process_frame')
|
||||
f.write_text(s,encoding='utf-8')
|
||||
f=p/'sentence_tests.gd';s=f.read_text(encoding='utf-8')
|
||||
s=s.replace('g.development.xp=100','g.development.xp=210;g.uid=3').replace('g.development.xp=300','g.development.xp=570;g.uid=8')
|
||||
s=s.replace('w.spawn();check(g.souls.back().required.size() in [1,2,3])','w.spawn();check(g.souls.back().required.size()==3)')
|
||||
s=s.replace('w.spawn();check(g.souls.back().required.size()==3)\n\tfor soul','g.uid=8;w.spawn();check(g.souls.back().required.size()==3)\n\tfor soul')
|
||||
s=s.replace('var s=new_soul(g,[0,2]);','g.development.xp=0\n\tvar s=new_soul(g,[0,2]);')
|
||||
s=s.replace('g.coins==gold+20','g.coins==gold+27').replace('g.coins==gold+40','g.coins==gold+68')
|
||||
f.write_text(s,encoding='utf-8')
|
||||
f=p/'main.gd';s=f.read_text(encoding='utf-8')
|
||||
s=s.replace('test_mode="--test-posture"','test_mode="--test-economy" in args or "--test-posture"')
|
||||
s=s.replace('capture_mode="--capture-posture"','capture_mode="--capture-economy" in args or "--capture-posture"')
|
||||
s=s.replace('elif "--test-hud"','elif "--test-economy" in args:call_deferred("run_economy_tests")\n\telif "--test-hud"')
|
||||
s=s.replace('elif "--capture-workshop"','elif "--capture-economy" in args:call_deferred("capture_economy")\n\telif "--capture-workshop"')
|
||||
s+='\nfunc run_economy_tests():\n\tawait preload("res://economy_tests.gd").new().run(self)\n\nfunc capture_economy():\n\tawait preload("res://economy_capture.gd").new().run(self)\n'
|
||||
f.write_text(s,encoding='utf-8')
|
||||
@@ -0,0 +1,27 @@
|
||||
from pathlib import Path
|
||||
p=Path(__file__).resolve().parent.parent/'Demon_v0.17'
|
||||
def edit(name,a,b):
|
||||
s=(p/name).read_text(encoding='utf-8');assert a in s,(name,a);(p/name).write_text(s.replace(a,b),encoding='utf-8')
|
||||
edit('judgement.gd','Vector2(24,24)','Vector2(28.8,28.8)')
|
||||
edit('dressing.gd','var t=tr;t.origin+=offset;mm.set_instance_transform(index,t);index+=1','var t=tr\n\t\t\t\tif offset==Vector3.ZERO and t.origin.x>=7.35:t.origin.x+=4.05\n\t\t\t\tt.origin+=offset;mm.set_instance_transform(index,t);index+=1')
|
||||
edit('equipment.gd','if d.selected==0:return','if d.selected==0:\n\t\tpreload("res://pillory.gd").new().build(g,d)\n\t\treturn')
|
||||
s=(p/'workshop.gd').read_text(encoding='utf-8');start=s.index('\tif kind==0:',s.index('func make_device'));end=s.index('\treturn s',start);s=s[:start]+s[end:]
|
||||
s=s.replace('elif d.selected==4:s.visual.position=Vector3(0,-.25,0);s.visual.scale=Vector3.ONE*.9','elif d.selected==4:s.visual.position=Vector3.ZERO')
|
||||
s=s.replace('s["pose_target"]=s.visual.transform','s.visual.update_torture(0,false)\n\ts["pose_target"]=s.visual.transform')
|
||||
s=s.replace('s.hit_clock=.45/rate;s.hits+=1;g.play_whip()','s.hit_clock=.45/rate;s.hits+=1;g.play_whip()\n\t\t\t\tsoul.visual.whip_reaction()\n\t\t\t\tpreload("res://whip_impact.gd").new().play(g,s.device,soul.visual)')
|
||||
s=s.replace('g.working=s.soul;g.STATION=s.device.position;s.motion.update(dt,active);g.working=-1','soul.visual.update_torture(dt,active)\n\tg.working=s.soul;g.STATION=s.device.position;s.motion.update(dt,active);g.working=-1')
|
||||
s=s.replace('if s.ready:\n\t\tEXTRA','if s.ready:\n\t\tsoul.visual.update_torture(dt,false)\n\t\tEXTRA')
|
||||
(p/'workshop.gd').write_text(s,encoding='utf-8')
|
||||
# Refine all revolved silhouettes and the submerged vat.
|
||||
edit('equipment.gd','mesh.rings=48;mesh.ring_segments=10','mesh.rings=128;mesh.ring_segments=20')
|
||||
edit('apparatus_motion.gd','range(32)','range(96)')
|
||||
edit('apparatus_motion.gd','i*TAU/32','i*TAU/96')
|
||||
edit('apparatus_motion.gd','Vector3(0.27,0.86,0.14)','Vector3(0.092,0.86,0.14)')
|
||||
s=(p/'apparatus_motion.gd').read_text();a=s.index('\t\tvar mesh=CylinderMesh.new();mesh.top_radius=1.29');b=s.index('\t\tfor i in range(14):',a)
|
||||
s=s[:a]+'''\t\twater=preload("res://water_surface.gd").new().build(g,d.device,1.29,Vector3(0,.87,.18),false)
|
||||
\t\twater.scale.z=.76
|
||||
'''+s[b:]
|
||||
s=s.replace('1.0+tension*0.12','1.04+tension*0.14')
|
||||
s=s.replace('var b=Vector3(rope.x,1.15,sign(rope.z)*(0.83+tension*0.16))','var bone=("wrist." if rope.z<0 else "foot.")+("L" if rope.x>0 else "R")\n\t\t\tvar b=d.device.to_local(s.visual.bone_world(bone))')
|
||||
s=s.replace('water.material_override.set_shader_parameter("agitation",0.8 if active else 0.1)','water.material_override.set_shader_parameter("agitation",0.8 if active else 0.1)\n\t\twater.material_override.set_shader_parameter("simulation_time",g.time)')
|
||||
(p/'apparatus_motion.gd').write_text(s,encoding='utf-8')
|
||||
@@ -0,0 +1,15 @@
|
||||
param([string]$Executable=(Join-Path $PSScriptRoot '../Demon_v0.19_Windows/Demon.exe'))
|
||||
$ErrorActionPreference='Stop'
|
||||
$repo=Split-Path -Parent $PSScriptRoot
|
||||
$engine=(Resolve-Path -LiteralPath $Executable).Path
|
||||
$cases=[ordered]@{economy='--test-economy';tests='--test-mode';ui='--test-ui';sentences='--test-sentences';hud='--test-hud';gait='--test-gait';posture='--test-posture';visuals='--test-visuals';audio='--test-audio';exit='--test-exit';capture='--capture-economy';probe='--probe-build'}
|
||||
foreach($name in $cases.Keys){
|
||||
$log=Join-Path $repo ('qa_v19/release-'+$name+'.log')
|
||||
$run=Start-Process -FilePath $engine -WorkingDirectory (Split-Path -Parent $engine) -ArgumentList @('--log-file',('"'+$log+'"'),'--',$cases[$name]) -WindowStyle Hidden -PassThru
|
||||
if(-not $run.WaitForExit(240000)){$run.Kill();throw ($name+' exceeded four minutes')}
|
||||
$run.Refresh()
|
||||
Write-Output ($name+': exit '+$run.ExitCode)
|
||||
Get-Content -LiteralPath $log -Tail 9
|
||||
if($run.ExitCode -ne 0){throw ($name+' failed')}
|
||||
if(Select-String -LiteralPath $log -Pattern 'ERROR:|Assertion failed|QA check failed' -Quiet){throw ($name+' logged an error')}
|
||||
}
|
||||
Reference in New Issue
Block a user