commit 2b9ae06592389ccb14f9a0be1f4d865f239926ce Author: JariKo Date: Wed Oct 28 15:39:06 2026 +0200 Import current DEMON v0.19 source, assets and development handoff diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..67d9e76 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +* text=auto +*.gd text eol=lf +*.gdshader text eol=lf +*.tscn text eol=lf +*.tres text eol=lf +*.py text eol=lf +*.ps1 text eol=crlf +*.glb filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba0d98b --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +# Keep the active project and development tools; historical copies stay local. +/* +!/.gitignore +!/.gitattributes +!/README.md +!/HANDOFF.md +!/PROJECT_NOTES.md +!/Demon_v0.19/ +!/tools/ + +# Godot generated state, local exports and test output. +**/.godot/ +**/captures/ +**/qa/ +**/export_templates/ +**/*.log +**/*.tmp +**/*.bak +**/__pycache__/ +**/*.pyc +/tools/godot/ +/tools/templates/ + +# Local credentials and signing material. +**/.env +**/.env.* +**/export_credentials.cfg +**/*.pfx +**/*.p12 +**/*.key +**/*.pem diff --git a/Demon_v0.19/AUDIO_CREDITS.md b/Demon_v0.19/AUDIO_CREDITS.md new file mode 100644 index 0000000..f9fa019 --- /dev/null +++ b/Demon_v0.19/AUDIO_CREDITS.md @@ -0,0 +1,36 @@ +# Sound credit + +Whip Crack Sound Effect — Alexander, Orange Free Sounds, January 9, 2017. + +Source: https://orangefreesounds.com/whip-crack-sound-effect/ + +Original file: https://www.orangefreesounds.com/wp-content/uploads/2017/01/Whip-crack-sound-effect.mp3 + +License: Creative Commons Attribution 4.0 International (CC BY 4.0) +https://creativecommons.org/licenses/by/4.0/ + +Stored as audio/whip.mp3. The original recording is unchanged. Playback volume is adjustable; pitch is unchanged. Other effects from previous builds are omitted. + +This is the recording accepted by the user in «Чат о звуках» after the request for a real whip sound. The earlier locally synthesized whip_preview_01.wav is not used. + +## User-supplied ambience — Cemetery Drones + +Source: Cemetery Drones.wav, supplied by the user. Game asset: audio/cemetery_ambience_loop.ogg, stereo 48 kHz Vorbis, duration 239.6 seconds. Four-second equal-power end/start crossfade and rotated continuous boundary. The original WAV is unchanged. Author/license was not supplied; no license from the other recordings is assigned to this file. The old Hell ambience is not included in 0.8. + +## Голоса при сгорании (0.8) +- Female Hurt Grunts & Groans — AuraVoice / Nocturnal_Vanguard. CC0 1.0. https://opengameart.org/content/female-hurt-grunts-groans ; https://creativecommons.org/publicdomain/zero/1.0/ . Фрагмент 4.90–6.25 сек., плавные края, нормализация, Ogg Vorbis. +- 11 male human pain/death sounds — Michel Baradari, опубликовано qubodup. CC BY 3.0. https://opengameart.org/content/11-male-human-paindeath-sounds ; https://creativecommons.org/licenses/by/3.0/ . Исходник player/deathh.wav; плавные края, нормализация, Ogg Vorbis. Автор не связан с проектом Demon и не заявляет о его одобрении. + +## Нечленораздельные реплики (рабочая версия после 0.11) + +audio/dialogue/voice_00_0.ogg … voice_10_1.ogg: 22 оригинальных синтезированных звука, созданных для Demon на основе согласованного направления soul_grumble_01.wav. Генератор audio/make_dialogue.py в корне рабочего пространства. Никакие записи актёров или образцы чужого голоса не использовались. Профили 0–9 соответствуют категориям душ, профиль 10 — мягкий женский тембр суккубы. Файлы не зациклены и воспроизводятся одной очередью при появлении облачка. Громкость регулируется ползунком голосов. + + +## Оригинальные эффекты строительства, версия 0.14 + +`apparatus_place.wav` и `apparatus_remove.wav` созданы процедурно для проекта, без сторонних семплов. Детерминированный генератор: `tools/make_build_sfx.py`. Общая громкость эффектов и master mute применяются к обоим звукам. + + +## Оригинальная поп-петля, 0.15 + +`infernal_pop.wav` — оригинальная процедурная восьмисекундная синтезированная мелодия с басом и ритмом. Сторонние записи, песни, исполнители и семплы не использованы. Генератор `tools/make_infernal_pop.py` включён в исходники. diff --git a/Demon_v0.19/BALANCE.md b/Demon_v0.19/BALANCE.md new file mode 100644 index 0000000..52abbf5 --- /dev/null +++ b/Demon_v0.19/BALANCE.md @@ -0,0 +1,43 @@ +# Баланс Demon 0.19 + +Это первая настройка экономики с тремя отдельными ресурсами. Все численные параметры собраны в `economy.gd`; дальнейшие изменения не требуют переписывать интерфейс или логику орудий. + +## Доход и развитие + +- Начало: 240 золота, 0 душ, уровень 1. Первые колодки стоят 40 золота. +- Душа приходит каждые 5 секунд вместо 3. Очередь вмещает 7 душ; занятые доставкой места учитываются до установки на орудие. +- Базовая завершённая душа даёт 12 золота, 1 душу в кошелёк и 18 опыта. Промежуточное наказание не приносит отдельную награду. +- У каждой души одно наказание на одном орудии. После его полного выполнения душа сгорает; награда начисляется один раз. Более сложные типы орудий увеличивают награду: например, колесо на первом уровне даёт 17 золота, 1 душу и 22 опыта. +- Счётчик душ справа показывает расходуемый запас. Общее число завершённых душ хранится отдельно. +- Уровни 1–10: накопленный опыт 0, 90, 210, 370, 570, 810, 1090, 1410, 1770, 2170. Каждый новый уровень даёт 1 очко навыков; всего 9 очков. +- Героиня: 3 ранга скорости движения (+25% за ранг), 3 ранга скорости своих действий (+20%), 3 ранга руководства (+8% к работе всех). Навыки требуют только очки уровня. +- Помощницы: 6, 18 и 36 душ за призыв. Самостоятельная работа — 4 души. Скорость движения: 5/12/22 души; скорость работы: 8/18/32. У каждой ветки по 3 ранга, +25% за ранг. Без самостоятельной работы помощницы только доставляют души. +- Чертежи следующих орудий: 55/85/120/160/200 золота. Установка: 40/80/120/170/220/280. Чертёж открывает покупку, но не устанавливает орудие автоматически. + +Улучшения, закалка и ранги орудий удалены. Все экземпляры одного типа имеют фиксированные параметры. Старые ранги при загрузке игнорируются и больше не сохраняются; скорость и награда не получают бонусов от прежних улучшений. + +## Рост нагрузки + +Каждый уровень повышает время работы с душой на 18% от базового. Улучшения исполнителя и руководства перемножаются; скорость главной героини не подменяет навык работы помощниц. + +| Уровень | Время работы без улучшений | Наказаний на душу | +|---|---:|---| +| 1–2 | ×1,00–1,18 | 1 | +| 3–4 | ×1,36–1,54 | 1 | +| 5–6 | ×1,72–1,90 | 1 | +| 7–8 | ×2,08–2,26 | 1 | +| 9–10 | ×2,44–2,62 | 1 | + +Душе назначается одно из реально установленных орудий. Недоступные устройства не выдаются в заданиях. Дубли позволяют обрабатывать души параллельно. Уровень повышает длительность работы, а не число этапов. Текущая ветка заканчивается на 10-м уровне; скорость появления душ остаётся 5 секунд. + +## Потеря души и расширение — рабочие правила 28 октября + +Первой душе в очереди даётся 10 секунд. Если её не забрали, она пролетает в противоположные ворота; списывается 50 золота. Следующая получает новый отдельный отсчёт. На орудии 10 секунд подряд без работы приводят к сгоранию и такому же штрафу. Во время переноса в руках/помощницей таймер старого орудия не идёт. Весь опыт, изученные навыки и запас душ сохраняются; за потерянную душу награда не выдаётся. Золото ограничено нулём, долг не накапливается. Старый нарастающий штраф отключён. + +Пауза, строительство и гримуар останавливают время. Сборка души на орудии длится 0,5 с и не считается простоем. + +Удаление любого свободного орудия возвращает половину базовой цены, включая последнее орудие. После секундного удержания орудие остаётся на курсоре при отпускании мыши. Установка — отдельный клик ЛКМ на полу; продажа — заход курсора с орудием в красную полосу снизу, без клика. Простое перемещение бесплатно; занятые, зарезервированные и остывающие орудия перемещать/продавать нельзя. + +Три покупки расширения по 500 золота каждая увеличивают текущую строительную ширину в 1,2 раза. Высота зоны сохраняется: площадь после покупок ×1,2 / ×1,44 / ×1,728. Все прибавки идут вправо. Максимальная правая стена x≈20,736; ближайшая соседняя комната начинается за x=30,1. Расширения сохраняются, новая игра их сбрасывает. + +Старые 20-минутные модельные расчёты относились к предыдущим штрафам и не подтверждают баланс этих новых правил. Текущие проверки: workflow_tests.gd (границы таймеров, однократность штрафов, очередь, пауза, сборка, расширение и геометрия стула), economy_tests.gd (валюты, развитие, F5, сохранения) и игровые проверки взаимодействий. diff --git a/Demon_v0.19/GODOT_LICENSE.txt b/Demon_v0.19/GODOT_LICENSE.txt new file mode 100644 index 0000000..9b45eef --- /dev/null +++ b/Demon_v0.19/GODOT_LICENSE.txt @@ -0,0 +1,23 @@ +Godot Engine +Copyright (c) 2014-present Godot Engine contributors. +Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Third-party notices: https://godotengine.org/license/#thirdparty diff --git a/Demon_v0.19/MODEL_CREDITS.md b/Demon_v0.19/MODEL_CREDITS.md new file mode 100644 index 0000000..4827c3c --- /dev/null +++ b/Demon_v0.19/MODEL_CREDITS.md @@ -0,0 +1,18 @@ +# Succubus model credits + +Anatomical base, morphs, skeleton and weights: MakeHuman Community, CC0. +https://www.makehumancommunity.org/about/license.html +https://github.com/makehumancommunity/makehuman/tree/master/makehuman/data + +Skin texture: young_lightskinned_female_diffuse4.png / toigo_light_skin_with_natural_makeup, Margaret Toigo, CC0. +https://static.makehumancommunity.org/assets/assetpacks/skins01.html + +Costume, accessories, hair, wings, whip and animations were created for Demon. The game asset is exported from the approved character_studio/succubus_v01/succubus_v01.blend, with baked skin/glove base colour, four skinning influences per vertex and merged fixed geometry. + +The working revision uses succubus_walk_v02.blend with re-authored leg/arm motion. The original approved source is retained. The ten soul variants use the same CC0 base, UVs, weights and male/female morph data, with original costumes, props and six skeletal clips. Reproduce them with character_studio/build_souls.py. Full subdivision geometry is retained; automatic Godot LOD generation is disabled in the import sidecars. + +Interface fonts: Kelly Slab and Ruslan Display, Google Fonts, SIL Open Font License. Font files and the respective OFL texts are included in art/fonts. + +## Новый набор spectral souls v03 + +Десять отдельных взрослых персонажей: 5 женских и 5 мужских анатомических вариантов MakeHuman CC0 с прежним 166-костным скелетом. Новые авторские причёски, костюмы, разрезы и подолы, анимации и варианты пропорций созданы в character_studio/souls_roster_v03. Игровые GLB: art/souls_v03; сведения о каждом варианте находятся в manifest.json. Лицензия базовой анатомии сохраняется; сторонние платные модели не добавлялись. diff --git a/Demon_v0.19/MODEL_LICENSE_CC0.txt b/Demon_v0.19/MODEL_LICENSE_CC0.txt new file mode 100644 index 0000000..f3ede1f --- /dev/null +++ b/Demon_v0.19/MODEL_LICENSE_CC0.txt @@ -0,0 +1,41 @@ +# Creative Commons CC0 1.0 Universal + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. + +### Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. + +1. __Copyright and Related Rights.__ A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. + +2. __Waiver.__ To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. + +3. __Public License Fallback.__ Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. + +4. __Limitations and Disclaimers.__ + + a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. diff --git a/Demon_v0.19/README_0.13.md b/Demon_v0.19/README_0.13.md new file mode 100644 index 0000000..05849aa --- /dev/null +++ b/Demon_v0.19/README_0.13.md @@ -0,0 +1,68 @@ +# Demon 0.17 — минимальный интерфейс + +Godot 4.3 stable, Windows x64, Forward+ / Vulkan. Предыдущие версии сохранены отдельно. + +## Интерфейс 0.16 + +- В игровом HUD сверху справа остаются только два счётчика: значок монеты с количеством золота и значок души с количеством обработанных душ. Текстовых названий ресурсов нет. +- Снизу справа находятся две отдельные кнопки-иконки: строительство и гримуар. Подсказка при наведении показывает название и горячую клавишу. Старые нижние кнопки, их подложка, логотип, боковая статистика, текстовые инструкции и уведомления убраны с игрового экрана. У скрытых областей нет активных зон мыши. +- B / T открывают строительство и гримуар; Esc управляет паузой, M отключает звук. Окна строительства, развития и настроек продолжают работать. +- Над душой вместо текста показываются до трёх иконок наказаний. Используются точно те же пиктограммы, что в каталоге орудий. Зелёная отметка означает выполненный этап, дуга — прогресс текущего. Иконки не перехватывают нажатия мыши. +- Обычные диалоги душ появляются не чаще одного раза в 30 секунд вместо 6. Реплики героини — раз в 100 секунд вместо 20. Ручной подбор и промежуточный этап больше не обходят общий интервал. Пауза останавливает таймеры. + +## Сохранённые механики + +Шесть орудий: плеть, дыба, колесо, железная дева, музыкальный стул и котёл. Со второго уровня встречаются души с двумя наказаниями, с четвёртого — до трёх; задания назначаются только для установленных типов орудий. Сгорание и вся награда происходят только после выполнения полного списка. Между этапами душу можно забрать со старого места; помощницы умеют продолжать подходящие цепочки. Помощницы окрашены в синий цвет. + +Площадь основной платформы увеличена на 25% относительно 0.14. Рабочая зона — 12×9 клеток. Очередь у ворот вмещает семь душ в один ряд. Орудия размещаются и поворачиваются по сетке, установка и удаление озвучены. + +## Быстрый старт + +Запустите Demon.exe. Для готовой игры Godot устанавливать не нужно. + +Новая игра выдаёт 240 золота и пустую рабочую зону. B открывает строительство; T — гримуар. Эти режимы останавливают время. Первое орудие стоит 40 золота; эта сумма резервируется, пока в цехе нет орудий, чтобы нельзя было потратить весь стартовый бюджет на свиту и чертежи. + +## Управление + +- WASD / стрелки — движение относительно камеры. +- Средняя кнопка с движением мыши — вращение камеры; колесо вне строительства — масштаб. +- ЛКМ по близкой душе — следование за игроком. Подведите душу к стороне подхода свободного орудия: она автоматически займёт место. ЛКМ по пустому полу возвращает новую душу в очередь, а душу с выполненным этапом — к предыдущему орудию. +- ЛКМ по душе у алтаря плети — удар, нужно пять ударов. Контекстное меню в обычной игре не появляется. +- ПКМ рядом со стороной подхода — работать у дыбы, колеса или девы. Интерфейс блокирует действие ПКМ. +- B — строительство. Выберите покупку или нажмите на существующее орудие и выберите «Переместить». Модель следует за мышью по клеткам. Зелёный цвет — место свободно, красный — поставить нельзя. +- Колесо при выбранном орудии — поворот на 90°. ЛКМ — подтвердить, ПКМ / Esc — отменить. Отмена переноса возвращает исходные позицию и угол. +- «Переместить / Удалить» доступны только в строительстве. Занятые и зарезервированные орудия, а также орудия во время сгорания переносить и удалять нельзя. Последний экземпляр орудия также нельзя удалить, пока оно нужно незавершённым наказаниям; использовать перемещение можно. +- T — три вертикальные ветки развития. Esc — закрыть окно / отменить выбор / пауза. M — выключить звук. +- F5 — тестовый бонус +1000 золота и максимальный уровень без повторного начисления очков. + +## Экономика и развитие + +Экземпляр алтаря стоит 40 золота, дыбы — 80, колеса — 140, девы — 220, музыкального стула — 300, котла — 380. Чертежи старших орудий предварительно изучаются за 80 / 140 / 220 / 300 / 380 золота. Чертёж покупается один раз; экземпляры — отдельно. Перенос бесплатный. Удаление возвращает 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_v16.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 включён в исходники. + + +Дополнительная проверка цепочек: `Demon.exe -- --test-sentences`. Она проверяет 1/2/3 наказания, промежуточные переносы, ошибочные орудия, итоговую награду, автоматическую цепочку помощницы, цвета и диалоги. + + +Проверка HUD: `Demon.exe -- --test-hud`. Проверяет два счётчика, две кнопки-иконки, отсутствие старых областей нажатия, соответствие пиктограмм, освобождение карточек и увеличение интервалов диалогов в пять раз. diff --git a/Demon_v0.19/README_RU.md b/Demon_v0.19/README_RU.md new file mode 100644 index 0000000..88c2e71 --- /dev/null +++ b/Demon_v0.19/README_RU.md @@ -0,0 +1,103 @@ +# Demon 0.19 — уровень и экономика + +## Рабочие изменения 28 октября + +- На орудии: 10 секунд непрерывного бездействия — сгорание души и штраф 50 золота. Работа сбрасывает отсчёт. Награда за потерянную душу не выдаётся. +- Очередь движется от приёмных ворот к воротам напротив. Первая душа ждёт 10 секунд, затем уходит со штрафом 50 золота. У следующей начинается новый отсчёт. Старых нарастающих штрафов больше нет; золото не уходит ниже нуля. +- Строительство, гримуар и пауза останавливают таймеры. Размещение на орудии занимает 0,5 секунды: распад на мелкие огоньки и сборка в правильной позе. До окончания эффекта работа заблокирована. +- В строительстве доступны три расширения вправо по 500 золота: каждое +20% к текущей строительной площади (итог ×1,728). Двигаются стены, расширяются пол, сетка и маршруты. Соседние цеха отодвинуты с запасом. Расширения сохраняются. +- Синие орбитальные маркеры и напольные кольца убраны. Сиденье музыкального стула уменьшено; посадка проверена на десяти моделях. Динамики направлены на душу и имеют отдельные источники звука. +- Лёгкий объёмный смог покрывает всю комнату и её расширения. +- В строительстве WASD двигает камеру, средняя кнопка вращает её, Shift + средняя кнопка сдвигает. Колесо приближает; при выборе орудия — поворачивает, Ctrl + колесо сохраняет приближение. +- Для переноса свободного станка удерживайте на нём ЛКМ одну секунду до заполнения круга, затем отпустите мышь. Орудие следует за курсором: ЛКМ ставит на пол, заход в красную полосу снизу удаляет с возвратом половины цены без клика. Кнопка «Переместить» убрана; занятые и зарезервированные станки защищены. +- Демонята сталкиваются с мешами станков; местные обходят препятствия по маршрутам. У демонят соседних цехов также есть физические столкновения. При строительстве поверх демонёнка он переносится на свободное место. + + +Запуск: Demon.exe. Godot для игры устанавливать не нужно. + +F5 — добавить 1000 золота, выставить максимальный опыт (уровень 10) и заполнить запас душ до 10 000 000. Повторные нажатия не дублируют очки навыков. + +- Внизу появилась полоса опыта с уровнем и свободными очками навыков. +- За золото покупаются новые типы орудий и их экземпляры. Улучшения, закалка и ранги орудий удалены из гримуара, строительства и расчёта наград. +- Помощницы и их навыки покупаются за души. Правый верхний счётчик теперь показывает доступный запас душ. +- Способности главной суккубы покупаются за очки, получаемые при повышении уровня. +- Души появляются каждые 5 секунд. С уровнем растёт длительность работы. У каждой души одно наказание: после полного цикла выбранного орудия она сгорает, освобождая место и принося награду. +- Очередь вмещает семь душ; правила ухода, простоя и штрафов описаны выше. Опыт, души в кошельке и купленные улучшения за потерю души не отнимаются. + +Новая экономика рассчитана на новую игру. Как и в предыдущих версиях, сохранения привязаны к конкретному билду; 0.18.1 остаётся отдельной сборкой. В 0.19 сохраняются кошельки, навыки, открытые типы орудий и планировка. + +Управление: WASD/стрелки — движение, ЛКМ — выбрать душу/ударить, ПКМ — работать у орудия, B — строительство, T — гримуар, колесо — камера/поворот выбранного орудия, Esc — отмена/пауза, M — звук. + +Точные формулы, цены и границы модельной проверки: BALANCE.md. Проверки готового EXE: QA. Скриншоты интерфейса: captures/v019. + +## Demon 0.18.1 — исправление наклона героини + +Запуск: Demon.exe. + +Исправлено накопление бокового поворота скелета в новой походке. Перед каждым обновлением анимации восстанавливается её исходная поза, а движение бёдер компенсируется корпусом. При переходе от ходьбы к остановке базовая анимация больше не перезапускается. + +Проверка включает героиню и три помощницы: 480 секунд модельного времени с непрерывной ходьбой, частыми остановками, покоем и повторными переходами после удара плетью. Боковой наклон при проверке не превышает 2°, в покое поза возвращается к нейтральной. Дополнительно проверяются контакт стоп с полом, скорости, повороты и игровой интерфейс. + +Результаты — QA, скриншоты — captures/v0181. + +## Изменения 0.18 + +Запуск: Demon.exe. Устанавливать Godot для игры не нужно. + +- Главная героиня и все помощницы используют новую походку в стиле подиума: узкая линия шага, перенос веса, мягкое движение бёдер и встречное движение плеч. +- Темп и длина шага зависят от фактического перемещения. Учтены обычная скорость, улучшения скорости и меньший рост помощниц. +- Опорная стопа фиксируется на полу; переносимая нога поднимается и ставится вперёд. На поворотах выполняется укороченный шаг. +- При остановке поднятая стопа опускается на пол. Пауза останавливает анимацию. Удар плетью сохраняет опору на ноги. +- Кольца помощниц опущены к поверхности пола и сделаны тоньше. + +Проверки: героиня и три помощницы на пяти скоростях, поворот на 90°, остановки, плеть, пауза и сброс после перемещения. Итоги — QA/release-gait.log; анимированные примеры — captures/v018. + +Управление: WASD/стрелки — движение, B — строительство, T — гримуар, колесо — камера/поворот выбранного орудия, Esc — пауза, M — звук. + +## Предыдущее обновление 0.17 + +Запуск: Demon.exe. Godot устанавливать не нужно. + +Изменения 0.17: +- Иконки наказаний над душами увеличены ровно на 20% (24 → 28,8). +- Вместо алтаря плети — деревянные средневековые колодки с тремя открытыми отверстиями, стойками, распорками и металлическими креплениями. +- Удары плети сопровождаются коротким следом, частицами, вспышкой и рывком души. Эффект создаётся только при зарегистрированном ударе. +- Разные реакции на устройства: напряжение и повороты головы на дыбе, движения рук в котле, скованные движения на стуле и колесе. Короткие тихие вскрики используют громкость голосов и общий mute. +- Дыба держит тело натянутым даже до активации; при работе усиливает растяжение. Верёвки и манжеты следуют за кистями и лодыжками. +- Стул: посадка через скелетную IK, таз над сиденьем, кисти у наручников, стопы у подножки. Проверены все десять моделей душ. +- Котёл: округлая открытая чаша с внутренней стенкой, тремя ножками, ручками и ободом; кипящая вода, пузырьки и пар. +- Колесо: более гладкие ободы, манжеты на конечностях, 96 досок чана и плотная водная поверхность с реальными волнами, нормалями и бликами. +- Служебные стойки и рейки, оставшиеся на старой правой границе комнаты, перенесены за новую стену. + +Управление: WASD/стрелки — движение, B — строительство, T — гримуар, колесо — камера/поворот выбранного орудия, Esc — пауза, M — звук. +Модели остаются в художественном стиле игры; музейные фотографии использованы только как визуальные референсы. Список: VISUAL_REFERENCES.md. + +Проверки релизного EXE находятся в QA: геймплей, мышь и интерфейс, наказания и помощницы, аудио, позы десяти персонажей, вода, VFX, пауза и очистка эффектов. Крупные планы — captures/v013/apparatus-*.png. + +## Обновление оформления 28 октября + +Симметричные замковые стены, угловые башенки, зубцы и бойницы; исправление стыков расширения и остаточных частиц. Душа плавно разворачивается к героине при переноске и левитирует. Смог усилен на 25%. У героини и помощниц более узкие плечи, корсет и высокие сапоги на каблуках; штаны и прямоугольные передние панели убраны. Изменения доступны при запуске исходников; прежний Windows EXE не обновлялся. + +## Строительство и чертики + +Сетка сохраняет шаг после расширений. При удержании ЛКМ на свободном орудии круг рядом с курсором заполняется за 1 секунду; затем начинается перенос. Красная полоса удаления на 25% выше. Чертики периодически чистят свободные орудия, моют пол, рисуют пентаграммы мелком и тихо напевают. Пауза и настройки звука учитываются. + +## Демонята v02 + +Обновлены лица, рога, копыта, руки и суставы. Походка привязана к расстоянию, опорные копыта фиксируются на полу. Убраны независимые прыжки корпуса и шаги при остановке; добавлены плавные ускорения, повороты и уклонение от персонажей. Переходы к занятиям и обратно сглажены. + +## Край сетки и камера после расширения + +Строительная сетка показывает только полные метровые клетки; последняя узкая дробная полоса не считается отдельной клеткой. Само расширение комнаты остаётся +20%. Камера свободно перемещается за границы комнаты, а покупка площади сохраняет её текущие положение и масштаб. + +## Обозначение прокачки + +У трёхуровневых навыков снизу карточки три ромба, у одноразовых покупок — один. Красный рубин означает купленный уровень. Карточки сохраняют яркость даже после полного изучения; ограничения на повторную покупку сохраняются. + +## Камера и диалоги + +В обычной игре камера плавно следует за суккубой. Наведение на края экрана не двигает камеру. В строительстве камера свободная, перемещение — WASD, вращение — средняя кнопка мыши. Реплики показаны в компактном окошке одной строкой с равными вертикальными отступами. + +## Оформление комнаты + +Декоративные столы, полки, трубы и мелкий реквизит убраны. Оставлены шесть жаровен: четыре по углам и две по центрам передней/задней стен. При расширении их расположение остаётся симметричным. Купленные орудия сохраняются. diff --git a/Demon_v0.19/VISUAL_REFERENCES.md b/Demon_v0.19/VISUAL_REFERENCES.md new file mode 100644 index 0000000..2306900 --- /dev/null +++ b/Demon_v0.19/VISUAL_REFERENCES.md @@ -0,0 +1,13 @@ +# Визуальные референсы 0.17 + +Изображения изучены как референсы конструкции и пропорций. В сборку не включены чужие фотографии или текстуры: модели, геометрия, вода и эффекты созданы кодом проекта. + +- [Science Museum Group: Ecclesiastical pillory, 1601–1800](https://collection.sciencemuseumgroup.org.uk/objects/co155179/ecclesiastical-pillory) — шарнирная деревянная доска с отверстиями для головы и кистей, железные крепления. +- [Wessex Museums: Dorchester town’s stocks](https://wessexmuseums.org.uk/collections-showcase/dorchester-towns-stocks/) — древесина, металлические накладки и соединение половин доски. +- [Library of Congress: pillory, Williamsburg](https://www.loc.gov/pictures/item/2020724453/) — стойки, высота поперечной доски и основание. +- [Medieval Torture Museum: How the rack worked](https://medievaltorturemuseum.com/blog/how-the-rack-worked-the-middle-ages-signature-torture-device/) — деревянная рама, концевые валики, верёвки и ворот. +- [National Gallery of Art: Saint Bartholomew](https://www.nga.gov/artworks/6044-saint-bartholomew) — историческое изображение дыбы. +- [The Met: Cauldron, XIII–XIV century](https://www.metmuseum.org/art/collection/search/471343) — округлый корпус, три ножки, кольцевые ручки и обод. +- [Leeds Museums: Historic cauldron find](https://news.leeds.gov.uk/news/historic-cauldron-find-lifts-lid-on-citys-spirited-past) — форма металлического котла и обработка поверхности. + +Музыкальный стул и колесо с водяным чаном — фантазийные игровые устройства. Их крепления и материалы согласованы с остальной мастерской; историческая точность для них не заявляется. diff --git a/Demon_v0.19/addons/build_stamp/plugin.cfg b/Demon_v0.19/addons/build_stamp/plugin.cfg new file mode 100644 index 0000000..1068454 --- /dev/null +++ b/Demon_v0.19/addons/build_stamp/plugin.cfg @@ -0,0 +1,6 @@ +[plugin] +name="Demon build identity" +description="Embeds a fresh build identity on every export to reset progression between builds." +author="Demon" +version="1.0" +script="plugin.gd" diff --git a/Demon_v0.19/addons/build_stamp/plugin.gd b/Demon_v0.19/addons/build_stamp/plugin.gd new file mode 100644 index 0000000..8423681 --- /dev/null +++ b/Demon_v0.19/addons/build_stamp/plugin.gd @@ -0,0 +1,21 @@ +@tool +extends EditorPlugin + +class BuildStamp extends EditorExportPlugin: + func _get_name() -> String: + return "DemonBuildIdentity" + + func _export_begin(_features: PackedStringArray, _debug: bool, _path: String, _flags: int) -> void: + var id="0.19-"+Crypto.new().generate_random_bytes(12).hex_encode() + var stamp={"version":"0.19","id":id,"built_at_utc":Time.get_datetime_string_from_system(true)} + add_file("res://build_info.json",JSON.stringify(stamp).to_utf8_buffer(),false) + print("DEMON_BUILD_ID: "+id) + +var exporter: BuildStamp + +func _enter_tree(): + exporter=BuildStamp.new() + add_export_plugin(exporter) + +func _exit_tree(): + remove_export_plugin(exporter) diff --git a/Demon_v0.19/apparatus_motion.gd b/Demon_v0.19/apparatus_motion.gd new file mode 100644 index 0000000..8dbbf98 --- /dev/null +++ b/Demon_v0.19/apparatus_motion.gd @@ -0,0 +1,86 @@ +extends RefCounted +var g +var d +var water: MeshInstance3D +var ropes=[] +var heat_materials=[] +var heat_light: OmniLight3D +var heat=0.0 +var tension=0.0 +var submerged=false +var splash_count=0 +var drops=[] +var wheel_cuffs=[] +func setup(game,development): + g=game;d=development + if d.selected==1: + for x in [-0.42,0.42]: + for z in [-1.42,1.42]: + var node=MeshInstance3D.new();d.device.add_child(node) + var mesh=CylinderMesh.new();mesh.top_radius=0.018;mesh.bottom_radius=0.018;mesh.height=1;mesh.radial_segments=12 + node.mesh=mesh;node.material_override=g.mat(Color("9b896c"));var cuff=preload("res://leather_cuff.gd").make(g,d.device,Vector3.ZERO,.08);cuff.rotation.x=PI/2 + ropes.append({"node":node,"cuff":cuff,"x":x,"z":z}) + for x in [-0.72,0.72]: + for z in [-1.28,1.28]:g.ball(d.device,Vector3(x,1.03,z),Vector3.ONE*0.09,Color("9d8c70")) + elif d.selected==2: + for n in d.crank.get_children(): + if n is MeshInstance3D and n.mesh is TorusMesh and n.mesh.outer_radius<.2:n.hide() + for bone in ["wrist.L","wrist.R","foot.L","foot.R"]: + var cuff=preload("res://leather_cuff.gd").make(g,d.crank,Vector3.ZERO,.095);cuff.rotation.x=PI/2;wheel_cuffs.append({"node":cuff,"bone":bone}) + # Open stave-built vat, solid water surface occludes the submerged body. + g.cylinder(d.device,Vector3(0,0.12,0.18),1.43,0.20,Color("32241e")) + for i in range(96): + var a=i*TAU/96 + var n=g.box(d.device,Vector3(cos(a)*1.37,0.54,sin(a)*1.06+0.18),Vector3(0.092,0.86,0.14),Color("4b3425").lightened((i%3)*0.03));n.rotation.y=-a+PI/2 + for y in [0.23,0.77,0.99]: + var band=g.torus(d.device,Vector3(0,y,0.18),1.39,Color("454249"));band.scale.z=0.77;band.material_override=g.mat(Color("454249"));band.material_override.metallic=0.8 + water=preload("res://water_surface.gd").new().build(g,d.device,1.29,Vector3(0,.87,.18),false) + water.scale.z=.76 + for i in range(14): + var drop=g.ball(d.device,Vector3.ZERO,Vector3(0.035,0.075,0.035),Color("9cbab9"));drop.hide();drops.append(drop) + elif d.selected==3: + var queue=[d.device] + while not queue.is_empty(): + var n=queue.pop_back() + for c in n.get_children():queue.append(c) + if n is MeshInstance3D and n!=d.flame: + var mat=ShaderMaterial.new();mat.shader=preload("res://forged.gdshader") + if n.material_override is StandardMaterial3D:mat.set_shader_parameter("tint",n.material_override.albedo_color) + n.material_override=mat;heat_materials.append(mat) + heat_light=OmniLight3D.new();d.device.add_child(heat_light);heat_light.position=Vector3(0,1,0.8);heat_light.light_color=Color("ff5819");heat_light.omni_range=3;heat_light.light_energy=0 + +func reset(): + tension=0;heat=0;submerged=false + +func update(dt,active): + var i=g.index_of(g.working) + if d.selected==1 and i>=0: + tension=move_toward(tension,clampf(d.elapsed,0,1) if d.stage==0 else 1.0,dt*2) + var s=g.souls[i] + # Extend along the body's long axis while keeping the pelvis centered. + s.visual.scale=Vector3(1.0,1.04+tension*0.14,1.0) + s.visual.position.z=1.13+tension*0.13 + for rope in ropes: + var a=Vector3(rope.x,1.16,rope.z) + var bone=("wrist." if rope.z<0 else "foot.")+("L" if rope.x>0 else "R") + var b=d.device.to_local(s.visual.bone_world(bone)) + rope.cuff.position=b + rope.node.position=(a+b)/2;rope.node.scale.y=a.distance_to(b);rope.node.quaternion=Quaternion(Vector3.UP,(b-a).normalized()) + elif d.selected==2 and i>=0: + for cuff in wheel_cuffs:cuff.node.position=d.crank.to_local(g.souls[i].visual.bone_world(cuff.bone)) + var head=g.souls[i].visual.bone_world("head") + var under=head.y=0 and d.stage>0 else 0.0 + if d.release_clock>0:target=heat + heat=move_toward(heat,target,dt*(1.5 if target>heat else 0.3)) + for mat in heat_materials:mat.set_shader_parameter("heat",heat) + heat_light.light_energy=heat*0.9 diff --git a/Demon_v0.19/art/fonts/KellySlab-OFL.txt b/Demon_v0.19/art/fonts/KellySlab-OFL.txt new file mode 100644 index 0000000..d098622 --- /dev/null +++ b/Demon_v0.19/art/fonts/KellySlab-OFL.txt @@ -0,0 +1,94 @@ +Copyright (c) 2011, Denis Masharov , +with Reserved Font Names "Kelly", "Kelly Slab". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/Demon_v0.19/art/fonts/KellySlab-Regular.ttf b/Demon_v0.19/art/fonts/KellySlab-Regular.ttf new file mode 100644 index 0000000..2f0bd3d Binary files /dev/null and b/Demon_v0.19/art/fonts/KellySlab-Regular.ttf differ diff --git a/Demon_v0.19/art/fonts/KellySlab-Regular.ttf.import b/Demon_v0.19/art/fonts/KellySlab-Regular.ttf.import new file mode 100644 index 0000000..e05a9d0 --- /dev/null +++ b/Demon_v0.19/art/fonts/KellySlab-Regular.ttf.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://i1xmvmokip2" +path="res://.godot/imported/KellySlab-Regular.ttf-4d07738b12de6af717023d4cbebf815e.fontdata" + +[deps] + +source_file="res://art/fonts/KellySlab-Regular.ttf" +dest_files=["res://.godot/imported/KellySlab-Regular.ttf-4d07738b12de6af717023d4cbebf815e.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/Demon_v0.19/art/fonts/RuslanDisplay-OFL.txt b/Demon_v0.19/art/fonts/RuslanDisplay-OFL.txt new file mode 100644 index 0000000..73e4f76 --- /dev/null +++ b/Demon_v0.19/art/fonts/RuslanDisplay-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2011 Oleg Snarsky, Denis Masharov, Vladimir Rabdu, with Reserved Font Name 'Ruslan', 'Ruslan Display'. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/Demon_v0.19/art/fonts/RuslanDisplay-Regular.ttf b/Demon_v0.19/art/fonts/RuslanDisplay-Regular.ttf new file mode 100644 index 0000000..ab8bbc2 Binary files /dev/null and b/Demon_v0.19/art/fonts/RuslanDisplay-Regular.ttf differ diff --git a/Demon_v0.19/art/fonts/RuslanDisplay-Regular.ttf.import b/Demon_v0.19/art/fonts/RuslanDisplay-Regular.ttf.import new file mode 100644 index 0000000..b5d6c8e --- /dev/null +++ b/Demon_v0.19/art/fonts/RuslanDisplay-Regular.ttf.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://25vgchp1ix6q" +path="res://.godot/imported/RuslanDisplay-Regular.ttf-b21277db87f732a1d4e67ed29c642ff3.fontdata" + +[deps] + +source_file="res://art/fonts/RuslanDisplay-Regular.ttf" +dest_files=["res://.godot/imported/RuslanDisplay-Regular.ttf-b21277db87f732a1d4e67ed29c642ff3.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/Demon_v0.19/art/fonts/body_bold.tres b/Demon_v0.19/art/fonts/body_bold.tres new file mode 100644 index 0000000..bc2d518 --- /dev/null +++ b/Demon_v0.19/art/fonts/body_bold.tres @@ -0,0 +1,7 @@ +[gd_resource type="FontVariation" load_steps=2 format=3] + +[ext_resource type="FontFile" path="res://art/fonts/KellySlab-Regular.ttf" id="1"] + +[resource] +base_font = ExtResource("1") +variation_embolden = 0.65 diff --git a/Demon_v0.19/art/fonts/title_bold.tres b/Demon_v0.19/art/fonts/title_bold.tres new file mode 100644 index 0000000..a209caa --- /dev/null +++ b/Demon_v0.19/art/fonts/title_bold.tres @@ -0,0 +1,7 @@ +[gd_resource type="FontVariation" load_steps=2 format=3] + +[ext_resource type="FontFile" path="res://art/fonts/RuslanDisplay-Regular.ttf" id="1"] + +[resource] +base_font = ExtResource("1") +variation_embolden = 0.35 diff --git a/Demon_v0.19/art/souls/soul_00.glb b/Demon_v0.19/art/souls/soul_00.glb new file mode 100644 index 0000000..3162f41 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_00.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca975429bf5d4f3ef5d1c7f26a988d1d0674e550111ff8a75f888b88f736522d +size 24448452 diff --git a/Demon_v0.19/art/souls/soul_00.glb.import b/Demon_v0.19/art/souls/soul_00.glb.import new file mode 100644 index 0000000..0339ebc --- /dev/null +++ b/Demon_v0.19/art/souls/soul_00.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dtrfrbrpqent6" +path="res://.godot/imported/soul_00.glb-2c938874d9c49ac4c7cb4cede72ca363.scn" + +[deps] + +source_file="res://art/souls/soul_00.glb" +dest_files=["res://.godot/imported/soul_00.glb-2c938874d9c49ac4c7cb4cede72ca363.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls/soul_00_young_lightskinned_female_diffuse4.png b/Demon_v0.19/art/souls/soul_00_young_lightskinned_female_diffuse4.png new file mode 100644 index 0000000..1f030f6 Binary files /dev/null and b/Demon_v0.19/art/souls/soul_00_young_lightskinned_female_diffuse4.png differ diff --git a/Demon_v0.19/art/souls/soul_00_young_lightskinned_female_diffuse4.png.import b/Demon_v0.19/art/souls/soul_00_young_lightskinned_female_diffuse4.png.import new file mode 100644 index 0000000..4ef6aa7 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_00_young_lightskinned_female_diffuse4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ycg3o8w1fj3j" +path="res://.godot/imported/soul_00_young_lightskinned_female_diffuse4.png-74e617c6a3d50bf42e8f80b5da9f6a8b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/souls/soul_00_young_lightskinned_female_diffuse4.png" +dest_files=["res://.godot/imported/soul_00_young_lightskinned_female_diffuse4.png-74e617c6a3d50bf42e8f80b5da9f6a8b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/souls/soul_01.glb b/Demon_v0.19/art/souls/soul_01.glb new file mode 100644 index 0000000..3f219ea --- /dev/null +++ b/Demon_v0.19/art/souls/soul_01.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7de325a0868bf1c101bdec3aa24a04d59c4857e299574dd42272085798b12982 +size 25149428 diff --git a/Demon_v0.19/art/souls/soul_01.glb.import b/Demon_v0.19/art/souls/soul_01.glb.import new file mode 100644 index 0000000..e24e07f --- /dev/null +++ b/Demon_v0.19/art/souls/soul_01.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://2m5n2vjfmrbl" +path="res://.godot/imported/soul_01.glb-fdc15a60dfa97611daa169ace6138257.scn" + +[deps] + +source_file="res://art/souls/soul_01.glb" +dest_files=["res://.godot/imported/soul_01.glb-fdc15a60dfa97611daa169ace6138257.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls/soul_01_young_lightskinned_female_diffuse4.png b/Demon_v0.19/art/souls/soul_01_young_lightskinned_female_diffuse4.png new file mode 100644 index 0000000..1f030f6 Binary files /dev/null and b/Demon_v0.19/art/souls/soul_01_young_lightskinned_female_diffuse4.png differ diff --git a/Demon_v0.19/art/souls/soul_01_young_lightskinned_female_diffuse4.png.import b/Demon_v0.19/art/souls/soul_01_young_lightskinned_female_diffuse4.png.import new file mode 100644 index 0000000..758ae2c --- /dev/null +++ b/Demon_v0.19/art/souls/soul_01_young_lightskinned_female_diffuse4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cfn3i8h6mp0bx" +path="res://.godot/imported/soul_01_young_lightskinned_female_diffuse4.png-358ac5012dae5901654d13646e9a54d7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/souls/soul_01_young_lightskinned_female_diffuse4.png" +dest_files=["res://.godot/imported/soul_01_young_lightskinned_female_diffuse4.png-358ac5012dae5901654d13646e9a54d7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/souls/soul_02.glb b/Demon_v0.19/art/souls/soul_02.glb new file mode 100644 index 0000000..3237021 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_02.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f48634f322cd4ac1c8915b7c1261e881148c84cd62f915f562062ae6e3b53a4 +size 25982524 diff --git a/Demon_v0.19/art/souls/soul_02.glb.import b/Demon_v0.19/art/souls/soul_02.glb.import new file mode 100644 index 0000000..3627053 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_02.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bt3vaw2yarfny" +path="res://.godot/imported/soul_02.glb-ad9226c37e9856a8983bde80c73a8d00.scn" + +[deps] + +source_file="res://art/souls/soul_02.glb" +dest_files=["res://.godot/imported/soul_02.glb-ad9226c37e9856a8983bde80c73a8d00.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls/soul_02_young_lightskinned_female_diffuse4.png b/Demon_v0.19/art/souls/soul_02_young_lightskinned_female_diffuse4.png new file mode 100644 index 0000000..1f030f6 Binary files /dev/null and b/Demon_v0.19/art/souls/soul_02_young_lightskinned_female_diffuse4.png differ diff --git a/Demon_v0.19/art/souls/soul_02_young_lightskinned_female_diffuse4.png.import b/Demon_v0.19/art/souls/soul_02_young_lightskinned_female_diffuse4.png.import new file mode 100644 index 0000000..3837d0d --- /dev/null +++ b/Demon_v0.19/art/souls/soul_02_young_lightskinned_female_diffuse4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dspy0gmfn145y" +path="res://.godot/imported/soul_02_young_lightskinned_female_diffuse4.png-c3b3b85d8468c454181b347f289deaf7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/souls/soul_02_young_lightskinned_female_diffuse4.png" +dest_files=["res://.godot/imported/soul_02_young_lightskinned_female_diffuse4.png-c3b3b85d8468c454181b347f289deaf7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/souls/soul_03.glb b/Demon_v0.19/art/souls/soul_03.glb new file mode 100644 index 0000000..5b9e5cb --- /dev/null +++ b/Demon_v0.19/art/souls/soul_03.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4748dc5593493dde7105b7aa44037e0edb499f3aa9cd4a92de1265e866bb5b2 +size 24456132 diff --git a/Demon_v0.19/art/souls/soul_03.glb.import b/Demon_v0.19/art/souls/soul_03.glb.import new file mode 100644 index 0000000..2ca3442 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_03.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://b6cf6k37opv2h" +path="res://.godot/imported/soul_03.glb-a5aed0d379d67c5a6f4bdf1ba237714e.scn" + +[deps] + +source_file="res://art/souls/soul_03.glb" +dest_files=["res://.godot/imported/soul_03.glb-a5aed0d379d67c5a6f4bdf1ba237714e.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls/soul_03_young_lightskinned_female_diffuse4.png b/Demon_v0.19/art/souls/soul_03_young_lightskinned_female_diffuse4.png new file mode 100644 index 0000000..1f030f6 Binary files /dev/null and b/Demon_v0.19/art/souls/soul_03_young_lightskinned_female_diffuse4.png differ diff --git a/Demon_v0.19/art/souls/soul_03_young_lightskinned_female_diffuse4.png.import b/Demon_v0.19/art/souls/soul_03_young_lightskinned_female_diffuse4.png.import new file mode 100644 index 0000000..fdfd6af --- /dev/null +++ b/Demon_v0.19/art/souls/soul_03_young_lightskinned_female_diffuse4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bboa3tnofiis7" +path="res://.godot/imported/soul_03_young_lightskinned_female_diffuse4.png-d92a7dfb5c2da50a11def37941d9d2c8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/souls/soul_03_young_lightskinned_female_diffuse4.png" +dest_files=["res://.godot/imported/soul_03_young_lightskinned_female_diffuse4.png-d92a7dfb5c2da50a11def37941d9d2c8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/souls/soul_04.glb b/Demon_v0.19/art/souls/soul_04.glb new file mode 100644 index 0000000..611d162 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_04.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83229de4f14f3a6db6e7c20589b4dae4262f0c1de39b0c619c97a6a68244e7c1 +size 24573308 diff --git a/Demon_v0.19/art/souls/soul_04.glb.import b/Demon_v0.19/art/souls/soul_04.glb.import new file mode 100644 index 0000000..037cdf2 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_04.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://b7j3ygnqe38l3" +path="res://.godot/imported/soul_04.glb-c8cc117cf0a4ec8b6c90d970c81e3016.scn" + +[deps] + +source_file="res://art/souls/soul_04.glb" +dest_files=["res://.godot/imported/soul_04.glb-c8cc117cf0a4ec8b6c90d970c81e3016.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls/soul_04_young_lightskinned_female_diffuse4.png b/Demon_v0.19/art/souls/soul_04_young_lightskinned_female_diffuse4.png new file mode 100644 index 0000000..1f030f6 Binary files /dev/null and b/Demon_v0.19/art/souls/soul_04_young_lightskinned_female_diffuse4.png differ diff --git a/Demon_v0.19/art/souls/soul_04_young_lightskinned_female_diffuse4.png.import b/Demon_v0.19/art/souls/soul_04_young_lightskinned_female_diffuse4.png.import new file mode 100644 index 0000000..ffb0067 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_04_young_lightskinned_female_diffuse4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cxofxpw8tsuup" +path="res://.godot/imported/soul_04_young_lightskinned_female_diffuse4.png-ca243685eb025e0392e204e34abb57a1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/souls/soul_04_young_lightskinned_female_diffuse4.png" +dest_files=["res://.godot/imported/soul_04_young_lightskinned_female_diffuse4.png-ca243685eb025e0392e204e34abb57a1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/souls/soul_05.glb b/Demon_v0.19/art/souls/soul_05.glb new file mode 100644 index 0000000..859e180 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_05.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6353cf09a78ed2789f99dfbe1b1a1a8eec5c80e8f2152f67377ee10a31d7556b +size 25410232 diff --git a/Demon_v0.19/art/souls/soul_05.glb.import b/Demon_v0.19/art/souls/soul_05.glb.import new file mode 100644 index 0000000..1ba85f4 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_05.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://xyfuco1ls0pg" +path="res://.godot/imported/soul_05.glb-76eb9f5e6ca470a6e9ac0dbea58f83d2.scn" + +[deps] + +source_file="res://art/souls/soul_05.glb" +dest_files=["res://.godot/imported/soul_05.glb-76eb9f5e6ca470a6e9ac0dbea58f83d2.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls/soul_05_young_lightskinned_female_diffuse4.png b/Demon_v0.19/art/souls/soul_05_young_lightskinned_female_diffuse4.png new file mode 100644 index 0000000..1f030f6 Binary files /dev/null and b/Demon_v0.19/art/souls/soul_05_young_lightskinned_female_diffuse4.png differ diff --git a/Demon_v0.19/art/souls/soul_05_young_lightskinned_female_diffuse4.png.import b/Demon_v0.19/art/souls/soul_05_young_lightskinned_female_diffuse4.png.import new file mode 100644 index 0000000..1db5b9b --- /dev/null +++ b/Demon_v0.19/art/souls/soul_05_young_lightskinned_female_diffuse4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://56jc77t741mj" +path="res://.godot/imported/soul_05_young_lightskinned_female_diffuse4.png-4903f05dbf7d319eb477ae9861f3cf02.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/souls/soul_05_young_lightskinned_female_diffuse4.png" +dest_files=["res://.godot/imported/soul_05_young_lightskinned_female_diffuse4.png-4903f05dbf7d319eb477ae9861f3cf02.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/souls/soul_06.glb b/Demon_v0.19/art/souls/soul_06.glb new file mode 100644 index 0000000..d197fb5 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_06.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f01e8e7ea574db2b41333f6ab4e884930087911c1bb36c10e2138433136efaa +size 24017876 diff --git a/Demon_v0.19/art/souls/soul_06.glb.import b/Demon_v0.19/art/souls/soul_06.glb.import new file mode 100644 index 0000000..6847d71 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_06.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bj6a3n5wjcoi8" +path="res://.godot/imported/soul_06.glb-1bf2146b80097e7ffdf8e331c7941a73.scn" + +[deps] + +source_file="res://art/souls/soul_06.glb" +dest_files=["res://.godot/imported/soul_06.glb-1bf2146b80097e7ffdf8e331c7941a73.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls/soul_06_young_lightskinned_female_diffuse4.png b/Demon_v0.19/art/souls/soul_06_young_lightskinned_female_diffuse4.png new file mode 100644 index 0000000..1f030f6 Binary files /dev/null and b/Demon_v0.19/art/souls/soul_06_young_lightskinned_female_diffuse4.png differ diff --git a/Demon_v0.19/art/souls/soul_06_young_lightskinned_female_diffuse4.png.import b/Demon_v0.19/art/souls/soul_06_young_lightskinned_female_diffuse4.png.import new file mode 100644 index 0000000..a4f5020 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_06_young_lightskinned_female_diffuse4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cvybl4biged00" +path="res://.godot/imported/soul_06_young_lightskinned_female_diffuse4.png-6482276df700d87e49888c4a080638e9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/souls/soul_06_young_lightskinned_female_diffuse4.png" +dest_files=["res://.godot/imported/soul_06_young_lightskinned_female_diffuse4.png-6482276df700d87e49888c4a080638e9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/souls/soul_07.glb b/Demon_v0.19/art/souls/soul_07.glb new file mode 100644 index 0000000..8f7ed3e --- /dev/null +++ b/Demon_v0.19/art/souls/soul_07.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7a84e07198063ef9dd87a31b0285cf87e4e881c21e913ffc2ce284f4207f729 +size 24624612 diff --git a/Demon_v0.19/art/souls/soul_07.glb.import b/Demon_v0.19/art/souls/soul_07.glb.import new file mode 100644 index 0000000..4da2969 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_07.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://ctyslxf7tcmhw" +path="res://.godot/imported/soul_07.glb-59c4eafdee29c2c4d3da0036e8f8a316.scn" + +[deps] + +source_file="res://art/souls/soul_07.glb" +dest_files=["res://.godot/imported/soul_07.glb-59c4eafdee29c2c4d3da0036e8f8a316.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls/soul_07_young_lightskinned_female_diffuse4.png b/Demon_v0.19/art/souls/soul_07_young_lightskinned_female_diffuse4.png new file mode 100644 index 0000000..1f030f6 Binary files /dev/null and b/Demon_v0.19/art/souls/soul_07_young_lightskinned_female_diffuse4.png differ diff --git a/Demon_v0.19/art/souls/soul_07_young_lightskinned_female_diffuse4.png.import b/Demon_v0.19/art/souls/soul_07_young_lightskinned_female_diffuse4.png.import new file mode 100644 index 0000000..38cbe1f --- /dev/null +++ b/Demon_v0.19/art/souls/soul_07_young_lightskinned_female_diffuse4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ch530l3w72s37" +path="res://.godot/imported/soul_07_young_lightskinned_female_diffuse4.png-54d7604119e708030cc0d5a060e027e4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/souls/soul_07_young_lightskinned_female_diffuse4.png" +dest_files=["res://.godot/imported/soul_07_young_lightskinned_female_diffuse4.png-54d7604119e708030cc0d5a060e027e4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/souls/soul_08.glb b/Demon_v0.19/art/souls/soul_08.glb new file mode 100644 index 0000000..ccc1fab --- /dev/null +++ b/Demon_v0.19/art/souls/soul_08.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c59073dc6f4fbf867593551b837759b8c0b5a07ba83e7b37af0ca1a5e111ebdb +size 26679372 diff --git a/Demon_v0.19/art/souls/soul_08.glb.import b/Demon_v0.19/art/souls/soul_08.glb.import new file mode 100644 index 0000000..79cdceb --- /dev/null +++ b/Demon_v0.19/art/souls/soul_08.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dong8lb6mguob" +path="res://.godot/imported/soul_08.glb-68e2346473c95f14542dad76816828d8.scn" + +[deps] + +source_file="res://art/souls/soul_08.glb" +dest_files=["res://.godot/imported/soul_08.glb-68e2346473c95f14542dad76816828d8.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls/soul_08_young_lightskinned_female_diffuse4.png b/Demon_v0.19/art/souls/soul_08_young_lightskinned_female_diffuse4.png new file mode 100644 index 0000000..1f030f6 Binary files /dev/null and b/Demon_v0.19/art/souls/soul_08_young_lightskinned_female_diffuse4.png differ diff --git a/Demon_v0.19/art/souls/soul_08_young_lightskinned_female_diffuse4.png.import b/Demon_v0.19/art/souls/soul_08_young_lightskinned_female_diffuse4.png.import new file mode 100644 index 0000000..9cadb34 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_08_young_lightskinned_female_diffuse4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c6dj6qsh75gxt" +path="res://.godot/imported/soul_08_young_lightskinned_female_diffuse4.png-53806de814a0a0fd946e9e7c87f82e65.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/souls/soul_08_young_lightskinned_female_diffuse4.png" +dest_files=["res://.godot/imported/soul_08_young_lightskinned_female_diffuse4.png-53806de814a0a0fd946e9e7c87f82e65.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/souls/soul_09.glb b/Demon_v0.19/art/souls/soul_09.glb new file mode 100644 index 0000000..fae7e93 --- /dev/null +++ b/Demon_v0.19/art/souls/soul_09.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb764afd31b36d693dbd40316f5353a417391f6db6b5854f4a4337755532052a +size 24372048 diff --git a/Demon_v0.19/art/souls/soul_09.glb.import b/Demon_v0.19/art/souls/soul_09.glb.import new file mode 100644 index 0000000..203fbfc --- /dev/null +++ b/Demon_v0.19/art/souls/soul_09.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://b7wp2gp0opkkj" +path="res://.godot/imported/soul_09.glb-2cf6bb81570d7d816a65166efb0c7ef7.scn" + +[deps] + +source_file="res://art/souls/soul_09.glb" +dest_files=["res://.godot/imported/soul_09.glb-2cf6bb81570d7d816a65166efb0c7ef7.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls/soul_09_young_lightskinned_female_diffuse4.png b/Demon_v0.19/art/souls/soul_09_young_lightskinned_female_diffuse4.png new file mode 100644 index 0000000..1f030f6 Binary files /dev/null and b/Demon_v0.19/art/souls/soul_09_young_lightskinned_female_diffuse4.png differ diff --git a/Demon_v0.19/art/souls/soul_09_young_lightskinned_female_diffuse4.png.import b/Demon_v0.19/art/souls/soul_09_young_lightskinned_female_diffuse4.png.import new file mode 100644 index 0000000..e1bb28e --- /dev/null +++ b/Demon_v0.19/art/souls/soul_09_young_lightskinned_female_diffuse4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b5ue4nc4x5ya6" +path="res://.godot/imported/soul_09_young_lightskinned_female_diffuse4.png-52548d00e70e79dbf6882e1858f8d5fd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/souls/soul_09_young_lightskinned_female_diffuse4.png" +dest_files=["res://.godot/imported/soul_09_young_lightskinned_female_diffuse4.png-52548d00e70e79dbf6882e1858f8d5fd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/souls_v03/manifest.json b/Demon_v0.19/art/souls_v03/manifest.json new file mode 100644 index 0000000..10a5e2e --- /dev/null +++ b/Demon_v0.19/art/souls_v03/manifest.json @@ -0,0 +1,212 @@ +[ + { + "kind": 0, + "name": "Обжора", + "gender": "female", + "hair": "flow", + "height": 0.96, + "face_width": 0.96, + "jaw": 0.94, + "bones": 166, + "legs": true, + "clips": [ + "Idle", + "Float", + "Walk", + "Rack", + "Wheel", + "Maiden" + ], + "bytes": 10036300, + "sha256": "22235f20d64e62e2434afd85e63c617e5ad742bafbe5c70e01fb72287f11cc11" + }, + { + "kind": 1, + "name": "Курильщица", + "gender": "female", + "hair": "bob", + "height": 1.02, + "face_width": 0.9, + "jaw": 1.04, + "bones": 166, + "legs": true, + "clips": [ + "Idle", + "Float", + "Walk", + "Rack", + "Wheel", + "Maiden" + ], + "bytes": 10044088, + "sha256": "2856029aa791c100654942952f68d7cbf09e64cc66301c84ffd9f3cfa925c99b" + }, + { + "kind": 2, + "name": "Аферистка", + "gender": "female", + "hair": "tail", + "height": 1.0, + "face_width": 1.04, + "jaw": 0.94, + "bones": 166, + "legs": true, + "clips": [ + "Idle", + "Float", + "Walk", + "Rack", + "Wheel", + "Maiden" + ], + "bytes": 10035152, + "sha256": "6995025ede8955a072329618e4154cc28cce46763754e3c66e77f53a32bf2b94" + }, + { + "kind": 3, + "name": "Взяточница", + "gender": "female", + "hair": "braid", + "height": 1.04, + "face_width": 0.93, + "jaw": 1.0, + "bones": 166, + "legs": true, + "clips": [ + "Idle", + "Float", + "Walk", + "Rack", + "Wheel", + "Maiden" + ], + "bytes": 10177408, + "sha256": "faa3fd068ef8b77173fdf0da8737b035454dd66289fce014a9a13b9dd0439dfd" + }, + { + "kind": 4, + "name": "Сплетница", + "gender": "female", + "hair": "bun", + "height": 0.97, + "face_width": 1.05, + "jaw": 1.04, + "bones": 166, + "legs": true, + "clips": [ + "Idle", + "Float", + "Walk", + "Rack", + "Wheel", + "Maiden" + ], + "bytes": 9418676, + "sha256": "195af84ce215e88e536ac9e8ae8928929ac84552a69f965f77c81ca621bb34fc" + }, + { + "kind": 5, + "name": "Алкоголик", + "gender": "male", + "hair": "crop", + "height": 1.0, + "face_width": 1.04, + "jaw": 1.0, + "bones": 166, + "legs": true, + "clips": [ + "Idle", + "Float", + "Walk", + "Rack", + "Wheel", + "Maiden" + ], + "bytes": 6374468, + "sha256": "5a699f3d38ff7df51e77be01936bcac826b42946d7f364d6e2a1deb2dbd3365f" + }, + { + "kind": 6, + "name": "Блогер", + "gender": "male", + "hair": "quiff", + "height": 1.03, + "face_width": 0.91, + "jaw": 1.04, + "bones": 166, + "legs": true, + "clips": [ + "Idle", + "Float", + "Walk", + "Rack", + "Wheel", + "Maiden" + ], + "bytes": 5877656, + "sha256": "d22aca247abb8f78ff4d562561452094c45be1a38118bb521cc1b46c6954715b" + }, + { + "kind": 7, + "name": "Нарцисс", + "gender": "male", + "hair": "slick", + "height": 1.05, + "face_width": 0.96, + "jaw": 0.94, + "bones": 166, + "legs": true, + "clips": [ + "Idle", + "Float", + "Walk", + "Rack", + "Wheel", + "Maiden" + ], + "bytes": 6437200, + "sha256": "7016569207fa48e1877b0cdd83d7f78a35d7c8d0a8eff20b27f7647152820d51" + }, + { + "kind": 8, + "name": "Скандалист", + "gender": "male", + "hair": "buzz", + "height": 0.99, + "face_width": 1.09, + "jaw": 1.06, + "bones": 166, + "legs": true, + "clips": [ + "Idle", + "Float", + "Walk", + "Rack", + "Wheel", + "Maiden" + ], + "bytes": 6019420, + "sha256": "e542e81feb667d91fa79ebf54dacea080e4142cb7be5749af5531ebfc3a1c58c" + }, + { + "kind": 9, + "name": "Мошенник", + "gender": "male", + "hair": "long", + "height": 1.02, + "face_width": 0.94, + "jaw": 1.0, + "bones": 166, + "legs": true, + "clips": [ + "Idle", + "Float", + "Walk", + "Rack", + "Wheel", + "Maiden" + ], + "bytes": 6474860, + "sha256": "03c358a3b89c7dce95d81db06f6264b937d753c5ed70c83cc835cce8469114fa" + } +] \ No newline at end of file diff --git a/Demon_v0.19/art/souls_v03/soul_00.glb b/Demon_v0.19/art/souls_v03/soul_00.glb new file mode 100644 index 0000000..af6d540 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_00.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22235f20d64e62e2434afd85e63c617e5ad742bafbe5c70e01fb72287f11cc11 +size 10036300 diff --git a/Demon_v0.19/art/souls_v03/soul_00.glb.import b/Demon_v0.19/art/souls_v03/soul_00.glb.import new file mode 100644 index 0000000..7b8e7de --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_00.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://v2tvf5axudvb" +path="res://.godot/imported/soul_00.glb-c67e93e4af30b2c74905f65641806bc6.scn" + +[deps] + +source_file="res://art/souls_v03/soul_00.glb" +dest_files=["res://.godot/imported/soul_00.glb-c67e93e4af30b2c74905f65641806bc6.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v03/soul_01.glb b/Demon_v0.19/art/souls_v03/soul_01.glb new file mode 100644 index 0000000..4379f01 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_01.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2856029aa791c100654942952f68d7cbf09e64cc66301c84ffd9f3cfa925c99b +size 10044088 diff --git a/Demon_v0.19/art/souls_v03/soul_01.glb.import b/Demon_v0.19/art/souls_v03/soul_01.glb.import new file mode 100644 index 0000000..fa483e4 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_01.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://d4fq1l02cgv2g" +path="res://.godot/imported/soul_01.glb-d4d61c236e9c9022d9f0cfdffc0f4b51.scn" + +[deps] + +source_file="res://art/souls_v03/soul_01.glb" +dest_files=["res://.godot/imported/soul_01.glb-d4d61c236e9c9022d9f0cfdffc0f4b51.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v03/soul_02.glb b/Demon_v0.19/art/souls_v03/soul_02.glb new file mode 100644 index 0000000..4e34efa --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_02.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6995025ede8955a072329618e4154cc28cce46763754e3c66e77f53a32bf2b94 +size 10035152 diff --git a/Demon_v0.19/art/souls_v03/soul_02.glb.import b/Demon_v0.19/art/souls_v03/soul_02.glb.import new file mode 100644 index 0000000..d897a38 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_02.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://c5t1k0kevgv8o" +path="res://.godot/imported/soul_02.glb-4ca314f115d645168e01badacf7e7d18.scn" + +[deps] + +source_file="res://art/souls_v03/soul_02.glb" +dest_files=["res://.godot/imported/soul_02.glb-4ca314f115d645168e01badacf7e7d18.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v03/soul_03.glb b/Demon_v0.19/art/souls_v03/soul_03.glb new file mode 100644 index 0000000..98e3307 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_03.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:faa3fd068ef8b77173fdf0da8737b035454dd66289fce014a9a13b9dd0439dfd +size 10177408 diff --git a/Demon_v0.19/art/souls_v03/soul_03.glb.import b/Demon_v0.19/art/souls_v03/soul_03.glb.import new file mode 100644 index 0000000..b5c419c --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_03.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://cp6hpyddm3wp" +path="res://.godot/imported/soul_03.glb-a2cc3f8cd8a65bcc5363107413f3e0e3.scn" + +[deps] + +source_file="res://art/souls_v03/soul_03.glb" +dest_files=["res://.godot/imported/soul_03.glb-a2cc3f8cd8a65bcc5363107413f3e0e3.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v03/soul_04.glb b/Demon_v0.19/art/souls_v03/soul_04.glb new file mode 100644 index 0000000..d04585f --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_04.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:195af84ce215e88e536ac9e8ae8928929ac84552a69f965f77c81ca621bb34fc +size 9418676 diff --git a/Demon_v0.19/art/souls_v03/soul_04.glb.import b/Demon_v0.19/art/souls_v03/soul_04.glb.import new file mode 100644 index 0000000..3f29824 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_04.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://sgh8jul17pft" +path="res://.godot/imported/soul_04.glb-75198623f928ebc00da392685c9da8aa.scn" + +[deps] + +source_file="res://art/souls_v03/soul_04.glb" +dest_files=["res://.godot/imported/soul_04.glb-75198623f928ebc00da392685c9da8aa.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v03/soul_05.glb b/Demon_v0.19/art/souls_v03/soul_05.glb new file mode 100644 index 0000000..f18007c --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_05.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a699f3d38ff7df51e77be01936bcac826b42946d7f364d6e2a1deb2dbd3365f +size 6374468 diff --git a/Demon_v0.19/art/souls_v03/soul_05.glb.import b/Demon_v0.19/art/souls_v03/soul_05.glb.import new file mode 100644 index 0000000..42d931b --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_05.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://cpbkwjc0ssykn" +path="res://.godot/imported/soul_05.glb-849440a11bb7ffc2cac4d0e1da8c0260.scn" + +[deps] + +source_file="res://art/souls_v03/soul_05.glb" +dest_files=["res://.godot/imported/soul_05.glb-849440a11bb7ffc2cac4d0e1da8c0260.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v03/soul_06.glb b/Demon_v0.19/art/souls_v03/soul_06.glb new file mode 100644 index 0000000..abb6ff4 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_06.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d22aca247abb8f78ff4d562561452094c45be1a38118bb521cc1b46c6954715b +size 5877656 diff --git a/Demon_v0.19/art/souls_v03/soul_06.glb.import b/Demon_v0.19/art/souls_v03/soul_06.glb.import new file mode 100644 index 0000000..d05ee95 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_06.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bub8oxyuthbif" +path="res://.godot/imported/soul_06.glb-cf09ac520f95af2eabf996f45d0d1ca4.scn" + +[deps] + +source_file="res://art/souls_v03/soul_06.glb" +dest_files=["res://.godot/imported/soul_06.glb-cf09ac520f95af2eabf996f45d0d1ca4.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v03/soul_07.glb b/Demon_v0.19/art/souls_v03/soul_07.glb new file mode 100644 index 0000000..4a777cf --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_07.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7016569207fa48e1877b0cdd83d7f78a35d7c8d0a8eff20b27f7647152820d51 +size 6437200 diff --git a/Demon_v0.19/art/souls_v03/soul_07.glb.import b/Demon_v0.19/art/souls_v03/soul_07.glb.import new file mode 100644 index 0000000..de29155 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_07.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://b4ws5dywjjrtd" +path="res://.godot/imported/soul_07.glb-1ed700a43962f4790b78d2eeddd5f7ec.scn" + +[deps] + +source_file="res://art/souls_v03/soul_07.glb" +dest_files=["res://.godot/imported/soul_07.glb-1ed700a43962f4790b78d2eeddd5f7ec.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v03/soul_08.glb b/Demon_v0.19/art/souls_v03/soul_08.glb new file mode 100644 index 0000000..c59ae0f --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_08.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e542e81feb667d91fa79ebf54dacea080e4142cb7be5749af5531ebfc3a1c58c +size 6019420 diff --git a/Demon_v0.19/art/souls_v03/soul_08.glb.import b/Demon_v0.19/art/souls_v03/soul_08.glb.import new file mode 100644 index 0000000..76e6307 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_08.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://d3ydd1ok51ja5" +path="res://.godot/imported/soul_08.glb-ad91404cba3a4513c15aada27b080678.scn" + +[deps] + +source_file="res://art/souls_v03/soul_08.glb" +dest_files=["res://.godot/imported/soul_08.glb-ad91404cba3a4513c15aada27b080678.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v03/soul_09.glb b/Demon_v0.19/art/souls_v03/soul_09.glb new file mode 100644 index 0000000..cdb8ae8 --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_09.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03c358a3b89c7dce95d81db06f6264b937d753c5ed70c83cc835cce8469114fa +size 6474860 diff --git a/Demon_v0.19/art/souls_v03/soul_09.glb.import b/Demon_v0.19/art/souls_v03/soul_09.glb.import new file mode 100644 index 0000000..780d53c --- /dev/null +++ b/Demon_v0.19/art/souls_v03/soul_09.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://rp14nanhu5u6" +path="res://.godot/imported/soul_09.glb-4a15b920c768f6e64aca4b438df253f8.scn" + +[deps] + +source_file="res://art/souls_v03/soul_09.glb" +dest_files=["res://.godot/imported/soul_09.glb-4a15b920c768f6e64aca4b438df253f8.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v04/manifest.json b/Demon_v0.19/art/souls_v04/manifest.json new file mode 100644 index 0000000..b0bdbe5 --- /dev/null +++ b/Demon_v0.19/art/souls_v04/manifest.json @@ -0,0 +1,37 @@ +[ + { + "kind": 5, + "modified_vertices": 59691, + "chest_width_factor": 0.86, + "chest_depth_factor": 0.88, + "sha256": "c03d98357d47548281fddb4f768a172ccb89946cf1f2b4616f49a1a63454d834" + }, + { + "kind": 6, + "modified_vertices": 55568, + "chest_width_factor": 0.86, + "chest_depth_factor": 0.88, + "sha256": "dd3e864bb0d59c84ea8266dba85d9fb0f6bb9dd68450ab47d7059c019e292a65" + }, + { + "kind": 7, + "modified_vertices": 58356, + "chest_width_factor": 0.86, + "chest_depth_factor": 0.88, + "sha256": "a22102ef9063dee512636867bd6e8b10f0282ba33beb353cebebe29e9e172de5" + }, + { + "kind": 8, + "modified_vertices": 58711, + "chest_width_factor": 0.86, + "chest_depth_factor": 0.88, + "sha256": "96fd131b03c36053c5b26636c95294cb7344a9b2a28dca23e1f22ffaf9936804" + }, + { + "kind": 9, + "modified_vertices": 80272, + "chest_width_factor": 0.86, + "chest_depth_factor": 0.88, + "sha256": "c9ee7ffbc37b14b1c29a14cd681507bd7b1f4612365ee55add2d311506449ff7" + } +] \ No newline at end of file diff --git a/Demon_v0.19/art/souls_v04/soul_05.glb b/Demon_v0.19/art/souls_v04/soul_05.glb new file mode 100644 index 0000000..cfc24fe --- /dev/null +++ b/Demon_v0.19/art/souls_v04/soul_05.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c03d98357d47548281fddb4f768a172ccb89946cf1f2b4616f49a1a63454d834 +size 7825220 diff --git a/Demon_v0.19/art/souls_v04/soul_05.glb.import b/Demon_v0.19/art/souls_v04/soul_05.glb.import new file mode 100644 index 0000000..45fcbf9 --- /dev/null +++ b/Demon_v0.19/art/souls_v04/soul_05.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://vrywj47libgr" +path="res://.godot/imported/soul_05.glb-950f002039c2b9e63f0c0b2e53e2d3d4.scn" + +[deps] + +source_file="res://art/souls_v04/soul_05.glb" +dest_files=["res://.godot/imported/soul_05.glb-950f002039c2b9e63f0c0b2e53e2d3d4.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v04/soul_06.glb b/Demon_v0.19/art/souls_v04/soul_06.glb new file mode 100644 index 0000000..c8e6cdd --- /dev/null +++ b/Demon_v0.19/art/souls_v04/soul_06.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd3e864bb0d59c84ea8266dba85d9fb0f6bb9dd68450ab47d7059c019e292a65 +size 7215836 diff --git a/Demon_v0.19/art/souls_v04/soul_06.glb.import b/Demon_v0.19/art/souls_v04/soul_06.glb.import new file mode 100644 index 0000000..df32c52 --- /dev/null +++ b/Demon_v0.19/art/souls_v04/soul_06.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bakwobhul517q" +path="res://.godot/imported/soul_06.glb-d30669f526a75a5f101fa3fa796ed01f.scn" + +[deps] + +source_file="res://art/souls_v04/soul_06.glb" +dest_files=["res://.godot/imported/soul_06.glb-d30669f526a75a5f101fa3fa796ed01f.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v04/soul_07.glb b/Demon_v0.19/art/souls_v04/soul_07.glb new file mode 100644 index 0000000..21c9699 --- /dev/null +++ b/Demon_v0.19/art/souls_v04/soul_07.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a22102ef9063dee512636867bd6e8b10f0282ba33beb353cebebe29e9e172de5 +size 7844264 diff --git a/Demon_v0.19/art/souls_v04/soul_07.glb.import b/Demon_v0.19/art/souls_v04/soul_07.glb.import new file mode 100644 index 0000000..44f220f --- /dev/null +++ b/Demon_v0.19/art/souls_v04/soul_07.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://muna6fngacye" +path="res://.godot/imported/soul_07.glb-06b6b5af5820cece70ed2a3657b4b7dd.scn" + +[deps] + +source_file="res://art/souls_v04/soul_07.glb" +dest_files=["res://.godot/imported/soul_07.glb-06b6b5af5820cece70ed2a3657b4b7dd.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v04/soul_08.glb b/Demon_v0.19/art/souls_v04/soul_08.glb new file mode 100644 index 0000000..1de6ab8 --- /dev/null +++ b/Demon_v0.19/art/souls_v04/soul_08.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96fd131b03c36053c5b26636c95294cb7344a9b2a28dca23e1f22ffaf9936804 +size 7466336 diff --git a/Demon_v0.19/art/souls_v04/soul_08.glb.import b/Demon_v0.19/art/souls_v04/soul_08.glb.import new file mode 100644 index 0000000..7c1dcdb --- /dev/null +++ b/Demon_v0.19/art/souls_v04/soul_08.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://uydo6ac23kkj" +path="res://.godot/imported/soul_08.glb-73113899addd4ec55e4825f858c99d56.scn" + +[deps] + +source_file="res://art/souls_v04/soul_08.glb" +dest_files=["res://.godot/imported/soul_08.glb-73113899addd4ec55e4825f858c99d56.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/souls_v04/soul_09.glb b/Demon_v0.19/art/souls_v04/soul_09.glb new file mode 100644 index 0000000..4b81d04 --- /dev/null +++ b/Demon_v0.19/art/souls_v04/soul_09.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9ee7ffbc37b14b1c29a14cd681507bd7b1f4612365ee55add2d311506449ff7 +size 8406980 diff --git a/Demon_v0.19/art/souls_v04/soul_09.glb.import b/Demon_v0.19/art/souls_v04/soul_09.glb.import new file mode 100644 index 0000000..437e0b9 --- /dev/null +++ b/Demon_v0.19/art/souls_v04/soul_09.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://cf7dmnlvi4afd" +path="res://.godot/imported/soul_09.glb-ef23a05d89961b008fcdd3997cf17b78.scn" + +[deps] + +source_file="res://art/souls_v04/soul_09.glb" +dest_files=["res://.godot/imported/soul_09.glb-ef23a05d89961b008fcdd3997cf17b78.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/stone_albedo.png b/Demon_v0.19/art/stone_albedo.png new file mode 100644 index 0000000..55d36a0 Binary files /dev/null and b/Demon_v0.19/art/stone_albedo.png differ diff --git a/Demon_v0.19/art/stone_albedo.png.import b/Demon_v0.19/art/stone_albedo.png.import new file mode 100644 index 0000000..a0affed --- /dev/null +++ b/Demon_v0.19/art/stone_albedo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dmekvu5vtk2gp" +path="res://.godot/imported/stone_albedo.png-27e4c2eea5f762ce23ad62b7b101e24a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/stone_albedo.png" +dest_files=["res://.godot/imported/stone_albedo.png-27e4c2eea5f762ce23ad62b7b101e24a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/succubus/asset_manifest.json b/Demon_v0.19/art/succubus/asset_manifest.json new file mode 100644 index 0000000..e13e1dc --- /dev/null +++ b/Demon_v0.19/art/succubus/asset_manifest.json @@ -0,0 +1,13 @@ +{ + "source": "character_studio/succubus_v01/succubus_walk_v02.blend", + "file": "succubus_v01.glb", + "body_vertices": 568276, + "body_faces": 565240, + "bones": 166, + "clips": [ + "Idle", + "Walk", + "Whip" + ], + "texture_resolution": 4096 +} diff --git a/Demon_v0.19/art/succubus/skin_basecolor.png b/Demon_v0.19/art/succubus/skin_basecolor.png new file mode 100644 index 0000000..db909fb Binary files /dev/null and b/Demon_v0.19/art/succubus/skin_basecolor.png differ diff --git a/Demon_v0.19/art/succubus/skin_basecolor.png.import b/Demon_v0.19/art/succubus/skin_basecolor.png.import new file mode 100644 index 0000000..efa7fc5 --- /dev/null +++ b/Demon_v0.19/art/succubus/skin_basecolor.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cpgl5dlv5mwd7" +path="res://.godot/imported/skin_basecolor.png-d8b1f513c9d377e9180c282a909def6d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/succubus/skin_basecolor.png" +dest_files=["res://.godot/imported/skin_basecolor.png-d8b1f513c9d377e9180c282a909def6d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/succubus/succubus_v01.glb b/Demon_v0.19/art/succubus/succubus_v01.glb new file mode 100644 index 0000000..fa46abc --- /dev/null +++ b/Demon_v0.19/art/succubus/succubus_v01.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6faf803870d03387bf89870c48dca47dc2846b36f5d5315b503b20dd9946239d +size 69732928 diff --git a/Demon_v0.19/art/succubus/succubus_v01.glb.import b/Demon_v0.19/art/succubus/succubus_v01.glb.import new file mode 100644 index 0000000..661ee27 --- /dev/null +++ b/Demon_v0.19/art/succubus/succubus_v01.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://cebnkp8gk8hc2" +path="res://.godot/imported/succubus_v01.glb-27490c03cc62581314beb4cf6bf3cc13.scn" + +[deps] + +source_file="res://art/succubus/succubus_v01.glb" +dest_files=["res://.godot/imported/succubus_v01.glb-27490c03cc62581314beb4cf6bf3cc13.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=false +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/succubus/succubus_v01_skin_basecolor.png b/Demon_v0.19/art/succubus/succubus_v01_skin_basecolor.png new file mode 100644 index 0000000..db909fb Binary files /dev/null and b/Demon_v0.19/art/succubus/succubus_v01_skin_basecolor.png differ diff --git a/Demon_v0.19/art/succubus/succubus_v01_skin_basecolor.png.import b/Demon_v0.19/art/succubus/succubus_v01_skin_basecolor.png.import new file mode 100644 index 0000000..350da5b --- /dev/null +++ b/Demon_v0.19/art/succubus/succubus_v01_skin_basecolor.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cwdjwb5e7b28w" +path="res://.godot/imported/succubus_v01_skin_basecolor.png-011639b8cfe57ced811b97ca36946443.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/succubus/succubus_v01_skin_basecolor.png" +dest_files=["res://.godot/imported/succubus_v01_skin_basecolor.png-011639b8cfe57ced811b97ca36946443.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/succubus/succubus_v02.glb b/Demon_v0.19/art/succubus/succubus_v02.glb new file mode 100644 index 0000000..c1b3b3c --- /dev/null +++ b/Demon_v0.19/art/succubus/succubus_v02.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4e1e1de138b58531dde1968992cc03aa77787cbdf4461783a096de0c9d8001e +size 99613416 diff --git a/Demon_v0.19/art/succubus/succubus_v02.glb.import b/Demon_v0.19/art/succubus/succubus_v02.glb.import new file mode 100644 index 0000000..e71b0ba --- /dev/null +++ b/Demon_v0.19/art/succubus/succubus_v02.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://2l0u0vinba10" +path="res://.godot/imported/succubus_v02.glb-80baed0e21fdea3dfac84ce1bd7617d2.scn" + +[deps] + +source_file="res://art/succubus/succubus_v02.glb" +dest_files=["res://.godot/imported/succubus_v02.glb-80baed0e21fdea3dfac84ce1bd7617d2.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/Demon_v0.19/art/succubus/succubus_v02_skin_basecolor.png b/Demon_v0.19/art/succubus/succubus_v02_skin_basecolor.png new file mode 100644 index 0000000..db909fb Binary files /dev/null and b/Demon_v0.19/art/succubus/succubus_v02_skin_basecolor.png differ diff --git a/Demon_v0.19/art/succubus/succubus_v02_skin_basecolor.png.import b/Demon_v0.19/art/succubus/succubus_v02_skin_basecolor.png.import new file mode 100644 index 0000000..8e63e88 --- /dev/null +++ b/Demon_v0.19/art/succubus/succubus_v02_skin_basecolor.png.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bb4buvbqtn0h6" +path="res://.godot/imported/succubus_v02_skin_basecolor.png-0488ea554cbd189e45837bf4d23cb3b9.ctex" +metadata={ +"vram_texture": false +} +generator_parameters={ +"md5": "6c375995b2643c42ccbe28db0302aae3" +} + +[deps] + +source_file="res://art/succubus/succubus_v02_skin_basecolor.png" +dest_files=["res://.godot/imported/succubus_v02_skin_basecolor.png-0488ea554cbd189e45837bf4d23cb3b9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Demon_v0.19/art/ui/check_off.svg b/Demon_v0.19/art/ui/check_off.svg new file mode 100644 index 0000000..7dd8390 --- /dev/null +++ b/Demon_v0.19/art/ui/check_off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Demon_v0.19/art/ui/check_off.svg.import b/Demon_v0.19/art/ui/check_off.svg.import new file mode 100644 index 0000000..5999bd4 --- /dev/null +++ b/Demon_v0.19/art/ui/check_off.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dew16iwpqr0t" +path="res://.godot/imported/check_off.svg-0aa3c7551812d8c4d259e891aa7f3ed5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/check_off.svg" +dest_files=["res://.godot/imported/check_off.svg-0aa3c7551812d8c4d259e891aa7f3ed5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Demon_v0.19/art/ui/check_on.svg b/Demon_v0.19/art/ui/check_on.svg new file mode 100644 index 0000000..be3ffbe --- /dev/null +++ b/Demon_v0.19/art/ui/check_on.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Demon_v0.19/art/ui/check_on.svg.import b/Demon_v0.19/art/ui/check_on.svg.import new file mode 100644 index 0000000..e016ba7 --- /dev/null +++ b/Demon_v0.19/art/ui/check_on.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://r1xfu070gwkh" +path="res://.godot/imported/check_on.svg-ea1ecd3eb3311aa90877fb566fa46b3b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/check_on.svg" +dest_files=["res://.godot/imported/check_on.svg-ea1ecd3eb3311aa90877fb566fa46b3b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Demon_v0.19/art/ui/parchment_button.svg b/Demon_v0.19/art/ui/parchment_button.svg new file mode 100644 index 0000000..a466a9d --- /dev/null +++ b/Demon_v0.19/art/ui/parchment_button.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Demon_v0.19/art/ui/parchment_button.svg.import b/Demon_v0.19/art/ui/parchment_button.svg.import new file mode 100644 index 0000000..8591288 --- /dev/null +++ b/Demon_v0.19/art/ui/parchment_button.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c1237kvsf72ag" +path="res://.godot/imported/parchment_button.svg-5c3b745bbca388a77a6104d2ec382e51.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/parchment_button.svg" +dest_files=["res://.godot/imported/parchment_button.svg-5c3b745bbca388a77a6104d2ec382e51.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Demon_v0.19/art/ui/parchment_hover.svg b/Demon_v0.19/art/ui/parchment_hover.svg new file mode 100644 index 0000000..7199d0d --- /dev/null +++ b/Demon_v0.19/art/ui/parchment_hover.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Demon_v0.19/art/ui/parchment_hover.svg.import b/Demon_v0.19/art/ui/parchment_hover.svg.import new file mode 100644 index 0000000..83ed889 --- /dev/null +++ b/Demon_v0.19/art/ui/parchment_hover.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dda6i83ooff3x" +path="res://.godot/imported/parchment_hover.svg-1d28b6252b7deda59d72798ebb11ede4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/parchment_hover.svg" +dest_files=["res://.godot/imported/parchment_hover.svg-1d28b6252b7deda59d72798ebb11ede4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Demon_v0.19/art/ui/parchment_panel.svg b/Demon_v0.19/art/ui/parchment_panel.svg new file mode 100644 index 0000000..67ccae5 --- /dev/null +++ b/Demon_v0.19/art/ui/parchment_panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Demon_v0.19/art/ui/parchment_panel.svg.import b/Demon_v0.19/art/ui/parchment_panel.svg.import new file mode 100644 index 0000000..4e69c0d --- /dev/null +++ b/Demon_v0.19/art/ui/parchment_panel.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://drtrw1ntssq2r" +path="res://.godot/imported/parchment_panel.svg-6c68b35e2a51a0d89f21bbca4cb78569.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/parchment_panel.svg" +dest_files=["res://.godot/imported/parchment_panel.svg-6c68b35e2a51a0d89f21bbca4cb78569.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Demon_v0.19/art/ui/slider_knob.svg b/Demon_v0.19/art/ui/slider_knob.svg new file mode 100644 index 0000000..d1343d3 --- /dev/null +++ b/Demon_v0.19/art/ui/slider_knob.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Demon_v0.19/art/ui/slider_knob.svg.import b/Demon_v0.19/art/ui/slider_knob.svg.import new file mode 100644 index 0000000..93aee04 --- /dev/null +++ b/Demon_v0.19/art/ui/slider_knob.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpoyl3607awyu" +path="res://.godot/imported/slider_knob.svg-470115d9b71b748e9aa06d5384a90f7b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/slider_knob.svg" +dest_files=["res://.godot/imported/slider_knob.svg-470115d9b71b748e9aa06d5384a90f7b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Demon_v0.19/art/ui/stone_button.svg b/Demon_v0.19/art/ui/stone_button.svg new file mode 100644 index 0000000..f4db158 --- /dev/null +++ b/Demon_v0.19/art/ui/stone_button.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Demon_v0.19/art/ui/stone_button.svg.import b/Demon_v0.19/art/ui/stone_button.svg.import new file mode 100644 index 0000000..afbf719 --- /dev/null +++ b/Demon_v0.19/art/ui/stone_button.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://drlx682llcesp" +path="res://.godot/imported/stone_button.svg-482734258b95847f86bb09dfacc6747e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/stone_button.svg" +dest_files=["res://.godot/imported/stone_button.svg-482734258b95847f86bb09dfacc6747e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Demon_v0.19/art/ui/stone_disabled.svg b/Demon_v0.19/art/ui/stone_disabled.svg new file mode 100644 index 0000000..30881be --- /dev/null +++ b/Demon_v0.19/art/ui/stone_disabled.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Demon_v0.19/art/ui/stone_disabled.svg.import b/Demon_v0.19/art/ui/stone_disabled.svg.import new file mode 100644 index 0000000..339b34d --- /dev/null +++ b/Demon_v0.19/art/ui/stone_disabled.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://g8g5abnlkcxa" +path="res://.godot/imported/stone_disabled.svg-698a98df08f93170ce3037ce3447f93e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/stone_disabled.svg" +dest_files=["res://.godot/imported/stone_disabled.svg-698a98df08f93170ce3037ce3447f93e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Demon_v0.19/art/ui/stone_hover.svg b/Demon_v0.19/art/ui/stone_hover.svg new file mode 100644 index 0000000..d1c07a1 --- /dev/null +++ b/Demon_v0.19/art/ui/stone_hover.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Demon_v0.19/art/ui/stone_hover.svg.import b/Demon_v0.19/art/ui/stone_hover.svg.import new file mode 100644 index 0000000..02ee8a1 --- /dev/null +++ b/Demon_v0.19/art/ui/stone_hover.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://py80vbaiqaqx" +path="res://.godot/imported/stone_hover.svg-6ae1f1f3debec381dcf071bfa2cdddb2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/stone_hover.svg" +dest_files=["res://.godot/imported/stone_hover.svg-6ae1f1f3debec381dcf071bfa2cdddb2.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Demon_v0.19/art/ui/stone_panel.svg b/Demon_v0.19/art/ui/stone_panel.svg new file mode 100644 index 0000000..f8703b3 --- /dev/null +++ b/Demon_v0.19/art/ui/stone_panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Demon_v0.19/art/ui/stone_panel.svg.import b/Demon_v0.19/art/ui/stone_panel.svg.import new file mode 100644 index 0000000..092483c --- /dev/null +++ b/Demon_v0.19/art/ui/stone_panel.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ddhvfsqujtmow" +path="res://.godot/imported/stone_panel.svg-f812e0096c2bcac65dde97d6c778977b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ui/stone_panel.svg" +dest_files=["res://.godot/imported/stone_panel.svg-f812e0096c2bcac65dde97d6c778977b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Demon_v0.19/audio/apparatus_place.wav b/Demon_v0.19/audio/apparatus_place.wav new file mode 100644 index 0000000..ca1e288 Binary files /dev/null and b/Demon_v0.19/audio/apparatus_place.wav differ diff --git a/Demon_v0.19/audio/apparatus_place.wav.import b/Demon_v0.19/audio/apparatus_place.wav.import new file mode 100644 index 0000000..3c71341 --- /dev/null +++ b/Demon_v0.19/audio/apparatus_place.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://b0ftl4207vlj" +path="res://.godot/imported/apparatus_place.wav-2de5c374d93237ffcd6e01c4d9e4dd1a.sample" + +[deps] + +source_file="res://audio/apparatus_place.wav" +dest_files=["res://.godot/imported/apparatus_place.wav-2de5c374d93237ffcd6e01c4d9e4dd1a.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Demon_v0.19/audio/apparatus_remove.wav b/Demon_v0.19/audio/apparatus_remove.wav new file mode 100644 index 0000000..b249c95 Binary files /dev/null and b/Demon_v0.19/audio/apparatus_remove.wav differ diff --git a/Demon_v0.19/audio/apparatus_remove.wav.import b/Demon_v0.19/audio/apparatus_remove.wav.import new file mode 100644 index 0000000..8af0314 --- /dev/null +++ b/Demon_v0.19/audio/apparatus_remove.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://3w35vpgrpw0i" +path="res://.godot/imported/apparatus_remove.wav-3c09847a1e6a7304b4dc715e27ecfe74.sample" + +[deps] + +source_file="res://audio/apparatus_remove.wav" +dest_files=["res://.godot/imported/apparatus_remove.wav-3c09847a1e6a7304b4dc715e27ecfe74.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Demon_v0.19/audio/burn_female.ogg b/Demon_v0.19/audio/burn_female.ogg new file mode 100644 index 0000000..67b3e3a Binary files /dev/null and b/Demon_v0.19/audio/burn_female.ogg differ diff --git a/Demon_v0.19/audio/burn_female.ogg.import b/Demon_v0.19/audio/burn_female.ogg.import new file mode 100644 index 0000000..912673c --- /dev/null +++ b/Demon_v0.19/audio/burn_female.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://boeb31y3l5nv8" +path="res://.godot/imported/burn_female.ogg-840b43d9b398165f900ccef9bb033579.oggvorbisstr" + +[deps] + +source_file="res://audio/burn_female.ogg" +dest_files=["res://.godot/imported/burn_female.ogg-840b43d9b398165f900ccef9bb033579.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/burn_male.ogg b/Demon_v0.19/audio/burn_male.ogg new file mode 100644 index 0000000..3bca627 Binary files /dev/null and b/Demon_v0.19/audio/burn_male.ogg differ diff --git a/Demon_v0.19/audio/burn_male.ogg.import b/Demon_v0.19/audio/burn_male.ogg.import new file mode 100644 index 0000000..dbfe893 --- /dev/null +++ b/Demon_v0.19/audio/burn_male.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dd0vhbmg3rvs7" +path="res://.godot/imported/burn_male.ogg-b8c4f918dc43d6dec7d57099bc87ee90.oggvorbisstr" + +[deps] + +source_file="res://audio/burn_male.ogg" +dest_files=["res://.godot/imported/burn_male.ogg-b8c4f918dc43d6dec7d57099bc87ee90.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/cemetery_ambience_loop.ogg b/Demon_v0.19/audio/cemetery_ambience_loop.ogg new file mode 100644 index 0000000..e7e11ef Binary files /dev/null and b/Demon_v0.19/audio/cemetery_ambience_loop.ogg differ diff --git a/Demon_v0.19/audio/cemetery_ambience_loop.ogg.import b/Demon_v0.19/audio/cemetery_ambience_loop.ogg.import new file mode 100644 index 0000000..160ad9b --- /dev/null +++ b/Demon_v0.19/audio/cemetery_ambience_loop.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dp8taa20hub8p" +path="res://.godot/imported/cemetery_ambience_loop.ogg-c745e3cbaa67077aeaba2a6f227cc1e0.oggvorbisstr" + +[deps] + +source_file="res://audio/cemetery_ambience_loop.ogg" +dest_files=["res://.godot/imported/cemetery_ambience_loop.ogg-c745e3cbaa67077aeaba2a6f227cc1e0.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/manifest.json b/Demon_v0.19/audio/dialogue/manifest.json new file mode 100644 index 0000000..2c4afd8 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/manifest.json @@ -0,0 +1,156 @@ +[ + { + "kind": 0, + "profile": "glutton", + "variant": 0, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 0, + "profile": "glutton", + "variant": 1, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 1, + "profile": "smoker", + "variant": 0, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 1, + "profile": "smoker", + "variant": 1, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 2, + "profile": "maniac", + "variant": 0, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 2, + "profile": "maniac", + "variant": 1, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 3, + "profile": "official", + "variant": 0, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 3, + "profile": "official", + "variant": 1, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 4, + "profile": "unfaithful", + "variant": 0, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 4, + "profile": "unfaithful", + "variant": 1, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 5, + "profile": "alcoholic", + "variant": 0, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 5, + "profile": "alcoholic", + "variant": 1, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 6, + "profile": "influencer", + "variant": 0, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 6, + "profile": "influencer", + "variant": 1, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 7, + "profile": "narcissist", + "variant": 0, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 7, + "profile": "narcissist", + "variant": 1, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 8, + "profile": "neighbour", + "variant": 0, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 8, + "profile": "neighbour", + "variant": 1, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 9, + "profile": "scammer", + "variant": 0, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 9, + "profile": "scammer", + "variant": 1, + "seconds": 1.45, + "peak": 0.58 + }, + { + "kind": 10, + "profile": "succubus", + "variant": 0, + "seconds": 1.65, + "peak": 0.58 + }, + { + "kind": 10, + "profile": "succubus", + "variant": 1, + "seconds": 1.65, + "peak": 0.58 + } +] \ No newline at end of file diff --git a/Demon_v0.19/audio/dialogue/voice_00_0.ogg b/Demon_v0.19/audio/dialogue/voice_00_0.ogg new file mode 100644 index 0000000..c6abf71 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_00_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_00_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_00_0.ogg.import new file mode 100644 index 0000000..8635ae4 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_00_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://cs7m52exkiras" +path="res://.godot/imported/voice_00_0.ogg-0772117aeb7385c6ec22f6db5a6bfba6.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_00_0.ogg" +dest_files=["res://.godot/imported/voice_00_0.ogg-0772117aeb7385c6ec22f6db5a6bfba6.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_00_1.ogg b/Demon_v0.19/audio/dialogue/voice_00_1.ogg new file mode 100644 index 0000000..b880b42 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_00_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_00_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_00_1.ogg.import new file mode 100644 index 0000000..79e82c4 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_00_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://diyt517guoihd" +path="res://.godot/imported/voice_00_1.ogg-b03d12e2602691c9458a010ce99f4d8a.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_00_1.ogg" +dest_files=["res://.godot/imported/voice_00_1.ogg-b03d12e2602691c9458a010ce99f4d8a.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_01_0.ogg b/Demon_v0.19/audio/dialogue/voice_01_0.ogg new file mode 100644 index 0000000..42b7906 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_01_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_01_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_01_0.ogg.import new file mode 100644 index 0000000..2520aa5 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_01_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://c7w03guj0e6x3" +path="res://.godot/imported/voice_01_0.ogg-e88b6ccbc3c24eac19d9785c64f4d33c.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_01_0.ogg" +dest_files=["res://.godot/imported/voice_01_0.ogg-e88b6ccbc3c24eac19d9785c64f4d33c.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_01_1.ogg b/Demon_v0.19/audio/dialogue/voice_01_1.ogg new file mode 100644 index 0000000..b0e6879 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_01_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_01_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_01_1.ogg.import new file mode 100644 index 0000000..3fc42cf --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_01_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://cfjafr7p2oiv2" +path="res://.godot/imported/voice_01_1.ogg-751a7d9b9b99b67106eeec5621e22e5c.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_01_1.ogg" +dest_files=["res://.godot/imported/voice_01_1.ogg-751a7d9b9b99b67106eeec5621e22e5c.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_02_0.ogg b/Demon_v0.19/audio/dialogue/voice_02_0.ogg new file mode 100644 index 0000000..526eb97 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_02_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_02_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_02_0.ogg.import new file mode 100644 index 0000000..b8050d8 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_02_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://cya75v0sujc2t" +path="res://.godot/imported/voice_02_0.ogg-911359689fe4c27585f257e4fe669e60.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_02_0.ogg" +dest_files=["res://.godot/imported/voice_02_0.ogg-911359689fe4c27585f257e4fe669e60.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_02_1.ogg b/Demon_v0.19/audio/dialogue/voice_02_1.ogg new file mode 100644 index 0000000..411a1ef Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_02_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_02_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_02_1.ogg.import new file mode 100644 index 0000000..3d377e8 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_02_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://7xq0wpvyew8t" +path="res://.godot/imported/voice_02_1.ogg-2b3d456fb08560c1a15c0aba6e051a2d.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_02_1.ogg" +dest_files=["res://.godot/imported/voice_02_1.ogg-2b3d456fb08560c1a15c0aba6e051a2d.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_03_0.ogg b/Demon_v0.19/audio/dialogue/voice_03_0.ogg new file mode 100644 index 0000000..cd3aff1 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_03_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_03_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_03_0.ogg.import new file mode 100644 index 0000000..9f0e93e --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_03_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://d65ahr6dc6s7" +path="res://.godot/imported/voice_03_0.ogg-5c1cef371562958bb1b90657fa318536.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_03_0.ogg" +dest_files=["res://.godot/imported/voice_03_0.ogg-5c1cef371562958bb1b90657fa318536.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_03_1.ogg b/Demon_v0.19/audio/dialogue/voice_03_1.ogg new file mode 100644 index 0000000..fe0788f Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_03_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_03_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_03_1.ogg.import new file mode 100644 index 0000000..7d6d620 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_03_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://f02ssa0fwwf3" +path="res://.godot/imported/voice_03_1.ogg-8adfaadb22f5cf6f5cdee11e0d1e41e5.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_03_1.ogg" +dest_files=["res://.godot/imported/voice_03_1.ogg-8adfaadb22f5cf6f5cdee11e0d1e41e5.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_04_0.ogg b/Demon_v0.19/audio/dialogue/voice_04_0.ogg new file mode 100644 index 0000000..0bc1448 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_04_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_04_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_04_0.ogg.import new file mode 100644 index 0000000..bbedb12 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_04_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dwlipvdeg0t00" +path="res://.godot/imported/voice_04_0.ogg-bcca2a86e24941d5bf432160fd7af3dc.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_04_0.ogg" +dest_files=["res://.godot/imported/voice_04_0.ogg-bcca2a86e24941d5bf432160fd7af3dc.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_04_1.ogg b/Demon_v0.19/audio/dialogue/voice_04_1.ogg new file mode 100644 index 0000000..27c2bc6 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_04_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_04_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_04_1.ogg.import new file mode 100644 index 0000000..75a7b86 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_04_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://cdd8p47y1oahd" +path="res://.godot/imported/voice_04_1.ogg-af532ad5723ac5e338fb06395e027a08.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_04_1.ogg" +dest_files=["res://.godot/imported/voice_04_1.ogg-af532ad5723ac5e338fb06395e027a08.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_05_0.ogg b/Demon_v0.19/audio/dialogue/voice_05_0.ogg new file mode 100644 index 0000000..ca7c971 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_05_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_05_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_05_0.ogg.import new file mode 100644 index 0000000..04b17c9 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_05_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://c6e3fwvjmij3k" +path="res://.godot/imported/voice_05_0.ogg-cc296f6ffd6a086fbc9f23a10c5c46f9.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_05_0.ogg" +dest_files=["res://.godot/imported/voice_05_0.ogg-cc296f6ffd6a086fbc9f23a10c5c46f9.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_05_1.ogg b/Demon_v0.19/audio/dialogue/voice_05_1.ogg new file mode 100644 index 0000000..07a24de Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_05_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_05_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_05_1.ogg.import new file mode 100644 index 0000000..856145d --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_05_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://cdwddqoyhke8f" +path="res://.godot/imported/voice_05_1.ogg-de5328e6c414ae083bb8534d3900c32f.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_05_1.ogg" +dest_files=["res://.godot/imported/voice_05_1.ogg-de5328e6c414ae083bb8534d3900c32f.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_06_0.ogg b/Demon_v0.19/audio/dialogue/voice_06_0.ogg new file mode 100644 index 0000000..0f9466c Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_06_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_06_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_06_0.ogg.import new file mode 100644 index 0000000..b685a12 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_06_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://tyvu1vd4xf1j" +path="res://.godot/imported/voice_06_0.ogg-b9ba55a0e2e8e43250a38d7e736062d2.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_06_0.ogg" +dest_files=["res://.godot/imported/voice_06_0.ogg-b9ba55a0e2e8e43250a38d7e736062d2.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_06_1.ogg b/Demon_v0.19/audio/dialogue/voice_06_1.ogg new file mode 100644 index 0000000..71e9b0e Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_06_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_06_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_06_1.ogg.import new file mode 100644 index 0000000..82553a7 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_06_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://c4qw4mr0fm31x" +path="res://.godot/imported/voice_06_1.ogg-8f24596d69a952ea322d1f582c3582b3.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_06_1.ogg" +dest_files=["res://.godot/imported/voice_06_1.ogg-8f24596d69a952ea322d1f582c3582b3.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_07_0.ogg b/Demon_v0.19/audio/dialogue/voice_07_0.ogg new file mode 100644 index 0000000..f04a325 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_07_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_07_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_07_0.ogg.import new file mode 100644 index 0000000..d10f9e3 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_07_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://2s4tgjv81yvd" +path="res://.godot/imported/voice_07_0.ogg-6106e51f40d2e74c1b06781defbba5b0.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_07_0.ogg" +dest_files=["res://.godot/imported/voice_07_0.ogg-6106e51f40d2e74c1b06781defbba5b0.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_07_1.ogg b/Demon_v0.19/audio/dialogue/voice_07_1.ogg new file mode 100644 index 0000000..399bd6c Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_07_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_07_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_07_1.ogg.import new file mode 100644 index 0000000..999eea4 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_07_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://c6fwc74uh1dvx" +path="res://.godot/imported/voice_07_1.ogg-26318676beb7e6b4fac57e48a33e3e6f.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_07_1.ogg" +dest_files=["res://.godot/imported/voice_07_1.ogg-26318676beb7e6b4fac57e48a33e3e6f.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_08_0.ogg b/Demon_v0.19/audio/dialogue/voice_08_0.ogg new file mode 100644 index 0000000..959711e Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_08_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_08_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_08_0.ogg.import new file mode 100644 index 0000000..01523e5 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_08_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://cxqv23fmfum4x" +path="res://.godot/imported/voice_08_0.ogg-8dc13717cddb4f669a953f320e9aba36.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_08_0.ogg" +dest_files=["res://.godot/imported/voice_08_0.ogg-8dc13717cddb4f669a953f320e9aba36.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_08_1.ogg b/Demon_v0.19/audio/dialogue/voice_08_1.ogg new file mode 100644 index 0000000..8bcfe10 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_08_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_08_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_08_1.ogg.import new file mode 100644 index 0000000..912c0b7 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_08_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://xmlbwaqtodgn" +path="res://.godot/imported/voice_08_1.ogg-5c254cd9f3db4c3886a2304c4a5cf32e.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_08_1.ogg" +dest_files=["res://.godot/imported/voice_08_1.ogg-5c254cd9f3db4c3886a2304c4a5cf32e.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_09_0.ogg b/Demon_v0.19/audio/dialogue/voice_09_0.ogg new file mode 100644 index 0000000..c59bc66 Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_09_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_09_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_09_0.ogg.import new file mode 100644 index 0000000..c37c469 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_09_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dlay8k3v76myq" +path="res://.godot/imported/voice_09_0.ogg-f8a414ed0ecf43b2b78e59a4c1a5acbf.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_09_0.ogg" +dest_files=["res://.godot/imported/voice_09_0.ogg-f8a414ed0ecf43b2b78e59a4c1a5acbf.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_09_1.ogg b/Demon_v0.19/audio/dialogue/voice_09_1.ogg new file mode 100644 index 0000000..d2013cd Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_09_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_09_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_09_1.ogg.import new file mode 100644 index 0000000..0a3bfe3 --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_09_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://d2m3y3p60u6lg" +path="res://.godot/imported/voice_09_1.ogg-cac0d3ed97f32196c1a63c56c5c8db13.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_09_1.ogg" +dest_files=["res://.godot/imported/voice_09_1.ogg-cac0d3ed97f32196c1a63c56c5c8db13.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_10_0.ogg b/Demon_v0.19/audio/dialogue/voice_10_0.ogg new file mode 100644 index 0000000..5e9d1cb Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_10_0.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_10_0.ogg.import b/Demon_v0.19/audio/dialogue/voice_10_0.ogg.import new file mode 100644 index 0000000..b433f9a --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_10_0.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://cns6nq3nwyleg" +path="res://.godot/imported/voice_10_0.ogg-42b0603fa6450e0074f610362b9bf61a.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_10_0.ogg" +dest_files=["res://.godot/imported/voice_10_0.ogg-42b0603fa6450e0074f610362b9bf61a.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/dialogue/voice_10_1.ogg b/Demon_v0.19/audio/dialogue/voice_10_1.ogg new file mode 100644 index 0000000..cdd5e4f Binary files /dev/null and b/Demon_v0.19/audio/dialogue/voice_10_1.ogg differ diff --git a/Demon_v0.19/audio/dialogue/voice_10_1.ogg.import b/Demon_v0.19/audio/dialogue/voice_10_1.ogg.import new file mode 100644 index 0000000..39fb41b --- /dev/null +++ b/Demon_v0.19/audio/dialogue/voice_10_1.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dd4bvixv1i4yx" +path="res://.godot/imported/voice_10_1.ogg-ee09cddd1c27592952af386d698a3226.oggvorbisstr" + +[deps] + +source_file="res://audio/dialogue/voice_10_1.ogg" +dest_files=["res://.godot/imported/voice_10_1.ogg-ee09cddd1c27592952af386d698a3226.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/audio/imp_humming.wav b/Demon_v0.19/audio/imp_humming.wav new file mode 100644 index 0000000..149ef84 Binary files /dev/null and b/Demon_v0.19/audio/imp_humming.wav differ diff --git a/Demon_v0.19/audio/imp_humming.wav.import b/Demon_v0.19/audio/imp_humming.wav.import new file mode 100644 index 0000000..7a86838 --- /dev/null +++ b/Demon_v0.19/audio/imp_humming.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://4kaj2u0vbjx" +path="res://.godot/imported/imp_humming.wav-c8c0326f6bf8e0fb4db1226cb75698a1.sample" + +[deps] + +source_file="res://audio/imp_humming.wav" +dest_files=["res://.godot/imported/imp_humming.wav-c8c0326f6bf8e0fb4db1226cb75698a1.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Demon_v0.19/audio/infernal_pop.wav b/Demon_v0.19/audio/infernal_pop.wav new file mode 100644 index 0000000..3df7182 Binary files /dev/null and b/Demon_v0.19/audio/infernal_pop.wav differ diff --git a/Demon_v0.19/audio/infernal_pop.wav.import b/Demon_v0.19/audio/infernal_pop.wav.import new file mode 100644 index 0000000..709c06d --- /dev/null +++ b/Demon_v0.19/audio/infernal_pop.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://nccwystb6j6p" +path="res://.godot/imported/infernal_pop.wav-7d95b169a6f09c1100744f5e96252b61.sample" + +[deps] + +source_file="res://audio/infernal_pop.wav" +dest_files=["res://.godot/imported/infernal_pop.wav-7d95b169a6f09c1100744f5e96252b61.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Demon_v0.19/audio/whip.mp3 b/Demon_v0.19/audio/whip.mp3 new file mode 100644 index 0000000..4311714 Binary files /dev/null and b/Demon_v0.19/audio/whip.mp3 differ diff --git a/Demon_v0.19/audio/whip.mp3.import b/Demon_v0.19/audio/whip.mp3.import new file mode 100644 index 0000000..db64bd8 --- /dev/null +++ b/Demon_v0.19/audio/whip.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://da2qlh5at4f0b" +path="res://.godot/imported/whip.mp3-9d6cca2af6e3421e6600301075b925e4.mp3str" + +[deps] + +source_file="res://audio/whip.mp3" +dest_files=["res://.godot/imported/whip.mp3-9d6cca2af6e3421e6600301075b925e4.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Demon_v0.19/balance_simulation.gd b/Demon_v0.19/balance_simulation.gd new file mode 100644 index 0000000..b32b85d --- /dev/null +++ b/Demon_v0.19/balance_simulation.gd @@ -0,0 +1,92 @@ +extends SceneTree +const E=preload("res://economy.gd") +var results=[] +func _initialize():call_deferred("run") +func worker():return {"job":null,"tool":-1,"busy":0.0} +func tool(kind):return {"kind":kind,"busy":0.0,"held":-1} +func run_case(policy): + var gold=E.START_GOLD-40;var essence=0;var xp=0;var points=0;var done=0;var uid=0 + var power=0;var speed=0;var lead=0;var haste=0;var diligence=0;var hires=0;var auto=false;var unlocked=0 + var tools=[tool(0)];var workers=[worker()];var jobs=[] + var arrival=0.0;var pressure=0.0;var fee_clock=0.0;var full_seconds=0.0;var loss_gold=0;var loss_souls=0;var samples=[] + var first_helper=-1.0;var third_helper=-1.0;var spent_gold=40;var spent_souls=0 + for tick in range(12000): + var dt=.1;var now=tick*dt + if policy!="hoard" and tick%10==0: + while policy!="no_hero" and points>0 and power+speed+lead<9: + if speed<1:speed+=1 + elif power<3:power+=1 + elif lead<3:lead+=1 + else:speed+=1 + points-=1 + var soul_cost=0 + if hires==0 and essence>=6 and policy!="no_helpers":hires=1;soul_cost=6;first_helper=now + elif hires>0 and not auto and essence>=4:auto=true;soul_cost=4 + elif haste<1 and auto and essence>=E.HASTE_PRICES[haste]:soul_cost=E.HASTE_PRICES[haste];haste+=1 + elif diligence<1 and auto and essence>=E.DILIGENCE_PRICES[diligence]:soul_cost=E.DILIGENCE_PRICES[diligence];diligence+=1 + elif hires<3 and auto and essence>=E.HIRE_PRICES[hires]: + soul_cost=E.HIRE_PRICES[hires];hires+=1 + if hires==3:third_helper=now + elif haste<3 and auto and essence>=E.HASTE_PRICES[haste]:soul_cost=E.HASTE_PRICES[haste];haste+=1 + elif diligence<3 and auto and essence>=E.DILIGENCE_PRICES[diligence]:soul_cost=E.DILIGENCE_PRICES[diligence];diligence+=1 + essence-=soul_cost;spent_souls+=soul_cost + while workers.size()<1+(hires if auto else 0):workers.append(worker()) + if policy=="no_tools":pass + elif tools.size()=40+50:tools.append(tool(0));gold-=40;spent_gold+=40 + elif unlocked<5 and E.level(xp)>=3+unlocked and gold>=E.BLUEPRINT_PRICES[unlocked+1]+E.TOOL_PRICES[unlocked+1]+60: + unlocked+=1;var cost=E.BLUEPRINT_PRICES[unlocked]+E.TOOL_PRICES[unlocked];tools.append(tool(unlocked));gold-=cost;spent_gold+=cost + for t in tools:t.busy=maxf(0,t.busy-dt) + for wi in range(workers.size()): + var w=workers[wi] + if w.job==null:continue + w.busy-=dt + if w.busy>0:continue + var job=w.job;job.step+=1 + if job.step>=job.required.size(): + var reward=E.reward(job.required,xp);gold+=reward.gold;essence+=reward.souls + var old=E.level(xp);xp=mini(E.XP_THRESHOLDS.back(),xp+reward.xp);points+=E.level(xp)-old;done+=1 + tools[w.tool].held=-1;tools[w.tool].busy=2.6;jobs.erase(job) + else:job.state="ready";job.origin=w.tool + w.job=null + arrival=minf(E.SPAWN_INTERVAL,arrival+dt) + var queue=jobs.filter(func(j):return j.state=="queue").size() + if arrival>=E.SPAWN_INTERVAL and queue<7: + var available=[] + for t in tools: + if not t.kind in available:available.append(t.kind) + var required=[];var count=E.recipe_size(uid,xp,available.size()) + for i in range(count):required.append(available[(uid+i)%available.size()]) + jobs.append({"id":uid,"required":required,"step":0,"origin":-1,"state":"queue"});uid+=1;arrival=0;queue+=1 + if queue>=7: + full_seconds+=dt;var old_pressure=pressure;pressure+=dt + if pressure>=E.PRESSURE_GRACE: + fee_clock=E.PENALTY_INTERVAL if old_pressure=E.PENALTY_INTERVAL: + fee_clock-=E.PENALTY_INTERVAL;var fee=E.penalty(xp,pressure) + var take_gold=mini(fee.gold,maxi(0,gold-E.GOLD_RESERVE));var take_souls=mini(fee.souls,maxi(0,essence-E.SOUL_RESERVE)) + gold-=take_gold;essence-=take_souls;loss_gold+=take_gold;loss_souls+=take_souls + else:pressure=maxf(0,pressure-dt*2);fee_clock=maxf(0,fee_clock-dt*2) + for wi in range(workers.size()): + var w=workers[wi] + if w.job!=null:continue + var candidates=jobs.filter(func(j):return j.state=="ready")+jobs.filter(func(j):return j.state=="queue") + for job in candidates: + var chosen=-1 + for ti in range(tools.size()): + if tools[ti].held<0 and tools[ti].busy<=0 and tools[ti].kind==job.required[job.step]:chosen=ti;break + if chosen<0:continue + if job.origin>=0:tools[job.origin].held=-1;tools[job.origin].busy=.4 + var movement=3.3+speed*.825 if wi==0 else 2.5+haste*.625 + var skill=power*.2 if wi==0 else diligence*.25 + var kind=tools[chosen].kind + var rate=(1+skill)*(1+lead*.08)/E.work_multiplier(xp) + var travel=8.0 if job.origin<0 else 4.0 + w.busy=travel/movement+.8+E.BASE_WORK_SECONDS[kind]/rate;w.job=job;w.tool=chosen + job.state="active";tools[chosen].held=job.id;break + if tick%600==0:samples.append({"seconds":now,"done":done,"gold":gold,"souls":essence,"level":E.level(xp),"queue":queue,"helpers":hires,"tools":tools.size(),"types":unlocked+1}) + return {"policy":policy,"seconds":1200,"done":done,"level":E.level(xp),"gold":gold,"souls":essence,"full_queue_seconds":snappedf(full_seconds,.1),"gold_lost":loss_gold,"souls_lost":loss_souls,"helpers":hires,"tools":tools.size(),"types":unlocked+1,"gold_spent":spent_gold,"souls_spent":spent_souls,"first_helper_seconds":first_helper,"third_helper_seconds":third_helper,"samples":samples} +func run(): + for policy in ["hoard","no_hero","no_helpers","no_tools","invest"]: + var result=run_case(policy);results.append(result);var summary=result.duplicate();summary.erase("samples");print("BALANCE ",JSON.stringify(summary)) + var file=FileAccess.open("res://../qa_v19/balance_simulation.json",FileAccess.WRITE);file.store_string(JSON.stringify(results," "));file.close() + quit() diff --git a/Demon_v0.19/boiling.gdshader b/Demon_v0.19/boiling.gdshader new file mode 100644 index 0000000..f8ac1e1 --- /dev/null +++ b/Demon_v0.19/boiling.gdshader @@ -0,0 +1,9 @@ +shader_type spatial; +uniform float heat=0.0; +varying vec3 local; +void vertex(){local=VERTEX;VERTEX.y+=heat*.018*sin(TIME*9.+VERTEX.x*16.)*cos(VERTEX.z*13.-TIME*7.);} +void fragment(){ + float ripples=sin(length(local.xz)*38.-TIME*8.)*.5+.5; + ALBEDO=mix(vec3(.10,.17,.035),vec3(.36,.46,.10),ripples*.6+heat*.3); + ROUGHNESS=.28;EMISSION=vec3(.23,.09,.01)*heat*.2; +} diff --git a/Demon_v0.19/build_drag.gd b/Demon_v0.19/build_drag.gd new file mode 100644 index 0000000..2b3e804 --- /dev/null +++ b/Demon_v0.19/build_drag.gd @@ -0,0 +1,61 @@ +extends RefCounted +var w +var g +var index=-1 +var elapsed=0.0 +var anchor=Vector2.ZERO +var active=false +var left_down=false +var strip: Control +var label: Label +var thickness=38.0 +var hold_ring: Control +func setup(workshop): + w=workshop;g=w.g + hold_ring=preload("res://hold_indicator.gd").new();g.hud.add_child(hold_ring);hold_ring.name="HoldToMoveProgress";hold_ring.mouse_filter=Control.MOUSE_FILTER_IGNORE;hold_ring.z_index=101;hold_ring.hide() + strip=Control.new();strip.name="DragDeleteStrip";g.hud.add_child(strip);strip.mouse_filter=Control.MOUSE_FILTER_IGNORE;strip.z_index=100 + var background=TextureRect.new();strip.add_child(background);background.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT);background.mouse_filter=Control.MOUSE_FILTER_IGNORE + var gradient=Gradient.new();gradient.set_color(0,Color(.85,.015,.01,0));gradient.set_color(1,Color(.85,.015,.01,.94)) + var texture=GradientTexture2D.new();texture.gradient=gradient;texture.fill_from=Vector2(0,0);texture.fill_to=Vector2(0,1);background.texture=texture + label=g.label("",16,Color.WHITE);strip.add_child(label);label.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT);label.horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER;label.vertical_alignment=VERTICAL_ALIGNMENT_CENTER + strip.hide() +func arm(station,point): + if not w.build_mode or not w.is_free(w.stations[station]):return + index=station;elapsed=0;anchor=point + hold_ring.position=point+Vector2(23,-23);hold_ring.progress=0;hold_ring.show() +func cancel(): + index=-1;elapsed=0;active=false + if is_instance_valid(strip):strip.hide() + if is_instance_valid(hold_ring):hold_ring.hide() +func hover_delete(point):return point.y>=g.get_viewport().get_visible_rect().size.y-thickness +func update(dt): + var size=g.get_viewport().get_visible_rect().size + thickness=clampf(DisplayServer.screen_get_dpi()/2.54*size.y/maxf(1,DisplayServer.window_get_size().y),28,64)*1.5625 + strip.position=Vector2(0,size.y-thickness);strip.size=Vector2(size.x,thickness) + if not w.build_mode:cancel();return + if active: + label.text="Перетащи сюда для удаления · возврат %d золота"%int(w.PRICES[w.pending]/2) + return + if index<0:return + if not left_down or w.pointer_position.distance_to(anchor)>18:cancel();return + elapsed+=dt + hold_ring.position=w.pointer_position+Vector2(23,-23);hold_ring.progress=elapsed + if elapsed>=1: + var picked=index;w.selected=picked;w.begin_move() + if w.moving==picked:active=true;strip.show() + hold_ring.hide() +func release(point): + # Releasing the pickup hold leaves the device attached to the cursor. + if active: + if hover_delete(point):confirm(point) + return true + cancel();return false +func confirm(point): + if not active:return false + var station=w.moving;var trash=hover_delete(point) + if trash: + w.cancel_placement(false);w.selected=station;w.delete_selected();w.catalogue.visible=w.build_mode + else: + if g.get_viewport().gui_get_hovered_control()!=null:return true + w.place(w.snap_to_grid(w.ground_point(point),w.pending,w.pending_turns)) + return true diff --git a/Demon_v0.19/build_grid.gdshader b/Demon_v0.19/build_grid.gdshader new file mode 100644 index 0000000..aad0cb7 --- /dev/null +++ b/Demon_v0.19/build_grid.gdshader @@ -0,0 +1,17 @@ +shader_type spatial; +render_mode unshaded, cull_disabled, depth_draw_never; +uniform vec2 grid_origin=vec2(-2.0,-4.0); +uniform vec2 grid_area=vec2(12.0,9.0); +varying vec2 world_xz; +void vertex(){world_xz=(MODEL_MATRIX*vec4(VERTEX,1.0)).xz;} +void fragment(){ + vec2 cell=world_xz-grid_origin; + vec2 pixel=max(fwidth(cell),vec2(.0001)); + vec2 distance_to_line=abs(fract(cell+.5)-.5)/pixel; + float lines=1.0-smoothstep(.65,1.45,min(distance_to_line.x,distance_to_line.y)); + vec2 edge=min(cell,grid_area-cell)/pixel; + float border=1.0-smoothstep(1.0,2.0,min(edge.x,edge.y)); + ALBEDO=vec3(.71,.61,.41); + ALPHA=max(lines*.65,border*.9); + if(ALPHA<.01)discard; +} diff --git a/Demon_v0.19/building_tests.gd b/Demon_v0.19/building_tests.gd new file mode 100644 index 0000000..9ada94d --- /dev/null +++ b/Demon_v0.19/building_tests.gd @@ -0,0 +1,73 @@ +extends RefCounted +var failures=0 +var checks=0 +func check(ok,label): + checks+=1 + if not ok:failures+=1;push_error("BUILDING QA: "+label) +func mouse(g,point,pressed): + g.get_viewport().warp_mouse(point);await g.get_tree().process_frame + var motion=InputEventMouseMotion.new();motion.position=point;motion.global_position=point;Input.parse_input_event(motion) + var event=InputEventMouseButton.new();event.position=point;event.global_position=point;event.button_index=MOUSE_BUTTON_LEFT;event.pressed=pressed;event.button_mask=MOUSE_BUTTON_MASK_LEFT if pressed else 0 + Input.parse_input_event(event);await g.get_tree().process_frame +func key(code,pressed): + var event=InputEventKey.new();event.keycode=code;event.physical_keycode=code;event.pressed=pressed;Input.parse_input_event(event) +func run(g): + await g.get_tree().create_timer(.4).timeout + g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false;g.hud.show();g.menu.show_page("") + var w=g.workshop;g.coins=1000 + var d=w.add_station(0,Vector3.ZERO);w.rebuild_nav() + await g.get_tree().physics_frame;await g.get_tree().process_frame + w.toggle_build();var player=g.player.position;var camera=g.camera.position;var clock=w.spawn_clock + key(KEY_D,true);Input.flush_buffered_events();w.update(.2);key(KEY_D,false);Input.flush_buffered_events() + check(g.camera.position.distance_to(camera)>.1 and g.player.position==player,"WASD pans building camera without moving heroine") + check(g.paused and w.spawn_clock==clock,"camera movement does not advance paused simulation") + g.orbit.begin();var yaw=g.orbit.yaw + var motion=InputEventMouseMotion.new();motion.relative=Vector2(30,10);g.orbit.input(motion);w.update(.1);g.orbit.stop() + check(g.orbit.yaw!=yaw and not g.orbit.dragging,"middle mouse rotates while construction is paused") + var wheel=InputEventMouseButton.new();wheel.button_index=MOUSE_BUTTON_WHEEL_UP;wheel.pressed=true + var zoom=g.camera.size;w.input(wheel);check(g.camera.size==zoom-1,"wheel zooms with no selected tool") + w.begin_purchase(0);zoom=g.camera.size;w.input(wheel) + check(w.pending_turns==1 and g.camera.size==zoom,"wheel still rotates selected equipment") + wheel.ctrl_pressed=true;w.input(wheel);check(w.pending_turns==1 and g.camera.size==zoom-1,"Ctrl wheel zooms during placement");w.cancel_placement() + var point=g.camera.unproject_position(Vector3(0,.18,0)) + await mouse(g,point,true);w.update(.99) + check(not w.drag.active and w.moving==-1,"short click does not start dragging") + check(not w.context.visible,"click shows no device title panel") + w.update(.02);check(w.drag.active and w.moving==0 and w.drag.strip.visible,"one-second hold starts drag and shows red strip") + check(not w.context.visible,"pickup shows no device title panel") + check(w.context.find_children("*","Button",true,false).all(func(button):return button.text not in ["Переместить","Удалить"]),"move and delete buttons removed") + var target=g.camera.unproject_position(Vector3(3,.18,3));var cash=g.coins + await mouse(g,target,false) + check(w.drag.active and w.moving==0 and w.stations[0].device.position==Vector3.ZERO,"releasing hold keeps device on cursor") + await mouse(g,target,true);await mouse(g,target,false) + check(w.stations.size()==1 and w.stations[0].device.position.distance_to(Vector3(3,0,3))<.01 and g.coins==cash,"release moves equipment without charging or duplicating") + check(not w.drag.active and not w.drag.strip.visible,"drop hides strip") + await g.get_tree().physics_frame;await g.get_tree().process_frame + point=g.camera.unproject_position(Vector3(3,.18,3));await mouse(g,point,true);w.update(1.01) + check(w.drag.active,"second hold starts deletion drag") + var trash=Vector2(800,g.get_viewport().get_visible_rect().size.y-4) + await mouse(g,trash,false) + check(w.stations.is_empty() and g.coins==cash+20,"moving into red strip sells without a click and refunds half of 40") + await mouse(g,Vector2(800,895),false);check(g.coins==cash+20,"extra release cannot duplicate refund") + d=w.add_station(0,Vector3.ZERO);w.rebuild_nav();w.spawn();var s=g.souls.back();s.required=[0];s.entering=false;w.attach(s,0) + w.drag.arm(0,point);check(w.drag.index<0,"occupied apparatus cannot be dragged") + w.selected=0;w.delete_selected();check(w.stations.size()==1,"occupied apparatus cannot be sold") + g.reset_shift();g.game_started=true;g.paused=false;g.coins=1000 + d=w.add_station(1,Vector3(2,0,0));w.rebuild_nav() + await g.get_tree().physics_frame;await g.get_tree().process_frame + var imp=g.life.imps[0];imp.root.position=Vector3.ZERO + w.mesh_walking.move_actor(imp.root,Vector3(4,0,0),.20,1.0) + check(imp.root.position.x<1.2,"imp swept capsule cannot walk through apparatus mesh") + for i in range(350): + g.life.move_imp(imp,Vector3(4,0,0),1.0/30) + if i%30==0:await g.get_tree().physics_frame + check(imp.root.position.distance_to(Vector3(4,0,0))<.4,"imp routes around equipment instead of getting stuck") + w.reset();g.paused=false;g.coins=1000;w.unlock=1;imp.root.position=Vector3.ZERO;w.toggle_build();w.begin_purchase(1) + check(w.place(Vector3.ZERO),"apparatus can be placed over current imp location") + check(not w.mesh_walking.blocked(Vector2(imp.root.position.x,imp.root.position.z),.18),"placement relocates imp outside solid geometry") + var neighbour=g.life.neighbours[0];neighbour.root.position=neighbour.origin+Vector3(-.5,0,0) + await g.get_tree().physics_frame;await g.get_tree().process_frame + w.mesh_walking.move_actor(neighbour.root,Vector3(5,0,0),.20,1.0) + check(neighbour.root.position.x4,"construction keyboard pan preserved") + g.workshop.toggle_build();orbit.pan=Vector3.ZERO + for i in range(180):orbit.update(1.0/60) + for point in [Vector2(2,2),viewport-Vector2(2,2)]: + g.get_viewport().warp_mouse(point);await g.get_tree().process_frame + for i in range(60):orbit.update(1.0/60) + check(orbit.pan==Vector3.ZERO,"screen edge does not pan normal camera") + for phrase in g.quips+g.LINES+["Новая смена. Обустрой свой цех."]: + g.say(phrase);await g.get_tree().process_frame + var panel=g.life.hero_bubble;var line=panel.get_child(0) + check(line.get_line_count()==1 and line.size.x>=line.get_minimum_size().x,"dialogue fits on one complete line") + check(panel.size.y<=48 and panel.size.y-line.size.y<=17,"compact dialogue height and balanced padding") + g.dialogue.place_bubble(panel,Vector2(viewport.x-1,viewport.y*.5)) + check(panel.position.x+panel.size.x<=viewport.x-9,"dialogue stays inside viewport") + g.say("Новая смена. Обустрой свой цех.");g.life.update(.01) + await g.get_tree().process_frame;await RenderingServer.frame_post_draw + g.get_viewport().get_texture().get_image().save_png("res://captures/compact-dialogue.png") + print("CAMERA AND DIALOGUE QA ","PASSED" if failures==0 else "FAILED",": no edge scrolling, heroine following, keyboard pan, single-line compact bubbles") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/castle_tests.gd b/Demon_v0.19/castle_tests.gd new file mode 100644 index 0000000..37a18a4 --- /dev/null +++ b/Demon_v0.19/castle_tests.gd @@ -0,0 +1,74 @@ +extends RefCounted +var failures=0 +func check(ok,label): + if not ok:failures+=1;push_error(label) +func key(part):return str(part.position.snapped(Vector3.ONE*.0001))+str(part.size.snapped(Vector3.ONE*.0001)) +func screenshot(g,label): + await g.get_tree().process_frame + await RenderingServer.frame_post_draw + g.get_viewport().get_texture().get_image().save_png("res://captures/castle/"+label+".png") +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false + var w=g.workshop + for rank in range(4): + g.architecture.growth.set_level(rank) + var right=g.architecture.growth.right_edge() + for node in g.architecture.growth.wall_dressing: + for record in node.get_meta("right_wall_dressing"): + check(is_equal_approx(node.multimesh.get_instance_transform(record.index).origin.x,record.transform.origin.x+right-12),"wall hardware follows expansion") + var parts=preload("res://castle_walls.gd").layout(-7.95,right,6.65,-5.3) + var keys={} + for p in parts:keys[key(p)]=true + for p in parts: + var mirror=p.duplicate();mirror.position.z=-mirror.position.z + check(keys.has(key(mirror)),"front/rear symmetry rank %d"%rank) + check(parts.filter(func(p):return p.feature=="tower_base").size()==4,"four corner towers") + # Sample the solid lower wall, including the old/new seam and the last partial bay. + for i in range(301): + var x=lerpf(-7.95,right,float(i)/300) + if absf(x+5.3)<1.02:continue + check(parts.any(func(p):return p.feature=="plinth" and absf(p.position.z-6.65)<.01 and absf(x-p.position.x)<=p.size.x/2+.0001),"no base holes rank %d x %.3f"%[rank,x]) + var distant=preload("res://castle_walls.gd").layout(-7.7,7.7,6.3,0) + var keys={} + for p in distant:keys[key(p)]=true + for p in distant: + var mirror=p.duplicate();mirror.position.x=-mirror.position.x + check(keys.has(key(mirror)),"distant cells mirror left/right") + g.reset_shift();g.game_started=true;g.paused=false + var d=w.add_station(0,Vector3(3,0,0));w.spawn();var s=g.souls.back();s.required=[0];s.entering=false + var carrier=Vector3(0,0,2);s.node.position=Vector3(0,0,0);s.visual.rotation=Vector3.ZERO + w.sentences.follow_carrier(s,carrier,Vector3.BACK,.01) + check(s.node.position.z>0 and s.node.position.z<.1,"held soul follows without teleporting") + for i in range(150): + g.time+=.02;w.sentences.follow_carrier(s,carrier,Vector3.BACK,.02) + check(absf(angle_difference(s.visual.rotation.y,0))<.03,"soul faces carrier") + check(s.visual.position.y>.56 and s.visual.position.y<.72,"gentle levitation stays bounded") + var angle=s.visual.rotation.y + w.sentences.follow_carrier(s,Vector3(2,0,2),Vector3.RIGHT,.02) + check(absf(angle_difference(s.visual.rotation.y,angle))>.001 and absf(angle_difference(s.visual.rotation.y,angle))<.25,"turn toward carrier is gradual") + check(is_equal_approx(g.architecture.growth.smog.material.density,.010),"smog increased by 25 percent") + w.attach(s,0);var effect=d.transfer + # A dissolved snapshot must hide even zero-valued dither pixels. + w.step_station(d,.22,false);check(not effect.snapshot.visible,"dissolved source hidden") + for i in range(56):w.step_station(d,.005,false) + check(d.placement==0 and d.transfer==null and effect.is_queued_for_deletion() and not effect.visible,"fractional assembly cannot leave blue sparks") + await g.get_tree().process_frame + check(not is_instance_valid(effect),"assembly nodes actually freed") + for i in range(5):w.step_station(d,.5,true) + g.life.update(2.1);await g.get_tree().process_frame + check(g.life.burns.is_empty(),"completion clears all burn effects") + check(g.get_children().filter(func(n):return n.get_script()==preload("res://soul_transfer.gd")).is_empty(),"no transfer effects left after completion") + DirAccess.make_dir_recursive_absolute("res://captures/castle") + g.hud.hide();g.player.hide() + g.architecture.growth.set_level(0) + g.camera.position=Vector3(21,23,30);g.camera.look_at(Vector3(2,0,0));g.camera.size=29 + g.architecture.update(g.camera);await screenshot(g,"base") + g.architecture.growth.set_level(3) + g.camera.position=Vector3(24,26,34);g.camera.look_at(Vector3(6,0,0));g.camera.size=34 + g.architecture.update(g.camera);await screenshot(g,"expanded") + for n in g.architecture.walls:n.show() + g.camera.position=Vector3(28,30,38);g.camera.look_at(Vector3(6,0,0));g.camera.size=40 + await screenshot(g,"expanded-all-walls") + print("CASTLE QA ","PASSED" if failures==0 else "FAILED",": symmetry, four growth ranks, sealed seams, distant cells, transfer cleanup and completion") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/castle_walls.gd b/Demon_v0.19/castle_walls.gd new file mode 100644 index 0000000..5d5a88d --- /dev/null +++ b/Demon_v0.19/castle_walls.gd @@ -0,0 +1,53 @@ +extends RefCounted +# One layout for the playable room and the instanced cells in the distance. +# All courses meet exactly; only the arrow slits and gate openings are empty. +static func layout(left,right,depth,gate_x): + var parts=[] + for z in [-depth,depth]: + wall(parts,Vector3(left,0,z),Vector3.RIGHT,right-left,gate_x-left) + for x in [left,right]: + wall(parts,Vector3(x,0,-depth),Vector3.BACK,depth*2,-100.0) + for x in [left,right]: + for z in [-depth,depth]: + var first=parts.size();tower(parts,Vector3(x,0,z)) + for i in range(first,parts.size()):parts[i]["normal"]=Vector3(-1 if x==left else 1,0,signf(z)) + return parts + +static func add(parts,pos,size,feature): + parts.append({"position":pos,"size":size,"feature":feature}) + +static func course(parts,start,axis,a,b,bottom,top,feature): + if b-a<.001:return + var size=Vector3(.46,top-bottom,.46) + if axis.x!=0:size.x=b-a + else:size.z=b-a + add(parts,start+axis*((a+b)*.5)+Vector3.UP*((bottom+top)*.5),size,feature) + +static func wall(parts,start,axis,length,gate): + var first=parts.size() + var sections=[[0.0,length]] + if gate>0 and gate=0:q=skeleton.get_bone_global_pose(parent).basis.orthonormalized().get_rotation_quaternion().inverse()*q + skeleton.set_bone_pose_rotation(i,q);skeleton.force_update_all_bone_transforms() +func aim(bone,child,target): + var from=point(child)-point(bone);var to=target-point(bone) + if from.length_squared()<.00001 or to.length_squared()<.00001:return + set_rotation(bone,Quaternion(from.normalized(),to.normalized())*global_rotation(bone)) +func leg(f,target): + var upper="upperleg01."+f.side;var lower="lowerleg01."+f.side;var end="foot."+f.side + var a=point(upper);var b=point(lower);var c=point(end) + var l1=a.distance_to(b);var l2=b.distance_to(c);var direction=(target-a).normalized() + var length=clampf(a.distance_to(target),absf(l1-l2)+.001,l1+l2-.001) + var along=(l1*l1-l2*l2+length*length)/(2*length) + var forward=actor.global_basis.z.normalized() + var bend=(forward-direction*forward.dot(direction)).normalized() + var knee=a+direction*along+bend*sqrt(maxf(0,l1*l1-along*along)) + aim(upper,lower,knee);aim(lower,end,target) + +func landing(f,progress,travel_direction): + var scale_y=actor.global_basis.get_scale().y + # Narrow catwalk track, with enough clearance for the boots to pass each other. + var side=1.0 if f.side=="L" else -1.0 + var destination=actor.global_position+travel_direction*((1.0-progress)*stride+stride*.25) + destination+=actor.global_basis.x.normalized()*side*.065*scale_y + destination.y=ground_height(f) + return destination + +func update(dt): + if not initialized:return + var displacement=actor.global_position-last_position;displacement.y=0 + last_position=actor.global_position + if displacement.length()>1.0:reset();displacement=Vector3.ZERO + var distance=displacement.length() + last_speed=distance/maxf(dt,.0001) + var was_moving=moving;moving=distance>.00015 and dt>0 + var scale_y=actor.global_basis.get_scale().y + # Longer steps at higher upgrade speeds; phase still follows the actual distance. + stride=lerpf(1.25,1.65,clampf((last_speed/scale_y-1.3)/2.0,0,1))*scale_y + walk_weight=move_toward(walk_weight,1.0 if moving else 0.0,dt*7) + if moving: + distance_walked+=distance;phase=fposmod(phase+distance/stride,1.0) + var travel_direction=displacement.normalized() if moving else actor.global_basis.z.normalized() + if moving and last_direction.length_squared()>.5 and travel_direction.dot(last_direction)<.65: + # A corner starts a short pivot step on the current support foot. + var support=0 if feet[0].grounded else 1 + phase=.25 if support==0 else .75 + var swing=feet[1-support];swing.start=swing.target;swing.start_phase=.75;swing.grounded=false + walk_weight=minf(walk_weight,.8) + if moving:last_direction=travel_direction + for f in feet: + var p=fposmod(phase+f.offset,1.0) + if moving: + if p>=.5: + if f.grounded: + f.start=f.target;f.start_phase=p if not was_moving else .5;f.grounded=false + f.landing=landing(f,p,travel_direction) + var u=clampf((p-f.start_phase)/maxf(.01,1.0-f.start_phase),0,1) + var ease=u*u*(3-2*u) + f.target=f.start.lerp(f.landing,ease) + f.target.y=ground_height(f)+sin(u*PI)*.15*scale_y + else: + if not f.grounded: + f.anchor=f.landing;f.anchor.y=ground_height(f);f.yaw=actor.global_rotation.y;f.grounded=true + f.target=f.anchor + else: + # An interrupted swing settles vertically; support feet never skate to idle. + f.target.y=move_toward(f.target.y,ground_height(f),dt*.9*scale_y) + if absf(f.target.y-ground_height(f))<.0001:f.anchor=f.target;f.grounded=true + f.last_phase=p + # Keep the pelvis at a reachable height instead of lifting the whole mesh. + var sway=sin(phase*TAU)*.042*walk_weight + var bob=(-.05-cos(phase*TAU*2)*.05)*walk_weight + var desired_hip=base_hip+Vector3(sway,bob+FLOOR_Y/scale_y,0) + # During stopping, retain enough leg reach for the last planted stride. + var reach_drop=0.0 + for f in feet: + var local=actor.to_local(f.target) + reach_drop=maxf(reach_drop,clampf((absf(local.z)-.12)*.28,0,.12)) + desired_hip.y=minf(desired_hip.y,base_hip.y+FLOOR_Y/scale_y-reach_drop) + skeleton.set_bone_pose_position(bones["root"],skeleton.to_local(actor.to_global(desired_hip))) + skeleton.force_update_all_bone_transforms() + if not actor.striking: + rotate_world("root",actor.global_basis.z,sin(phase*TAU)*.045*walk_weight) + rotate_world("spine02",actor.global_basis.z,-sin(phase*TAU)*.045*walk_weight) + rotate_world("spine02",Vector3.UP,-sin(phase*TAU)*.045*walk_weight) + for side in ["L","R"]: + var sign_x=1.0 if side=="L" else -1.0 + rotate_world("upperarm01."+side,actor.global_basis.x,sign_x*sin(phase*TAU)*.14*walk_weight) + rotate_world("lowerarm01."+side,actor.global_basis.x,-.06*walk_weight) + # Solve pelvis height from both leg reaches, including sideways steps on turns. + var lower_by=0.0 + for f in feet: + var hip=point("upperleg01."+f.side);var knee=point("lowerleg01."+f.side);var ankle=point("foot."+f.side) + var reach=hip.distance_to(knee)+knee.distance_to(ankle)-.006*scale_y + var horizontal=Vector2(hip.x-f.target.x,hip.z-f.target.z).length_squared() + var available=sqrt(maxf(.01,reach*reach-horizontal)) + lower_by=maxf(lower_by,hip.y-f.target.y-available) + if lower_by>0: + var root_position=point("root")-Vector3.UP*lower_by + skeleton.set_bone_pose_position(bones["root"],skeleton.to_local(root_position));skeleton.force_update_all_bone_transforms() + for f in feet: + leg(f,f.target) + var yaw=f.yaw if f.grounded else actor.global_rotation.y + var foot_rotation=Quaternion(Vector3.UP,yaw)*f.rotation + if not f.grounded:foot_rotation=Quaternion(actor.global_basis.x.normalized(),sin(maxf(0,f.last_phase-.5)*TAU)*-.12)*foot_rotation + set_rotation("foot."+f.side,foot_rotation) diff --git a/Demon_v0.19/cauldron_shell.gd b/Demon_v0.19/cauldron_shell.gd new file mode 100644 index 0000000..2883f90 --- /dev/null +++ b/Demon_v0.19/cauldron_shell.gd @@ -0,0 +1,20 @@ +extends RefCounted +func build(g,root): + var profile=[Vector2(.58,.27),Vector2(.88,.30),Vector2(1.14,.43),Vector2(1.32,.68),Vector2(1.41,1.03),Vector2(1.39,1.36),Vector2(1.32,1.65),Vector2(1.25,1.65),Vector2(1.31,1.35),Vector2(1.33,1.04),Vector2(1.24,.72),Vector2(1.06,.51),Vector2(.58,.37)] + var st=SurfaceTool.new();st.begin(Mesh.PRIMITIVE_TRIANGLES) + for j in range(profile.size()-1): + for i in range(160): + var a=i*TAU/160;var b=(i+1)*TAU/160 + var p=profile[j];var q=profile[j+1] + var vertices=[Vector3(cos(a)*p.x,p.y,sin(a)*p.x),Vector3(cos(b)*p.x,p.y,sin(b)*p.x),Vector3(cos(b)*q.x,q.y,sin(b)*q.x),Vector3(cos(a)*q.x,q.y,sin(a)*q.x)] + for k in [0,1,2,0,2,3]:st.set_uv(Vector2(float(i)/160,float(j)/profile.size()));st.add_vertex(vertices[k]) + st.generate_normals();st.index();var node=g.mesh_node(root,st.commit(),Vector3.ZERO,Color.WHITE) + var mat=ShaderMaterial.new();mat.shader=preload("res://forged.gdshader");mat.set_shader_parameter("tint",Color("333d40"));node.material_override=mat + node.set_meta("open_double_wall",true) + for i in range(3): + var a=i*TAU/3 + g.line(root,Vector3(cos(a)*.85,.5,sin(a)*.85),Vector3(cos(a)*1.04,.08,sin(a)*1.04),.10,Color("35383a")) + for i in range(10): + var mist=MeshInstance3D.new();root.add_child(mist);var quad=QuadMesh.new();quad.size=Vector2(.38,.8);mist.mesh=quad + var material=ShaderMaterial.new();material.shader=preload("res://steam.gdshader");material.render_priority=111;material.set_shader_parameter("phase",i*.63);mist.material_override=material + mist.position=Vector3(sin(i*2.4)*.85,1.9,cos(i*2.4)*.85) diff --git a/Demon_v0.19/character_review.gd b/Demon_v0.19/character_review.gd new file mode 100644 index 0000000..3bc77f3 --- /dev/null +++ b/Demon_v0.19/character_review.gd @@ -0,0 +1,64 @@ +extends SceneTree +var actors=[] +var stage: Node3D +var camera: Camera3D +var names=["Обжора","Куряга","Маньяк","Коррупционер","Изменщица","Алкоголик","Блогерша","Нарцисс","Злая соседка","Мошенник"] +func _initialize(): + call_deferred("review") + +func review(): + stage=Node3D.new();root.add_child(stage) + var environment=WorldEnvironment.new();stage.add_child(environment) + environment.environment=Environment.new();environment.environment.background_mode=Environment.BG_COLOR + environment.environment.background_color=Color("141b24") + environment.environment.ambient_light_source=Environment.AMBIENT_SOURCE_COLOR + environment.environment.ambient_light_color=Color("b9c7dc");environment.environment.ambient_light_energy=.55 + var light=DirectionalLight3D.new();stage.add_child(light);light.rotation_degrees=Vector3(-45,-30,0);light.light_energy=1.5 + camera=Camera3D.new();stage.add_child(camera);camera.projection=Camera3D.PROJECTION_ORTHOGONAL;camera.size=6.9 + camera.position=Vector3(0,3.0,16);camera.look_at(Vector3(0,3.0,0));camera.current=true + var helper=load("res://main.gd").new() + for k in range(10): + var actor=load("res://soul_actor.gd").new(k);stage.add_child(actor);actor.configure(self) + actor.position=Vector3((k%5-2)*2.2,3.3 if k<5 else 0,0) + actor.rotation.y=.25 + helper.make_ghost(actor,k) + assert(actor.get_meta("spectral") and actor.clips.size()==6) + var skeleton=actor.find_children("*","Skeleton3D",true,false)[0] + assert(skeleton.get_bone_count()==166) + actor.set_walking(true);actor.animator.play(actor.clips["Walk"],0);actor.animator.advance(0);actor.animator.seek(.25,true) + print("Soul knee ",k," ",skeleton.get_bone_pose_rotation(skeleton.find_bone("lowerleg01.L")).get_angle()) + assert(skeleton.get_bone_pose_rotation(skeleton.find_bone("lowerleg01.L")).get_angle()>.6) + actor.set_walking(false);actor.animator.advance(.2) + for station in [1,2,3]: + actor.mount_station(station);actor.animator.advance(.2) + assert(actor.mounted) + actor.mounted=false;actor.animator.play(actor.clips["Idle"],0);actor.animator.advance(0);actor.animator.seek(.3,true) + for n in actor.find_children("*","MeshInstance3D",true,false): + for i in range(n.mesh.get_surface_count()):assert(n.get_active_material(i) is ShaderMaterial) + actors.append(actor) + var label=Label3D.new();stage.add_child(label);label.text=names[k];label.position=actor.position+Vector3(0,2.45,0);label.font_size=38;label.pixel_size=.006;label.billboard=BaseMaterial3D.BILLBOARD_ENABLED + helper.free() + await process_frame;await process_frame + await RenderingServer.frame_post_draw + root.get_texture().get_image().save_png("res://captures/souls-review.png") + print("PASS: ten distinct 166-bone souls; imported knee flexion; six clips including Float; station poses; spectral materials on every surface") + for actor in actors:actor.hide() + for node in stage.get_children(): + if node is Label3D:node.hide() + var hero=load("res://succubus_actor.gd").new();stage.add_child(hero);hero.configure(self);hero.rotation.y=.58 + hero.set_walking(true);hero.animator.play(hero.clips["Walk"],0);hero.animator.advance(0);hero.animator.seek(.25,true) + var skeleton=hero.find_children("*","Skeleton3D",true,false)[0] + var angle=skeleton.get_bone_pose_rotation(skeleton.find_bone("lowerleg01.L")).get_angle() + assert(angle>1.0) + print("PASS: imported succubus knee flexion radians: ",angle) + var arm=skeleton.find_bone("upperarm01.L") + var first=skeleton.get_bone_pose_rotation(arm) + hero.animator.seek(.90,true) + assert(first.angle_to(skeleton.get_bone_pose_rotation(arm))>.5) + print("PASS: imported shoulder counter-swing exceeds 0.5 radians") + hero.animator.seek(.25,true) + paused=true + camera.size=3.5;camera.position=Vector3(4,2.2,6);camera.look_at(Vector3(0,1.3,0)) + await process_frame;await RenderingServer.frame_post_draw + root.get_texture().get_image().save_png("res://captures/succubus-walk-v02.png") + quit() diff --git a/Demon_v0.19/characters.gd b/Demon_v0.19/characters.gd new file mode 100644 index 0000000..c125cee --- /dev/null +++ b/Demon_v0.19/characters.gd @@ -0,0 +1,191 @@ +extends RefCounted +# Original procedural 3D characters, based on the approved caricature direction. +var g +const SKINS = ["e7aa7e","bda182","d6a080","e4ac7d","edb48e","cba087","edb48e","d6a074","cfaa96","ddac8d"] +const CLOTHES = ["ded1aa","85715c","b49a77","263044","b62f52","6a6c45","a74f94","e6dcc1","60395f","283344"] +const HAIR = ["6e3425","45392e","30272a","38282a","d6a451","777368","ed72ac","ad482a","b4a5b2","4a3028"] + +func build(game, demon: bool, kind = 0): + g = game + var sculpt=preload("res://hero.gd").new() + sculpt.g=g + var r = Node3D.new() + var skin = Color("cc748e") if demon else Color(SKINS[kind]) + var cloth = Color("382439") if demon else Color(CLOTHES[kind]) + var hair = Color("502132") if demon else Color(HAIR[kind]) + var female = demon or kind in [4,6,8] + var fat = not demon and kind in [0,3] + var slim = not demon and kind in [1,2,5] + var old = not demon and kind==8 + var width = 0.58 if fat else (0.33 if slim else 0.39) + var belly = 0.43 if fat else 0.25 + var hip = 0.44 if fat else 0.30 + var head_y = 1.93 if not old else 1.78 + # Boots / trouser legs are separate pivots so gait is visible from above. + for side in [-1,1]: + var leg = Node3D.new() + r.add_child(leg) + leg.name = "LegL" if side<0 else "LegR" + leg.position = Vector3(side*hip*0.57,0.87,0) + var pants = Color("201b29") if demon else (skin if female and not old else cloth.darkened(0.30)) + sculpt.tube(leg,[Vector3(0,0.06,0),Vector3(0,-0.20,0),Vector3(0,-0.39,0)],[0.16 if fat else 0.13,0.14 if fat else 0.115,0.12 if fat else 0.10],pants) + g.line(leg,Vector3(0,-0.36,0),Vector3(0,-0.72,0.02),0.10 if not fat else 0.13,Color("251e2c") if demon else pants) + g.ball(leg,Vector3(0,-0.74,0.12),Vector3(0.24,0.20,0.43),Color("24212b")) + if demon or kind==4: + g.box(leg,Vector3(0,-0.83,-0.04),Vector3(0.08,0.15,0.10),Color("c18e62")) + if demon: + g.cylinder(leg,Vector3(0,-0.25,0),0.12,0.12,Color("9b4967")) + if kind==9 and not demon: + g.box(leg,Vector3(0,-0.79,0.12),Vector3(0.26,0.07,0.43),Color("cfbfa9")) + sculpt.loft(r,Vector3.ZERO,[[0.75,hip,belly*0.8,0],[0.88,width*0.85,belly*0.95,0],[1.09,width,belly,0],[1.29,width*0.94,belly*0.91,0],[1.46,width*0.87,belly*0.68,0],[1.57,0.18,0.14,0]],cloth) + if demon or (female and not old): + g.cylinder(r,Vector3(0,0.86,0),0.36,0.33,cloth,0.24) + g.ball(r,Vector3(0,1.49,0.01),Vector3(0.64,0.28,0.4),skin) + g.box(r,Vector3(0,1.38,0.26),Vector3(0.36,0.23,0.06),cloth) + for y in [1.10,1.20,1.30]: + g.line(r,Vector3(-0.07,y,0.285),Vector3(0.07,y+0.07,0.285),0.012,Color("d7aa6b")) + g.line(r,Vector3(0.07,y,0.285),Vector3(-0.07,y+0.07,0.285),0.012,Color("d7aa6b")) + if fat: + g.ball(r,Vector3(0,1.06,0.20),Vector3(width*1.9,0.75,0.82),skin if kind==0 else cloth) + g.cylinder(r,Vector3(0,0.84,0),width*0.83,0.08,Color("35282a")) + g.box(r,Vector3(0,0.86,belly+0.025),Vector3(0.15,0.13,0.055),Color("cf9952")) + var head=Node3D.new();r.add_child(head) + head.scale=Vector3(0.78,0.82,0.82);head.position.y=0.29 + g.cylinder(head,Vector3(0,head_y-0.32,0),0.13,0.18,skin) + # Jaw, oversized nose, eyebrows and large high-contrast eyes. + var face_width=0.37 if fat else (0.25 if slim else 0.30) + sculpt.loft(head,Vector3(0,head_y,0),[[-0.32,0.09,0.10,0.04],[-0.24,face_width*0.68,0.18,0.035],[-0.10,face_width,0.26,0.015],[0.05,face_width,0.27,0],[0.20,face_width*0.91,0.24,-0.01],[0.31,face_width*0.60,0.18,-0.02],[0.35,0.04,0.06,-0.02]],skin) + g.ball(head,Vector3(0,head_y-0.04,0.33),Vector3(0.13 if not fat else 0.17,0.17,0.17),skin.lightened(0.05)) + for side in [-1,1]: + g.ball(head,Vector3(side*0.32,head_y-0.02,0),Vector3(0.14,0.22,0.15),skin) + g.ball(head,Vector3(side*0.145,head_y+0.075,0.262),Vector3(0.15,0.10,0.06),Color("fff0d8")) + g.ball(head,Vector3(side*0.145,head_y+0.065,0.306),Vector3(0.055,0.07,0.022),Color("542c35") if demon else Color("28313a")) + g.ball(head,Vector3(side*0.145-0.016,head_y+0.09,0.325),Vector3(0.028,0.032,0.02),Color("ffffff")) + var brow=g.box(head,Vector3(side*0.145,head_y+0.19,0.27),Vector3(0.23,0.055,0.065),hair) + brow.rotation.z=side*(-0.20 if demon or kind in [2,8] else 0.13) + g.ball(head,Vector3(0,head_y-0.19,0.319),Vector3(0.21,0.045,0.03),Color("6d2539")) + # Sculpted clumps keep hairstyles distinct at gameplay distance. + sculpt.loft(head,Vector3(0,head_y,-0.045),[[0.19,0.32,0.245,-0.025],[0.30,0.29,0.23,-0.01],[0.39,0.20,0.17,0],[0.41,0.03,0.05,0]],hair) + for k in range(5): + var lock=g.ball(head,Vector3(-0.25+k*0.12,head_y+0.27,0.12),Vector3(0.20,0.29,0.30),hair.lightened(0.025*k)) + lock.rotation.z=-0.30+k*0.13 + if female or demon: + for side in [-1,1]: + var lock=g.ball(head,Vector3(side*0.27,head_y-0.16,-0.13),Vector3(0.24,0.72,0.32),hair) + lock.rotation.z=side*0.18 + if kind==7 and not demon: + for k in range(3): + var quiff=g.ball(head,Vector3(-0.14+k*0.13,head_y+0.42,0.08),Vector3(0.22,0.42,0.29),hair) + quiff.rotation.z=-0.55 + if (kind in [1,5]) and not demon: + g.ball(head,Vector3(0,head_y-0.22,0.19),Vector3(0.48,0.29,0.31),hair) + g.ball(head,Vector3(0,head_y-0.16,0.36),Vector3(0.23,0.065,0.04),Color("563f36")) + # Arms and hands, posed around each person's recognisable prop. + for side in [-1,1]: + var arm=Node3D.new() + r.add_child(arm) + arm.name="ArmL" if side<0 else "ArmR" + arm.position=Vector3(side*(width+0.03),1.47,0) + var elbow=Vector3(side*0.10,-0.30,0.10) + var hand=Vector3(side*0.04,-0.42,0.28) + sculpt.tube(arm,[Vector3(0,0.03,0),elbow*0.55,elbow],[0.15 if fat else 0.12,0.13 if fat else 0.10,0.10 if fat else 0.08],skin if demon or kind in [0,1,2,4,6,7] else cloth) + g.ball(arm,elbow,Vector3.ONE*(0.21 if fat else 0.17),skin) + g.line(arm,elbow,hand,0.10 if fat else 0.08,Color("302335") if demon else skin) + g.ball(arm,hand,Vector3(0.17,0.19,0.17),skin) + if demon: + for side in [-1,1]: + var horn=g.cylinder(r,Vector3(side*0.23,head_y+0.52,-0.05),0.13,0.45,Color("ca5371"),0) + horn.rotation.z=-side*0.32 + g.cylinder(r,Vector3(side*0.23,head_y+0.36,-0.05),0.13,0.07,Color("d7a354")) + wing(r,side) + g.line(r,Vector3(0,1,-0.24),Vector3(0.43,0.80,-0.67),0.045,skin) + g.line(r,Vector3(0.43,0.80,-0.67),Vector3(0.74,1.12,-0.63),0.045,skin) + g.cylinder(r,Vector3(0.74,1.20,-0.63),0.13,0.27,Color("c54c6b"),0) + g.box(r,Vector3(0.23,1.4,0.25),Vector3(0.12,0.16,0.025),Color("e9caa0")) + g.line(r,Vector3(0.51,1.05,0.3),Vector3(0.64,0.62,0.38),0.035,Color("412b30")) + g.ball(r,Vector3(0.66,0.57,0.40),Vector3(0.19,0.13,0.08),Color("a1465b")) + else: + accessory(r,kind,head_y,width,head) + r.rotation.y = 0.58 + return r + +func wing(r, side): + var st=SurfaceTool.new() + st.begin(Mesh.PRIMITIVE_TRIANGLES) + var points=[Vector3(side*0.20,1.58,-0.23),Vector3(side*0.85,1.91,-0.40),Vector3(side*1.05,1.32,-0.32),Vector3(side*0.68,1.42,-0.36),Vector3(side*0.56,1.04,-0.26),Vector3(side*0.36,1.27,-0.25)] + for i in range(1,points.size()-1): + for p in [points[0],points[i],points[i+1]]: st.add_vertex(p) + st.generate_normals() + var n=MeshInstance3D.new() + n.mesh=st.commit() + var m=g.mat(Color("79354e")) + m.cull_mode=BaseMaterial3D.CULL_DISABLED + n.material_override=m + r.add_child(n) + for p in [points[1],points[2],points[4]]: g.line(r,points[0],p,0.025,Color("b35b73")) + +func accessory(r, k, hy, w, head): + var gold=Color("d8a64d") + match k: + 0: + g.line(r,Vector3(-w,1.07,0.35),Vector3(-w-0.08,1.43,0.38),0.045,Color("dbc3a0")) + g.ball(r,Vector3(-w-0.09,1.55,0.38),Vector3(0.36,0.45,0.32),Color("b45c30")) + for i in range(5): g.ball(r,Vector3(-0.30+i*0.13,1.36-i%2*0.13,0.53),Vector3(0.09,0.10,0.025),Color("aa753d")) + 1: + g.line(head,Vector3(0.16,hy-0.17,0.36),Vector3(0.45,hy-0.20,0.49),0.025,Color("e5cfb4")) + g.ball(head,Vector3(0.45,hy-0.20,0.49),Vector3(0.055,0.05,0.055),Color("fa8b47")) + for i in range(3): g.ball(head,Vector3(0.48+i*0.08,hy+0.02+i*0.19,0.48),Vector3.ONE*(0.10+i*0.06),Color("938b9c")) + 2: + g.box(r,Vector3(0,1.14,0.30),Vector3(0.56,0.64,0.05),Color("a18c65")) + g.line(r,Vector3(w+0.03,1.07,0.3),Vector3(w+0.12,1.27,0.32),0.05,Color("4c3431")) + g.box(r,Vector3(w+0.22,1.48,0.33),Vector3(0.39,0.38,0.06),Color("a5b4b6")) + g.ball(r,Vector3(w+0.28,1.60,0.37),Vector3(0.06,0.06,0.01),Color("3d4750")) + 3: + glasses(head,hy) + g.box(r,Vector3(0,1.30,0.53),Vector3(0.09,0.36,0.06),Color("c1474e")) + g.box(r,Vector3(-w,0.73,0.28),Vector3(0.56,0.4,0.23),Color("352930")) + for i in range(3): + var bill=g.box(r,Vector3(w+0.05+i*0.04,1.15+i*0.04,0.35),Vector3(0.18,0.34,0.025),Color("718e58")) + bill.rotation.z=-0.2+i*0.18 + 4: + phone(r,Vector3(w+0.07,1.32,0.37),Color("d96493")) + g.ball(r,Vector3(0,1.51,0.24),Vector3(0.07,0.11,0.05),gold) + 6: + g.line(r,Vector3(-w,1.04,0.32),Vector3(-w-0.1,2.25,0.37),0.025,Color("342b37")) + phone(r,Vector3(-w-0.1,2.36,0.37),Color("db67a7")) + for side in [-1,1]: g.ball(head,Vector3(side*0.3,hy+0.38,-0.06),Vector3.ONE*0.28,Color("ef80ba")) + g.box(r,Vector3(w+0.13,0.88,0.07),Vector3(0.30,0.29,0.19),Color("e67fa8")) + 5: + g.cylinder(r,Vector3(-w-0.04,0.99,0.32),0.10,0.38,Color("3c684f")) + g.cylinder(r,Vector3(-w-0.04,1.24,0.32),0.043,0.16,Color("3c684f")) + g.box(r,Vector3(-w-0.04,0.99,0.421),Vector3(0.14,0.14,0.02),Color("d6c698")) + 7: + glasses(head,hy) + g.torus(r,Vector3(0,1.52,0.05),0.22,gold).rotation.x=0.45 + g.ball(r,Vector3(0,1.24,0.31),Vector3(0.12,0.15,0.04),gold) + phone(r,Vector3(-w-0.03,1.27,0.37),Color("714951")) + 8: + for i in range(6): + var a=i*TAU/6 + var roller=g.cylinder(head,Vector3(cos(a)*0.27,hy+0.28,sin(a)*0.24),0.09,0.18,Color("c785a6")) + roller.rotation.x=PI/2 + glasses(head,hy,false) + g.cylinder(r,Vector3(0,0.85,0),0.43,0.68,Color("60395f"),0.31) + for i in range(6): g.ball(r,Vector3(-0.24+i%3*0.24,0.68+floori(i/3.0)*0.3,0.37),Vector3(0.09,0.10,0.025),Color("b8956b")) + 9: + g.box(r,Vector3(0,1.01,0.55),Vector3(0.65,0.06,0.43),Color("41424f")) + var screen=g.box(r,Vector3(0,1.25,0.75),Vector3(0.65,0.44,0.05),Color("41424f")) + screen.rotation.x=-0.15 + g.ball(r,Vector3(0,1.25,0.79),Vector3(0.13,0.14,0.015),Color("baaac3")) + for side in [-1,1]: g.ball(head,Vector3(side*0.34,hy,0),Vector3(0.16,0.25,0.22),Color("252735")) + g.torus(head,Vector3(0,hy+0.03,0),0.35,Color("252735")).rotation.x=PI/2 + +func phone(r,p,c): + g.box(r,p,Vector3(0.20,0.34,0.055),c) + g.box(r,p+Vector3(0,0,0.032),Vector3(0.15,0.25,0.01),Color("a5d3d3")) + +func glasses(r,hy,dark=true): + for side in [-1,1]: + g.box(r,Vector3(side*0.16,hy+0.08,0.322),Vector3(0.25,0.17,0.055),Color("242333")) + if not dark: g.box(r,Vector3(side*0.16,hy+0.08,0.355),Vector3(0.18,0.10,0.02),Color("bdc9be")) + g.line(r,Vector3(-0.06,hy+0.10,0.35),Vector3(0.06,hy+0.10,0.35),0.025,Color("242333")) diff --git a/Demon_v0.19/delivery_priority_tests.gd b/Demon_v0.19/delivery_priority_tests.gd new file mode 100644 index 0000000..e685bea --- /dev/null +++ b/Demon_v0.19/delivery_priority_tests.gd @@ -0,0 +1,43 @@ +extends RefCounted +var failures=0 +func check(value,label): + if not value:failures+=1;push_error("DELIVERY QA: "+label) +func soul(g): + g.workshop.spawn();var s=g.souls.back();s.required=[0];s.served=[];s.entering=false;s.entry_time=1;return s +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.paused=true + var w=g.workshop + for s in g.souls:s.node.queue_free() + g.souls.clear();w.reset();w.unlock=5 + var first=w.add_station(0,Vector3(1,0,0));var other=w.add_station(0,Vector3(5,0,0));w.rebuild_nav();w.add_helper() + var carried=soul(g);var manual=soul(g) + w.helpers[0].root.position=Vector3(-4,0,4) + w.update_helpers(.001) + var h=w.helpers[0] + check(h.soul==carried.id and first.reserved==0,"helper reserves destination in advance") + w.sentences.pickup(manual);g.player.position=w.approach(first) + check(w.try_player_attach(0),"player arriving first can place despite helper reservation") + check(first.soul==manual.id and g.held==-1,"manual placement commits once and clears carried selection") + check(h.station==1 and other.reserved==0 and first.reserved==-1,"helper reroutes to alternative and releases old reservation") + check(h.soul==carried.id and h.state=="collect" and carried.state=="reserved","rerouting before collection preserves the assigned soul") + # The same conflict after collection, with no alternative available. + h.state="deliver";carried.state="transit";w.sentences.float_pose(carried) + var second_manual=soul(g);w.sentences.pickup(second_manual);g.player.position=w.approach(other) + check(w.try_player_attach(1),"first arrival also overrides a helper already transporting") + check(h.station==-1 and h.state=="deliver" and h.soul==carried.id and carried.state=="transit","no alternate: helper keeps soul and waits") + w.update_helpers(.01) + check(first.soul==manual.id and other.soul==second_manual.id and h.soul==carried.id,"waiting helper cannot overwrite an occupied apparatus") + var rejected=soul(g);w.sentences.pickup(rejected) + check(not w.try_player_attach(1) and g.held==rejected.id,"occupied apparatus cannot be stolen by player") + w.drop_held() + # Vacate the first device and ensure the waiting delivery resumes. + first.soul=-1;manual.node.queue_free();g.souls.erase(manual) + w.update_helpers(.001) + check(h.station==0 and first.reserved==0,"waiting helper retries when an apparatus becomes available") + h.root.position=w.approach(first);h.path=PackedVector2Array();h.destination=w.cell(w.approach(first));h.revision=w.revision + w.update_helpers(.001) + check(first.soul==carried.id and h.soul==-1 and h.state=="idle","delivery resumes without loss or duplicate assignment") + check(g.souls.filter(func(s):return s.id==carried.id).size()==1,"rerouting does not duplicate souls") + if failures==0:print("ALL DELIVERY PRIORITY TESTS PASSED: first arrival, collect/deliver reroutes, waiting, retry, occupied protection, no lost or duplicate souls") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/development.gd b/Demon_v0.19/development.gd new file mode 100644 index 0000000..4f85380 --- /dev/null +++ b/Demon_v0.19/development.gd @@ -0,0 +1,260 @@ +extends Node +const Economy=preload("res://economy.gd") +var g +var motion +var close_clock=0.0 +var release_clock=0.0 +var placement_clock=0.0 +var placement_from: Transform3D +var placement_to: Transform3D +var pose_from: Transform3D +var pose_to: Transform3D +var finish_clock=0.0 +const TITLES=["Место для шлепков","Дыба","Колесование","Железная дева"] +const COSTS=[0,50,100,180] +var tier=0 +var selected=0 +var xp=0 +var points=0 +var action_level=0 +var leadership=0 +var elapsed=0.0 +var stage=0 +var tree_panel: PanelContainer +var tree_buttons=[] +var tree_icon: Button +var skill_buttons=[] +var xp_bar: ProgressBar +var xp_label: Label +var action_bar: ProgressBar +var device: Node3D +var crank: Node3D +var second_door: Node3D +var door: Node3D +var flame: MeshInstance3D +var bubble: PanelContainer +var bubble_id=-1 +var bubble_time=0.0 + +func build(game): + g=game + var saved=g.get_meta("development_save",{}) + tier=clampi(int(saved.get("tier",0)),0,3) + selected=clampi(int(saved.get("selected",tier)),0,tier) + xp=maxi(0,int(saved.get("xp",0))) + points=maxi(0,int(saved.get("points",0))) + action_level=clampi(int(saved.get("action",0)),0,3) + leadership=clampi(int(saved.get("leadership",0)),0,3) + var p=g.panel(Vector2(24,104),Vector2(340,100)) + var v=VBoxContainer.new();p.add_child(v) + xp_label=g.label("",15);v.add_child(xp_label) + xp_bar=ProgressBar.new();xp_bar.custom_minimum_size=Vector2(260,12);xp_bar.show_percentage=false;v.add_child(xp_bar) + var fill=StyleBoxFlat.new();fill.bg_color=Color("7c754f") + var bg=StyleBoxFlat.new();bg.bg_color=Color("2c3028");bg.border_color=Color("997749");bg.set_border_width_all(1) + xp_bar.add_theme_stylebox_override("fill",fill);xp_bar.add_theme_stylebox_override("background",bg) + var b=preload("res://pentagram.gd").new() + tree_icon=b + b.pressed.connect(toggle_tree) + g.hud.add_child(b);b.position=Vector2(762,798) + action_bar=ProgressBar.new();g.hud.add_child(action_bar);action_bar.position=Vector2(580,750);action_bar.size=Vector2(440,24);action_bar.visible=false;action_bar.show_percentage=false + action_bar.add_theme_stylebox_override("fill",fill);action_bar.add_theme_stylebox_override("background",bg) + tree_panel=g.panel(Vector2(250,160),Vector2(1100,540));tree_panel.z_index=30 + var col=VBoxContainer.new();tree_panel.add_child(col);col.add_theme_constant_override("separation",14) + col.add_child(g.label("ГРИМУАР РАЗВИТИЯ",28,Color("e4c68b"))) + col.add_child(g.label("Орудия",22)) + var row=HBoxContainer.new();col.add_child(row) + for i in range(4): + var btn=g.button("",func():purchase_station(i));btn.custom_minimum_size=Vector2(245,94);btn.add_theme_font_size_override("font_size",15);row.add_child(btn);tree_buttons.append(btn) + col.add_child(g.label("Суккуба",22)) + var skills=HBoxContainer.new();col.add_child(skills) + for kind in ["speed","action"]: + var btn=g.button("",func():purchase_skill(kind));btn.custom_minimum_size=Vector2(490,75);skills.add_child(btn);skill_buttons.append(btn) + col.add_child(g.button("Закрыть",toggle_tree)) + tree_panel.hide() + rebuild_device();refresh() + +func snapshot(): + return {"tier":tier,"selected":selected,"xp":xp,"points":points,"action":action_level,"leadership":leadership} + +func refresh(): + var current=Economy.level(xp);var start=Economy.XP_THRESHOLDS[current-1] + var maximum=current==Economy.XP_THRESHOLDS.size() + var needed=1 if maximum else Economy.XP_THRESHOLDS[current]-start + xp_label.text="УРОВЕНЬ %d · %s · ОЧКИ %d" % [current,"МАКСИМУМ" if maximum else "%d / %d ОПЫТА" % [xp-start,needed],points] + xp_bar.max_value=needed;xp_bar.value=needed if maximum else xp-start + for i in range(4): + tree_buttons[i].text="%s\n%s" % [TITLES[i],("ВЫБРАНО" if selected==i else "Выбрать") if i<=tier else "%d монет" % COSTS[i]] + tree_buttons[i].disabled=g.working>=0 or release_clock>0 or i>tier+1 or (i>tier and g.coins=3 + skill_buttons[1].disabled=points<1 or action_level>=3 + +func toggle_tree(): + if not g.game_started: return + if tree_panel.visible: + tree_panel.hide();g.paused=false + else: + if g.paused: return + if g.held>=0:g.release_soul() + g.orbit.stop();g.paused=true;refresh();tree_panel.show() + +func purchase_station(i): + if i<0 or i>3 or g.working>=0 or release_clock>0 or i>tier+1:return + if i>tier: + if g.coins0 or g.player.position.distance_to(g.STATION)>3:return + if selected==3 and stage==0: + stage=1;close_clock=0.35 + g.create_tween().tween_property(door,"rotation:y",0.0,0.35) + if second_door:g.create_tween().tween_property(second_door,"rotation:y",0.0,0.35) + +func step(dt:float,pressed:bool): + if g.paused or g.working<0 or selected==0 or placement_clock>0:return + if g.player.position.distance_to(g.STATION)>3:pressed=false + if selected==3 and stage==0:return + if selected==3 and close_clock>0: + close_clock=maxf(0,close_clock-dt) + action_bar.value=(.35-close_clock)/3.35*100 + return + var duration=2.0 if selected==1 and stage==1 else (1.0 if selected==1 else (5.0 if selected==2 else 3.0)) + if not pressed: + if selected==1 and stage==1:elapsed=0;action_bar.value=100.0/3.0 + return + var rate=1.0 if selected==1 and stage==1 else 1.0+action_level*0.2 + elapsed+=dt*rate + if crank:crank.rotation.z+=dt*rate*4 + if selected==2: + var i=g.index_of(g.working) + if i>=0: + g.souls[i].visual.rotation.z=crank.rotation.z + g.souls[i].visual.position=Vector3(sin(crank.rotation.z)*1.15,1.62-cos(crank.rotation.z)*1.15,0.27) + if flame:flame.visible=selected==3 + var fraction=elapsed/duration + if selected==1:fraction=(elapsed if stage==0 else 1.0+elapsed)/3.0 + if selected==3:fraction=(.35+elapsed)/3.35 + action_bar.value=clampf(fraction*100,0,100) + if elapsed>=duration: + if selected==1 and stage==0:stage=1;elapsed=0 + else: + finish_clock=.65 + g.complete_soul();elapsed=0;stage=0 + if flame:flame.hide() + +func hint(): + return "" + +func pointer_over_ui(): + var c=g.get_viewport().gui_get_hovered_control() + return c!=null and c.mouse_filter!=Control.MOUSE_FILTER_IGNORE + +func update(dt): + advance_placement(dt) + finish_clock=maxf(0,finish_clock-dt) + if release_clock>0: + release_clock=maxf(0,release_clock-dt) + if release_clock<=0: + if door:g.create_tween().tween_property(door,"rotation:y",-1.8,0.45) + if second_door:g.create_tween().tween_property(second_door,"rotation:y",1.8,0.45) + refresh() + action_bar.visible=(g.working>=0 or finish_clock>0) and not tree_panel.visible + if g.working>=0:g.status.text=hint() + var active=Input.is_mouse_button_pressed(MOUSE_BUTTON_RIGHT) and not pointer_over_ui() + step(dt,active) + if motion and placement_clock<=0:motion.update(dt,active) + if is_instance_valid(bubble): + bubble_time-=dt + var i=g.index_of(bubble_id) + if i<0 or bubble_time<=0:bubble.queue_free();bubble=null + else: + var p=g.camera.unproject_position(g.souls[i].node.position+Vector3(0,3.2,0)) + g.dialogue.place_bubble(bubble,p) + +func advance_placement(dt): + if g.paused or placement_clock<=0:return + placement_clock=maxf(0,placement_clock-dt) + var i=g.index_of(g.working) + if i<0:placement_clock=0;return + var t=1.0-placement_clock/.8 + var u=t*t*(3.0-2.0*t) + var s=g.souls[i] + s.node.transform=placement_from.interpolate_with(placement_to,u) + s.node.position.y+=sin(t*PI)*.42 + s.visual.transform=pose_from.interpolate_with(pose_to,u) + +func speak(s,override_text=""): + if g.dialogue and not g.dialogue.souls_enabled:return + if is_instance_valid(bubble):bubble.queue_free() + var phrase=override_text if not override_text.is_empty() else g.LINES[s.kind] + bubble=g.dialogue.make_bubble(g.NAMES[s.kind]+": "+phrase,17);bubble.z_index=10 + bubble_id=s.id;bubble_time=7.0 + if g.dialogue:g.dialogue.speak(s.kind) + +func rebuild_device(): + if is_instance_valid(device):device.queue_free() + device=Node3D.new();g.add_child(device);device.position=g.STATION + crank=null;door=null;flame=null + second_door=null + preload("res://equipment.gd").new().build(g,self) + motion=preload("res://apparatus_motion.gd").new() + motion.setup(g,self) diff --git a/Demon_v0.19/dialogue.gd b/Demon_v0.19/dialogue.gd new file mode 100644 index 0000000..afcd22c --- /dev/null +++ b/Demon_v0.19/dialogue.gd @@ -0,0 +1,41 @@ +extends RefCounted +var g +var souls_enabled=false +var player: AudioStreamPlayer +var pending=[] +var serial=0 +var last_kind=-1 +func setup(game): + g=game;player=AudioStreamPlayer.new();g.add_child(player) + player.finished.connect(next) +func make_bubble(text,font_size=16): + var panel=PanelContainer.new();g.hud.add_child(panel);panel.mouse_filter=Control.MOUSE_FILTER_IGNORE + var style=preload("res://infernal_ui.gd").panel(true,16) + for side in [SIDE_TOP,SIDE_BOTTOM]: + style.set_texture_margin(side,14);style.set_content_margin(side,8) + panel.add_theme_stylebox_override("panel",style) + var line=g.label(text.replace("\n"," "),font_size,Color("252820")) + line.autowrap_mode=TextServer.AUTOWRAP_OFF;line.vertical_alignment=VERTICAL_ALIGNMENT_CENTER + line.mouse_filter=Control.MOUSE_FILTER_IGNORE;panel.add_child(line) + panel.size=panel.get_combined_minimum_size() + return panel +func place_bubble(panel,point): + panel.size=panel.get_combined_minimum_size() + var viewport=g.get_viewport().get_visible_rect().size + panel.position=Vector2(clampf(point.x-panel.size.x*.5,10,maxf(10,viewport.x-panel.size.x-10)),clampf(point.y-panel.size.y-12,10,maxf(10,viewport.y-panel.size.y-10))) +func speak(kind): + if kind<10 and not souls_enabled:return + if g.paused or not g.game_started:return + if pending.size()>1:pending.pop_front() + pending.append(kind) + if not player.playing:next() +func next(): + if pending.is_empty():return + last_kind=pending.pop_front() + player.stream=load("res://audio/dialogue/voice_%02d_%d.ogg" % [last_kind,serial%2]);serial+=1 + if not g.test_mode and not g.capture_mode and not g.muted and g.voice_volume>0:player.play() +func stop(): + pending.clear();player.stop() +func update(): + player.volume_db=-10.0+linear_to_db(maxf(g.voice_volume,.0001)) + player.stream_paused=g.paused diff --git a/Demon_v0.19/dressing.gd b/Demon_v0.19/dressing.gd new file mode 100644 index 0000000..615e19c --- /dev/null +++ b/Demon_v0.19/dressing.gd @@ -0,0 +1,124 @@ +extends RefCounted +var g +var batches={} +var count=0 +func piece(p,size,kind=0,rotation=Vector3.ZERO): + if not batches.has(kind):batches[kind]=[] + batches[kind].append(Transform3D(Basis.from_euler(rotation).scaled(size),p));count+=1 +func rod(a,b,r=.025,kind=1): + if not batches.has(kind):batches[kind]=[] + var basis=Basis(Quaternion(Vector3.UP,(b-a).normalized())).scaled(Vector3(r*2,a.distance_to(b),r*2)) + batches[kind].append(Transform3D(basis,(a+b)*.5));count+=1 +func barrel(p): + for j in range(24): + var a=j*TAU/24 + piece(p+Vector3(cos(a)*.34,.44,sin(a)*.34),Vector3(.085,.85,.055),2,Vector3(0,-a+PI/2,0)) + for y in [.12,.42,.76]: + for j in range(24): + var a=j*TAU/24;var b=(j+1)*TAU/24 + rod(p+Vector3(cos(a)*.37,y,sin(a)*.37),p+Vector3(cos(b)*.37,y,sin(b)*.37),.018) + for j in range(6):piece(p+Vector3((j-2.5)*.105,.865,0),Vector3(.10,.035,sqrt(maxf(.01,.11-pow((j-2.5)*.105,2)))*2),2) +func crate(p,size): + for side in [-1,1]: + for j in range(6): + piece(p+Vector3(side*size.x*.5,size.y*.5,(j-2.5)*size.z/6),Vector3(.06,size.y,size.z/6-.01),2) + piece(p+Vector3((j-2.5)*size.x/6,size.y*.5,side*size.z*.5),Vector3(size.x/6-.01,size.y,.06),2) + for y in [.1,size.y-.1]: + piece(p+Vector3(0,y,side*(size.z*.5+.04)),Vector3(size.x,.09,.05),0) + for x in [-size.x*.4,size.x*.4]:piece(p+Vector3(x,y,side*(size.z*.5+.08)),Vector3.ONE*.035,3) +func build(game): + g=game + # Dense wall-mounted hardware, leaving circulation around the workstation clear. + for x in [-7.65,7.65]: + for z in [-5,-3,-1,1,3,5]: + piece(Vector3(x,1.0,z),Vector3(.055,1.9,.12),0) + for y in [.2,.55,.9,1.25,1.6,1.9]:piece(Vector3(x-sign(x)*.05,y,z),Vector3(.035,.045,.045),3) + for y in [.55,1.45]:piece(Vector3(x,y,0),Vector3(.06,.08,12.0),0) + # Service pipes, flanges and a pressure vessel behind the playable space. + for y in [2.3,2.65]: + rod(Vector3(-2,y,-6.15),Vector3(7,y,-6.15),.085) + for x in [-1,1,3,5,7]: + rod(Vector3(x-.04,y,-6.15),Vector3(x+.04,y,-6.15),.14) + for j in range(6): + var a=j*TAU/6;piece(Vector3(x+.05,y+sin(a)*.115,-6.15+cos(a)*.115),Vector3.ONE*.035,3) + rod(Vector3(6.7,.1,-5.1),Vector3(6.7,1.9,-5.1),.42) + for y in [.25,1.7]:rod(Vector3(6.7,y-.04,-5.1),Vector3(6.7,y+.04,-5.1),.47) + rod(Vector3(6.7,1.9,-5.1),Vector3(6.7,2.65,-5.1),.09) + rod(Vector3(6.7,2.65,-5.1),Vector3(6.7,2.65,-6.15),.09) + for j in range(16): + var a=j*TAU/16;var b=(j+1)*TAU/16 + rod(Vector3(6.7+cos(a)*.25,1.2+sin(a)*.25,-4.6),Vector3(6.7+cos(b)*.25,1.2+sin(b)*.25,-4.6),.025) + for a in [0,PI/2]:rod(Vector3(6.7-cos(a)*.25,1.2-sin(a)*.25,-4.6),Vector3(6.7+cos(a)*.25,1.2+sin(a)*.25,-4.6),.025) + for p in [Vector3(-6.8,0,-5.3),Vector3(-7.0,0,-4.4),Vector3(5.4,0,-5.6)]:barrel(p) + crate(Vector3(4.5,0,-5.4),Vector3(.75,.60,.70));crate(Vector3(4.6,.62,-5.4),Vector3(.6,.45,.6)) + # Tools, hooks, a work table and suspended cables on the rear wall. + for x in [-2.3,-1.8,-1.3,-.8,-.3]: + rod(Vector3(x,1.1,-6.05),Vector3(x,1.9,-6.05),.023) + piece(Vector3(x,1.1,-6.02),Vector3(.17,.07,.07),0) + rod(Vector3(x,1.92,-6.15),Vector3(x,1.92,-5.95),.025) + for x in [-2.4,.5]: + for z in [-5.2,-5.8]:piece(Vector3(x,.45,z),Vector3(.08,.9,.08),2) + for j in range(5):piece(Vector3(-.95,.95,-5.8+j*.15),Vector3(3.1,.08,.14),2) + for j in range(10): + var x=-2.0+j*.24 + rod(Vector3(x,1.02,-5.65),Vector3(x+.12,1.02,-5.25),.016) + piece(Vector3(x+.12,1.02,-5.25),Vector3(.07,.06,.10),0) + # Loose masonry, chips, inset drains and fastening plates at the edges. + for j in range(100): + var x=-7.1+fmod(j*1.371,14.2);var z=-6.0+fmod(j*2.13,1.0) + if x < -3.8 and x > -6.7:continue + piece(Vector3(x,.09,z),Vector3(.06+fmod(j*.03,.12),.08,.12),4,Vector3(.1,j*1.7,.1)) + for z in [-2.3,2.6]: + piece(Vector3(-6.5,.045,z),Vector3(.8,.035,.5),0) + for j in range(8):piece(Vector3(-6.85+j*.1,.066,z),Vector3(.04,.025,.48),3) + for x in [-7.4,7.4]: + for z in range(-6,7): + piece(Vector3(x,.055,z),Vector3(.25,.03,.32),0) + for dz in [-.1,.1]:piece(Vector3(x,.08,z+dz),Vector3.ONE*.035,3) + # Wall reliefs and iron brackets add a second scale of detail above the tools. + for x in [-2.5,1.0,4.0,7.5]: + for y in [.35,1.35,2.35]: + piece(Vector3(x,y,-6.0),Vector3(.68,.12,.10),0) + for dx in [-.25,.25]:piece(Vector3(x+dx,y,-5.92),Vector3.ONE*.06,3) + for side in [-1,1]:rod(Vector3(x,2.75,-6.1),Vector3(x+side*.40,2.15,-6.1),.04) + # Equipment gantries and a hanging cage remain outside the navigable floor. + for x in [-8.8,8.8]: + for z in [-4,3.6]: + piece(Vector3(x,1.6,z),Vector3(.18,3.2,.18),0) + piece(Vector3(x-sign(x)*.45,3.2,z),Vector3(1.1,.16,.18),0) + rod(Vector3(x,2.5,z),Vector3(x-sign(x)*.8,3.2,z),.04) + for side in [-1,1]: + var p=Vector3(side*8.9,-.8,.5) + for j in range(12): + var a=j*TAU/12;rod(p+Vector3(cos(a)*.5,0,sin(a)*.5),p+Vector3(cos(a)*.5,1.6,sin(a)*.5),.022) + for y in [0,.7,1.6]: + for j in range(12): + var a=j*TAU/12;var a2=(j+1)*TAU/12 + rod(p+Vector3(cos(a)*.5,y,sin(a)*.5),p+Vector3(cos(a2)*.5,y,sin(a2)*.5),.035) + flush() + g.set_meta("dressing_parts",count) +func flush(): + var offsets=[Vector3.ZERO] + # Repeat the service infrastructure in neighbouring cells with instancing. + for p in g.architecture.detailed_positions:offsets.append(p) + for kind in batches: + var mesh: Mesh + if kind==1: + var cylinder=CylinderMesh.new();cylinder.top_radius=.5;cylinder.bottom_radius=.5;cylinder.height=1;cylinder.radial_segments=16;mesh=cylinder + else: + var box=BoxMesh.new();box.size=Vector3.ONE;mesh=box + var mm=MultiMesh.new();mm.transform_format=MultiMesh.TRANSFORM_3D;mm.mesh=mesh;mm.instance_count=batches[kind].size()*offsets.size() + var index=0 + var moving_wall_parts=[] + for offset in offsets: + for tr in batches[kind]: + var t=tr + if offset==Vector3.ZERO and t.origin.x>=7.35: + t.origin.x+=4.05 + moving_wall_parts.append({"index":index,"transform":t}) + t.origin+=offset;mm.set_instance_transform(index,t);index+=1 + var node=MultiMeshInstance3D.new();g.add_child(node);node.multimesh=mm + node.set_meta("right_wall_dressing",moving_wall_parts) + var mat=ShaderMaterial.new();mat.shader=preload("res://timber.gdshader") if kind==2 else preload("res://forged.gdshader") + mat.set_shader_parameter("tint",[Color("242621"),Color("373931"),Color("403326"),Color("615b48"),Color("494a42")][kind]);node.material_override=mat + node.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF diff --git a/Demon_v0.19/dungeon.gd b/Demon_v0.19/dungeon.gd new file mode 100644 index 0000000..35537ab --- /dev/null +++ b/Demon_v0.19/dungeon.gd @@ -0,0 +1,348 @@ +extends RefCounted +var g +var rng=RandomNumberGenerator.new() +var stone_cache={} +var fire_material: ShaderMaterial +var lava_material: ShaderMaterial +var iron=Color("292c29") +var brass=Color("82725b") + +func build(game): + g=game + rng.seed=40281 + light_scene() + fire_material=ShaderMaterial.new() + fire_material.shader=preload("res://fire.gdshader") + lava_material=ShaderMaterial.new() + lava_material.shader=preload("res://lava_v4.gdshader") + block(Vector3(0,-0.72,0),Vector3(16.5,1.3,13.4),Color("353b36"),0.16) + for row in range(13): + for col in range(12): + var x=-7.4+col*1.29+(0.16 if row%2 else -0.16) + block(Vector3(x,-0.10,-6.0+row),Vector3(1.24,0.24,0.95),Color("77717b").darkened(rng.randf_range(0.0,0.16)),0.055) + for x in range(-8,8): + for z in [-6.55,6.55]: block(Vector3(x+0.5,-0.32,z),Vector3(0.94,0.66,0.45),Color("68606b"),0.075) + for z in range(-6,7): + for x in [-8.1,8.1]: block(Vector3(x,-0.32,z),Vector3(0.45,0.66,0.94),Color("68606b"),0.075) + # Tall rear masonry and a lower side wall enclose the workshop. + for row in range(5): + for col in range(12): + var x=-7.6+col*1.4+(0.25 if row%2 else 0.0) + if x>-6.7 and x<-3.9: continue + block(Vector3(x,0.43+row*0.83,-6.85),Vector3(1.34,0.77,0.85),Color("565b55"),0.11) + for z in [-5.7,-4.25,-2.8,-1.35,0.1,1.55,3.0,4.45]: + for row in range(3): block(Vector3(-8.75,0.43+row*0.85,z),Vector3(0.85,0.78,1.38),Color("505650"),0.11) + for x in [-8.3,-3.5,1.0,5.4,8.3]: tower(Vector3(x,0,-6.7),4.6) + for z in [-3.3,1.0,5.4]: tower(Vector3(-8.65,0,z),3.0) + entrance(Vector3(-5.3,0,-6.4)) + for x in [-0.9,3.2,7.0]: banner(Vector3(x,3.1,-6.28)) + for x in [-3.5,1.0,5.4]: gargoyle(Vector3(x,3.1,-6.04),0.65) + workstation(g.STATION) + furnace(Vector3(6.2,0,-4.25)) + cage(Vector3(6.5,0,3.95)) + for p in [Vector3(-7.6,0,-1.0),Vector3(-7.6,0,5.5),Vector3(7.4,0,-1.9),Vector3(7.4,0,5.6)]: brazier(p,1.35) + for x in [-6.2,-3.4,0.0,3.4,6.2]: post(Vector3(x,0,6.45)) + for pair in [[-6.2,-3.4],[-3.4,0.0],[0.0,3.4],[3.4,6.2]]: chain(Vector3(pair[0],1.0,6.45),Vector3(pair[1],1.0,6.45)) + for z in [-4.8,-1.7,1.4,4.5]: post(Vector3(8.0,0,z)) + for z in [-4.8,-1.7,1.4]: chain(Vector3(8.0,1.0,z),Vector3(8.0,1.0,z+3.1)) + var lake=PlaneMesh.new() + lake.size=Vector2(70,60) + var surface=g.mesh_node(g,lake,Vector3(0,-1.8,-3),Color.WHITE) + surface.material_override=lava_material + for x in [-10.5,10.5]: + for z in [-7,0,7]: point_light(Vector3(x,-0.65,z),Color("ff4a10"),3.5,6.0) + for x in [-13.0,13.0]: + block(Vector3(x,-0.8,0),Vector3(4.0,1.3,28),Color("514a5b"),0.2) + for z in range(-12,14,3): tower(Vector3(x,0,z),rng.randf_range(2.0,4.0)) + for x in range(-14,15,3): + block(Vector3(x,-0.2,-11),Vector3(2.9,2.0,3.0),Color("534858"),0.2) + if x%2==0: brazier(Vector3(x,0.8,-10.5),1.1) + # Foreground terrace limits the lava to channels and frames the play area. + block(Vector3(0,-0.65,11.0),Vector3(36,1.5,7),Color("514857"),0.18) + for x in range(-17,18): + block(Vector3(x,0.08,7.65),Vector3(0.94,0.3,0.65),Color("74616d"),0.07) + if x%3==0: post(Vector3(x,0.20,7.65)) + for i in range(28): + var n=block(Vector3(rng.randf_range(-7.8,7.8),0.10,6.0),Vector3(rng.randf_range(0.10,0.3),0.15,0.18),Color("6f626b"),0.025) + n.rotation.y=rng.randf()*TAU + g.ring=g.torus(g,Vector3.ZERO,0.66,Color("8debd6")) + g.ring.visible=false + g.set_meta("visual_revision","0.4") + +func light_scene(): + var world=WorldEnvironment.new() + var e=Environment.new() + e.background_mode=Environment.BG_COLOR + e.background_color=Color("171221") + e.ambient_light_source=Environment.AMBIENT_SOURCE_COLOR + e.ambient_light_color=Color("818db9") + e.ambient_light_energy=0.30 + e.tonemap_mode=Environment.TONE_MAPPER_FILMIC + e.tonemap_exposure=1.05 + e.adjustment_enabled=true + e.adjustment_saturation=0.83 + e.adjustment_contrast=1.06 + e.ssao_enabled=true + e.ssao_radius=1.3 + e.ssao_intensity=1.7 + e.glow_enabled=true + e.glow_intensity=0.45 + e.glow_bloom=0.03 + e.glow_hdr_threshold=1.3 + e.fog_enabled=true + e.fog_light_color=Color("3d243a") + e.fog_light_energy=0.45 + e.fog_density=0.006 + world.environment=e + g.add_child(world) + var key=DirectionalLight3D.new() + g.add_child(key) + key.rotation_degrees=Vector3(-52,-30,0) + key.light_color=Color("a5b2d9") + key.light_energy=0.65 + key.shadow_enabled=true + key.directional_shadow_max_distance=65.0 + key.light_angular_distance=0.6 + +func point_light(p,c,energy,radius,shadow=false): + var n=OmniLight3D.new() + g.add_child(n) + n.position=p + n.light_color=c + n.light_energy=energy + n.omni_range=radius + n.omni_attenuation=1.4 + n.shadow_enabled=shadow + n.light_size=0.35 + return n + +func block(p,size,c,bevel=0.08): + var st=SurfaceTool.new() + st.begin(Mesh.PRIMITIVE_TRIANGLES) + var hx=size.x*0.5 + var hz=size.z*0.5 + var y=size.y*0.5 + var b=minf(bevel,minf(y*0.7,minf(hx,hz)*0.4)) + var corners=[Vector2(-hx+b,-hz),Vector2(hx-b,-hz),Vector2(hx,-hz+b),Vector2(hx,hz-b),Vector2(hx-b,hz),Vector2(-hx+b,hz),Vector2(-hx,hz-b),Vector2(-hx,-hz+b)] + var upper=[] + var rim=[] + var bottom=[] + for q in corners: + var jitter=0.0 + rim.append(Vector3(q.x,y-b+jitter,q.y)) + upper.append(Vector3(q.x*(1.0-b/hx),y+jitter,q.y*(1.0-b/hz))) + bottom.append(Vector3(q.x,-y,q.y)) + for i in range(8): + var j=(i+1)%8 + triangle(st,Vector3(0,y,0),upper[j],upper[i]) + quad(st,upper[i],upper[j],rim[j],rim[i]) + quad(st,rim[i],rim[j],bottom[j],bottom[i]) + var n=g.mesh_node(g,st.commit(),p,c) + var key=c.to_html() + if not stone_cache.has(key): + var m=ShaderMaterial.new() + m.shader=preload("res://stone.gdshader") + m.set_shader_parameter("tint",c) + m.set_shader_parameter("stone_tex",preload("res://art/stone_albedo.png")) + stone_cache[key]=m + n.material_override=stone_cache[key] + return n + +func triangle(st,a,b,c): + var normal=(b-a).cross(c-a).normalized() + for v in [a,c,b]: + st.set_normal(normal) + st.add_vertex(v) + +func quad(st,a,b,c,d): + triangle(st,a,b,c) + triangle(st,a,c,d) + +func tower(p,h): + block(p+Vector3(0,0.20,0),Vector3(1.5,0.4,1.5),Color("706170"),0.10) + for k in range(int(h/0.6)): + var n=block(p+Vector3(0,0.65+k*0.55,0),Vector3(1.05,0.52,1.07),Color("625767"),0.09) + n.rotation.y=0.025 if k%2 else -0.025 + block(p+Vector3(0,h,0),Vector3(1.4,0.3,1.4),Color("81717c"),0.08) + for side in [-1,1]: + spike(p+Vector3(side*0.46,h+0.18,0.46),0.12,0.55) + spike(p+Vector3(side*0.46,h+0.18,-0.46),0.12,0.55) + if h>4: + g.box(g,p+Vector3(0,2.8,0.58),Vector3(0.24,0.8,0.14),brass) + brazier(p+Vector3(0,h+0.15,0),0.25) + +func spike(p,r,h): + return g.cylinder(g,p+Vector3(0,h/2,0),r,h,iron,0) + +func post(p): + block(p+Vector3(0,0.15,0),Vector3(0.62,0.3,0.62),Color("766575"),0.06) + g.box(g,p+Vector3(0,0.64,0),Vector3(0.24,0.9,0.24),iron) + for y in [0.38,0.95]: g.box(g,p+Vector3(0,y,0),Vector3(0.34,0.12,0.34),brass) + spike(p+Vector3(0,1.08,0),0.23,0.5) + +func chain(a,b): + var count=maxi(1,int(a.distance_to(b)*7)) + var mesh=TorusMesh.new();mesh.inner_radius=.033;mesh.outer_radius=.123;mesh.rings=24;mesh.ring_segments=8 + var mm=MultiMesh.new();mm.transform_format=MultiMesh.TRANSFORM_3D;mm.mesh=mesh;mm.instance_count=count+1 + for i in range(count+1): + var t=float(i)/count + var basis=Basis.from_euler(Vector3(PI/2,0,PI/2 if i%2 else 0)).scaled(Vector3(1.25,.8,1)) + mm.set_instance_transform(i,Transform3D(basis,a.lerp(b,t)-Vector3.UP*sin(t*PI)*.32)) + var node=MultiMeshInstance3D.new();g.add_child(node);node.multimesh=mm;node.material_override=g.mat(iron) + +func brazier(p,h): + block(p+Vector3(0,0.13,0),Vector3(0.9,0.26,0.9),Color("6c5b67"),0.08) + block(p+Vector3(0,h/2,0),Vector3(0.58,h,0.58),Color("685364"),0.08) + g.cylinder(g,p+Vector3(0,h,0),0.47,0.24,iron,0.63) + g.torus(g,p+Vector3(0,h+0.13,0),0.55,brass).material_override=g.mat(brass) + for i in range(5): + var a=i*TAU/5 + spike(p+Vector3(cos(a)*0.5,h+0.12,sin(a)*0.5),0.07,0.5) + flame(p+Vector3(0,h+0.38,0),0.8) + point_light(p+Vector3(0,h+0.75,0),Color("ff872f"),4.2,6.2,true) + +func flame(p,size): + for angle in [0.0,PI/2]: + var mesh=QuadMesh.new() + mesh.size=Vector2(size,size*1.6) + var n=g.mesh_node(g,mesh,p+Vector3(0,size*0.55,0),Color.WHITE) + n.rotation.y=angle + n.material_override=fire_material + n.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + var embers=GPUParticles3D.new() + g.add_child(embers) + embers.position=p + embers.amount=12 + embers.lifetime=2.4 + embers.visibility_aabb=AABB(Vector3(-2,-1,-2),Vector3(4,5,4)) + var pm=ParticleProcessMaterial.new() + pm.direction=Vector3(0,1,0) + pm.spread=25 + pm.initial_velocity_min=0.45 + pm.initial_velocity_max=1.3 + pm.gravity=Vector3(0,0.25,0) + pm.scale_min=0.02 + pm.scale_max=0.055 + embers.process_material=pm + var em=SphereMesh.new() + em.radius=0.5 + em.height=1.0 + em.radial_segments=6 + em.rings=3 + var m=g.mat(Color("ffc75c"),true) + m.emission_energy_multiplier=3.0 + em.material=m + embers.draw_pass_1=em + +func entrance(p): + for s in [-1,1]: + for k in range(5): block(p+Vector3(s*1.25,0.4+k*0.72,0),Vector3(0.62,0.67,1.3),Color("62615a"),0.10) + for k in range(9): + var a=k*PI/8 + var n=block(p+Vector3(cos(a)*1.25,3.65+sin(a)*1.0,0),Vector3(0.58,0.72,1.3),Color("6d695e"),0.09) + n.rotation.z=a-PI/2 + var portal=g.box(g,p+Vector3(0,1.8,-0.38),Vector3(1.95,3.7,0.1),Color("142c36")) + portal.material_override=g.mat(Color("171b19")) + g.gate=Node3D.new() + g.gate.name="GatePortcullis" + g.add_child(g.gate) + g.gate.position=p + for x in [-0.7,-0.35,0.0,0.35,0.7]: g.cylinder(g.gate,Vector3(x,2.0,-0.25),0.035,3.7,iron) + for y in [0.8,2.0,3.4]: g.box(g.gate,Vector3(0,y,-0.25),Vector3(1.85,0.065,0.08),iron) + point_light(p+Vector3(0,1.3,0.8),Color("b4b9a7"),0.6,4) + g.sign3d("ПРИЁМ ДУШ",p+Vector3(0,4.7,0.1),Color("cbbfae"),27) + +func banner(p): + g.line(g,p+Vector3(-0.62,0.65,0),p+Vector3(0.62,0.65,0),0.05,brass) + var st=SurfaceTool.new() + st.begin(Mesh.PRIMITIVE_TRIANGLES) + var a=Vector3(-0.5,0.6,0) + var b=Vector3(0.5,0.6,0) + var c=Vector3(0.5,-0.85,0.04) + var d=Vector3(0,-1.15,0.08) + var e=Vector3(-0.5,-0.85,0.04) + triangle(st,a,c,b) + triangle(st,a,d,c) + triangle(st,a,e,d) + var n=g.mesh_node(g,st.commit(),p,Color("7c1930")) + n.material_override.cull_mode=BaseMaterial3D.CULL_DISABLED + g.ball(g,p+Vector3(0,-0.05,0.07),Vector3(0.36,0.48,0.08),Color("251c2a")) + for side in [-1,1]: + var horn=g.cylinder(g,p+Vector3(side*0.18,0.24,0.07),0.09,0.38,Color("251c2a"),0) + horn.rotation.z=-side*0.65 + +func workstation(p): + g.cylinder(g,p+Vector3(0,0.08,0),1.55,0.16,Color("453540")) + g.zone=g.torus(g,p+Vector3(0,0.18,0),1.48,Color("e3a850")) + for i in range(12): + var a=i*TAU/12 + var n=block(p+Vector3(cos(a)*1.35,0.17,sin(a)*1.35),Vector3(0.48,0.28,0.37),Color("8c6e6c"),0.06) + n.rotation.y=-a + g.ball(g,p+Vector3(cos(a)*1.38,0.34,sin(a)*1.38),Vector3.ONE*0.09,brass) + var mesh=PlaneMesh.new() + mesh.size=Vector2(1.7,1.7) + var heat=g.mesh_node(g,mesh,p+Vector3(0,0.11,0),Color.WHITE) + heat.material_override=lava_material + for x in [-0.7,-0.35,0.0,0.35,0.7]: g.box(g,p+Vector3(x,0.15,0),Vector3(0.12,0.08,1.8),iron) + point_light(p+Vector3(0,0.65,0),Color("ff7835"),1.6,3.5) + for x in [-1.25,1.25]: + block(p+Vector3(x,1.25,-1.6),Vector3(0.5,2.5,0.55),Color("75616e"),0.07) + g.box(g,p+Vector3(x,1.3,-1.29),Vector3(0.17,2.4,0.10),brass) + block(p+Vector3(0,2.65,-1.6),Vector3(3.2,0.5,0.8),Color("83707b"),0.08) + gargoyle(p+Vector3(0,2.70,-1.12),0.48) + gear(p+Vector3(1.6,1.18,-1.30),0.52) + gear(p+Vector3(1.45,2.12,-1.30),0.32) + for x in [-0.65,0.65]: g.cylinder(g,p+Vector3(x,1.95,-1.6),0.085,1.0,brass) + block(p+Vector3(0,1.48,-1.6),Vector3(1.85,0.38,0.72),Color("6f5865"),0.06) + for i in range(5): spike(p+Vector3(-1.2+i*0.6,2.9,-1.6),0.14,0.4) + +func furnace(p): + block(p+Vector3(0,0.25,0),Vector3(2.6,0.5,1.6),Color("75616a"),0.1) + for side in [-1,1]: block(p+Vector3(side*0.95,1.3,0),Vector3(0.55,2.1,1.4),Color("72616e"),0.1) + block(p+Vector3(0,2.4,0),Vector3(2.5,0.45,1.5),Color("806a76"),0.1) + flame(p+Vector3(0,0.65,0.05),1.1) + for x in [-0.5,-0.25,0,0.25,0.5]: g.cylinder(g,p+Vector3(x,1.1,0.72),0.035,1.4,iron) + point_light(p+Vector3(0,1.1,1.0),Color("ff681d"),4.0,5.5,true) + block(p+Vector3(0,2.9,-0.25),Vector3(1.1,0.65,1.0),Color("685460"),0.08) + +func cage(p): + g.cylinder(g,p+Vector3(0,0.2,0),1.0,0.4,Color("45313b")) + for i in range(10): + var a=i*TAU/10 + g.cylinder(g,p+Vector3(cos(a)*0.85,1.55,sin(a)*0.85),0.045,2.5,iron) + g.line(g,p+Vector3(cos(a)*0.85,2.8,sin(a)*0.85),p+Vector3(0,3.4,0),0.045,iron) + for y in [0.4,1.5,2.8]: g.torus(g,p+Vector3(0,y,0),0.86,brass).material_override=g.mat(iron) + flame(p+Vector3(0,0.35,0),0.65) + point_light(p+Vector3(0,1,0),Color("ff6228"),2.0,4) + +func gargoyle(p,s): + var art=preload("res://hero.gd").new() + art.g=g + var root=Node3D.new() + g.add_child(root) + root.position=p + root.scale=Vector3.ONE*s + art.loft(root,Vector3.ZERO,[[-0.7,0.15,0.12,0.0],[-0.48,0.33,0.22,0.06],[-0.1,0.42,0.27,0],[0.25,0.50,0.28,0],[0.43,0.3,0.2,0],[0.5,0.03,0.03,0]],Color("8b737a")) + for side in [-1,1]: + art.tube(root,[Vector3(side*0.32,0.30,0),Vector3(side*0.67,0.53,-0.04),Vector3(side*0.72,0.93,-0.08),Vector3(side*0.48,1.14,0)],[0.18,0.135,0.07,0.002],Color("6c5867")) + var brow=g.box(root,Vector3(side*0.23,0.12,0.24),Vector3(0.42,0.15,0.20),Color("9c7c7e")) + brow.rotation.z=side*0.35 + var eye=g.ball(root,Vector3(side*0.21,0.02,0.30),Vector3(0.15,0.09,0.10),Color("ff702c")) + eye.material_override=g.mat(Color("ff702c"),true) + art.tube(root,[Vector3(side*0.23,-0.34,0.25),Vector3(side*0.25,-0.14,0.34)],[0.07,0.002],Color("c4a082")) + g.ball(root,Vector3(0,-0.16,0.28),Vector3(0.20,0.32,0.22),Color("79616c")) + g.box(root,Vector3(0,-0.44,0.23),Vector3(0.3,0.08,0.05),Color("30212a")) + +func gear(p,r): + var n=Node3D.new() + g.add_child(n) + n.position=p + var hub=g.cylinder(n,Vector3.ZERO,r,0.18,brass) + hub.rotation.x=PI/2 + for i in range(12): + var a=i*TAU/12 + var tooth=g.box(n,Vector3(cos(a)*r,sin(a)*r,0),Vector3(0.15,0.22,0.22),iron) + tooth.rotation.z=a + if i%3==0: g.ball(n,Vector3(cos(a)*r*0.55,sin(a)*r*0.55,0.12),Vector3(0.09,0.09,0.04),Color("d2ae77")) + g.ball(n,Vector3(0,0,0.12),Vector3(0.20,0.20,0.08),iron) + g.moving_gears.append(n) diff --git a/Demon_v0.19/economy.gd b/Demon_v0.19/economy.gd new file mode 100644 index 0000000..146f155 --- /dev/null +++ b/Demon_v0.19/economy.gd @@ -0,0 +1,31 @@ +extends RefCounted +const START_GOLD=240 +const SPAWN_INTERVAL=5.0 +const XP_THRESHOLDS=[0,90,210,370,570,810,1090,1410,1770,2170] +const BASE_WORK_SECONDS=[1.8,3.0,5.0,3.35,6.0,7.0] +const TOOL_VALUE=[0,2,5,5,8,11] +const TOOL_PRICES=[40,80,120,170,220,280] +const BLUEPRINT_PRICES=[0,55,85,120,160,200] +const HIRE_PRICES=[6,18,36] +const HASTE_PRICES=[5,12,22] +const DILIGENCE_PRICES=[8,18,32] +const AUTOMATION_PRICE=4 +const PRESSURE_GRACE=12.0 +const PENALTY_INTERVAL=5.0 +const GOLD_RESERVE=60 +const SOUL_RESERVE=6 +static func level(xp): + var result=1 + for threshold in XP_THRESHOLDS: + if xp>=threshold:result=XP_THRESHOLDS.find(threshold)+1 + return result +static func tier(xp):return mini(4,int((level(xp)-1)/2)) +static func work_multiplier(xp):return 1.0+.18*(level(xp)-1) +static func recipe_size(_id,_xp,available): + return mini(1,available) +static func reward(required,xp): + var count=required.size();var value=0;var xp_bonus=0 + for kind in required:value+=TOOL_VALUE[kind];xp_bonus+=kind*2 + return {"gold":12+10*(count-1)+value+tier(xp)*2,"souls":count,"xp":18+12*(count-1)+xp_bonus} +static func penalty(xp,pressure_seconds): + return {"gold":3+tier(xp)*2+(2 if pressure_seconds>=30 else 0)+(3 if pressure_seconds>=60 else 0),"souls":2 if pressure_seconds>=45 else 1} diff --git a/Demon_v0.19/economy_capture.gd b/Demon_v0.19/economy_capture.gd new file mode 100644 index 0000000..29b3fda --- /dev/null +++ b/Demon_v0.19/economy_capture.gd @@ -0,0 +1,32 @@ +extends RefCounted +func shot(g,name): + await g.get_tree().process_frame + await RenderingServer.frame_post_draw + var folder="res://captures/v019" if OS.has_feature("editor") else OS.get_executable_path().get_base_dir()+"/captures/v019" + DirAccess.make_dir_recursive_absolute(folder) + if g.get_viewport().get_texture().get_image().save_png(folder+"/"+name+".png")!=OK: + push_error("ECONOMY CAPTURE failed");g.get_tree().quit(1);return + print("ECONOMY_CAPTURE: "+name) +func run(g): + await g.get_tree().create_timer(.4).timeout + g.start_game();g.set_process(false) + if is_instance_valid(g.life.hero_bubble):g.life.hero_bubble.hide() + var w=g.workshop;var dev=g.development + dev.xp=460;dev.points=2;dev.action_level=1;g.coins=387;g.essence=24 + 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.add_helper();w.automation=true;w.helper_speed=1;w.helper_diligence=1;w.rebuild_nav() + while w.queue_load()<7:w.spawn() + for i in range(g.souls.size()): + var s=g.souls[i];s.entering=false;s.entry_time=1;s.node.position=w.queue_target(i,7);g.set_soul_reveal(s.visual,1) + w.sentences.update_icons();w.refresh();dev.refresh() + w.update_pressure(3,7);await shot(g,"level-and-queue-warning") + w.pressure_time=34;w.penalty_clock=0;w.update_pressure(.1,7);w.darkness=.35;w.shade.color.a=.35 + await shot(g,"queue-penalty") + w.pressure_time=0;w.update_pressure(.1,0);w.shade.color.a=0 + w.toggle_tree();await shot(g,"grimoire-currencies") + for scroll in w.tree.find_children("*","ScrollContainer",true,false):scroll.scroll_vertical=10000 + await shot(g,"grimoire-lower-branches") + w.toggle_tree();w.toggle_build();w.click_station(0);w.update(0);await shot(g,"equipment-purchase-menu") + print("ECONOMY_CAPTURE_BUILD: "+g.build_id) + g.get_tree().quit() diff --git a/Demon_v0.19/economy_tests.gd b/Demon_v0.19/economy_tests.gd new file mode 100644 index 0000000..fe817d4 --- /dev/null +++ b/Demon_v0.19/economy_tests.gd @@ -0,0 +1,104 @@ +extends RefCounted +const E=preload("res://economy.gd") +var checks=0 +func check(ok,message): + checks+=1 + if not ok: + push_error("ECONOMY QA #%d: %s"%[checks,message]);Engine.get_main_loop().quit(1) +func run(g): + await g.get_tree().process_frame + g.start_game();g.set_process(false) + var w=g.workshop;var dev=g.development + check(g.coins==240 and g.essence==0 and dev.xp==0,"new game wallets") + w.upgrade("hire");check(w.helpers.is_empty(),"gold cannot hire a helper") + g.essence=6;var gold=g.coins;w.upgrade("hire") + check(w.helpers.size()==1 and g.essence==0 and g.coins==gold,"hire uses souls exclusively") + g.essence=4;w.upgrade("auto");check(w.automation and g.essence==0,"autonomous work uses souls") + g.essence=13;w.upgrade("haste");w.upgrade("diligence") + check(w.helper_speed==1 and w.helper_diligence==1 and g.essence==0 and g.coins==gold,"helper skills use souls") + g.essence=100;g.coins=0;w.upgrade("tool0") + check(g.coins==0 and g.essence==100,"removed tool upgrades cannot spend souls") + g.coins=240;w.upgrade("tool0");check(g.coins==240,"removed tool upgrades cannot spend gold") + check(w.node_buttons.all(func(n):return not n.key.begins_with("tool")),"no tool upgrade nodes in grimoire") + check(w.context.find_children("*","Button",true,false).size()==0,"selected tool menu has no action buttons") + check(w.buy_labels.all(func(l):return not "ранг" in l.text),"purchase catalogue has no equipment ranks") + w.upgrade("unlock1");check(w.unlock==1 and g.coins==185,"new apparatus purchases remain available") + var d=w.add_station(0,Vector3(0,0,0));var d2=w.add_station(0,Vector3(3,0,0)) + check(is_equal_approx(w.action_rate(d),1.0) and is_equal_approx(w.action_rate(d2),1.0),"tools have fixed base speed") + var points=dev.points;w.upgrade("power") + check(dev.action_level==0 and dev.points==points,"money cannot buy heroine level skills") + dev.reward(89);check(dev.points==0 and E.level(dev.xp)==1,"before first level threshold") + dev.reward(1);check(E.level(dev.xp)==2 and dev.points==1 and dev.xp_bar.value==0,"level grants one point and resets fill") + gold=g.coins;var souls=g.essence;w.upgrade("power") + check(dev.action_level==1 and dev.points==0 and g.coins==gold and g.essence==souls,"hero skill uses level point only") + check(is_equal_approx(w.action_rate(d),1.2/1.18),"manual work scales with heroine and difficulty") + d.operator=0 + check(is_equal_approx(w.action_rate(d),1.25/1.18),"helper uses diligence instead of heroine power") + dev.reward(280);check(dev.points==2 and E.level(dev.xp)==4,"multiple level thresholds") + w.upgrade("leadership");check(is_equal_approx(w.action_rate(d),1.25*1.08/1.54),"leadership helps the team") + d.operator=-1 + dev.reward(99999);check(dev.points==7 and E.level(dev.xp)==10 and dev.xp==2170,"bounded maximum level and total nine points") + dev.reward(100);check(dev.points==7 and dev.xp_bar.value==dev.xp_bar.max_value,"no repeated points at max level") + check(E.recipe_size(3,210,6)==1 and E.recipe_size(8,570,6)==1,"one apparatus per soul at every level") + for id in range(100): + check(E.recipe_size(id,2170,1)==1,"never require a missing tool") + check(E.recipe_size(id,2170,6)==1,"late game still requires exactly one apparatus") + check(E.reward([0],0)=={"gold":12,"souls":1,"xp":18},"base completion rewards") + check(E.reward([0,2],0)=={"gold":27,"souls":2,"xp":34},"multi-stage final rewards") + check(E.reward([0],0).gold==12,"fixed tool gold yield without ranks") + print("PASS: isolated currencies, level points, fixed tool stats, distinct worker skills, single-device assignments and level scaling") + g.reset_shift();g.start_game();g.set_process(false);w=g.workshop;dev=g.development + check(g.souls.is_empty(),"new shift starts without souls or apparatus") + w.update(30);g.spawn_soul() + check(g.souls.is_empty() and w.spawn_clock==0 and not w.spawn(),"empty workshop blocks every spawn path and holds the timer") + w.add_station(0,Vector3(0,0,0)) + w.update(4.99);check(g.souls.is_empty(),"first apparatus starts a fresh five-second countdown") + w.update(.02);check(g.souls.size()==1,"first soul arrives five seconds after construction") + w.toggle_build();var clock=w.spawn_clock;w.update(20) + check(g.souls.size()==1 and is_equal_approx(clock,w.spawn_clock),"construction freezes arrivals") + w.toggle_build() + g.coins=100;g.essence=20;dev.xp=210;dev.points=2 + dev.action_level=1 + w.update_pressure(120,7) + check(g.coins==100 and g.essence==20,"old escalating overflow fees are replaced by per-soul losses") + check(dev.xp==210 and dev.points==2 and dev.action_level==1,"idle loss mechanics preserve experience and character skills") + print("PASS: queue UI does not double-charge the new fixed soul-loss penalties") + w.add_station(0,Vector3(0,0,0));w.add_helper();w.automation=true;w.helper_diligence=2;w.helper_speed=1 + dev.leadership=1;g.coins=123;g.essence=45 + var snap=g.progress_snapshot();snap.workshop["tool_ranks"]=[3,3,3,3,3,3];var path="user://qa_economy_v019.json" + check(g.Progression.write_save(path,snap)==OK,"save written") + var saved=g.Progression.read_save(path,g.build_id) + DirAccess.remove_absolute(ProjectSettings.globalize_path(path)) + check(saved.coins==123 and saved.essence==45 and saved.development.leadership==1 and saved.development.xp==210,"wallet and heroine save round trip") + w.reset();w.restore(saved.workshop) + check(w.helpers.size()==1 and w.helper_diligence==2 and w.helper_speed==1 and w.automation,"assistant skills restored") + check(w.pressure_time==0 and w.stations.size()==1,"penalty pressure and layout restored") + check(not w.snapshot().has("tool_ranks"),"legacy tool ranks removed on save migration") + check(is_equal_approx(w.action_rate(w.stations[0]),1.2*1.08/1.36),"old saved upgrades give no hidden speed bonus") + g.reset_shift();check(g.essence==0 and g.coins==240 and dev.xp==0 and dev.leadership==0 and w.pressure_time==0,"new game reset") + print("PASS: save/load of wallets, levels, apparatus purchases, helper upgrades and pressure; new game reset") + g.game_started=true;g.paused=false;g.menu.show_page("") + var cash=g.coins + for physical_only in [false,true]: + for down in [true,false]: + var key=InputEventKey.new();key.keycode=0 if physical_only else KEY_F5;key.physical_keycode=KEY_F5;key.pressed=down + Input.parse_input_event(key) + await g.get_tree().process_frame + check(g.coins==cash+2000,"F5 adds exactly 1000 per key press") + check(g.essence==g.Progression.MAX_RESOURCE and dev.xp==E.XP_THRESHOLDS.back() and E.level(dev.xp)==10,"F5 fills souls and maximum experience") + check(dev.points==9,"F5 grants maximum available skill points") + w.upgrade("speed");w.upgrade("power");w.upgrade("leadership") + check(dev.points==6,"three learned skills consume three points") + g.essence=12;cash=g.coins;dev.test_boost() + check(g.coins==cash+1000 and g.essence==g.Progression.MAX_RESOURCE and dev.points==6,"repeat boost refills souls without duplicating skill points") + var repeat=InputEventKey.new();repeat.keycode=KEY_F5;repeat.physical_keycode=KEY_F5;repeat.pressed=true;repeat.echo=true + cash=g.coins;Input.parse_input_event(repeat);await g.get_tree().process_frame + check(g.coins==cash,"holding F5 does not repeatedly grant gold") + snap=g.progress_snapshot();path="user://qa_f5_v019.json" + check(g.Progression.write_save(path,snap)==OK,"F5 bonus save written") + saved=g.Progression.read_save(path,g.build_id);DirAccess.remove_absolute(ProjectSettings.globalize_path(path)) + check(saved.essence==g.Progression.MAX_RESOURCE and saved.development.xp==E.XP_THRESHOLDS.back() and saved.development.points==6,"maximum souls, experience and remaining points survive save reload") + check(g.gold_value.text==str(g.coins) and g.souls_value.text==str(g.essence),"F5 refreshes both resource counters") + print("PASS: F5 +1000 gold per press, 10 million souls, maximum experience, no duplicate skill points, held-key protection and save round trip") + print("ALL ECONOMY TESTS PASSED — DEMON 0.19 (%d checks)"%checks) + g.get_tree().quit() diff --git a/Demon_v0.19/endless.gd b/Demon_v0.19/endless.gd new file mode 100644 index 0000000..cfa3ec3 --- /dev/null +++ b/Demon_v0.19/endless.gd @@ -0,0 +1,199 @@ +extends RefCounted +var g +var d +var batches={} +var walls=[] +var room_count=0 +var growth=preload("res://room_growth.gd").new() +var exit_gate: Node3D +var detailed_positions=[] +var braziers=[] +var stone=Color("565853") +var iron=Color("242726") +func cube(pos,scale,kind=0): + if not batches.has(kind):batches[kind]=[] + batches[kind].append(Transform3D(Basis.from_scale(scale),pos)) +func build(game): + g=game;d=g.dungeon;d.g=g;d.rng.seed=40281 + d.light_scene() + d.fire_material=ShaderMaterial.new();d.fire_material.shader=preload("res://fire.gdshader") + d.lava_material=ShaderMaterial.new();d.lava_material.shader=preload("res://lava_v4.gdshader") + # The player's work cell: worn masonry rather than a detached lava arena. + d.block(Vector3(2.025,-0.65,0),Vector3(20.25,1.25,13.4),stone,0.08) + for row in range(28): + for col in range(40): + var p=Vector3(-7.75+col*.5,-0.08,-6.55+row*0.48) + var tile=d.block(p,Vector3(0.475,0.18,0.455),stone.darkened(float((row*7+col*3)%5)*0.035),0.025) + tile.set_meta("tile_group",(row*7+col*3)%5) + batch_floor() + d.entrance(Vector3(-5.3,0,-6.4)) + var entrance_gate=g.gate;var existing=g.get_children();var exit_at=Vector3(-5.3,0,6.4) + d.entrance(exit_at);exit_gate=g.gate;exit_gate.position.y=3.5;exit_gate.hide();g.gate=entrance_gate + for node in g.get_children(): + if node in existing or not node is Node3D:continue + node.position=exit_at+(node.position-exit_at).rotated(Vector3.UP,PI);node.rotation.y+=PI + if node is Label3D:node.text="ВЫХОД ДУШ" + for i in range(6):braziers.append(brazier(Vector3.ZERO)) + g.zone=g.torus(g,Vector3.ZERO,1,Color("746348"));g.zone.hide() + g.ring=g.torus(g,Vector3.ZERO,.62,Color("b0b9ac"));g.ring.hide() + # Hundreds of cheap repeated cells below and around the playable room. + for level in range(3): + for gx in range(-5,6): + for gz in range(-5,6): + if level==0 and gx==0 and gz==0:continue + cell(Vector3(preload("res://room_growth.gd").neighbour_x(gx),-level*10.0,gz*20.0),gx,gz,level) + flush() + detailed_cells() + preload("res://lava_channels.gd").new().build(g) + var env=g.get_children().filter(func(n):return n is WorldEnvironment)[0].environment + env.background_color=Color("1b211f");env.ambient_light_color=Color("a8b2ae");env.ambient_light_energy=0.17 + env.fog_light_color=Color("24221d");env.fog_density=0.0045;env.fog_light_energy=0.55 + env.volumetric_fog_enabled=true;env.volumetric_fog_density=.001;env.volumetric_fog_albedo=Color("a09683");env.volumetric_fog_length=75.0 + env.glow_intensity=0.22;env.glow_bloom=0.0;env.adjustment_saturation=0.82;env.tonemap_exposure=1.0 + for n in g.get_children(): + if n is DirectionalLight3D:n.light_color=Color("bcc4bd");n.light_energy=0.80 + atmosphere() + g.set_meta("dressing_parts",0) + g.set_meta("endless_room_count",room_count+1) + g.set_meta("level_area_scale",1.25) + g.set_meta("main_floor_tiles",1120) + growth.setup(g) + +func timber(n): + var m=ShaderMaterial.new();m.shader=preload("res://timber.gdshader");n.material_override=m +func brazier(at): + var root=Node3D.new();root.name="RoomBrazier";root.set_meta("room_brazier",true);g.add_child(root) + var existing=g.get_children();var p=Vector3.ZERO + g.cylinder(g,p+Vector3(0,0.75,0),0.30,0.20,iron,0.4) + for i in range(8): + var a=i*TAU/8;g.line(g,p+Vector3(cos(a)*0.30,0.7,sin(a)*0.30),p+Vector3(cos(a)*0.4,1.18,sin(a)*0.4),0.025,iron) + for x in [-0.22,0.22]:g.line(g,p+Vector3(x,0,0),p+Vector3(x,0.75,0),0.045,iron) + d.flame(p+Vector3(0,0.95,0),0.55) + d.point_light(p+Vector3(0,1.45,0),Color("ff9f50"),4.5,7,true) + for node in g.get_children(): + if node in existing:continue + if node is GPUParticles3D:node.local_coords=true + node.reparent(root) + root.position=at + return root + +func arrange_braziers(left,right): + var positions=[] + for x in [left+1.0,right-1.0]: + for z in [-5.6,5.6]:positions.append(Vector3(x,0,z)) + for z in [-5.6,5.6]:positions.append(Vector3((left+right)*.5,0,z)) + for i in range(braziers.size()):braziers[i].position=positions[i] + + +func cell(p,gx,gz,level): + room_count+=1 + cube(p+Vector3(0,-0.5,0),Vector3(15.8,1,13.1)) + for part in preload("res://castle_walls.gd").layout(-7.7,7.7,6.3,0.0): + cube(p+part.position,part.size) + for x in [-7.7,7.7]: + for z in [-6.3,6.3]:cube(p+Vector3(x,-5,z),Vector3(1,10,1)) + cube(p+Vector3(11,-0.05,0),Vector3(6.2,0.25,2.1)) + cube(p+Vector3(0,-0.05,10),Vector3(2.1,0.25,7)) + for side in [-1,1]: + cube(p+Vector3(11,0.8,side*1.1),Vector3(6.2,0.06,0.06),1) + cube(p+Vector3(side*1.1,0.8,10),Vector3(0.06,0.06,7),1) + if abs(gx)+abs(gz)<3:detailed_positions.append(p) + # Small repeating silhouettes and equipment sell scale without full actor rigs. + if abs(gx)+abs(gz)>=3:cube(p+Vector3(2,0.65,0),Vector3(1.4,0.2,2.8),2) + for x in [1.4,2.6]:cube(p+Vector3(x,0.3,0),Vector3(0.13,0.6,2.8),2) + if abs(gx)+abs(gz)>=3:cube(p+Vector3(4,1.1,-3),Vector3(1,2.2,0.65),1) + for x in [-5,5]: + cube(p+Vector3(x,0.9,-4.6),Vector3(0.45,0.18,0.45),1) + cube(p+Vector3(x,1.1,-4.6),Vector3(0.16,0.35,0.16),3) + var worker=p+Vector3(-1.3+(gx%2),0,1) + cube(worker+Vector3(0,0.95,0),Vector3(0.38,0.75,0.25),1) + cube(worker+Vector3(0,1.55,0),Vector3(0.24,0.28,0.22),2) + for x in [-0.11,0.11]:cube(worker+Vector3(x,0.34,0),Vector3(0.12,0.7,0.15),1) + if abs(gx)+abs(gz)<3: + for x in [-5,5]: + d.point_light(p+Vector3(x,1.6,-4.6),Color("ff984a"),5,8,false) + d.flame(p+Vector3(x,1.15,-4.6),0.65) + +func flush(): + for kind in batches: + var mesh=BoxMesh.new();mesh.size=Vector3.ONE + var mm=MultiMesh.new();mm.transform_format=MultiMesh.TRANSFORM_3D;mm.mesh=mesh;mm.instance_count=batches[kind].size() + for i in range(mm.instance_count):mm.set_instance_transform(i,batches[kind][i]) + var node=MultiMeshInstance3D.new();g.add_child(node);node.multimesh=mm + var mat=g.mat([Color("3d4440"),Color("252b28"),Color("463b2c"),Color("d4833c")][kind]) + if kind==3:mat.emission_enabled=true;mat.emission=Color("e2a05f");mat.emission_energy_multiplier=1.3 + if kind==0: + var masonry=ShaderMaterial.new();masonry.shader=preload("res://masonry.gdshader");masonry.set_shader_parameter("stone_tex",preload("res://art/stone_albedo.png"));node.material_override=masonry + else:node.material_override=mat + node.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + +func update(camera): + # Cut away near-side upper walls, so 360-degree orbit cannot hide the work bay. + for n in walls: + if not is_instance_valid(n):continue + var center=g.CAMERA_TARGET+Vector3(growth.extra_width(growth.level)*.35,0,0) + var v=n.get_meta("wall_normal",n.global_position-center) + var c=camera.position-center + n.visible=Vector2(v.x,v.z).dot(Vector2(c.x,c.z))<0 + +func details(): + # Small floor drains and repairs break up the otherwise uniform masonry. + for z in [-4.0,3.8]: + g.box(g,Vector3(4.9,.025,z),Vector3(1.2,.03,.55),Color("131714")) + for i in range(9):g.box(g,Vector3(4.35+i*.14,.048,z),Vector3(.055,.035,.55),iron) + for i in range(9): + var p=Vector3(-6.8+i*.14,.09,-2.2) + g.cylinder(g,p,.065,.13,Color("5d5547")) + # Long hanging chains make the vertical repetition visible beyond the room. + for x in [-9.2,9.2]: + for z in [-8.1,8.1]:d.chain(Vector3(x,4,z),Vector3(x,-23,z)) + +func detailed_cells(): + for kind in [1,2,3]: + var template=Node3D.new();g.add_child(template) + var state={"device":template,"selected":kind,"flame":null} + preload("res://equipment.gd").new().build(g,state) + preload("res://mesh_walking.gd").new().build(template) + var locations=[] + for i in range(detailed_positions.size()): + if i%3==kind-1:locations.append(detailed_positions[i]+Vector3(2,0,0)) + bake_repeated(template,locations) + template.queue_free() +func bake_repeated(root,locations): + var queue=[root] + while not queue.is_empty(): + var n=queue.pop_back() + for child in n.get_children():queue.append(child) + if n is CollisionShape3D: + for location in locations: + if absf(location.y)>.1 or absf(location.z)>20.1 or location.x< -22.1 or location.x>40.1:continue + var body=StaticBody3D.new();body.collision_layer=2;body.collision_mask=0;g.add_child(body) + var tr=n.global_transform;tr.origin+=location;body.transform=tr + var shape=CollisionShape3D.new();shape.shape=n.shape;body.add_child(shape) + if not n is MeshInstance3D or not n.visible:continue + var mm=MultiMesh.new();mm.transform_format=MultiMesh.TRANSFORM_3D;mm.mesh=n.mesh;mm.instance_count=locations.size() + for i in range(locations.size()): + var tr=n.global_transform;tr.origin+=locations[i];mm.set_instance_transform(i,tr) + var instance=MultiMeshInstance3D.new();g.add_child(instance);instance.multimesh=mm;instance.material_override=n.material_override + instance.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + +func atmosphere(): + for p in [Vector3(-8.5,1.5,-5),Vector3(12.55,1.8,3),Vector3(2,1.8,-9),Vector3(-10,-2,0)]: + for j in range(2): + var mesh=QuadMesh.new();mesh.size=Vector2(3.0,5.5) + var n=g.mesh_node(g,mesh,p,Color.WHITE);n.rotation.y=.45+j*PI/2 + var mat=ShaderMaterial.new();mat.shader=preload("res://haze.gdshader");mat.set_shader_parameter("phase",float(j)+p.x);n.material_override=mat;n.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + +func batch_floor(): + var groups={} + for n in g.get_children(): + if n.has_meta("tile_group"): + var key=n.get_meta("tile_group") + if not groups.has(key):groups[key]=[] + groups[key].append(n) + for key in groups: + var tiles=groups[key] + var mm=MultiMesh.new();mm.transform_format=MultiMesh.TRANSFORM_3D;mm.mesh=tiles[0].mesh;mm.instance_count=tiles.size() + for i in range(tiles.size()):mm.set_instance_transform(i,tiles[i].transform) + var node=MultiMeshInstance3D.new();g.add_child(node);node.multimesh=mm;node.material_override=tiles[0].material_override;node.set_meta("main_floor",true) + for tile in tiles:tile.queue_free() diff --git a/Demon_v0.19/equipment.gd b/Demon_v0.19/equipment.gd new file mode 100644 index 0000000..7197730 --- /dev/null +++ b/Demon_v0.19/equipment.gd @@ -0,0 +1,134 @@ +extends RefCounted +var g +var wood=Color("573927") +var iron=Color("343730") +var brass=Color("8e8066") +func beam(root,a,b,r=0.09,c=Color("573927")): + g.line(root,a,b,r,c) +func rim(root,radius,width,color): + var mesh=TorusMesh.new();mesh.inner_radius=radius-width;mesh.outer_radius=radius+width;mesh.rings=128;mesh.ring_segments=20 + var n=g.mesh_node(root,mesh,Vector3.ZERO,color);n.rotation.x=PI/2 + return n +func wheel(root,radius): + var n=Node3D.new();root.add_child(n) + rim(n,radius,0.10,wood);rim(n,radius+0.08,0.025,iron) + for i in range(12): + var a=i*TAU/12 + beam(n,Vector3.ZERO,Vector3(cos(a),sin(a),0)*radius,0.065) + g.ball(n,Vector3(cos(a),sin(a),0.105)*radius,Vector3.ONE*0.065,brass) + var hub=g.cylinder(n,Vector3.ZERO,0.18,0.35,iron);hub.rotation.x=PI/2 + return n +func build(game,d): + g=game + if d.selected>=4: + preload("res://new_equipment.gd").new().build(g,d) + return + var root=d.device + if d.selected==0: + preload("res://pillory.gd").new().build(g,d) + return + if d.selected==1: + # Long timber bed, end rollers, iron straps and a separate winding crank. + for x in [-0.70,0.70]: + g.box(root,Vector3(x,0.84,0),Vector3(0.18,0.28,3.15),wood) + for z in [-1.3,1.3]: + g.box(root,Vector3(x,0.4,z),Vector3(0.23,0.8,0.25),wood) + g.box(root,Vector3(x,0.68,z),Vector3(0.25,0.14,0.27),iron) + for j in range(10):g.box(root,Vector3(0,0.86,-1.17+j*0.26),Vector3(1.3,0.14,0.23),wood.lightened((j%3)*0.04)) + for z in [-1.4,1.4]: + var roller=g.cylinder(root,Vector3(0,1.08,z),0.16,1.75,wood);roller.rotation.z=PI/2 + for x in [-0.48,0.48]: + beam(root,Vector3(x,1.16,z),Vector3(x,1.12,sign(z)*0.72),0.022,Color("bda27a")) + for x in [-0.72,0.72]: + for z in [-1.35,-0.5,0.5,1.35]: + g.box(root,Vector3(x,0.87,z),Vector3(0.2,0.31,0.07),iron) + g.ball(root,Vector3(x,1.04,z),Vector3.ONE*0.07,brass) + d.crank=wheel(root,0.36);d.crank.position=Vector3(1.0,1.1,1.4);d.crank.rotation.y=PI/2 + beam(d.crank,Vector3(0.36,0,0),Vector3(0.36,0,0.3),0.055,iron) + elif d.selected==2: + for x in [-0.55,0.55]: + beam(root,Vector3(x,0,-0.7),Vector3(0,1.6,-0.45),0.14) + beam(root,Vector3(x,0,0.6),Vector3(0,1.6,-0.45),0.14) + g.box(root,Vector3(0,0.12,0),Vector3(1.7,0.22,1.5),wood) + d.crank=wheel(root,1.28);d.crank.position=Vector3(0,1.62,0) + for x in [-0.72,0.72]: + for y in [-0.62,0.62]: + pass # Bone-following leather cuffs are supplied by apparatus_motion. + else: + # Body-shaped iron shell with rounded shoulders, face and two hinged leaves. + root.scale=Vector3(1.25,1.12,1.2) + var sculpt=preload("res://hero.gd").new();sculpt.g=g + g.cylinder(root,Vector3(0,0.13,0),0.95,0.26,iron) + var profile=[[0.25,0.56],[0.8,0.67],[1.5,0.74],[2.1,0.64],[2.4,0.40],[2.65,0.28]] + for j in range(profile.size()-1): + var y=(profile[j][0]+profile[j+1][0])/2.0 + var h=profile[j+1][0]-profile[j][0] + var w=(profile[j][1]+profile[j+1][1])/2.0 + for i in range(9): + var a=PI+i*PI/8 + var n=g.box(root,Vector3(cos(a)*w,y,sin(a)*0.52),Vector3(0.30,h+0.02,0.12),iron);n.rotation.y=-a+PI/2 + d.door=Node3D.new();root.add_child(d.door);d.door.position=Vector3(-0.69,0,0.10) + d.second_door=Node3D.new();root.add_child(d.second_door);d.second_door.position=Vector3(0.69,0,0.10) + for side in [-1,1]: + var leaf=d.door if side<0 else d.second_door + for j in range(profile.size()-1): + var y=(profile[j][0]+profile[j+1][0])/2.0;var h=profile[j+1][0]-profile[j][0] + var w=(profile[j][1]+profile[j+1][1])/2.0 + g.box(leaf,Vector3(-side*(0.69-w/2),y,0.44),Vector3(w,h+0.01,0.14),iron.lightened(0.07)) + for y in [0.5,1.2,1.9]: + g.box(leaf,Vector3(-side*0.34,y,0.54),Vector3(0.62,0.06,0.06),brass) + for x in [0.13,0.55]:g.ball(leaf,Vector3(-side*x,y,0.59),Vector3.ONE*0.065,brass) + sculpt.loft(leaf,Vector3(-side*0.55,0,0.43),[[2.35,0.15,0.08,0],[2.5,0.2,0.16,0],[2.73,0.15,0.13,0],[2.83,0.01,0.04,0]],brass) + g.ball(leaf,Vector3(-side*0.55,2.58,0.58),Vector3(0.09,0.035,0.03),Color("19151b")) + d.crank=wheel(root,0.32);d.crank.position=Vector3(1.0,1.05,0.1) + beam(root,Vector3(0.7,0.2,0),Vector3(1,0.2,0),0.10,iron) + beam(root,Vector3(1,0.2,0),Vector3(1,1,0),0.10,iron) + d.flame=g.ball(root,Vector3(0,0.3,0),Vector3(1,0.5,0.9),Color("ff8735"));d.flame.material_override=g.mat(Color("ff8735"),true);d.flame.hide() + d.door.rotation.y=-1.8;d.second_door.rotation.y=1.8 + add_detail(root,d) + var queue=[root] + while not queue.is_empty(): + var n=queue.pop_back() + for child in n.get_children():queue.append(child) + if n is MeshInstance3D and n.material_override is StandardMaterial3D and n!=d.flame: + var color=n.material_override.albedo_color + var mat=ShaderMaterial.new() + mat.shader=preload("res://timber.gdshader") if color.r>color.g*1.25 and color.r<0.5 else preload("res://forged.gdshader") + mat.set_shader_parameter("tint",color) + n.material_override=mat + +func add_detail(root,d): + if d.selected==1: + for z in [-1.4,1.4]: + # Actual helical rope wound around both rollers. + for i in range(100): + var a=i*.65;var b=(i+1)*.65 + var x=-.62+i*.0124 + beam(root,Vector3(x,1.08+cos(a)*.175,z+sin(a)*.175),Vector3(x+.0124,1.08+cos(b)*.175,z+sin(b)*.175),.009,Color("918066")) + for x in [-.82,.82]: + var cap=g.cylinder(root,Vector3(x,1.08,z),.21,.06,iron);cap.rotation.z=PI/2 + for j in range(8): + var a=j*TAU/8;g.ball(root,Vector3(x,1.08+sin(a)*.17,z+cos(a)*.17),Vector3.ONE*.037,brass) + for x in [-.7,.7]: + for z in [-1.25,1.25]: + beam(root,Vector3(x,.15,z),Vector3(x,.72,z-sign(z)*.55),.045,iron) + for y in [.15,.35,.65]:g.ball(root,Vector3(x+sign(x)*.12,y,z),Vector3.ONE*.045,brass) + elif d.selected==2: + for j in range(36): + var a=j*TAU/36 + g.ball(d.crank,Vector3(cos(a)*1.28,sin(a)*1.28,.12),Vector3.ONE*.05,brass) + if j%3==0: + var plate=g.box(d.crank,Vector3(cos(a)*1.20,sin(a)*1.20,.11),Vector3(.09,.21,.03),iron);plate.rotation.z=a-PI/2 + for j in range(24): + var a=j*TAU/24 + var tooth=g.box(d.crank,Vector3(cos(a)*.30,sin(a)*.30,-.12),Vector3(.07,.09,.08),iron);tooth.rotation.z=a + elif d.selected==3: + for side in [-1,1]: + var leaf=d.door if side<0 else d.second_door + for y in [.35,.75,1.15,1.55,1.95,2.25]: + g.cylinder(leaf,Vector3(0,y,.1),.055,.16,brass) + for x in [.08,.59]:g.ball(leaf,Vector3(-side*x,y,.56),Vector3.ONE*.045,brass) + for j in range(7):g.box(leaf,Vector3(-side*(.15+j*.055),.32,.56),Vector3(.018,.13,.025),Color("111411")) + var handle=g.torus(leaf,Vector3(-side*.48,1.3,.62),.075,iron);handle.rotation.x=PI/2;handle.material_override=g.mat(iron) + for j in range(24): + var a=j*TAU/24;g.ball(root,Vector3(cos(a)*.85,.2,sin(a)*.85),Vector3.ONE*.06,brass) diff --git a/Demon_v0.19/expansion_regression_tests.gd b/Demon_v0.19/expansion_regression_tests.gd new file mode 100644 index 0000000..fc25be5 --- /dev/null +++ b/Demon_v0.19/expansion_regression_tests.gd @@ -0,0 +1,69 @@ +extends RefCounted +var failures=0 +func check(ok,label): + if not ok:failures+=1;push_error("EXPANSION QA: "+label) +func key(g,code,down): + var event=InputEventKey.new();event.keycode=code;event.physical_keycode=code;event.pressed=down + Input.parse_input_event(event);Input.flush_buffered_events() +func shot(g,name): + await g.get_tree().process_frame;await RenderingServer.frame_post_draw + g.get_viewport().get_texture().get_image().save_png("res://captures/expansion-fix/"+name+".png") +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false;g.coins=3000 + var w=g.workshop;w.toggle_build();g.orbit.yaw=0;g.orbit.pitch=.8;g.orbit.update(1) + DirAccess.make_dir_recursive_absolute("res://captures/expansion-fix") + for rank in range(1,4): + var zoom=g.camera.size;var view=g.camera.position + # Use the same real press/release route as the purchase button. + await preload("res://workshop_tests.gd").new().click(g,w.expansion_button) + check(w.expansion_level==rank,"real mouse buys expansion %d"%rank) + g.orbit.update(0) + check(g.camera.size==zoom and g.camera.position.distance_to(view)<.001,"purchase preserves camera view and zoom") + check(w.grid_area().x==floorf(w.build_area().x),"no fractional last strip") + var mesh=w.grid.get_child(0) + check(mesh.mesh.size==w.grid_area() and mesh.material_override.get_shader_parameter("grid_area")==w.grid_area(),"mesh and shader use same whole-cell boundary") + # Every orientation of every footprint can use the final full column. + w.unlock=5 + for kind in range(6): + for turn in range(4): + var size=w.footprint(kind,turn) + var at=Vector3(w.ORIGIN.x+w.grid_area().x-size.x*.5,0,w.ORIGIN.y+size.y*.5+2) + check(w.snap_to_grid(at,kind,turn).is_equal_approx(at) and w.valid_position(at,kind,-1,turn),"last full column accepts footprint %d/%d at rank %d"%[kind,turn,rank]) + # Fly well beyond both old clamps, then return through the room. + g.orbit.yaw=0 + key(g,KEY_D,true) + for frame in range(300):w.update(1.0/30) + key(g,KEY_D,false) + check(g.orbit.pan.x>60,"camera keeps flying past former right limit") + var right=g.orbit.pan.x;key(g,KEY_A,true) + for frame in range(600):w.update(1.0/30) + key(g,KEY_A,false) + check(g.orbit.pan.x< -30 and g.orbit.pan.x.01,"Shift middle mouse pans after purchase") + var release=middle.duplicate();release.pressed=false;Input.parse_input_event(release);Input.flush_buffered_events() + g.camera.position=Vector3(16,24,28);g.camera.look_at(Vector3(7,0,0));g.camera.size=28;g.architecture.update(g.camera);w.catalogue.hide() + w.begin_purchase(0) + var at=Vector3(w.ORIGIN.x+w.grid_area().x-1,0,0) + var point=g.camera.unproject_position(at) + var move=InputEventMouseMotion.new();move.position=point;move.global_position=point;Input.parse_input_event(move) + await g.get_tree().process_frame + var press=InputEventMouseButton.new();press.button_index=MOUSE_BUTTON_LEFT;press.pressed=true;press.position=point;press.global_position=point;Input.parse_input_event(press) + await g.get_tree().process_frame + var up=press.duplicate();up.pressed=false;Input.parse_input_event(up) + await g.get_tree().process_frame + check(w.stations.size()==1 and w.stations[0].device.position.distance_to(at)<.01,"real mouse places station in final column") + await shot(g,"last-column-rank-%d"%rank) + if not w.stations.is_empty():w.selected=0;w.delete_selected() + w.catalogue.show() + g.orbit.update(1) + var snap=w.snapshot();w.reset();w.restore(snap);w.toggle_build() + check(w.expansion_level==3 and w.grid_area()==Vector2(20,9),"loaded expansion uses full cells") + print("EXPANSION QA ","PASSED" if failures==0 else "FAILED",": real purchases, whole final columns, all footprints, camera view, long WASD flight, rotation, Shift pan and save restore") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/export_presets.cfg b/Demon_v0.19/export_presets.cfg new file mode 100644 index 0000000..f4a75bd --- /dev/null +++ b/Demon_v0.19/export_presets.cfg @@ -0,0 +1,27 @@ +[preset.0] +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="AUDIO_CREDITS.md,MODEL_CREDITS.md" +exclude_filter="captures/*,*.log,README_RU.md,ART_DIRECTION.md,addons/*,qa/*" +export_path="../Demon_v0.19_Windows/Demon.exe" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +[preset.0.options] +custom_template/debug="" +custom_template/release="../tools/templates/windows_release_x86_64.exe" +debug/export_console_wrapper=0 +binary_format/embed_pck=true +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +binary_format/architecture="x86_64" +codesign/enable=false +application/modify_resources=false diff --git a/Demon_v0.19/fantasy_theme.tres b/Demon_v0.19/fantasy_theme.tres new file mode 100644 index 0000000..0312b5d --- /dev/null +++ b/Demon_v0.19/fantasy_theme.tres @@ -0,0 +1,7 @@ +[gd_resource type="Theme" load_steps=2 format=3] + +[ext_resource type="FontVariation" path="res://art/fonts/body_bold.tres" id="1"] + +[resource] +default_font = ExtResource("1") +default_font_size = 19 diff --git a/Demon_v0.19/fire.gdshader b/Demon_v0.19/fire.gdshader new file mode 100644 index 0000000..8333805 --- /dev/null +++ b/Demon_v0.19/fire.gdshader @@ -0,0 +1,14 @@ +shader_type spatial; +render_mode unshaded, cull_disabled, depth_draw_never; +void fragment(){ + vec2 p=UV; + float t=TIME*3.0; + float wiggle=sin(p.y*10.0-t)*0.075*p.y+sin(p.y*19.0+t*1.3)*0.025; + float width=0.32*pow(p.y,0.65)+0.02; + float edge=abs(p.x-0.5+wiggle); + float body=1.0-smoothstep(width*0.65,width,edge); + body*=smoothstep(0.02,0.18,p.y)*(1.0-smoothstep(0.85,1.0,p.y)); + vec3 color=mix(vec3(1.0,0.045,0.004),vec3(1.0,0.55,0.045),pow(p.y,0.4)); + color=mix(color,vec3(1.0,0.9,0.40),smoothstep(0.5,0.9,p.y)*(1.0-smoothstep(0.02,0.16,edge))); + ALBEDO=color; EMISSION=color*2.5; ALPHA=body*0.94; +} diff --git a/Demon_v0.19/flight_camera_tests.gd b/Demon_v0.19/flight_camera_tests.gd new file mode 100644 index 0000000..0f8beaa --- /dev/null +++ b/Demon_v0.19/flight_camera_tests.gd @@ -0,0 +1,56 @@ +extends RefCounted +var failures=0 +func check(ok,label): + if not ok:failures+=1;push_error("FLIGHT/CAMERA QA: "+label) +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false + var w=g.workshop;g.coins=2000;w.toggle_build() + for rank in range(1,4): + w.expansion_button.grab_focus();w.expansion_button.pressed.emit() + check(w.expansion_level==rank and not w.expansion_button.has_focus(),"expansion button callback releases keyboard focus") + g.orbit.pan=Vector3(16,0,0);var before=g.camera.position + g.orbit.keys[KEY_D]=true;w.update(1);g.orbit.keys.clear() + check(g.orbit.pan.x>16 and g.camera.position.distance_to(before)>.1,"camera travels beyond old boundary at rank %d"%rank) + var middle=InputEventMouseButton.new();middle.button_index=MOUSE_BUTTON_MIDDLE;middle.pressed=true;g.orbit.input(middle) + check(g.orbit.dragging,"middle mouse works over expansion menu") + var motion=InputEventMouseMotion.new();motion.relative=Vector2(40,8);var yaw=g.orbit.yaw;g.orbit.input(motion);w.update(.1) + check(g.orbit.yaw!=yaw,"camera rotates after expansion") + g.orbit.stop() + w.toggle_build();g.paused=false;g.hud.hide();g.player.hide() + DirAccess.make_dir_recursive_absolute("res://captures/flight") + for kind in range(10): + var actor=g.make_person(false,kind);g.add_child(actor);actor.set_process(false);actor.following=true + actor._process(.04) + check(actor.cloth.strips.size()==3,"three small cloth scraps %d"%kind) + check(actor.cloth.strips.all(func(strip):return strip.node.mesh.get_aabb().size.y<.30 and strip.material.shader==preload("res://soul_cloth.gdshader")),"cloth size and flutter shader %d"%kind) + if kind>=5: + actor.restore_flight_pose();var upright=actor.bone_local("head") + actor._process(.04) + check(actor.bone_local("head").z>upright.z+.03,"male hunched posture %d"%kind) + var previous=actor.bone_local("wrist.L") + var motion_range=0.0 + for i in range(40): + actor._process(.04);motion_range=maxf(motion_range,actor.bone_local("wrist.L").distance_to(previous)) + check(motion_range>.005 and motion_range<.08,"gentle hand animation %d"%kind) + check(actor.cloth.strips.all(func(strip):return strip.material.get_shader_parameter("flutter")==1.0),"cloth flutters while following") + var cloth_clock=actor.cloth.clock;g.paused=true;actor._process(.05);g.paused=false + check(actor.cloth.clock==cloth_clock,"cloth pauses with soul") + if kind>=5: + for i in range(200):actor._process(.04) + check(actor.bone_local("head").y>actor.bone_local("root").y+.40,"hunch does not accumulate or fold model %d"%kind) + for side in ["L","R"]: + var shoulder=actor.bone_local("upperarm01."+side);var elbow=actor.bone_local("lowerarm01."+side);var hand=actor.bone_local("wrist."+side) + check(hand.y1: + max_slide=maxf(max_slide,actual.distance_to(before[i].position));planted_frames+=1 + check(max_error<.003,"IK reach "+str(actor.scale.x)+" "+str(speed)) + check(max_slide<.003,"stance slip "+str(actor.scale.x)+" "+str(speed)) + check(min_contact>-.002,"ground clearance") + check(max_lift>.08 and planted_frames>150,"alternating lift/support") + print("GAIT_METRICS ",JSON.stringify({"scale":actor.scale.x,"speed":speed,"max_slide":max_slide,"max_target_error":max_error,"max_lift":max_lift,"min_contact":min_contact})) + var phase=actor.gait.phase + for frame in range(30):actor._process(1.0/60) + check(is_equal_approx(actor.gait.phase,phase),"no steps when blocked/stopped") + for f in actor.gait.feet:check(f.grounded and absf(actor.gait.point("foot."+f.side).y-actor.gait.ground_height(f))<.04,"stop settles to floor") + actor.strike(.45) + for frame in range(40):actor._process(1.0/60) + check(not actor.striking,"whip returns to idle") + g.paused=true;var root=actor.gait.point("root");actor._process(.05);check(actor.gait.point("root").is_equal_approx(root),"pause freezes pose");g.paused=false + actor.get_parent().position+=Vector3(10,0,0);actor._process(.016) + check(actor.gait.last_speed==0,"teleport resets anchors") + print("GAIT_FAILURES: ",failures) + if failures.is_empty():print("ALL GAIT TESTS PASSED: heroine and three helpers, five speeds, turns, ground contact, stopping, whip, pause, teleport") + g.get_tree().quit(0 if failures.is_empty() else 1) diff --git a/Demon_v0.19/gate_clip.gdshader b/Demon_v0.19/gate_clip.gdshader new file mode 100644 index 0000000..7d4dba4 --- /dev/null +++ b/Demon_v0.19/gate_clip.gdshader @@ -0,0 +1,8 @@ +shader_type spatial; +uniform vec4 base_color:source_color=vec4(.15,.17,.16,1); +varying float world_y; +void vertex(){world_y=(MODEL_MATRIX*vec4(VERTEX,1)).y;} +void fragment(){ + if(world_y>3.70)discard; + ALBEDO=base_color.rgb;METALLIC=.75;ROUGHNESS=.58; +} diff --git a/Demon_v0.19/ghost.gdshader b/Demon_v0.19/ghost.gdshader new file mode 100644 index 0000000..39d152a --- /dev/null +++ b/Demon_v0.19/ghost.gdshader @@ -0,0 +1,33 @@ +shader_type spatial; +render_mode depth_prepass_alpha, cull_back, diffuse_burley, specular_schlick_ggx; +uniform vec4 base_color : source_color = vec4(0.6,0.8,0.85,1.0); +uniform vec4 spectral_color : source_color = vec4(0.36,0.77,0.93,1.0); +uniform float phase = 0.0; +uniform sampler2D albedo_texture : source_color, filter_linear_mipmap; +uniform bool use_texture = false; +uniform float reveal=1.0; +uniform float transfer_visibility=1.0; +varying vec3 local_position; +void vertex(){ + local_position=VERTEX; + float drift=(1.0-smoothstep(0.0,1.1,VERTEX.y))*.025; + VERTEX.x+=sin(TIME*1.7+VERTEX.y*5.0+phase)*drift; +} +void fragment(){ + if(local_position.y>reveal*3.5)discard; + float grain=fract(sin(dot(floor(local_position*65.0),vec3(12.9898,78.233,45.164)))*43758.5453); + if(grain>transfer_visibility)discard; + float rim=pow(1.0-clamp(dot(normalize(NORMAL),normalize(VIEW)),0.0,1.0),2.2); + float pulse=.88+.12*sin(TIME*1.8+phase); + vec3 original=base_color.rgb; + if(use_texture){original*=texture(albedo_texture,UV).rgb;} + float luminance=dot(original,vec3(.299,.587,.114)); + original=mix(original,vec3(luminance),.45); + ALBEDO=mix(original,spectral_color.rgb,.57); + ROUGHNESS=.95; + EMISSION=spectral_color.rgb*(.16+rim*.95)*pulse; + float mist=.5+.5*sin(local_position.y*15.0-TIME*2.0+phase+sin(local_position.x*9.0)); + float feet=smoothstep(-.05,.65,local_position.y); + ALPHA=clamp((.45+rim*.35+mist*.08)*mix(.68,1.0,feet),.1,.88); + +} diff --git a/Demon_v0.19/gothic.gd b/Demon_v0.19/gothic.gd new file mode 100644 index 0000000..d3f0d8a --- /dev/null +++ b/Demon_v0.19/gothic.gd @@ -0,0 +1,27 @@ +extends Control +# Small carved guardians sit in the frame margins, clear of all controls. +func _ready(): + mouse_filter=Control.MOUSE_FILTER_IGNORE + get_parent().resized.connect(queue_redraw) +func _draw(): + var parent=get_parent() + var style=parent.get_theme_stylebox("panel") + draw_set_transform(Vector2(-style.content_margin_left,-style.content_margin_top)) + var extent=parent.size + if extent.y>380 and extent.x<700: + guardian(Vector2(23,extent.y-190),1) + guardian(Vector2(extent.x-23,extent.y-190),-1) +func guardian(at,side): + var dark=Color("202a29");var mid=Color("5e6863");var light=Color("a1aaa0") + var robe=PackedVector2Array([at+Vector2(0,0),at+Vector2(-10,16),at+Vector2(-7,40),at+Vector2(-13,62),at+Vector2(-15,153),at+Vector2(15,153),at+Vector2(13,62),at+Vector2(7,40),at+Vector2(10,16),at]) + draw_colored_polygon(robe,mid);draw_polyline(robe,light,1,true) + for i in range(5): + var x=-10+i*5 + draw_polyline(PackedVector2Array([at+Vector2(x*.45,65),at+Vector2(x*.7,103),at+Vector2(x,149)]),dark,1,true) + draw_colored_polygon(PackedVector2Array([at+Vector2(0,8),at+Vector2(-6,23),at+Vector2(0,35),at+Vector2(6,23)]),dark) + draw_line(at+Vector2(-4,25),at+Vector2(4,25),light,1,true) + draw_polyline(PackedVector2Array([at+Vector2(-10,43),at+Vector2(6,58),at+Vector2(11,50)]),light,2,true) + draw_polyline(PackedVector2Array([at+Vector2(10,43),at+Vector2(-6,58),at+Vector2(-11,50)]),dark,2,true) + draw_line(at+Vector2(side*11,51),at+Vector2(side*11,148),Color("b2b9a8"),1.4,true) + draw_rect(Rect2(at+Vector2(-17,153),Vector2(34,5)),dark) + draw_line(at+Vector2(-17,153),at+Vector2(17,153),light,1,true) diff --git a/Demon_v0.19/haze.gdshader b/Demon_v0.19/haze.gdshader new file mode 100644 index 0000000..a83f292 --- /dev/null +++ b/Demon_v0.19/haze.gdshader @@ -0,0 +1,11 @@ +shader_type spatial; +render_mode unshaded, cull_disabled, depth_draw_never; +uniform float phase=0.0; +float hash(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);} +float noise(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.0-2.0*f);return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+vec2(1,1)),f.x),f.y);} +void fragment(){ + vec2 uv=UV;float n=noise(uv*vec2(5,9)+vec2(phase,TIME*.35)); + n=mix(n,noise(uv*vec2(12,18)+vec2(phase,TIME*.5)),.3); + float edge=pow(max(0.0,1.0-abs(uv.x-.5)*2.0),2.0)*sin(uv.y*3.14159); + ALBEDO=vec3(.28,.26,.21);ALPHA=edge*smoothstep(.25,.7,n)*.13; +} diff --git a/Demon_v0.19/hero.gd b/Demon_v0.19/hero.gd new file mode 100644 index 0000000..43b73c8 --- /dev/null +++ b/Demon_v0.19/hero.gd @@ -0,0 +1,135 @@ +extends RefCounted +# Continuous profile meshes replace the old stacked primitive torso. +var g +var skin=Color("a26764") +var armor=Color("302331") +var leather=Color("441d30") +var gold=Color("9c825b") +var hair=Color("461a2b") + +func build(game): + g=game + var r=Node3D.new() + r.name="DemonHero" + # Fitted, fully clothed silhouette with a waist, flared hip armour and collar. + loft(r,Vector3.ZERO,[[1.00,0.32,0.22,0],[1.13,0.40,0.25,0],[1.32,0.34,0.23,0],[1.49,0.24,0.19,0],[1.67,0.29,0.24,0.01],[1.85,0.39,0.25,0.01],[2.00,0.38,0.19,0],[2.06,0.19,0.14,0]],armor) + loft(r,Vector3.ZERO,[[1.05,0.45,0.28,0],[1.22,0.41,0.26,0],[1.35,0.30,0.21,0]],leather) + loft(r,Vector3.ZERO,[[1.37,0.285,0.22,0],[1.43,0.275,0.215,0]],gold) + g.ball(r,Vector3(0,1.40,0.232),Vector3(0.20,0.18,0.08),Color("b87936")) + g.ball(r,Vector3(0,1.40,0.28),Vector3(0.09,0.11,0.035),Color("ff714e")) + for side in [-1,1]: + # Gold piping follows the curves of the bodice. + tube(r,[Vector3(side*0.27,1.29,0.22),Vector3(side*0.20,1.52,0.20),Vector3(side*0.25,1.75,0.24),Vector3(side*0.33,1.92,0.17)],[0.018,0.018,0.02,0.015],gold) + var leg=Node3D.new() + r.add_child(leg) + leg.name="LegL" if side<0 else "LegR" + leg.position=Vector3(side*0.22,1.13,0) + loft(leg,Vector3.ZERO,[[-0.49,0.11,0.12,0],[-0.25,0.15,0.145,0],[-0.03,0.17,0.17,0],[0.08,0.13,0.13,0]],armor) + var knee=Node3D.new();leg.add_child(knee);knee.name="Knee";knee.position.y=-0.47 + loft(knee,Vector3.ZERO,[[-0.57,0.10,0.17,0.08],[-0.39,0.08,0.09,0],[-0.11,0.12,0.115,0],[0.04,0.115,0.125,0]],armor) + g.ball(knee,Vector3(0,-0.57,0.10),Vector3(0.23,0.20,0.45),armor) + g.ball(knee,Vector3(0,0,0.09),Vector3(0.24,0.20,0.13),gold) + var arm=Node3D.new() + r.add_child(arm) + arm.name="ArmL" if side<0 else "ArmR" + arm.position=Vector3(side*0.38,1.94,0) + tube(arm,[Vector3.ZERO,Vector3(side*0.12,-0.23,0.015),Vector3(side*0.16,-0.43,0.06),Vector3(side*0.19,-0.66,0.14)],[0.14,0.12,0.095,0.07],skin) + tube(arm,[Vector3(side*0.16,-0.43,0.06),Vector3(side*0.19,-0.63,0.13),Vector3(side*0.19,-0.70,0.15)],[0.115,0.085,0.08],armor) + g.ball(arm,Vector3(side*0.19,-0.74,0.16),Vector3(0.15,0.23,0.14),skin) + g.ball(arm,Vector3(side*0.03,-0.04,0),Vector3(0.39,0.21,0.36),armor) + for i in range(3): + tube(arm,[Vector3(side*(0.0+i*0.07),0.01,-0.07),Vector3(side*(0.06+i*0.10),0.17+0.04*i,-0.10)],[0.055,0.002],gold) + var head=Node3D.new();r.add_child(head) + head.scale=Vector3(0.86,0.86,0.86);head.position=Vector3(0,0.29,0) + # Sculpted head profile: pointed chin, broad cheekbones, narrower temples. + loft(head,Vector3.ZERO,[[2.00,0.12,0.12,0],[2.18,0.14,0.13,0]],skin) + loft(head,Vector3.ZERO,[[2.13,0.07,0.08,0.075],[2.20,0.16,0.16,0.035],[2.30,0.25,0.215,0.01],[2.43,0.295,0.245,0],[2.57,0.28,0.22,-0.015],[2.70,0.23,0.19,-0.025],[2.77,0.06,0.08,-0.03]],skin) + # Hair cap and swept, tapered locks. + loft(head,Vector3(0,0,-0.06),[[2.46,0.28,0.21,-0.05],[2.62,0.315,0.25,-0.03],[2.76,0.25,0.20,-0.02],[2.81,0.06,0.06,0]],hair) + for side in [-1,1]: + for i in range(3): + var x=side*(0.18+i*0.04) + tube(head,[Vector3(x,2.72,-0.10-i*0.05),Vector3(side*0.32,2.44,-0.19-i*0.04),Vector3(side*0.34,2.16,-0.24),Vector3(side*(0.36+i*0.05),1.96,-0.22)],[0.11,0.10,0.065,0.006],hair.lightened(i*0.035)) + tube(head,[Vector3(side*0.07,2.77,0.03),Vector3(side*0.24,2.65,0.13),Vector3(side*0.29,2.43,0.16)],[0.11,0.095,0.005],hair.lightened(0.05)) + # Sweeping horns rather than straight cones. + tube(head,[Vector3(side*0.22,2.69,-0.07),Vector3(side*0.40,2.87,-0.10),Vector3(side*0.42,3.12,-0.13),Vector3(side*0.30,3.28,-0.08)],[0.115,0.09,0.045,0.001],Color("5c2437")) + g.ball(head,Vector3(side*0.24,2.73,-0.07),Vector3(0.23,0.12,0.23),gold) + # Ears and angular, contrasting eyes. + tube(head,[Vector3(side*0.25,2.38,0),Vector3(side*0.44,2.52,-0.015)],[0.09,0.001],skin) + var eye=g.ball(head,Vector3(side*0.135,2.46,0.218),Vector3(0.20,0.10,0.075),Color("ffe6a3")) + eye.rotation.z=side*0.12 + g.ball(head,Vector3(side*0.132,2.459,0.256),Vector3(0.045,0.075,0.016),Color("301a2a")) + tube(head,[Vector3(side*0.045,2.53,0.24),Vector3(side*0.15,2.55,0.24),Vector3(side*0.24,2.52,0.19)],[0.025,0.03,0.008],hair) + g.ball(head,Vector3(side*0.28,2.31,0.02),Vector3(0.055,0.10,0.055),gold) + # Nose bridge and a slight asymmetric smile. + tube(head,[Vector3(0,2.49,0.22),Vector3(0,2.38,0.29),Vector3(0,2.35,0.255)],[0.035,0.055,0.035],skin.lightened(0.08)) + tube(head,[Vector3(-0.10,2.255,0.181),Vector3(0,2.24,0.212),Vector3(0.105,2.27,0.18)],[0.009,0.014,0.005],Color("562031")) + for side in [-1,1]: wing(r,side) + tube(r,[Vector3(0,1.16,-0.20),Vector3(0.32,0.93,-0.53),Vector3(0.70,0.85,-0.62),Vector3(0.88,1.13,-0.53),Vector3(0.85,1.38,-0.46)],[0.065,0.05,0.04,0.03,0.02],skin) + g.ball(r,Vector3(0.85,1.39,-0.46),Vector3(0.18,0.25,0.10),Color("9d304a")) + r.rotation.y=0.58 + return r + +func loft(parent,position,profiles,color): + var st=SurfaceTool.new() + st.begin(Mesh.PRIMITIVE_TRIANGLES) + var segments=80 + var refined=[] + for k in range(profiles.size()-1): + for j in range(6): + var t=float(j)/6.0 + var row=[] + for n in range(4):row.append(lerpf(profiles[k][n],profiles[k+1][n],t)) + refined.append(row) + refined.append(profiles.back()) + profiles=refined + for k in range(profiles.size()-1): + for i in range(segments): + var a=float(i)*TAU/segments + var b=float(i+1)*TAU/segments + var lower=profiles[k] + var upper=profiles[k+1] + var v0=Vector3(cos(a)*lower[1],lower[0],sin(a)*lower[2]+lower[3]) + var v1=Vector3(cos(b)*lower[1],lower[0],sin(b)*lower[2]+lower[3]) + var v2=Vector3(cos(b)*upper[1],upper[0],sin(b)*upper[2]+upper[3]) + var v3=Vector3(cos(a)*upper[1],upper[0],sin(a)*upper[2]+upper[3]) + for v in [v0,v1,v2,v0,v2,v3]: st.add_vertex(v) + st.index() + st.generate_normals() + return g.mesh_node(parent,st.commit(),position,color) + +func tube(parent,points,radii,color): + var st=SurfaceTool.new() + st.begin(Mesh.PRIMITIVE_TRIANGLES) + var rings=[] + var radial=12 if radii.max()<.035 else 48 + for k in range(points.size()): + var tangent=(points[mini(k+1,points.size()-1)]-points[maxi(0,k-1)]).normalized() + var helper=Vector3.FORWARD if absf(tangent.dot(Vector3.UP))>0.9 else Vector3.UP + var right=tangent.cross(helper).normalized() + var up=tangent.cross(right).normalized() + var row=[] + for i in range(radial): row.append(points[k]+(right*cos(i*TAU/radial)+up*sin(i*TAU/radial))*radii[k]) + rings.append(row) + for k in range(rings.size()-1): + for i in range(radial): + var j=(i+1)%radial + for v in [rings[k][i],rings[k+1][i],rings[k+1][j],rings[k][i],rings[k+1][j],rings[k][j]]: st.add_vertex(v) + st.index() + st.generate_normals() + var n=g.mesh_node(parent,st.commit(),Vector3.ZERO,color) + n.material_override.cull_mode=BaseMaterial3D.CULL_DISABLED + return n + +func wing(r,side): + var root=Vector3(side*0.25,1.92,-0.22) + var points=[root,Vector3(side*0.85,2.40,-0.38),Vector3(side*1.35,2.08,-0.43),Vector3(side*1.06,1.90,-0.39),Vector3(side*0.94,1.57,-0.33),Vector3(side*0.66,1.68,-0.30),Vector3(side*0.50,1.31,-0.24)] + var st=SurfaceTool.new() + st.begin(Mesh.PRIMITIVE_TRIANGLES) + for i in range(1,points.size()-1): + for p in [points[0],points[i],points[i+1]]: st.add_vertex(p) + st.index() + st.generate_normals() + var n=g.mesh_node(r,st.commit(),Vector3.ZERO,Color("732b47")) + n.material_override.cull_mode=BaseMaterial3D.CULL_DISABLED + for i in [1,2,4,6]: tube(r,[root,points[i]],[0.045,0.015],Color("c45964")) diff --git a/Demon_v0.19/hold_indicator.gd b/Demon_v0.19/hold_indicator.gd new file mode 100644 index 0000000..4de455c --- /dev/null +++ b/Demon_v0.19/hold_indicator.gd @@ -0,0 +1,7 @@ +extends Control +var progress=0.0: + set(value):progress=clampf(value,0,1);queue_redraw() +func _draw(): + draw_circle(Vector2.ZERO,14,Color(.03,.035,.03,.85)) + draw_arc(Vector2.ZERO,11,0,TAU,48,Color(.25,.27,.24,.9),3,true) + if progress>0:draw_arc(Vector2.ZERO,11,-PI/2,-PI/2+TAU*progress,48,Color("e2c88b"),3,true) diff --git a/Demon_v0.19/hud_tests.gd b/Demon_v0.19/hud_tests.gd new file mode 100644 index 0000000..483763f --- /dev/null +++ b/Demon_v0.19/hud_tests.gd @@ -0,0 +1,72 @@ +extends RefCounted +var checks=0 +func check(value): + checks+=1 + if not value:push_error("HUD QA failed #%d" % checks);Engine.get_main_loop().quit(1) + +func buttons(node): + var found=[] + for child in node.get_children(): + if child is Button and child.is_visible_in_tree():found.append(child) + found.append_array(buttons(child)) + return found + +func point(g,p): + var m=InputEventMouseMotion.new();m.position=p;m.global_position=p;Input.parse_input_event(m) + await g.get_tree().process_frame + +func run(g): + await g.get_tree().create_timer(.3).timeout + await preload("res://workshop_tests.gd").new().click(g,g.menu.main_start) + var w=g.workshop + check(not g.ui_compat.visible and g.sound_button==null) + check(not g.stats.is_visible_in_tree() and not w.panel.is_visible_in_tree()) + check(buttons(g.hud).size()==2) + check(w.build_button.text.is_empty() and w.grimoire_button.text.is_empty()) + check(w.build_button.position.x>1400 and w.build_button.position.y>780) + check(w.grimoire_button.position.x>w.build_button.position.x) + g.coins=12345;g.done=99;g.essence=42;g.refresh_ui() + check(g.gold_value.text=="12345" and g.souls_value.text=="42") + check(g.gold_value.is_visible_in_tree() and g.souls_value.is_visible_in_tree()) + check(g.development.xp_bar.is_visible_in_tree() and g.development.xp_bar.position.y>870) + check(g.development.xp_bar.mouse_filter==Control.MOUSE_FILTER_IGNORE) + for p in [Vector2(100,100),Vector2(670,845),Vector2(920,845),Vector2(800,860),Vector2(1350,50)]: + await point(g,p) + check(g.get_viewport().gui_get_hovered_control()==null) + await preload("res://workshop_tests.gd").new().click(g,w.grimoire_button) + check(w.tree.visible and g.paused) + await preload("res://workshop_tests.gd").new().click(g,w.grimoire_button) + check(not w.tree.visible and not g.paused) + await preload("res://workshop_tests.gd").new().click(g,w.build_button) + check(w.build_mode) + await preload("res://workshop_tests.gd").new().click(g,w.grimoire_button) + check(w.tree.visible and not w.build_mode) + await preload("res://workshop_tests.gd").new().click(g,w.build_button) + check(w.build_mode and not w.tree.visible) + w.toggle_build() + var s=g.souls[0];s.required=[0,4,5];s.served=[0];s.entering=false;s.entry_time=1;s.node.position=Vector3(-1,0,1) + w.sentences.update_label(s);w.sentences.update_icons() + check(s.label.text.is_empty() and not s.label.visible and s.task_icon_nodes.size()==3) + for i in range(3): + check(s.task_icon_nodes[i].kind==w.Icon.APPARATUS[s.required[i]]) + check(s.task_icon_nodes[i].mouse_filter==Control.MOUSE_FILTER_IGNORE) + check(s.task_icon_nodes[0].completed and not s.task_icon_nodes[1].completed) + await point(g,s.task_badge.get_global_rect().get_center()) + check(g.get_viewport().gui_get_hovered_control()==null) + if is_instance_valid(g.development.bubble):g.development.bubble.queue_free();g.development.bubble=null + if is_instance_valid(g.life.hero_bubble):g.life.hero_bubble.queue_free();g.life.hero_bubble=null + w.dialogue_clock=0;var serial=g.dialogue.serial + w.update_soul_dialogue(29.9);check(g.dialogue.serial==serial) + w.update_soul_dialogue(.11);check(g.dialogue.serial==serial) + w.announce_soul(s,"Немедленная реплика");check(g.dialogue.serial==serial) + g.paused=true;var before=w.dialogue_clock;w.update(10);check(is_equal_approx(before,w.dialogue_clock)) + g.paused=false;g.talk_clock=99.9;w.update(.05);check(not is_instance_valid(g.life.hero_bubble)) + w.update(.06);check(is_instance_valid(g.life.hero_bubble)) + var badge=s.task_badge;g.souls.erase(s);s.node.queue_free() + await g.get_tree().process_frame + await g.get_tree().process_frame + check(not is_instance_valid(badge)) + print("PASS: two icon-only lower-right controls; coin/soul counters; removed HUD regions and task badges do not intercept the mouse") + print("PASS: identical task/catalogue pictograms, green completion marks, cleanup; soul dialogue disabled, heroine 100s, manual triggers throttled") + print("ALL HUD TESTS PASSED — DEMON 0.19") + g.get_tree().quit() diff --git a/Demon_v0.19/imp.gd b/Demon_v0.19/imp.gd new file mode 100644 index 0000000..8eec1f8 --- /dev/null +++ b/Demon_v0.19/imp.gd @@ -0,0 +1,81 @@ +extends RefCounted +func build(g): + var r=Node3D.new();r.name="Imp";r.set_meta("species","imp");r.set_meta("model_revision",2) + var s=preload("res://hero.gd").new();s.g=g + var skin=Color("785140");var horn=Color("30251f");var hide=Color("352b25");var rim=Color("907558") + # A rounded abdomen, narrow waist, stooped chest and articulated limbs. + s.loft(r,Vector3.ZERO,[[.35,.13,.12,0],[.44,.19,.145,0],[.55,.205,.17,-.025],[.69,.20,.18,-.045],[.80,.165,.155,-.025],[.88,.085,.09,.025]],skin) + for side in [-1,1]: + s.tube(r,[Vector3(side*.13,.80,-.035),Vector3(side*.19,.69,-.09),Vector3(side*.13,.54,-.12)],[.065,.075,.04],skin.darkened(.10)) + var head=Node3D.new();r.add_child(head);head.name="Head";head.position=Vector3(0,.85,.035) + s.loft(head,Vector3.ZERO,[[-.055,.075,.075,.02],[.015,.13,.115,.045],[.105,.158,.125,.035],[.19,.137,.105,.015],[.235,.075,.07,0],[.25,.025,.03,0]],skin) + for side in [-1,1]: + s.tube(head,[Vector3(side*.105,.19,-.02),Vector3(side*.17,.29,-.07),Vector3(side*.15,.40,-.105),Vector3(side*.095,.435,-.075)],[.051,.036,.017,.001],horn) + for j in range(4): + var ridge=TorusMesh.new();ridge.inner_radius=.030-j*.003;ridge.outer_radius=.036-j*.003;ridge.rings=24;ridge.ring_segments=12 + var a=g.mesh_node(head,ridge,Vector3(side*(.12+j*.013),.22+j*.026,-.025-j*.015),horn.lightened(.10));a.scale=Vector3(1,.5,1) + s.tube(head,[Vector3(side*.13,.13,.005),Vector3(side*.27,.185,-.06),Vector3(side*.23,.075,-.025)],[.056,.009,.001],skin) + s.tube(head,[Vector3(side*.16,.135,.006),Vector3(side*.237,.163,-.035)],[.026,.002],skin.darkened(.25)) + var eye=Node3D.new();head.add_child(eye);eye.name="EyeL" if side<0 else "EyeR";eye.position=Vector3(side*.067,.126,.139) + g.ball(eye,Vector3.ZERO,Vector3(.068,.035,.026),Color("c7aa6b"));g.ball(eye,Vector3(0,0,.014),Vector3(.012,.027,.008),Color("17130f")) + g.ball(eye,Vector3(-.012,.007,.016),Vector3.ONE*.006,Color("efdaa8")) + s.tube(head,[Vector3(side*.018,.168,.117),Vector3(side*.10,.157,.129),Vector3(side*.13,.14,.105)],[.021,.025,.008],skin.darkened(.12)) + s.tube(head,[Vector3(side*.04,.065,.139),Vector3(side*.10,.070,.12)],[.025,.014],skin.lightened(.05)) + g.ball(head,Vector3(side*.025,.075,.173),Vector3(.014,.009,.006),horn) + s.tube(head,[Vector3(side*.053,.028,.143),Vector3(side*.058,.06,.156)],[.012,.001],Color("b4a48a")) + s.tube(head,[Vector3(0,.125,.13),Vector3(0,.070,.184),Vector3(0,.057,.164)],[.026,.030,.018],skin.darkened(.08)) + s.tube(head,[Vector3(-.07,.022,.12),Vector3(0,.009,.151),Vector3(.07,.022,.12)],[.006,.009,.006],Color("38231d")) + g.ball(head,Vector3(0,-.025,.102),Vector3(.09,.05,.065),skin.darkened(.06)) + for side in [-1,1]: + var leg=Node3D.new();r.add_child(leg);leg.name="LegL" if side<0 else "LegR";leg.position=Vector3(side*.135,.44,0) + s.tube(leg,[Vector3.ZERO,Vector3(0,-.09,.02),Vector3(0,-.19,.025)],[.077,.070,.054],skin) + var knee=Node3D.new();leg.add_child(knee);knee.name="Knee";knee.position=Vector3(0,-.19,.025) + g.ball(knee,Vector3(0,0,.014),Vector3(.115,.105,.10),skin.darkened(.08)) + s.tube(knee,[Vector3.ZERO,Vector3(0,-.08,-.025),Vector3(0,-.19,-.025)],[.052,.046,.033],skin) + var foot=Node3D.new();knee.add_child(foot);foot.name="Foot";foot.position=Vector3(0,-.19,-.025) + for toe in [-1,1]: + s.loft(foot,Vector3(toe*.034,0,0),[[-.052,.032,.080,.052],[-.02,.034,.083,.050],[.025,.031,.065,.035],[.055,.021,.035,.005]],horn) + g.line(foot,Vector3(toe*.034,-.025,.130),Vector3(toe*.034,.014,.105),.006,rim.darkened(.3)) + var arm=Node3D.new();r.add_child(arm);arm.name="ArmL" if side<0 else "ArmR";arm.position=Vector3(side*.18,.77,.005) + s.tube(arm,[Vector3.ZERO,Vector3(side*.055,-.10,.005),Vector3(side*.085,-.22,.025)],[.069,.062,.045],skin) + var elbow=Node3D.new();arm.add_child(elbow);elbow.name="Elbow";elbow.position=Vector3(side*.085,-.22,.025) + g.ball(elbow,Vector3.ZERO,Vector3(.09,.085,.085),skin.darkened(.05)) + s.tube(elbow,[Vector3.ZERO,Vector3(side*.018,-.12,.035),Vector3(side*.025,-.23,.075)],[.044,.039,.029],skin) + g.ball(elbow,Vector3(side*.025,-.25,.078),Vector3(.075,.09,.05),skin) + for finger in range(3): + var a=Vector3(side*.025+(finger-1)*.024,-.28,.083) + s.tube(elbow,[a,a+Vector3(0,-.045,.015),a+Vector3(0,-.055,.035)],[.011,.008,.001],horn) + s.tube(elbow,[Vector3(-side*.005,-.23,.085),Vector3(-side*.025,-.265,.11)],[.015,.004],skin) + s.loft(r,Vector3.ZERO,[[.33,.16,.13,0],[.40,.185,.15,0],[.47,.19,.16,0]],hide) + s.loft(r,Vector3.ZERO,[[.445,.193,.164,0],[.475,.193,.164,0]],rim.darkened(.35)) + for i in range(7):g.line(r,Vector3(-.12+i*.04,.435,.151),Vector3(-.11+i*.04,.405,.15),.004,rim) + var tail=Node3D.new();r.add_child(tail);tail.name="Tail" + s.tube(tail,[Vector3(0,.41,-.13),Vector3(.08,.32,-.30),Vector3(.23,.35,-.44),Vector3(.29,.49,-.44),Vector3(.25,.56,-.39)],[.033,.026,.019,.012,.002],skin) + for i in range(5):g.ball(r,Vector3(0,.49+i*.055,-.18),Vector3(.035,.035,.045),horn) + merge_parts(r) + return r + +func merge_parts(root): + # Bake fixed details per articulated part, preserving vertex colours and rig nodes. + for child in root.get_children(): + if child is Node3D and not child is MeshInstance3D:merge_parts(child) + var st=SurfaceTool.new();st.begin(Mesh.PRIMITIVE_TRIANGLES) + var sources=[] + for n in root.get_children(): + if not n is MeshInstance3D:continue + sources.append(n) + var color=n.material_override.albedo_color + for surface in range(n.mesh.get_surface_count()): + var arrays=n.mesh.surface_get_arrays(surface) + var verts=arrays[Mesh.ARRAY_VERTEX];var normals=arrays[Mesh.ARRAY_NORMAL];var indices=arrays[Mesh.ARRAY_INDEX] + var size=indices.size() if indices!=null and indices.size()>0 else verts.size() + for i in range(size): + var index=indices[i] if indices!=null and indices.size()>0 else i + st.set_color(color.srgb_to_linear()) + st.set_normal((n.transform.basis.inverse().transposed()*normals[index]).normalized()) + st.add_vertex(n.transform*verts[index]) + if sources.is_empty():return + st.index();var mesh=MeshInstance3D.new();mesh.mesh=st.commit() + var material=StandardMaterial3D.new();material.vertex_color_use_as_albedo=true;material.roughness=.88 + mesh.material_override=material;root.add_child(mesh) + for n in sources:n.free() diff --git a/Demon_v0.19/imp_activities.gd b/Demon_v0.19/imp_activities.gd new file mode 100644 index 0000000..e8b778f --- /dev/null +++ b/Demon_v0.19/imp_activities.gd @@ -0,0 +1,122 @@ +extends RefCounted +var g +var marks=[] +const KINDS=["clean","mop","draw","hum"] +func setup(game):g=game +func prepare(imp,number): + imp["activity"]="";imp["activity_wait"]=6.0+number*2.7;imp["activity_next"]=number%4 + imp["activity_time"]=0.0;imp["activity_travel"]=0.0;imp["activity_station"]=null + imp["activity_props"]=null;imp["activity_mark"]=null;imp["activity_number"]=number + var hum=AudioStreamPlayer3D.new();imp.root.add_child(hum);hum.position.y=.85;hum.max_distance=12;hum.unit_size=2 + hum.stream=preload("res://audio/imp_humming.wav");imp["humming"]=hum +func reset(): + for mark in marks: + if is_instance_valid(mark.root):mark.root.queue_free() + marks.clear() + for imp in g.life.imps+g.life.neighbours: + if imp.has("activity"):finish(imp) +func start(imp,kind): + imp.activity=kind;imp.activity_time=0.0;imp.activity_travel=0.0;imp.activity_station=null;imp.activity_mark=null + imp["activity_revision"]=g.workshop.revision + var origin=imp.get("origin",Vector3.ZERO) + var target=imp.root.position + if kind=="clean": + var available=g.workshop.stations.filter(func(d):return g.workshop.is_free(d) and not (g.life.imps.any(func(other):return other!=imp and other.get("activity_station")==d))) + if imp.has("origin") or available.is_empty():imp.activity="mop" + else: + available.sort_custom(func(a,b):return imp.root.position.distance_squared_to(a.device.position)8: + var old=marks.pop_front();old.root.queue_free() +func finish(imp): + if is_instance_valid(imp.activity_props):imp.activity_props.queue_free() + imp.activity_props=null + if imp.activity_mark!=null:imp.activity_mark.drawing=false;imp.activity_mark=null + imp.humming.stop();imp.activity="";imp.activity_wait=12.0+fposmod(imp.phase*4.7+imp.activity_number*1.9,14) + imp.root.set_meta("activity","") +func update_marks(dt): + for i in range(marks.size()-1,-1,-1): + var mark=marks[i] + if not is_instance_valid(mark.root):marks.remove_at(i);continue + if not mark.drawing:mark.age+=dt + if mark.age>15:mark.root.queue_free();marks.remove_at(i) +func sync_audio(imp): + imp.humming.stream_paused=g.paused + imp.humming.volume_db=-18+linear_to_db(maxf(g.voice_volume,.0001)) + if g.muted or g.voice_volume<=0:imp.humming.stop() +func update(imp,dt): + if not imp.has("activity"):return false + sync_audio(imp) + if g.paused:return true + if imp.activity=="": + imp.activity_wait-=dt + if imp.activity_wait>0:return false + start(imp,KINDS[imp.activity_next]);imp.activity_next=(imp.activity_next+1)%4 + if imp.activity_station!=null: + if imp.activity_revision!=g.workshop.revision:finish(imp);return false + if not g.workshop.stations.has(imp.activity_station) or not g.workshop.is_free(imp.activity_station):finish(imp);return false + imp.activity_travel+=dt + if imp.root.position.distance_to(imp.activity_target)>.32: + if imp.activity_travel>12:finish(imp);return false + if imp.has("origin"): + g.life.move_neighbour(imp,imp.activity_target,dt) + else:g.life.move_imp(imp,imp.activity_target,dt) + return true + if not is_instance_valid(imp.activity_props):make_props(imp) + imp.activity_time+=dt + var t=imp.activity_time;var wave=sin(t*6) + var toward=imp.activity_look-imp.root.position + g.life.face_motion(imp,toward,minf(dt,.05)) + var left=imp.model.get_node("ArmL");var right=imp.model.get_node("ArmR") + match imp.activity: + "clean": + imp.model.rotation.x=.16;right.rotation.x=-1.35+wave*.22;right.rotation.z=cos(t*6)*.15;left.rotation.x=-.6 + "mop": + imp.model.rotation.x=.16+sin(t*3)*.05;left.rotation.x=-.85+sin(t*3)*.16;right.rotation.x=-.85+sin(t*3)*.16 + imp.activity_props.position.z=sin(t*3)*.13 + "draw": + if imp.activity_mark==null:make_mark(imp) + var progress=minf(t/4,1.0)*5 + for i in range(5): + var edge=imp.activity_mark.edges[i];var amount=clampf(progress-i,0,1) + edge.node.visible=amount>.001;edge.node.scale.y=maxf(.001,amount);edge.node.position=edge.from.lerp(edge.to,amount*.5) + right.rotation.x=-1.65+sin(t*7)*.20;right.rotation.z=cos(t*7)*.23;left.rotation.x=-.2 + "hum": + imp.model.rotation.z=sin(t*2.5)*.065;imp.model.position.y=sin(t*5)*.012 + left.rotation.z=-.2+sin(t*2.5)*.12;right.rotation.z=.2+sin(t*2.5)*.12 + if not imp.humming.playing and t<.3 and not g.muted and g.voice_volume>0 and not g.test_mode and not g.capture_mode:imp.humming.play() + if t>=5.5:finish(imp) + return true diff --git a/Demon_v0.19/imp_gait.gd b/Demon_v0.19/imp_gait.gd new file mode 100644 index 0000000..5d05cbf --- /dev/null +++ b/Demon_v0.19/imp_gait.gd @@ -0,0 +1,82 @@ +extends RefCounted +var root: Node3D +var variation=0.0 +var model +var feet=[] +var previous=Vector3.ZERO +var phase=.1 +var clock=0.0 +var weight=0.0 +var arm_pose=[Vector3.ZERO,Vector3.ZERO] +var body_rotation=Vector3.ZERO +var body_height=0.0 +var last_direction=Vector3.ZERO +const CYCLE_DISTANCE=.48 +func setup(record): + model=record.model;root=record.root;variation=record.phase;previous=root.global_position + feet.clear() + phase=.1;weight=0;body_height=0;body_rotation=Vector3.ZERO;last_direction=Vector3.ZERO + for side in ["L","R"]: + var leg=model.get_node("Leg"+side);var knee=leg.get_node("Knee");var foot=knee.get_node("Foot") + feet.append({"leg":leg,"knee":knee,"foot":foot,"side":side,"anchor":foot.global_position,"target":foot.global_position,"start":foot.global_position,"landing":foot.global_position,"swing":false,"yaw":root.rotation.y,"last_phase":.1 if side=="L" else .6}) +func reset(): + previous=root.global_position;weight=0;phase=.1;last_direction=Vector3.ZERO + model.position=Vector3.ZERO;body_height=0;body_rotation=Vector3.ZERO;model.rotation=Vector3.ZERO + for f in feet:f.leg.rotation=Vector3.ZERO;f.knee.rotation=Vector3.ZERO;f.foot.rotation=Vector3.ZERO + for f in feet: + f.anchor=f.foot.global_position;f.anchor.y=root.global_position.y+.06;f.target=f.anchor;f.swing=false;f.yaw=root.rotation.y +func solve(f): + var hip=f.leg.global_position;var l1=f.knee.position.length();var l2=f.foot.position.length() + var delta=f.target-hip;var distance=clampf(delta.length(),absf(l1-l2)+.001,l1+l2-.001) + var direction=delta.normalized();var forward=root.global_basis.z.normalized() + var bend=(forward-direction*forward.dot(direction)).normalized() + var along=(l1*l1-l2*l2+distance*distance)/(2*distance) + var elbow=hip+direction*along+bend*sqrt(maxf(0,l1*l1-along*along)) + f.leg.quaternion=Quaternion(f.knee.position.normalized(),(f.leg.get_parent().to_local(elbow)-f.leg.position).normalized()) + f.knee.quaternion=Quaternion(f.foot.position.normalized(),(f.leg.to_local(f.target)-f.knee.position).normalized()) + f.foot.global_rotation=Vector3(0,f.yaw,0) +func update(dt,acting=false): + dt=minf(dt,.05);clock+=dt + var delta=root.global_position-previous;delta.y=0;previous=root.global_position + if delta.length()>.20:reset();delta=Vector3.ZERO + var distance=delta.length();var moving=distance>.00005 + weight=move_toward(weight,1.0 if moving else 0.0,dt*5) + if moving:phase=fposmod(phase+distance/CYCLE_DISTANCE,1) + var forward=delta.normalized() if moving else root.global_basis.z.normalized() + if moving and last_direction.length_squared()>.5 and forward.dot(last_direction)<.75: + phase=.30 if not feet[0].swing else .80 + if moving:last_direction=forward + for i in range(feet.size()): + var f=feet[i];var p=fposmod(phase+i*.5,1);var ground=root.global_position.y+.06 + if moving: + if p>=.56: + if not f.swing:f.start=f.target;f.swing=true + f.landing=root.global_position+root.global_basis.x*(-.135 if f.side=="L" else .135)+forward*.08;f.landing.y=ground + var t=clampf((p-.56)/.44,0,1);f.target=f.start.lerp(f.landing,smoothstep(0,1,t));f.target.y=ground+sin(t*PI)*.065 + else: + if f.swing:f.anchor=f.landing;f.anchor.y=ground;f.swing=false;f.yaw=root.rotation.y + f.target=f.anchor + else: + f.target.y=move_toward(f.target.y,ground,dt*.35) + if absf(f.target.y-ground)<.001:f.anchor=f.target;f.swing=false + f.last_phase=p + var desired_rotation=model.rotation if acting else Vector3(sin(phase*TAU)*.018*weight,0,sin(phase*TAU)*.025*weight) + body_rotation=body_rotation.lerp(desired_rotation,1-exp(-dt*9));model.rotation=body_rotation + var desired_height=model.position.y if acting and root.get_meta("activity","")=="hum" else -.025+sin(phase*TAU*2)*.007*weight+sin(clock*2)*.003*(1-weight) + body_height=lerpf(body_height,desired_height,1-exp(-dt*9));model.position.y=body_height + var drop=0.0 + for f in feet: + var hip=f.leg.global_position;var reach=(f.knee.position.length()+f.foot.position.length())*.985 + var horizontal=Vector2(hip.x-f.target.x,hip.z-f.target.z).length_squared() + drop=maxf(drop,hip.y-f.target.y-sqrt(maxf(.001,reach*reach-horizontal))) + model.position.y-=clampf(drop,0,.16) + for f in feet:solve(f) + for i in range(2): + var arm=model.get_node("ArmL" if i==0 else "ArmR") + var desired=arm.rotation if acting else Vector3(sin(phase*TAU+i*PI)*.22*weight,0,(-.06 if i==0 else .06)*(1-weight)) + arm_pose[i]=arm_pose[i].lerp(desired,1-exp(-dt*8));arm.rotation=arm_pose[i] + arm.get_node("Elbow").rotation.x=-.05-sin(phase*TAU+i*PI)*.045*weight + model.get_node("Head").rotation=Vector3(sin(clock*2)*.012, sin(clock*.8+variation)*.025, -sin(phase*TAU)*.018*weight) + var blink=absf(sin(clock*.68+variation)) + for side in ["L","R"]:model.get_node("Head/Eye"+side).scale.y=clampf(blink*24,.10,1) + model.get_node("Tail").rotation.y=sin(clock*2.4+variation)*(.12+.08*weight) diff --git a/Demon_v0.19/imp_walk_tests.gd b/Demon_v0.19/imp_walk_tests.gd new file mode 100644 index 0000000..9ba9278 --- /dev/null +++ b/Demon_v0.19/imp_walk_tests.gd @@ -0,0 +1,55 @@ +extends RefCounted +var failures=[] +func check(ok,label): + if not ok and not label in failures:failures.append(label);push_error("IMP QA: "+label) +func shot(g,name): + await g.get_tree().process_frame;await RenderingServer.frame_post_draw + g.get_viewport().get_texture().get_image().save_png("res://captures/imps-v02/"+name+".png") +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false + var imp=g.life.imps[0];var gait=imp.gait + check(imp.model.get_meta("model_revision")==2 and imp.model.has_node("LegL/Knee/Foot") and imp.model.has_node("ArmR/Elbow") and imp.model.has_node("Head/EyeL"),"new articulated model") + for fps in [30,60,144]: + for speed in [.5,1.25]: + imp.root.position=Vector3(3,0,2);imp.root.rotation=Vector3.ZERO;imp.model.rotation=Vector3.ZERO;imp.model.position=Vector3.ZERO + for f in gait.feet:f.leg.rotation=Vector3.ZERO;f.knee.rotation=Vector3.ZERO;f.foot.rotation=Vector3.ZERO + gait.setup(imp);var max_error=0.0;var max_slide=0.0;var min_floor=1.0;var max_step=0.0 + for frame in range(fps*5): + var last=[] + for f in gait.feet:last.append({"swing":f.swing,"anchor":f.anchor,"at":f.foot.global_position}) + var direction=Vector3.BACK if frame-.005,"hooves stay above floor") + var phase=gait.phase + for i in range(fps):gait.update(1.0/fps) + check(is_equal_approx(gait.phase,phase),"blocked imp does not march in place") + check(gait.feet.all(func(f):return not f.swing and absf(f.foot.global_position.y-.06)<.006),"stop settles both hooves") + print("IMP_METRICS ",fps," ",speed," error ",max_error," slide ",max_slide," floor ",min_floor) + g.reset_shift();g.game_started=true;g.paused=false + for actor in g.life.imps+g.life.neighbours:actor.activity_wait=10000 + imp.root.position=Vector3(-4,0,0);g.life.imps[1].root.position=Vector3(-3.8,0,0);imp.velocity=Vector3.ZERO + for i in range(120): + var before=imp.root.position;var yaw=imp.root.rotation.y + g.life.move_imp(imp,Vector3(1,0,0),1.0/60) + check(imp.root.position.distance_to(before)<.04,"crowd avoidance has no teleport pushes") + check(absf(angle_difference(yaw,imp.root.rotation.y))<=.051,"turn speed bounded") + for kind in ["clean","mop","draw","hum"]: + if kind=="clean" and g.workshop.stations.is_empty():g.workshop.add_station(0,Vector3(2,0,0));g.workshop.rebuild_nav() + g.life.activities.finish(imp);g.life.activities.start(imp,kind);imp.root.position=imp.activity_target;gait.reset() + for i in range(50):g.life.activities.update(imp,.02);gait.update(.02,true) + var arm=imp.model.get_node("ArmR").rotation;g.life.activities.finish(imp);gait.update(.02,false) + check(imp.model.get_node("ArmR").rotation.distance_to(arm)<.35,"activity returns smoothly to walking") + DirAccess.make_dir_recursive_absolute("res://captures/imps-v02") + g.life.activities.finish(imp);imp.root.position=Vector3.ZERO;imp.root.rotation=Vector3.ZERO;gait.reset();g.hud.hide();g.player.hide() + g.camera.position=Vector3(2,1.6,3);g.camera.look_at(Vector3(0,.65,0));g.camera.size=2.4 + for i in range(24): + imp.root.position.z+=1.0/30;gait.update(1.0/30) + if i in [0,6,12,18,23]:await shot(g,"step-%02d"%i) + for i in range(30):gait.update(1.0/60) + await shot(g,"idle") + print("IMP QA ","PASSED" if failures.is_empty() else "FAILED",": articulated model, 30/60/144 fps, planted hooves, turns, stops, avoidance and activity transitions") + g.get_tree().quit(0 if failures.is_empty() else 1) diff --git a/Demon_v0.19/infernal_ui.gd b/Demon_v0.19/infernal_ui.gd new file mode 100644 index 0000000..75f1962 --- /dev/null +++ b/Demon_v0.19/infernal_ui.gd @@ -0,0 +1,48 @@ +extends RefCounted +# Shared nine-slice stone, silver filigree and parchment surfaces. +static func texture_style(texture,padding=18,border=24): + var s=StyleBoxTexture.new();s.texture=texture + for side in [SIDE_LEFT,SIDE_TOP,SIDE_RIGHT,SIDE_BOTTOM]: + s.set_texture_margin(side,border);s.set_content_margin(side,padding) + return s +static func panel(parchment=false,padding=24): + return texture_style(preload("res://art/ui/parchment_panel.svg") if parchment else preload("res://art/ui/stone_panel.svg"),padding,38) +static func button(state="normal",parchment=false): + var texture=preload("res://art/ui/stone_button.svg") + if parchment:texture=preload("res://art/ui/parchment_hover.svg") if state=="hover" else preload("res://art/ui/parchment_button.svg") + elif state=="hover" or state=="pressed":texture=preload("res://art/ui/stone_hover.svg") + elif state=="disabled":texture=preload("res://art/ui/stone_disabled.svg") + var s=texture_style(texture,12,30) + s.content_margin_top=10;s.content_margin_bottom=10 + return s +static func apply_button(b,parchment=false): + for state in ["normal","hover","pressed","disabled"]:b.add_theme_stylebox_override(state,button(state,parchment)) + b.add_theme_color_override("font_color",Color("292e2c") if parchment else Color("deddd0")) + b.add_theme_color_override("font_focus_color",Color("292e2c") if parchment else Color("deddd0")) + b.add_theme_color_override("font_hover_color",Color("131a18") if parchment else Color("fff9e7")) + b.add_theme_color_override("font_pressed_color",Color("161d1a") if parchment else Color("e9e3d3")) + b.add_theme_color_override("font_disabled_color",Color("777d77")) + var focus=StyleBoxFlat.new();focus.bg_color=Color.TRANSPARENT;focus.border_color=Color("b9c9c0");focus.set_border_width_all(1);focus.set_corner_radius_all(5) + b.add_theme_stylebox_override("focus",focus) + +static func icon(state="normal"): + var s=StyleBoxFlat.new();s.bg_color=Color("1b2425") if state!="hover" else Color("394446") + s.border_color=Color("929f98") if state!="pressed" else Color("d9e0cc");s.set_border_width_all(2);s.set_corner_radius_all(5) + s.shadow_color=Color(0,0,0,.6);s.shadow_size=3 + for side in [SIDE_LEFT,SIDE_TOP,SIDE_RIGHT,SIDE_BOTTOM]:s.set_content_margin(side,5) + return s + +static func apply_slider(slider): + var track=StyleBoxFlat.new();track.bg_color=Color("111a19");track.border_color=Color("6a7971");track.set_border_width_all(1);track.set_corner_radius_all(2);track.content_margin_top=4;track.content_margin_bottom=4 + var fill=track.duplicate();fill.bg_color=Color("81938b");fill.border_color=Color("a9b5a7") + slider.add_theme_stylebox_override("slider",track);slider.add_theme_stylebox_override("grabber_area",fill);slider.add_theme_stylebox_override("grabber_area_highlight",fill) + for state in ["grabber","grabber_highlight","grabber_disabled"]:slider.add_theme_icon_override(state,preload("res://art/ui/slider_knob.svg")) +static func apply_check(check): + for state in ["checked","checked_disabled"]:check.add_theme_icon_override(state,preload("res://art/ui/check_on.svg")) + for state in ["unchecked","unchecked_disabled"]:check.add_theme_icon_override(state,preload("res://art/ui/check_off.svg")) +static func apply_scroll(scroll): + var bar=scroll.get_v_scroll_bar() + var track=StyleBoxFlat.new();track.bg_color=Color("111918");track.content_margin_left=4;track.content_margin_right=4 + var grabber=StyleBoxFlat.new();grabber.bg_color=Color("606e67");grabber.border_color=Color("a3aea2");grabber.set_border_width_all(1);grabber.set_corner_radius_all(3);grabber.content_margin_top=12;grabber.content_margin_bottom=12 + bar.add_theme_stylebox_override("scroll",track) + for state in ["grabber","grabber_highlight","grabber_pressed"]:bar.add_theme_stylebox_override(state,grabber) diff --git a/Demon_v0.19/inspect_asset.gd b/Demon_v0.19/inspect_asset.gd new file mode 100644 index 0000000..5dfd7c7 --- /dev/null +++ b/Demon_v0.19/inspect_asset.gd @@ -0,0 +1,16 @@ +extends SceneTree +func _initialize(): + var scene=load("res://art/succubus/succubus_v01.glb").instantiate() + root.add_child(scene) + walk(scene) + scene.queue_free() + quit() +func walk(node): + if node is AnimationPlayer: + print("ASSET_ANIMATIONS ",node.name," ",node.get_animation_list()) + for name in node.get_animation_list(): + var a=node.get_animation(name) + print(name," length=",a.length," tracks=",a.get_track_count()) + if node is Skeleton3D:print("ASSET_SKELETON ",node.get_bone_count()) + if node is MeshInstance3D:print("ASSET_MESH ",node.name," surfaces=",node.mesh.get_surface_count()) + for c in node.get_children():walk(c) diff --git a/Demon_v0.19/judgement.gd b/Demon_v0.19/judgement.gd new file mode 100644 index 0000000..8424388 --- /dev/null +++ b/Demon_v0.19/judgement.gd @@ -0,0 +1,136 @@ +extends RefCounted +const NAMES=["Отшлепать","Растянуть","Колесовать","Железная дева","Слушать попсу","Сварить"] +var w +var g +func setup(workshop): + w=workshop;g=w.g + +func assign(s): + var available=[] + for d in w.stations: + if not d.selected in available:available.append(d.selected) + if available.is_empty():available=[0] + available.sort() + var count=w.Economy.recipe_size(s.id,g.development.xp,available.size()) + var required=[] + for i in range(count):required.append(available[(s.id+i)%available.size()]) + s["required"]=required;s["served"]=[];s["origin_station"]=-1;s["queue_reserved"]=true + update_label(s) + +func remaining(s): + return s.get("required",[0]).filter(func(kind):return not kind in s.get("served",[])) + +func accepts(s,kind): + return kind in remaining(s) + +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(28.8,28.8);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("bccbc4") + +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=0 and origin.001: + s.visual.rotation.y=lerp_angle(s.visual.rotation.y,atan2(direction.x,direction.z)-s.node.rotation.y,1.0-exp(-dt*4.5)) + var phase=g.time*2.8+s.id*.73 + s.visual.position.y=lerpf(s.visual.position.y,.64+sin(phase)*.065,blend) + s.visual.rotation.x=lerpf(s.visual.rotation.x,sin(phase*.8)*.025,blend) + s.visual.rotation.z=lerpf(s.visual.rotation.z,sin(phase*.65)*.022,blend) + +func pickup(s): + if not s.state in ["queue","ready"]:return false + if g.held>=0:w.drop_held() + s["return_pose"]=s.visual.transform + s.queue_reserved=s.state=="queue" + float_pose(s);s.state="held";g.held=s.id + update_label(s) + w.announce_soul(s) + return true + +func drop(s): + var origin=s.get("origin_station",-1) + if origin>=0 and origin0:g.voice_player.play() + var materials=[] + var queue=[s.visual] + for w in g.wisps: + if is_instance_valid(w.node) and w.node.get_parent()==s.node:w.node.hide() + while not queue.is_empty(): + var n=queue.pop_back() + for c in n.get_children():queue.append(c) + if n is MeshInstance3D: + for surface in range(n.mesh.get_surface_count()): + var old=n.get_active_material(surface) + var color=Color("a4bbca") + if old is ShaderMaterial and old.shader==preload("res://ghost.gdshader"):color=old.get_shader_parameter("base_color") + elif old is StandardMaterial3D:color=old.albedo_color + var mat=ShaderMaterial.new();mat.shader=preload("res://burn.gdshader");mat.set_shader_parameter("base_color",color);mat.set_shader_parameter("base_y",s.node.position.y) + if old is ShaderMaterial and old.shader==preload("res://ghost.gdshader"): + mat.set_shader_parameter("use_texture",old.get_shader_parameter("use_texture")) + mat.set_shader_parameter("albedo_texture",old.get_shader_parameter("albedo_texture")) + n.set_surface_override_material(surface,mat);materials.append(mat) + n.material_override=null + s.label.hide() + var fx=Node3D.new();g.add_child(fx);fx.position=s.node.position + for i in range(7): + var mesh=QuadMesh.new();mesh.size=Vector2(0.9,2.3) + var n=MeshInstance3D.new();fx.add_child(n);n.mesh=mesh;n.position=Vector3(sin(i*2.4)*0.5,1.1,cos(i*2.4)*0.5);n.rotation.y=i*1.1 + var mat=ShaderMaterial.new();mat.shader=preload("res://fire.gdshader");n.material_override=mat;n.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + var sparks=[] + for i in range(16):sparks.append(g.ball(fx,Vector3.ZERO,Vector3.ONE*0.045,Color("ffb23d"))) + var light=OmniLight3D.new();fx.add_child(light);light.position.y=1;light.light_color=Color("ff642b");light.omni_range=4 + burns.append({"root":s.node,"fx":fx,"materials":materials,"t":0.0,"sparks":sparks,"light":light}) + +func update(dt): + activities.update_marks(dt) + for imp in imps+neighbours: + var busy=activities.update(imp,dt) + if not busy: + imp.patrol_age+=dt + if imp.root.position.distance_to(imp.patrol_target)<.25 or imp.patrol_age>9: + imp.patrol_angle+=1.05;imp.patrol_age=0;imp.patrol_target=patrol_point(imp) + if imp.has("origin"):move_neighbour(imp,imp.patrol_target,dt) + else:move_imp(imp,imp.patrol_target,dt) + imp.gait.update(dt,busy and imp.activity_time>0) + for i in range(burns.size()-1,-1,-1): + var b=burns[i];b.t+=dt + for mat in b.materials:mat.set_shader_parameter("progress",b.t/1.7) + b.fx.scale=Vector3.ONE*minf(1.0,b.t*6)*(1.0-clampf((b.t-1.3)/0.7,0,1)) + b.light.light_energy=2.5*(1-clampf(b.t/2,0,1)) + for j in range(b.sparks.size()): + var t=fposmod(b.t*0.8+j*0.061,1.0);b.sparks[j].position=Vector3(sin(j*2.4+b.t)*0.6,t*3,cos(j*2.4)*0.6) + if b.t>=1.7:b.root.hide() + if b.t>=2:b.root.queue_free();b.fx.queue_free();burns.remove_at(i) + if is_instance_valid(hero_bubble): + bubble_time-=dt + var p=g.camera.unproject_position(g.player.position+Vector3(0,3.5,0)) + g.dialogue.place_bubble(hero_bubble,p) + if is_instance_valid(g.development.bubble) and hero_bubble.get_global_rect().intersects(g.development.bubble.get_global_rect()): + hero_bubble.position.y=maxf(12,g.development.bubble.position.y-hero_bubble.size.y-18) + if bubble_time<=0:hero_bubble.queue_free();hero_bubble=null + +func move_imp(imp,target,dt): + var w=g.workshop + var destination=w.cell(w.free_floor(target)) + if imp.destination!=destination or imp.revision!=w.revision: + imp.destination=destination;imp.revision=w.revision + var start=w.cell(imp.root.position) + if w.nav.is_point_solid(start): + imp.root.position=w.free_floor(imp.root.position);start=w.cell(imp.root.position);imp.velocity=Vector3.ZERO;imp.gait.reset() + imp.path=w.nav.get_point_path(start,destination) + if not imp.path.is_empty():imp.path.remove_at(0) + var next=target + if not imp.path.is_empty():next=Vector3(imp.path[0].x,0,imp.path[0].y) + var step_dt=minf(dt,.05) + var desired_velocity=(next-imp.root.position).normalized()*1.25 + desired_velocity.y=0 + var actors=[g.player.position] + for helper in w.helpers:actors.append(helper.root.position) + for soul in g.souls: + if soul.state in ["queue","reserved","held","transit"]:actors.append(soul.node.position) + for other in imps: + if other.root!=imp.root:actors.append(other.root.position) + for position in actors: + var delta=imp.root.position-position;delta.y=0 + if delta.length_squared()<.52*.52: + desired_velocity+=(delta.normalized() if delta.length_squared()>.0001 else Vector3.RIGHT)*1.4*(1-delta.length()/.52) + imp.velocity=imp.get("velocity",Vector3.ZERO).move_toward(desired_velocity.limit_length(1.35),step_dt*5) + var before=imp.root.position;var desired=before+imp.velocity*step_dt + w.mesh_walking.move_actor(imp.root,desired-imp.root.position,.20,1.0) + imp.root.position.x=clampf(imp.root.position.x,-7.1,w.walk_right());imp.root.position.z=clampf(imp.root.position.z,-4.8,5.6) + face_motion(imp,imp.root.position-before,step_dt) + if imp.root.position.distance_to(next)<.12 and not imp.path.is_empty():imp.path.remove_at(0) + +func patrol_point(imp): + var origin=imp.get("origin",Vector3.ZERO) + var point=origin+Vector3(sin(imp.patrol_angle)*5.8,0,cos(imp.patrol_angle)*3.5) + return point if imp.has("origin") else g.workshop.free_floor(point) if g.workshop else point + +func face_motion(imp,delta,dt): + delta.y=0 + if delta.length_squared()>.000002: + imp.root.rotation.y+=clampf(angle_difference(imp.root.rotation.y,atan2(delta.x,delta.z)),-3*dt,3*dt) + +func move_neighbour(imp,target,dt): + dt=minf(dt,.05) + var desired=(target-imp.root.position).normalized()*1.15;desired.y=0 + imp.velocity=imp.velocity.move_toward(desired,dt*4) + var before=imp.root.position + g.workshop.mesh_walking.move_actor(imp.root,imp.velocity*dt,.20,1.0) + imp.root.position.x=clampf(imp.root.position.x,imp.origin.x-7.1,imp.origin.x+7.1) + imp.root.position.z=clampf(imp.root.position.z,imp.origin.z-5.5,imp.origin.z+5.5) + face_motion(imp,imp.root.position-before,dt) diff --git a/Demon_v0.19/main.gd b/Demon_v0.19/main.gd new file mode 100644 index 0000000..c2e177b --- /dev/null +++ b/Demon_v0.19/main.gd @@ -0,0 +1,992 @@ +extends Node3D + +var STATION = Vector3(2, 0, 0.5) +const SAVE = "user://progress.json" +var life +var workshop +var development +var player: Node3D +var avatar: Node3D +var camera: Camera3D +var souls: Array[Dictionary] = [] +var held = -1 +var working = -1 +var coins = 0 +var done = 0 +var essence = 0 +var speed_level = 0 +var power_level = 0 +var automatic = false +var next_spawn_delay = -1.0 +var game_started = false +var menu +var gate: Node3D +var gate_target = 0.0 +var build_id = "0.19-editor" +var whip_volume = 0.75 +var ambience_volume = 0.35 +var voice_volume = 0.60 +var voice_player: AudioStreamPlayer +const MALE_GROAN=preload("res://audio/burn_male.ogg") +const FEMALE_GROAN=preload("res://audio/burn_female.ogg") +var ambience_fade = 0.0 +var fullscreen = false +var vsync = true +const Progression = preload("res://progression.gd") +const WHIP = preload("res://audio/whip.mp3") +const AMBIENCE = preload("res://audio/cemetery_ambience_loop.ogg") +const GATE_SPAWN = Vector3(-5.3,0,-6.55) +const GATE_EXIT = Vector3(-5.3,0,-4.3) +var auto_clock = 0.0 +var time = 0.0 +var talk_clock = 0.0 +var hit_clock = 0.0 +var face = Vector3(0, 0, 1) +var paused = false +var test_mode = false +var uid = 0 +var flames: Array = [] +var moving_gears: Array = [] +var wisps: Array = [] +var architecture = preload("res://endless.gd").new() +var orbit = preload("res://orbit.gd").new() +var dungeon = preload("res://dungeon.gd").new() +var audio_player: AudioStreamPlayer +var ambience_player: AudioStreamPlayer +var muted = false +var soul_talk_clock = 0.0 +var stage_effects +var dialogue +var soul_talk_label: Label +var sound_button: Button +var dossier: Label +var capture_mode = false +const CAMERA_OFFSET = Vector3(10,18,20) +const CAMERA_TARGET = Vector3(2.0,0.4,-0.2) +const NAMES = preload("res://soul_catalog.gd").NAMES +const LINES = ["А тут кормят вообще?","Есть закурить?","А я ведь говорил, что это не я…","Ну мы же взрослые люди, договоримся…","Главное, чтобы Дима не узнал про Сашу…","Я только по праздникам…","Ребят, это просто жесть, я реально в аду!","Я слишком красив для этого места…","А я всё про вас знаю!","Это не пирамида, это инвестиционная модель!"] +var hud: CanvasLayer +var stats: Label +var gold_value: Label +var souls_value: Label +var ui_compat: Control +var task: Label +var quote: Label +var status: Label +var speed_button: Button +var power_button: Button +var auto_button: Button +var zone: MeshInstance3D +var ring: MeshInstance3D +var hover_id = -1 +var popups: Array[Dictionary] = [] +var rng = RandomNumberGenerator.new() +var quips = ["Ещё один. Наверху сегодня скидки на грехи?", "Вечные муки — это, оказывается, моя должность.", "На собеседовании это называли работой с людьми.", "Я повелительница тьмы. По документам — стажёр.", "Кофе остыл. Души всё ещё горячие.", "Обеденный перерыв перенесли на следующую вечность."] + +func _ready(): + var args=OS.get_cmdline_user_args() + test_mode="--test-room-decor" in args or "--test-camera-controls" in args or "--test-rubies" in args or "--test-runtime-burn" in args or "--test-single-punishment" in args or "--test-expansion" in args or "--test-imps" in args or "--test-flight-camera" in args or "--test-maintenance" in args or "--test-castle" in args or "--test-building" in args or "--test-workflow" in args or "--test-roster" in args or "--test-priority" in args or "--test-mesh" in args or "--test-economy" in args or "--test-posture" in args or "--test-gait" in args or "--test-visuals" in args or "--test-mode" in args or "--test-exit" in args or "--test-ui" in args or "--test-audio" in args or "--test-sentences" in args or "--test-hud" in args + capture_mode="--capture-workflow" in args or "--capture-roster" in args or "--capture-economy" in args or "--capture-posture" in args or "--capture-gait" in args or "--capture" in args or "--capture-workshop" in args + if FileAccess.file_exists("res://build_info.json"): + var stamp=JSON.parse_string(FileAccess.get_file_as_string("res://build_info.json")) + if stamp is Dictionary: build_id=str(stamp.get("id",build_id)) + if "--probe-build" in args: + print("BUILD_PROBE: "+JSON.stringify({"id":build_id,"version":"0.19"})) + get_tree().quit() + return + rng.seed=8127 + if not test_mode and not capture_mode: + load_progress() + load_settings() + architecture.build(self) + player=Node3D.new() + add_child(player) + player.position=Vector3(-1,0,2.5) + avatar=make_person(true) + player.add_child(avatar) + if avatar.has_method("configure"):avatar.configure(self) + var hero_fill=OmniLight3D.new() + player.add_child(hero_fill) + hero_fill.position=Vector3(0.4,3.0,1.8) + hero_fill.light_color=Color("ffba8b") + hero_fill.light_energy=0.35 + hero_fill.omni_range=3.4 + camera=Camera3D.new() + add_child(camera) + camera.projection=Camera3D.PROJECTION_ORTHOGONAL + camera.size=20.0 + camera.position=CAMERA_TARGET+CAMERA_OFFSET + camera.look_at(CAMERA_TARGET) + camera.current=true + orbit.setup(self) + stage_effects=preload("res://stage_effects.gd").new();stage_effects.build(self) + build_ui() + development=preload("res://development.gd").new() + add_child(development) + development.build(self) + life=preload("res://life.gd").new() + add_child(life) + life.build(self) + setup_audio() + menu=preload("res://menu.gd").new() + add_child(menu) + menu.build(self) + apply_settings() + workshop=preload("res://workshop.gd").new() + add_child(workshop) + workshop.setup(self) + if not test_mode and not capture_mode: ambience_player.play() + paused=true + hud.visible=false + say("Первый день. Последняя надежда на отпуск.") + refresh_ui() + if automatic: build_auto_arm() + if "--test-exit" in args: call_deferred("test_exit") + elif "--test-audio" in args: call_deferred("run_audio_tests") + elif "--test-ui" in args: call_deferred("run_ui_tests") + elif "--test-room-decor" in args:call_deferred("run_room_decor_tests") + elif "--test-camera-controls" in args:call_deferred("run_camera_controls_tests") + elif "--test-rubies" in args:call_deferred("run_ruby_ui_tests") + elif "--test-runtime-burn" in args:call_deferred("run_runtime_burn_tests") + elif "--test-single-punishment" in args:call_deferred("run_single_punishment_tests") + elif "--test-expansion" in args:call_deferred("run_expansion_regression_tests") + elif "--test-imps" in args:call_deferred("run_imp_walk_tests") + elif "--test-flight-camera" in args:call_deferred("run_flight_camera_tests") + elif "--test-maintenance" in args:call_deferred("run_maintenance_tests") + elif "--test-castle" in args:call_deferred("run_castle_tests") + elif "--test-building" in args:call_deferred("run_building_tests") + elif "--test-workflow" in args:call_deferred("run_workflow_tests") + elif "--test-roster" in args:call_deferred("run_roster_tests") + elif "--test-priority" in args:call_deferred("run_delivery_priority_tests") + elif "--test-mesh" in args:call_deferred("run_mesh_tests") + elif "--test-sentences" in args:call_deferred("run_sentence_tests") + elif "--test-economy" in args:call_deferred("run_economy_tests") + elif "--test-hud" in args:call_deferred("run_hud_tests") + elif "--test-visuals" in args:call_deferred("run_visual_tests") + elif "--test-gait" in args:call_deferred("run_gait_tests") + elif "--test-posture" in args:call_deferred("run_posture_tests") + elif test_mode: call_deferred("run_tests") + elif "--capture-workflow" in args:call_deferred("capture_workflow") + elif "--capture-roster" in args:call_deferred("capture_roster") + elif "--capture-economy" in args:call_deferred("capture_economy") + elif "--capture-workshop" in args:call_deferred("capture_workshop") + elif "--capture-gait" in args:call_deferred("capture_gait") + elif "--capture-posture" in args:call_deferred("capture_posture") + elif capture_mode: call_deferred("capture_scene") + +func capture_workshop(): + await preload("res://workshop_capture.gd").new().run(self) + +func mat(c: Color, glow = false) -> StandardMaterial3D: + var m = StandardMaterial3D.new() + m.albedo_color = c + m.roughness = 0.67 + m.metallic = 0.15 + if glow: + m.emission_enabled = true + m.emission = c + m.emission_energy_multiplier = 1.2 + return m + +func mesh_node(parent: Node3D, mesh: Mesh, pos: Vector3, color: Color) -> MeshInstance3D: + var n = MeshInstance3D.new() + n.mesh = mesh + n.material_override = mat(color) + parent.add_child(n) + n.position = pos + return n + +func box(parent: Node3D, pos: Vector3, size: Vector3, color: Color) -> MeshInstance3D: + var m = BoxMesh.new() + m.size = size + return mesh_node(parent, m, pos, color) + +func ball(parent: Node3D, pos: Vector3, size: Vector3, color: Color) -> MeshInstance3D: + var m = SphereMesh.new() + m.radius = 0.5 + m.height = 1 + m.radial_segments = 12 if maxf(size.x,maxf(size.y,size.z))<.16 else 96 + m.rings = 6 if maxf(size.x,maxf(size.y,size.z))<.16 else 32 + var n = mesh_node(parent,m,pos,color) + n.scale = size + return n + +func cylinder(parent: Node3D, pos: Vector3, radius: float, height: float, color: Color, top = -1.0) -> MeshInstance3D: + var m = CylinderMesh.new() + m.bottom_radius = radius + m.top_radius = radius if top < 0 else top + m.height = height + m.radial_segments = 12 if radius<.06 else 96 + return mesh_node(parent,m,pos,color) + +func line(parent: Node3D, a: Vector3, b: Vector3, radius: float, color: Color): + var n = cylinder(parent,(a+b)/2,radius,a.distance_to(b),color) + n.quaternion = Quaternion(Vector3.UP,(b-a).normalized()) + return n + +func torus(parent: Node3D, pos: Vector3, radius: float, color: Color): + var m = TorusMesh.new() + m.inner_radius = radius-0.045 + m.outer_radius = radius+0.045 + m.rings = 96 + m.ring_segments = 16 + var n = mesh_node(parent,m,pos,color) + n.material_override = mat(color,true) + return n + +func sign3d(text: String, pos: Vector3, color: Color, size = 38): + var n = Label3D.new() + add_child(n) + n.position = pos + n.text = text + n.font_size = size + n.font=preload("res://art/fonts/KellySlab-Regular.ttf") + n.pixel_size = 0.009 + n.modulate = color + n.billboard = BaseMaterial3D.BILLBOARD_ENABLED + n.outline_size = 6 + return n + +func make_person(demon: bool, kind = 0) -> Node3D: + if demon:return preload("res://succubus_actor.gd").new() + var soul=preload("res://soul_actor.gd").new(kind) + soul.configure(self) + return soul + +func panel(pos: Vector2, size: Vector2) -> PanelContainer: + var p = PanelContainer.new() + if is_instance_valid(ui_compat):ui_compat.add_child(p) + else:hud.add_child(p) + p.position = pos + p.size = size + var style=preload("res://infernal_ui.gd").panel(false,30) + style.content_margin_left=40;style.content_margin_right=40 + style.content_margin_top=24;style.content_margin_bottom=24 + p.add_theme_stylebox_override("panel",style) + var ornament=preload("res://gothic.gd").new() + p.add_child(ornament) + ornament.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) + return p + +func label(text: String, font_size = 18, color = Color("eddfdf")) -> Label: + var l = Label.new() + l.text = text + l.add_theme_font_size_override("font_size",font_size) + l.add_theme_font_override("font",preload("res://art/fonts/body_bold.tres")) + l.add_theme_color_override("font_color",color) + l.mouse_filter = Control.MOUSE_FILTER_IGNORE + return l + +func button(text: String, callback: Callable) -> Button: + var b = Button.new() + b.text = text + b.add_theme_font_override("font",preload("res://art/fonts/body_bold.tres")) + b.custom_minimum_size = Vector2(252,58) + b.add_theme_font_size_override("font_size",16) + preload("res://infernal_ui.gd").apply_button(b,true) + b.pressed.connect(callback) + return b + +func build_ui(): + preload("res://ui.gd").new().build(self) + +func set_pause(value: bool): + if value: orbit.stop() + if not game_started: return + if value and held>=0: + if workshop:workshop.drop_held() + else:release_soul() + if value and workshop:workshop.context.hide() + paused=value + if audio_player: audio_player.stream_paused=value + if voice_player:voice_player.stream_paused=value + if value: menu.show_pause() + else: menu.show_page("") + +func start_game(): + if menu.current_page=="main":reset_shift() + if not game_started: + game_started=true + paused=false + spawn_soul() + if not test_mode and not capture_mode: save_progress() + hud.visible=true + set_pause(false) + if workshop:workshop.message("240 золота на обустройство. [B] — строительство, [T] — развитие.");workshop.refresh() + say("Новая смена. Обустрой свой цех.") + +func reset_shift(): + if workshop:workshop.reset() + for soul in souls: + if is_instance_valid(soul.node):soul.node.queue_free() + souls.clear();wisps.clear() + for burn in life.burns: + if is_instance_valid(burn.root):burn.root.queue_free() + if is_instance_valid(burn.fx):burn.fx.queue_free() + life.burns.clear() + for popup in popups: + if is_instance_valid(popup.node):popup.node.queue_free() + popups.clear() + if is_instance_valid(development.bubble):development.bubble.queue_free();development.bubble=null + if is_instance_valid(life.hero_bubble):life.hero_bubble.queue_free();life.hero_bubble=null + coins=240;done=0;essence=0;uid=0;speed_level=0;power_level=0;held=-1;working=-1;automatic=false + game_started=false;next_spawn_delay=-1;hit_clock=0;auto_clock=0;gate_target=0;gate.position.y=0 + development.tier=0;development.selected=0;development.xp=0;development.points=0;development.action_level=0;development.leadership=0 + development.elapsed=0;development.stage=0;development.release_clock=0;development.close_clock=0;development.placement_clock=0 + development.action_bar.value=0;development.finish_clock=0;development.tree_panel.hide();development.rebuild_device() + development.device.hide() + player.position=Vector3(-1,0,2.5) + avatar.striking=false;avatar.set_walking(false);avatar.refresh();avatar.reset_gait() + if dialogue:dialogue.stop() + refresh_ui() + +func return_to_main_menu(): + set_pause(true) + hud.visible=false + menu.show_main() + save_progress() + +func quit_game(): + if game_started: save_progress() + save_settings() + print("QUIT: main-menu exit action") + get_tree().quit() + +func test_exit(): + assert(menu.current_page=="main") + print("PASS: exit button connected") + menu.main_exit.pressed.emit() + +func say(text: String): + if life:life.speak(text) + talk_clock=0 + +func refresh_ui(): + stats.text = "Золото %d Души %d" % [coins,essence] + if gold_value:gold_value.text=str(coins) + if souls_value:souls_value.text=str(essence) + task.text = "ПЛАН СМЕНЫ %d / 15\n%s" % [mini(done,15),"План выполнен. Работаем дальше!" if done >= 15 else "Наладь работу своего участка"] + if development:development.refresh() + +func spawn_soul(): + if not game_started: return + if workshop and workshop.stations.is_empty(): return + next_spawn_delay=-1.0 + gate_target=3.5 + var root=Node3D.new() + add_child(root) + root.position=GATE_SPAWN + var kind=uid%10 + var visual=make_person(false,kind) + root.add_child(visual) + make_ghost(visual,kind) + visual.position.y=.55 + set_soul_reveal(visual,0.0) + stage_effects.summon() + add_wisps(root,kind) + var progress=Label3D.new() + root.add_child(progress) + progress.position.y=2.9 + progress.billboard=BaseMaterial3D.BILLBOARD_ENABLED + progress.font_size=25 + progress.font=preload("res://art/fonts/KellySlab-Regular.ttf") + progress.pixel_size=0.008 + progress.modulate=Color("ffe1a5") + progress.outline_size=6 + souls.append({"id":uid,"kind":kind,"node":root,"visual":visual,"label":progress,"hits":0,"phase":rng.randf()*6.28,"flash":0.0,"entering":true,"entry_time":0.0}) + souls.back()["state"]="queue" + souls.back()["assigned"]=-1 + if workshop:workshop.sentences.assign(souls.back()) + uid+=1 + if stats: refresh_ui() + +func advance_spawns(dt: float): + if paused or not game_started: return + if gate: gate.position.y=move_toward(gate.position.y,gate_target,dt*5.0) + stage_effects.update(dt) + for soul in souls: + if not soul.entering: continue + soul.entry_time+=dt + # Wait for the portcullis, then walk from the gateway onto the floor. + var t=clampf((soul.entry_time-0.70)/1.6,0.0,1.0) + soul.node.position=GATE_SPAWN.lerp(GATE_EXIT,t) + soul.visual.position.y=.55+sin(time*2+soul.phase)*.06 + set_soul_reveal(soul.visual,clampf(soul.entry_time/.75,0,1)) + if t>=1.0: + soul.entering=false + gate_target=0.0 + if souls.is_empty() and next_spawn_delay>=0: + next_spawn_delay=maxf(0.0,next_spawn_delay-dt) + if next_spawn_delay<=0: spawn_soul() + +func index_of(id: int) -> int: + for i in range(souls.size()): + if souls[i].id == id: return i + return -1 + +func pick_soul(mouse=null) -> int: + if mouse==null:mouse=get_viewport().get_mouse_position() + var chosen = -1 + var best = 68.0 + for s in souls: + if s.entering: continue + var p = camera.unproject_position(s.node.position+Vector3(0,1.0,0)) + var d = mouse.distance_to(p) + if d < best: + best = d + chosen = s.id + return chosen + +func grab(id: int): + if paused: return + var i = index_of(id) + if i<0 or souls[i].entering or id==working: return + if player.position.distance_to(souls[i].node.position)>2.5: + say("Я не телепат. Сначала подойди поближе.") + return + held = id + souls[i].visual.rotation.z=0 + souls[i].visual.set_walking(false) + say("За мной. Твою волю здесь уже списали.") + +func release_soul(): + var i = index_of(held) + if i<0: + held = -1 + return + var s = souls[i] + s.visual.rotation = Vector3(0,0.58,0) + s.node.rotation.y=0 + if working<0 and s.node.position.distance_to(STATION)<3.3 and player.position.distance_to(STATION)<2.6: + working = held + s["placement_start"]=s.node.transform + s["visual_start"]=s.visual.transform + s.node.position = STATION + s.label.text = "" + development.attach_soul(s) + auto_clock = 0 + say("Пять шлепков. Даже унижение здесь по регламенту." if power_level==0 else "Ускоренный курс исправления. Без домашних заданий.") + else: + say("Доставка до золотого круга. Клиент сам себя не обработает.") + held = -1 + +func hit(auto_hit = false): + if paused or development.selected!=0 or development.placement_clock>0: return + var i = index_of(working) + if i<0: return + var s = souls[i] + if not auto_hit and player.position.distance_to(STATION)>3: + say("До рабочего места ещё нужно дойти.") + return + if not auto_hit and hit_clock>0: return + hit_clock = 0.45/(1.0+development.action_level*0.2) + play_whip() + if not auto_hit and avatar.has_method("strike"):avatar.strike(hit_clock) + s.hits+=1 + development.action_bar.value=clampf(s.hits/5.0*100,0,100) + s.flash = 0.3 + s.label.text = "" + if s.hits>=5:complete_soul() + refresh_ui() + +func complete_soul(): + var i=index_of(working) + if i<0:return + if souls[i].get("completed",false):return + souls[i]["completed"]=true + development.action_bar.value=100 + development.finish_clock=.65 + if development.selected==3:development.release_clock=2.05 + coins+=10 + done+=1 + development.reward() + floating("+10 МОНЕТ +20 ОПЫТА",STATION+Vector3(0,2.7,0),Color("a5f3ce")) + life.burn(souls[i]) + souls.remove_at(i) + working=-1 + next_spawn_delay=2.9 + refresh_ui() + save_progress() + +func floating(text: String, p: Vector3, c: Color): + var l = sign3d(text,p,c,42) + popups.append({"node":l,"ttl":1.15}) + +func _input(event): + if workshop:workshop.track_pointer(event) + orbit.input(event) + +func _unhandled_input(event): + if workshop and workshop.input(event):return + if event is InputEventKey and event.pressed and not event.echo: + if event.keycode==KEY_F5 or event.physical_keycode==KEY_F5: + development.test_boost() + get_viewport().set_input_as_handled() + return + if event.keycode==KEY_ESCAPE: + if development.tree_panel.visible: + development.toggle_tree() + return + if menu.visible: menu.escape() + elif game_started: set_pause(true) + get_viewport().set_input_as_handled() + return + if event.physical_keycode==KEY_T: + development.toggle_tree() + return + if event.physical_keycode==KEY_M: + toggle_sound() + return + if paused: return + if event is InputEventMouseButton: + if event.button_index==MOUSE_BUTTON_MIDDLE and event.pressed: orbit.begin() + if event.button_index==MOUSE_BUTTON_RIGHT and event.pressed: + development.activate() + if event.button_index==MOUSE_BUTTON_WHEEL_UP and event.pressed: camera.size=maxf(12,camera.size-1.0) + if event.button_index==MOUSE_BUTTON_WHEEL_DOWN and event.pressed: camera.size=minf(42,camera.size+1.0) + if event.button_index==MOUSE_BUTTON_LEFT: + if event.pressed: + var id=pick_soul() + if id==working and id>=0: hit() + elif id>=0: grab(id) + +func _process(delta): + var dt=minf(delta,0.05) + ambience_fade=minf(1.0,ambience_fade+delta/1.5) + update_audio_levels() + time+=dt + for gear in moving_gears: gear.rotation.z+=dt*0.65 + if workshop: + workshop.update(dt) + return + if paused or not game_started: return + advance_spawns(dt) + update_wisps(dt) + for f in flames: f.scale.y = 0.9+sin(time*5+f.position.x)*0.13 + + hit_clock = maxf(0,hit_clock-dt) + talk_clock+=dt + if talk_clock>20: say(quips[rng.randi_range(0,quips.size()-1)]) + var move = Vector2.ZERO + if Input.is_physical_key_pressed(KEY_W) or Input.is_physical_key_pressed(KEY_UP): move.y-=1 + if Input.is_physical_key_pressed(KEY_S) or Input.is_physical_key_pressed(KEY_DOWN): move.y+=1 + if Input.is_physical_key_pressed(KEY_A) or Input.is_physical_key_pressed(KEY_LEFT): move.x-=1 + if Input.is_physical_key_pressed(KEY_D) or Input.is_physical_key_pressed(KEY_RIGHT): move.x+=1 + var right = camera.global_basis.x + right.y=0 + right=right.normalized() + var down = camera.global_basis.z + down.y=0 + down=down.normalized() + var direction = (right*move.x+down*move.y).normalized() + player.position += direction*dt*(3.3+speed_level*0.825)*(0.78 if held>=0 else 1.0) + player.position.x=clampf(player.position.x,-7.3,7.2) + player.position.z=clampf(player.position.z,-4.8,5.7) + # Keep the desk and filing stack solid without a physics dependency. + if player.position.x>4.0 and player.position.z < -3.1: player.position.z = -3.1 + if player.position.x>5.7 and player.position.z>3.0: player.position.x=5.7 + for pillar in [STATION+Vector3(-1.25,0,-1.6),STATION+Vector3(1.25,0,-1.6)]: + var away=player.position-pillar + away.y=0 + if away.length()<0.55: + player.position=pillar+(away.normalized() if away.length()>0.001 else Vector3.FORWARD)*0.55 + if direction.length()>0: + face=direction + avatar.rotation.y=lerp_angle(avatar.rotation.y,atan2(direction.x,direction.z),dt*12) + avatar.position.y=0.0 + avatar.rotation.z=0.0 + else: + avatar.position.y=0.0 + avatar.rotation.z=lerpf(avatar.rotation.z,0.0,dt*8) + animate_gait(avatar, time, direction.length()>0) + if hit_clock>0.03 and avatar.get_node_or_null("ArmR"): + avatar.get_node("ArmR").rotation.x=-1.4 + orbit.update(dt) + if held>=0: + var i=index_of(held) + if i>=0: + var p=player.position-face*0.85 + souls[i].node.position=souls[i].node.position.lerp(p,dt*12) + souls[i].node.rotation.y=atan2(face.x,face.z)-0.58 + souls[i].visual.position.y=.62+sin(time*2.2)*.045 + souls[i].visual.rotation.x=0;souls[i].visual.rotation.z=0 + if player.position.distance_to(STATION)<2.35 and souls[i].node.position.distance_to(STATION)<3.3:release_soul() + for s in souls: + s.flash=maxf(0,s.flash-dt) + if s.id!=held and s.id!=working: + s.visual.set_walking(false) + s.visual.position.y=.55+sin(time*2+s.phase)*.06 + s.visual.rotation.z=sin(time*48)*s.flash*0.8 + s.visual.scale=Vector3(1+s.flash*0.3,1-s.flash*0.4,1+s.flash*0.3) + if automatic and working>=0: + auto_clock+=dt + if auto_clock>=1.0: + auto_clock=0 + hit(true) + for i in range(popups.size()-1,-1,-1): + var p=popups[i] + p.ttl-=dt + p.node.position.y+=dt*0.7 + p.node.modulate.a=clampf(p.ttl,0,1) + if p.ttl<=0: + p.node.queue_free() + popups.remove_at(i) + hover_id=pick_soul() + var hover=index_of(hover_id) + if hover>=0: + var kind=souls[hover].kind + dossier.text="%02d / %s" % [kind+1,NAMES[kind].to_upper()] + else: dossier.text="ПРИЁМ ПО ОДНОМУ\nСледующий грешник ждёт за воротами" + for s in souls: + if s.id!=working: s.label.text=NAMES[s.kind] if s.id==hover_id else "" + ring.visible = hover >= 0 + if hover >= 0: ring.position=souls[hover].node.position+Vector3(0,0.09,0) + zone.scale=Vector3.ONE*(1.0+sin(time*3)*0.025) if held>=0 and working<0 else Vector3.ONE + status.text="" + + development.update(dt) + life.update(dt) + preload("res://separation.gd").resolve(self) + +func progress_snapshot() -> Dictionary: + return {"build_id":build_id,"coins":coins,"essence":essence,"done":done,"speed":speed_level,"power":power_level,"auto":false,"development":development.snapshot() if development else {},"workshop":workshop.snapshot() if workshop else {}} + +func save_progress(): + if test_mode or capture_mode: return + Progression.write_save(SAVE,progress_snapshot()) + +func load_progress(): + var data=Progression.read_save(SAVE,build_id) + coins=data.coins + done=data.done + essence=data.essence + speed_level=data.speed + power_level=data.power + automatic=false + set_meta("development_save",data.development) + uid=done + set_meta("workshop_save",data.get("workshop",{})) + +func run_tests(): + await preload("res://workshop_tests.gd").new().run(self) + +func run_sentence_tests(): + preload("res://sentence_tests.gd").new().run(self) + +func run_hud_tests(): + await preload("res://hud_tests.gd").new().run(self) + +func run_ui_tests(): + await preload("res://workshop_tests.gd").new().run_ui(self) + +func run_audio_tests(): + await preload("res://tests.gd").new().run_audio(self) + +func build_auto_arm(): + if get_node_or_null("AutoArm"): return + var arm = box(self,STATION+Vector3(0.9,1.9,0),Vector3(0.25,0.2,1.0),Color("e6b078")) + arm.name = "AutoArm" + cylinder(self,STATION+Vector3(1.1,0.9,-0.5),0.15,1.8,Color("8c7186")) + +func _notification(what): + if what==NOTIFICATION_APPLICATION_FOCUS_OUT: + orbit.stop();orbit.keys.clear() + if workshop and workshop.build_mode and (workshop.drag.active or workshop.drag.index>=0):workshop.cancel_placement() + if what==NOTIFICATION_APPLICATION_FOCUS_OUT and menu and game_started and not paused and not test_mode and not capture_mode: + set_pause(true) + +func setup_audio(): + dialogue=preload("res://dialogue.gd").new();dialogue.setup(self) + voice_player=AudioStreamPlayer.new() + add_child(voice_player) + audio_player=AudioStreamPlayer.new() + add_child(audio_player) + audio_player.stream=WHIP + audio_player.max_polyphony=4 + audio_player.volume_db=-3.0 + audio_player.pitch_scale=1.0 + ambience_player=AudioStreamPlayer.new() + add_child(ambience_player) + var track=AMBIENCE.duplicate() as AudioStreamOggVorbis + track.loop=true + track.loop_offset=0.0 + ambience_player.stream=track + ambience_player.volume_db=-80.0 + +func play_whip(): + if muted or whip_volume<=0 or test_mode or capture_mode: return + audio_player.play() + +func soul_speak(s): + development.speak(s) + +func toggle_sound(): + set_sound_muted(not muted) + +func set_sound_muted(value: bool): + muted=value + apply_settings() + save_settings() + if menu: menu.sync_settings() + +func apply_settings(): + AudioServer.set_bus_mute(0,muted) + AudioServer.set_bus_volume_db(0,0.0) + update_audio_levels() + if DisplayServer.get_name()!="headless": + DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN if fullscreen else DisplayServer.WINDOW_MODE_WINDOWED) + DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED if vsync else DisplayServer.VSYNC_DISABLED) + if sound_button: sound_button.text="× ♪" if muted else "♪" + +func update_audio_levels(): + if dialogue:dialogue.update() + if voice_player:voice_player.volume_db=linear_to_db(maxf(voice_volume,0.0001)) + if audio_player: audio_player.volume_db=-3.0+linear_to_db(maxf(whip_volume,0.0001)) + if ambience_player: ambience_player.volume_db=linear_to_db(maxf(ambience_volume*ambience_fade,0.0001)) + +func save_settings(): + if test_mode or capture_mode: return + var config=ConfigFile.new() + config.set_value("audio","volume",whip_volume) + config.set_value("audio","voice_volume",voice_volume) + config.set_value("audio","ambience_volume",ambience_volume) + config.set_value("audio","muted",muted) + config.set_value("display","fullscreen",fullscreen) + config.set_value("display","vsync",vsync) + config.save("user://settings.cfg") + +func load_settings(): + var config=ConfigFile.new() + if config.load("user://settings.cfg")!=OK: return + voice_volume=clampf(float(config.get_value("audio","voice_volume",0.60)),0,1) + whip_volume=clampf(float(config.get_value("audio","volume",0.75)),0,1) + ambience_volume=clampf(float(config.get_value("audio","ambience_volume",0.35)),0,1) + muted=bool(config.get_value("audio","muted",false)) + fullscreen=bool(config.get_value("display","fullscreen",false)) + vsync=bool(config.get_value("display","vsync",true)) + +func animate_gait(model, t: float, walking: bool): + if model.has_method("set_walking"): + model.set_walking(walking) + return + var amount=float(model.get_meta("stride",0.0)) + amount=lerpf(amount,1.0 if walking else 0.0,0.16) + model.set_meta("stride",amount) + for part in ["LegL","LegR","ArmL","ArmR"]: + var limb=model.get_node_or_null(part) + if not limb:continue + var phase=t*9.0+(0.0 if part.ends_with("L") else PI) + limb.rotation.x=sin(phase)*amount*(0.42 if part.begins_with("Leg") else -0.28) + var knee=limb.get_node_or_null("Knee") + if knee:knee.rotation.x=maxf(0.0,-sin(phase))*0.65*amount + +func _exit_tree(): + for child in get_children(): + if child is AudioStreamPlayer: + child.stop() + child.stream=null + +func make_ghost(model: Node3D, kind: int): + model.set_meta("spectral",true) + var queue: Array[Node] = [model] + while not queue.is_empty(): + var n=queue.pop_back() + for child in n.get_children():queue.append(child) + if n is MeshInstance3D: + if n.has_meta("soul_cloth"):continue + # Retain every costume surface and skin texture beneath the spectral shader. + for surface in range(n.mesh.get_surface_count()): + var old=n.get_active_material(surface) + var sm=ShaderMaterial.new() + sm.shader=preload("res://ghost.gdshader") + sm.render_priority=110 + sm.set_shader_parameter("base_color",old.albedo_color if old is BaseMaterial3D else Color("b0ced5")) + if old is BaseMaterial3D and old.albedo_texture: + sm.set_shader_parameter("albedo_texture",old.albedo_texture) + sm.set_shader_parameter("use_texture",true) + sm.set_shader_parameter("spectral_color",Color("85b9ae") if kind%2==0 else Color("9daed0")) + sm.set_shader_parameter("phase",float(kind)) + n.set_surface_override_material(surface,sm) + n.material_override=null + n.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + +func set_soul_reveal(model,value): + for n in model.find_children("*","MeshInstance3D",true,false): + for surface in range(n.mesh.get_surface_count()): + var mat=n.get_active_material(surface) + if mat is ShaderMaterial:mat.set_shader_parameter("reveal",value) + +func add_wisps(_root: Node3D, _kind: int): + # Ambient blue orbiting markers are disabled; body glow and transfer sparks remain. + return + +func update_wisps(_dt): + for i in range(wisps.size()-1,-1,-1): + var w=wisps[i] + if not is_instance_valid(w.node): + wisps.remove_at(i) + continue + var a=time*1.0+w.phase + var life=fposmod(time*0.35+w.offset,1.0) + w.node.position=Vector3(cos(a)*0.48,0.1+life*1.35,sin(a)*0.35) + w.node.scale=Vector3(0.065,0.24,0.065)*(0.5+sin(life*PI)) + w.node.material_override.albedo_color.a=sin(life*PI)*0.28 + +func capture_scene(): + await get_tree().create_timer(1.0).timeout + await save_capture("main-menu") + menu.main_settings.pressed.emit() + await get_tree().process_frame + await save_capture("settings") + menu.settings_back.pressed.emit() + menu.main_start.pressed.emit() + await get_tree().create_timer(.40).timeout + await save_capture("soul-summon") + await get_tree().create_timer(2.6).timeout + await save_capture("gameplay") + development.toggle_tree() + await save_capture("development") + development.toggle_tree() + # Capture prototype equipment with a staged soul; capture mode never saves. + for tool in range(1,4): + player.position=STATION+Vector3(-2,0,1) + development.selected=tool + development.rebuild_device() + var s=souls[0] + s.node.position=STATION + s.visual.rotation=Vector3.ZERO + s.visual.position=Vector3.ZERO + working=s.id + development.attach_soul(s) + development.advance_placement(.81) + await get_tree().process_frame + await save_capture("station-%d" % tool) + if tool==1: + development.step(0.85,true);development.motion.update(0.5,true) + await save_capture("rack-tension") + if tool==2: + player.position=STATION+Vector3(-2,0,1) + development.step(PI/4,true);development.motion.update(0.1,true) + await save_capture("wheel-immersed") + working=-1 + working=souls[0].id + player.position=STATION+Vector3(-2,0,1) + development.activate() + await get_tree().create_timer(0.4).timeout + await save_capture("maiden-closed") + development.step(0.36,true) + development.step(2.5,true);development.motion.update(1,true) + await save_capture("maiden-heated") + complete_soul() + await get_tree().create_timer(0.65).timeout + await save_capture("soul-burning") + await get_tree().create_timer(1.3).timeout + assert(absf(development.door.rotation.y)<0.01) + await get_tree().create_timer(0.75).timeout + assert(development.door.rotation.y<-1.7 and life.burns.is_empty()) + await save_capture("maiden-reopened") + development.selected=1;development.rebuild_device() + hud.hide() + camera.size=16;orbit.yaw=.48;orbit.pitch=.72;orbit.update(1) + await save_capture("workshop") + camera.size=36;orbit.yaw=.85;orbit.pitch=.60;orbit.update(1) + await save_capture("endless-complex") + camera.size=20;orbit.yaw=3.6;orbit.pitch=.78;orbit.update(1) + await save_capture("reverse-camera") + paused=true + camera.size=7 + camera.position=Vector3(-9.3,-1,6) + camera.look_at(Vector3(-11,-5,0)) + await save_capture("lava-channels") + camera.size=5.5 + camera.position=player.position+Vector3(5,3.2,7) + camera.look_at(player.position+Vector3(0,1.3,0)) + await save_capture("succubus-model") + avatar.strike(.7) + avatar.animator.seek(avatar.animator.get_animation(avatar.clips["Whip"]).length*.48,true) + await save_capture("succubus-whip") + var metrics={"build_id":build_id,"local_imps":life.imps.size(),"animated_neighbour_imps":life.neighbours.size(),"rooms":get_meta("endless_room_count"),"lava_channels":get_meta("lava_channels"),"succubus_model":"succubus_v01","succubus_animation_clips":avatar.clips.keys(),"detail_parts_per_cell":get_meta("dressing_parts"),"floor_tiles":896,"profile_segments":80,"profile_subdivisions":6,"draw_calls_snapshot":Performance.get_monitor(Performance.RENDER_TOTAL_DRAW_CALLS_IN_FRAME),"primitives_snapshot":Performance.get_monitor(Performance.RENDER_TOTAL_PRIMITIVES_IN_FRAME)} + var report=FileAccess.open("res://captures/scene-metrics.json",FileAccess.WRITE) + if report:report.store_string(JSON.stringify(metrics," ")) + print("CAPTURE_BUILD: "+build_id) + get_tree().quit() + +func save_capture(name: String): + await RenderingServer.frame_post_draw + var output=ProjectSettings.globalize_path("res://captures/"+name+".png") + DirAccess.make_dir_recursive_absolute(output.get_base_dir()) + var result=get_viewport().get_texture().get_image().save_png(output) + if result!=OK: push_error("Capture failed: "+output) + else: print("CAPTURE: "+output) + +func run_visual_tests(): + await preload("res://visual_tests.gd").new().run(self) + +func run_gait_tests(): + await preload("res://gait_tests.gd").new().run(self) + +func capture_gait(): + await preload("res://gait_capture.gd").new().run(self) + +func run_posture_tests(): + await preload("res://posture_tests.gd").new().run(self) + +func capture_posture(): + await preload("res://posture_capture.gd").new().run(self) + +func run_economy_tests(): + await preload("res://economy_tests.gd").new().run(self) + +func capture_economy(): + await preload("res://economy_capture.gd").new().run(self) + +func run_mesh_tests(): + await preload("res://mesh_walking_tests.gd").new().run(self) + +func run_delivery_priority_tests(): + await preload("res://delivery_priority_tests.gd").new().run(self) + +func run_roster_tests(): + await preload("res://roster_tests.gd").new().run(self) + +func capture_roster(): + await preload("res://roster_capture.gd").new().run(self) + +func run_workflow_tests(): + await preload("res://workflow_tests.gd").new().run(self) + +func capture_workflow(): + await preload("res://workflow_capture.gd").new().run(self) + +func run_building_tests(): + await preload("res://building_tests.gd").new().run(self) + +func run_castle_tests(): + await preload("res://castle_tests.gd").new().run(self) + +func run_maintenance_tests(): + await preload("res://maintenance_tests.gd").new().run(self) + +func run_flight_camera_tests(): + await preload("res://flight_camera_tests.gd").new().run(self) + +func run_imp_walk_tests(): + await preload("res://imp_walk_tests.gd").new().run(self) + +func run_expansion_regression_tests(): + await preload("res://expansion_regression_tests.gd").new().run(self) + +func run_single_punishment_tests(): + await preload("res://single_punishment_tests.gd").new().run(self) + +func run_runtime_burn_tests(): + await preload("res://runtime_burn_tests.gd").new().run(self) + +func run_ruby_ui_tests(): + await preload("res://ruby_ui_tests.gd").new().run(self) + +func run_camera_controls_tests(): + await preload("res://camera_controls_tests.gd").new().run(self) + +func run_room_decor_tests(): + await preload("res://room_decor_tests.gd").new().run(self) diff --git a/Demon_v0.19/main.tscn b/Demon_v0.19/main.tscn new file mode 100644 index 0000000..d2f16b3 --- /dev/null +++ b/Demon_v0.19/main.tscn @@ -0,0 +1,4 @@ +[gd_scene load_steps=2 format=3] +[ext_resource type="Script" path="res://main.gd" id="1"] +[node name="Demon" type="Node3D"] +script = ExtResource("1") diff --git a/Demon_v0.19/maintenance_tests.gd b/Demon_v0.19/maintenance_tests.gd new file mode 100644 index 0000000..2493975 --- /dev/null +++ b/Demon_v0.19/maintenance_tests.gd @@ -0,0 +1,61 @@ +extends RefCounted +var failures=0 +func check(ok,label): + if not ok:failures+=1;push_error("MAINTENANCE QA: "+label) +func shot(g,label): + await g.get_tree().process_frame + await RenderingServer.frame_post_draw + g.get_viewport().get_texture().get_image().save_png("res://captures/maintenance/"+label+".png") +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false + DirAccess.make_dir_recursive_absolute("res://captures/maintenance") + var w=g.workshop;var d=w.add_station(0,Vector3.ZERO);g.coins=3000;w.rebuild_nav() + w.toggle_build() + for rank in range(4): + if rank>0:w.purchase_expansion() + var plane=w.grid.get_child(0) + check(plane.mesh is PlaneMesh and plane.scale==Vector3.ONE,"grid is unscaled world-space plane rank %d"%rank) + check(plane.material_override.get_shader_parameter("grid_origin")==w.ORIGIN,"grid origin unchanged") + check(plane.material_override.get_shader_parameter("grid_area")==w.grid_area(),"grid matches whole-cell placement boundary") + check(w.snap_to_grid(Vector3(4.2,0,2.4),0)==Vector3(4,0,2),"placement lattice unchanged") + g.camera.position=Vector3(18,24,30);g.camera.look_at(Vector3(6,0,0));g.camera.size=30;g.architecture.update(g.camera) + await shot(g,"grid-%d"%rank) + var point=g.camera.unproject_position(Vector3.ZERO);w.pointer_position=point;w.drag.left_down=true;w.drag.arm(0,point);w.drag.update(.5) + check(w.drag.hold_ring.visible and is_equal_approx(w.drag.hold_ring.progress,.5) and not w.drag.active,"half-filled circle before drag") + var size=g.get_viewport().get_visible_rect().size + var old=clampf(DisplayServer.screen_get_dpi()/2.54*size.y/maxf(1,DisplayServer.window_get_size().y),28,64) + check(is_equal_approx(w.drag.thickness,old*1.25*1.25),"delete strip increased another 25 percent") + await shot(g,"hold-half") + w.pointer_position=point;w.drag.left_down=true;w.drag.update(.51);check(w.drag.active and not w.drag.hold_ring.visible and w.drag.strip.visible,"ring hands off to dragging at one second") + await shot(g,"delete-strip");w.cancel_placement();w.drag.cancel();w.drag.left_down=false + w.drag.arm(0,point);w.drag.cancel();check(not w.drag.hold_ring.visible,"cancel hides countdown") + w.toggle_build();g.paused=false;g.hud.hide();g.player.hide() + var activities=g.life.activities;var imp=g.life.imps[0] + for kind in ["clean","mop","draw","hum"]: + activities.finish(imp);activities.start(imp,kind);imp.root.position=imp.activity_target + activities.update(imp,.2) + check(imp.activity==kind and is_instance_valid(imp.activity_props),"activity starts with real props: "+kind) + var before=imp.model.get_node("ArmR").rotation + activities.update(imp,.3) + check(imp.model.get_node("ArmR").rotation!=before,"activity animates: "+kind) + g.camera.position=imp.root.position+Vector3(3,2.4,4);g.camera.look_at(imp.root.position+Vector3(0,.6,0));g.camera.size=3.5 + if kind=="draw": + activities.update(imp,3.5) + check(imp.activity_mark.edges.all(func(edge):return edge.node.visible),"pentagram is drawn in five strokes") + for node in g.architecture.walls:node.show() + g.camera.position=imp.root.position+Vector3(3,1.5,2);g.camera.look_at(imp.root.position+Vector3(-.3,.7,0)) + await shot(g,kind) + activities.update(imp,6);check(imp.activity=="" and not imp.humming.playing,"activity finishes and cleans props: "+kind) + activities.start(imp,"clean");imp.root.position=imp.activity_target;d.soul=999 + activities.update(imp,.1);check(imp.activity=="","occupied equipment cancels cleaning");d.soul=-1 + activities.start(imp,"hum");imp.root.position=imp.activity_target;g.test_mode=false;activities.update(imp,.05) + await g.get_tree().create_timer(.1).timeout + check(imp.humming.playing,"real quiet humming plays") + g.paused=true;var clock=imp.activity_time;w.update(.5) + check(imp.humming.stream_paused and imp.activity_time==clock,"pause freezes activity and humming") + g.muted=true;activities.sync_audio(imp);check(not imp.humming.playing,"mute stops humming") + g.muted=false;g.test_mode=true;g.paused=false;activities.reset() + check(activities.marks.is_empty() and g.life.imps.all(func(i):return i.activity==""),"reset clears activities and wall chalk") + print("MAINTENANCE QA ","PASSED" if failures==0 else "FAILED",": expanded grid, hold countdown, taller strip, four activities, interruption, audio, pause and cleanup") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/masonry.gdshader b/Demon_v0.19/masonry.gdshader new file mode 100644 index 0000000..74792e9 --- /dev/null +++ b/Demon_v0.19/masonry.gdshader @@ -0,0 +1,15 @@ +shader_type spatial; +uniform sampler2D stone_tex : source_color, filter_linear_mipmap_anisotropic, repeat_enable; +varying vec3 wp; +varying vec3 wn; +void vertex(){wp=(MODEL_MATRIX*vec4(VERTEX,1.0)).xyz;wn=normalize(mat3(MODEL_MATRIX)*NORMAL);} +void fragment(){ + vec3 b=pow(abs(wn),vec3(8.0));b/=max(dot(b,vec3(1.0)),0.001); + vec3 t=texture(stone_tex,wp.xz*.5).rgb*b.y+texture(stone_tex,wp.xy*.4).rgb*b.z+texture(stone_tex,wp.zy*.4).rgb*b.x; + vec2 q=abs(wn.y)>.7?wp.xz:vec2(abs(wn.x)>.7?wp.z:wp.x,wp.y*1.7); + q.x+=mod(floor(q.y),2.0)*.5; + vec2 edge=min(fract(q),1.0-fract(q)); + float grout=smoothstep(.015,.045,min(edge.x,edge.y)); + ALBEDO=mix(vec3(.045,.042,.035),t*.85,grout); + ROUGHNESS=.82; +} diff --git a/Demon_v0.19/menu.gd b/Demon_v0.19/menu.gd new file mode 100644 index 0000000..7931660 --- /dev/null +++ b/Demon_v0.19/menu.gd @@ -0,0 +1,190 @@ +extends CanvasLayer +var g +var current_page="" +var return_page="main" +var main_panel: PanelContainer +var settings_panel: PanelContainer +var pause_panel: PanelContainer +var main_start: Button +var main_settings: Button +var main_exit: Button +var settings_back: Button +var resume_button: Button +var pause_settings: Button +var pause_main: Button +var volume_slider: HSlider +var volume_label: Label +var voice_slider: HSlider +var voice_label: Label +var ambience_slider: HSlider +var ambience_label: Label +var mute_check: CheckButton +var fullscreen_check: CheckButton +var vsync_check: CheckButton + +func build(game): + g=game + layer=20 + var shade=ColorRect.new() + add_child(shade) + shade.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) + shade.color=Color(0.015,0.009,0.025,0.48) + main_panel=panel(Vector2(555,155),Vector2(490,590)) + var main=column(main_panel) + main.add_child(g.label("D E M O N",56,Color("e1dfcf"))) + main.add_child(g.label("Испытательный срок",19,Color("9da9a4"))) + space(main,28) + space(main,20) + main_start=action(main,"Новая игра",g.start_game) + main_settings=action(main,"Настройки",func():show_settings("main")) + main_exit=action(main,"Выйти",g.quit_game) + space(main,16) + + settings_panel=panel(Vector2(500,45),Vector2(600,810)) + var settings=column(settings_panel) + settings.add_child(g.label("НАСТРОЙКИ",32,Color("e1dfcf"))) + space(settings,8) + volume_label=g.label("",18,Color("c8cbbf")) + settings.add_child(volume_label) + volume_slider=HSlider.new() + volume_slider.min_value=0 + volume_slider.max_value=100 + volume_slider.step=1 + volume_slider.custom_minimum_size=Vector2(460,32) + settings.add_child(volume_slider) + volume_slider.value_changed.connect(func(value): + g.whip_volume=value/100.0 + g.apply_settings() + g.save_settings() + update_volume_label()) + ambience_label=g.label("",18,Color("c8cbbf")) + settings.add_child(ambience_label) + ambience_slider=HSlider.new() + ambience_slider.min_value=0 + ambience_slider.max_value=100 + ambience_slider.step=1 + ambience_slider.custom_minimum_size=Vector2(460,32) + settings.add_child(ambience_slider) + ambience_slider.value_changed.connect(func(value): + g.ambience_volume=value/100.0 + g.apply_settings() + g.save_settings() + update_volume_label()) + voice_label=g.label("",18,Color("c8cbbf"));settings.add_child(voice_label) + voice_slider=HSlider.new();voice_slider.min_value=0;voice_slider.max_value=100;voice_slider.step=1;voice_slider.custom_minimum_size=Vector2(460,24);settings.add_child(voice_slider) + voice_slider.value_changed.connect(func(value): + g.voice_volume=value/100.0;g.apply_settings();g.save_settings();update_volume_label()) + mute_check=check(settings,"Выключить весь звук") + mute_check.toggled.connect(func(value):g.set_sound_muted(value)) + space(settings,8) + fullscreen_check=check(settings,"Полноэкранный режим") + fullscreen_check.toggled.connect(func(value): + g.fullscreen=value + g.apply_settings() + g.save_settings()) + vsync_check=check(settings,"Вертикальная синхронизация (VSync)") + vsync_check.toggled.connect(func(value): + g.vsync=value + g.apply_settings() + g.save_settings()) + space(settings,12) + settings_back=action(settings,"Назад",back) + + pause_panel=panel(Vector2(560,195),Vector2(480,510)) + var pause=column(pause_panel) + pause.add_child(g.label("ПАУЗА",34,Color("e1dfcf"))) + space(pause,18) + resume_button=action(pause,"Продолжить",func():g.set_pause(false)) + pause_settings=action(pause,"Настройки",func():show_settings("pause")) + pause_main=action(pause,"Главное меню",g.return_to_main_menu) + action(pause,"Выйти",g.quit_game) + for slider in [volume_slider,voice_slider,ambience_slider]:preload("res://infernal_ui.gd").apply_slider(slider) + show_main() + +func panel(pos,size_value): + var p=PanelContainer.new() + add_child(p) + p.position=pos + p.custom_minimum_size=size_value + var style=preload("res://infernal_ui.gd").panel(false,30) + style.content_margin_left=42;style.content_margin_right=42 + p.add_theme_stylebox_override("panel",style) + var ornament=preload("res://gothic.gd").new() + p.add_child(ornament) + ornament.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) + return p + +func column(parent): + var box=VBoxContainer.new() + parent.add_child(box) + box.add_theme_constant_override("separation",13) + return box + +func space(parent,height): + var spacer=Control.new() + spacer.custom_minimum_size.y=height + parent.add_child(spacer) + +func action(parent,text,callback): + var b=g.button(text,callback) + b.custom_minimum_size=Vector2(0,64) + b.add_theme_font_size_override("font_size",21) + var focus=StyleBoxFlat.new() + focus.bg_color=Color(0,0,0,0) + focus.border_color=Color("b9c9c0") + focus.set_border_width_all(2) + b.add_theme_stylebox_override("focus",focus) + parent.add_child(b) + return b + +func check(parent,text): + var control=CheckButton.new() + control.text=text + control.custom_minimum_size.y=42 + control.add_theme_font_size_override("font_size",17) + preload("res://infernal_ui.gd").apply_check(control) + parent.add_child(control) + return control + +func show_page(page): + current_page=page + visible=not page.is_empty() + main_panel.visible=page=="main" + settings_panel.visible=page=="settings" + pause_panel.visible=page=="pause" + +func show_main(): + show_page("main") + main_start.grab_focus.call_deferred() + +func show_pause(): + show_page("pause") + resume_button.grab_focus.call_deferred() + +func show_settings(from_page): + return_page=from_page + sync_settings() + show_page("settings") + settings_back.grab_focus.call_deferred() + +func sync_settings(): + volume_slider.set_value_no_signal(g.whip_volume*100) + ambience_slider.set_value_no_signal(g.ambience_volume*100) + voice_slider.set_value_no_signal(g.voice_volume*100) + mute_check.set_pressed_no_signal(g.muted) + fullscreen_check.set_pressed_no_signal(g.fullscreen) + vsync_check.set_pressed_no_signal(g.vsync) + update_volume_label() + +func update_volume_label(): + if voice_label:voice_label.text="Громкость голосов %d%%" % roundi(g.voice_volume*100) + volume_label.text="Громкость плети %d%%" % roundi(g.whip_volume*100) + ambience_label.text="Громкость эмбиента %d%%" % roundi(g.ambience_volume*100) + +func back(): + if return_page=="pause": show_pause() + else: show_main() + +func escape(): + if current_page=="settings": back() + elif current_page=="pause": g.set_pause(false) diff --git a/Demon_v0.19/mesh_walking.gd b/Demon_v0.19/mesh_walking.gd new file mode 100644 index 0000000..88ecf01 --- /dev/null +++ b/Demon_v0.19/mesh_walking.gd @@ -0,0 +1,55 @@ +extends RefCounted +# Physics uses the rendered triangles; the grid is only a route planner. +var g +var probe: CharacterBody3D +var shape: CapsuleShape3D +var shape_node: CollisionShape3D +var outlines=[] +func setup(game): + g=game + probe=CharacterBody3D.new();g.add_child(probe) + probe.collision_layer=0;probe.collision_mask=2 + probe.motion_mode=CharacterBody3D.MOTION_MODE_FLOATING + shape=CapsuleShape3D.new();shape.radius=.30;shape.height=1.65 + shape_node=CollisionShape3D.new();shape_node.shape=shape;shape_node.position.y=1.02;probe.add_child(shape_node) +func build(root): + for mesh in root.find_children("*","MeshInstance3D",true,false): + if not mesh.is_visible_in_tree() or mesh.mesh==null:continue + if mesh.mesh is QuadMesh:continue + if mesh.material_override is ShaderMaterial and mesh.material_override.shader in [preload("res://surface_water.gdshader"),preload("res://boiling.gdshader"),preload("res://leather.gdshader")]:continue + var bounds=mesh.get_aabb() + if bounds.size.length()<.24:continue + var body=StaticBody3D.new();body.name="MeshWalkingCollider";body.collision_layer=2;body.collision_mask=0 + mesh.add_child(body) + var collider=CollisionShape3D.new();collider.shape=mesh.mesh.create_trimesh_shape();body.add_child(collider) + collider.shape.backface_collision=true +func rebuild(stations): + outlines.clear() + for s in stations: + for mesh in s.device.find_children("*","MeshInstance3D",true,false): + if not mesh.has_node("MeshWalkingCollider"):continue + var points=PackedVector2Array() + var faces=mesh.mesh.get_faces() + for i in range(0,faces.size(),3): + var a=mesh.global_transform*faces[i];var b=mesh.global_transform*faces[i+1];var c=mesh.global_transform*faces[i+2] + if maxf(a.y,maxf(b.y,c.y))<.20 or minf(a.y,minf(b.y,c.y))>1.85:continue + for v in [a,b,c]:points.append(Vector2(v.x,v.z)) + if points.size()>2:outlines.append(Geometry2D.convex_hull(points)) +func blocked(point,radius=.32): + for polygon in outlines: + if Geometry2D.is_point_in_polygon(point,polygon):return true + for i in range(polygon.size()-1): + if point.distance_to(Geometry2D.get_closest_point_to_segment(point,polygon[i],polygon[i+1]))1.4 else .10)+height/2 + probe.position=node.position;probe.force_update_transform() + var remaining=motion + for i in range(4): + if remaining.length_squared()<.0000001:break + var hit=probe.move_and_collide(remaining,false,.005) + if not hit:break + var normal=hit.get_normal();normal.y=0 + if normal.length_squared()<.0001:break + remaining=hit.get_remainder().slide(normal.normalized());remaining.y=0 + node.position=Vector3(probe.position.x,node.position.y,probe.position.z) diff --git a/Demon_v0.19/mesh_walking_tests.gd b/Demon_v0.19/mesh_walking_tests.gd new file mode 100644 index 0000000..11802e5 --- /dev/null +++ b/Demon_v0.19/mesh_walking_tests.gd @@ -0,0 +1,38 @@ +extends RefCounted +var failures=0 +func check(value,label): + if not value:failures+=1;push_error("MESH QA: "+label) +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.paused=true + var w=g.workshop;w.reset();w.unlock=5 + var d=w.add_station(1,Vector3(2,0,0));w.rebuild_nav() + await g.get_tree().physics_frame;await g.get_tree().physics_frame + # Inside its construction footprint, outside the actual timber bed. + g.player.position=Vector3(3.35,0,-1) + w.mesh_walking.move_actor(g.player,Vector3(0,0,1)) + check(g.player.position.z>-.1,"free movement inside unused construction cells") + g.player.position=Vector3(0,0,0) + w.mesh_walking.move_actor(g.player,Vector3(4,0,0)) + check(g.player.position.x<1.1,"swept capsule cannot tunnel through timber bed") + var before=g.player.position + w.mesh_walking.move_actor(g.player,Vector3(.7,0,.5)) + check(g.player.position.z>before.z+.2,"slides along mesh instead of stopping both axes") + d.device.rotation.y=PI/2;d.turns=1;w.rebuild_nav() + await g.get_tree().physics_frame;await g.get_tree().physics_frame + g.player.position=Vector3(2,0,-3) + w.mesh_walking.move_actor(g.player,Vector3(0,0,6)) + check(g.player.position.z<-.9,"rotation moves mesh collision") + w.dispose_station(d);w.stations.clear();w.bars.clear();w.rebuild_nav() + await g.get_tree().physics_frame;await g.get_tree().physics_frame + g.player.position=Vector3(0,0,0);w.mesh_walking.move_actor(g.player,Vector3(4,0,0)) + check(g.player.position.x>3.9,"removed apparatus leaves no invisible collision") + g.development.points=5;g.speed_level=1;w.automation=true;w.refresh() + for n in w.node_buttons: + if n.key in ["speed","auto"]:check(n.button.modulate==Color.WHITE and n.gems.filled==1,"learned upgrades stay bright and show a ruby") + g.say("Проверка диалога");check(g.life.hero_bubble.find_children("*","Polygon2D",true,false).is_empty(),"hero dialogue has no arrow") + w.spawn();var soul=g.souls.back();soul.entering=false;g.set_soul_reveal(soul.visual,1) + g.development.speak(soul,"Проверка") + check(not is_instance_valid(g.development.bubble),"soul dialogue disabled") + if failures==0:print("ALL MESH WALKING TESTS PASSED: mesh clearance, sweep, slide, rotation, removal, learned UI and arrowless dialogue") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/model_preview.gd b/Demon_v0.19/model_preview.gd new file mode 100644 index 0000000..38e03c1 --- /dev/null +++ b/Demon_v0.19/model_preview.gd @@ -0,0 +1,15 @@ +extends SceneTree +func _initialize():call_deferred("run") +func run(): + var root=Node3D.new();get_root().add_child(root) + var model=load("res://art/succubus/succubus_v02.glb").instantiate();root.add_child(model) + for player in model.find_children("*","AnimationPlayer",true,false):player.stop() + var camera=Camera3D.new();root.add_child(camera);camera.projection=Camera3D.PROJECTION_ORTHOGONAL;camera.size=2.45 + camera.position=Vector3(2.2,1.35,4);camera.look_at(Vector3(0,1,0));camera.current=true + var env=WorldEnvironment.new();root.add_child(env);env.environment=Environment.new();env.environment.ambient_light_source=Environment.AMBIENT_SOURCE_COLOR;env.environment.ambient_light_color=Color.WHITE;env.environment.ambient_light_energy=.7;env.environment.background_mode=Environment.BG_COLOR;env.environment.background_color=Color("343840") + var light=DirectionalLight3D.new();root.add_child(light);light.rotation_degrees=Vector3(-35,-35,0);light.light_energy=1.4 + get_root().size=Vector2i(900,1000) + await create_timer(.5).timeout + await RenderingServer.frame_post_draw + get_root().get_texture().get_image().save_png("res://captures/castle/character-after.png") + quit() diff --git a/Demon_v0.19/new_equipment.gd b/Demon_v0.19/new_equipment.gd new file mode 100644 index 0000000..5114ab8 --- /dev/null +++ b/Demon_v0.19/new_equipment.gd @@ -0,0 +1,84 @@ +extends RefCounted +const POP=preload("res://audio/infernal_pop.wav") + +func build(g,d): + var root=d.device + var wood=Color("48302f");var iron=Color("292d35");var brass=Color("a58b59") + d["special"]={"bubbles":[],"notes":[],"liquid":null,"music":null,"players":[],"speaker_roots":[],"heat":0.0} + if d.selected==4: + d.special["seat"]=g.box(root,Vector3(0,.62,-.23),Vector3(1.05,.16,.42),wood);d.special.seat.name="ChairSeat" + g.box(root,Vector3(0,.025,.71),Vector3(.85,.05,.45),iron) + g.box(root,Vector3(0,1.45,-.48),Vector3(1.15,1.55,.18),wood) + for x in [-.47,.47]: + for z in [-.40,.20]:g.cylinder(root,Vector3(x,.29,z),.075,.58,iron) + g.box(root,Vector3(x*1.3,1.06,.05),Vector3(.16,.14,.96),wood) + for z in [-.32,.42]:g.line(root,Vector3(x*1.3,.68,z),Vector3(x*1.3,1.05,z),.045,iron) + var cuff=preload("res://leather_cuff.gd").make(g,root,Vector3(x*1.3,1.15,.2),.13);cuff.rotation.x=PI/2 + for link_index in range(4): + var link=g.torus(root,Vector3(x*1.3,1.04-link_index*.12,.2),.12,iron) + link.scale=Vector3.ONE*.5;link.rotation.x=PI/2 if link_index%2==0 else 0 + for x in [-.23,.23]: + var ankle=preload("res://leather_cuff.gd").make(g,root,Vector3(x,.13,.66),.095);ankle.rotation.x=PI/2 + g.line(root,Vector3(x,.13,.66),Vector3(x,.35,.38),.025,iron) + g.box(root,Vector3(0,1.45,-.34),Vector3(1.08,.075,.04),Color("33241e")) + g.box(root,Vector3(0,.91,.12),Vector3(1.08,.075,.045),Color("33241e")) + for side in [-1,1]: + var speaker_root=Node3D.new();root.add_child(speaker_root);speaker_root.name="InwardFacingSpeaker";speaker_root.position=Vector3(side*1.05,1.05,-.45) + var direction=Vector3(0,1.05,.10)-speaker_root.position;speaker_root.rotation.y=atan2(direction.x,direction.z);d.special.speaker_roots.append(speaker_root) + g.box(speaker_root,Vector3.ZERO,Vector3(.50,1.20,.50),iron) + for y in [-.30,.26]: + var speaker=g.cylinder(speaker_root,Vector3(0,y,.27),.19,.045,Color("14141c"));speaker.rotation.x=PI/2 + var rim=g.torus(speaker_root,Vector3(0,y,.30),.19,brass);rim.rotation.x=PI/2 + g.ball(speaker_root,Vector3(0,y,.31),Vector3(.12,.12,.04),Color("6c4f7d")) + for j in range(9):g.line(speaker_root,Vector3(-.15+j*.038,y-.14,.325),Vector3(-.15+j*.038,y+.14,.325),.004,Color("4b4b52")) + for j in range(3): + var note=g.torus(root,Vector3(side*(.95+j*.10),2.0+j*.18,-.35),.07,Color("b38bd5"));note.hide();d.special.notes.append(note) + var music=AudioStreamPlayer3D.new();speaker_root.add_child(music);music.position.z=.31;music.unit_size=4;music.max_distance=16 + music.stream=POP.duplicate();music.stream.loop_mode=AudioStreamWAV.LOOP_FORWARD;music.stream.loop_end=int(music.stream.get_length()*music.stream.mix_rate) + d.special.players.append(music) + d.special.music=d.special.players[0] + else: + preload("res://cauldron_shell.gd").new().build(g,root) + var liquid=preload("res://water_surface.gd").new().build(g,root,1.24,Vector3(0,1.55,0),true) + d.special.liquid=liquid + g.torus(root,Vector3(0,1.65,0),1.32,brass) + for side in [-1,1]: + var handle=g.torus(root,Vector3(side*1.48,1.15,0),.30,iron);handle.rotation.z=PI/2 + for i in range(12): + var a=i*TAU/12 + g.ball(root,Vector3(cos(a)*1.38,1.4,sin(a)*1.38),Vector3.ONE*.07,brass) + for i in range(16): + var bubble=g.ball(root,Vector3.ZERO,Vector3.ONE*.07,Color("c2ddd9"));bubble.hide();d.special.bubbles.append(bubble) + d.flame=Node3D.new();root.add_child(d.flame) + for i in range(6): + var quad=QuadMesh.new();quad.size=Vector2(.8,.6) + var fire=MeshInstance3D.new();d.flame.add_child(fire);fire.mesh=quad;fire.position=Vector3(sin(i)*.65,.28,cos(i)*.65);fire.rotation.y=i + var mat_fire=ShaderMaterial.new();mat_fire.shader=preload("res://fire.gdshader");fire.material_override=mat_fire + var light=OmniLight3D.new();d.flame.add_child(light);light.position.y=.4;light.light_color=Color("ff8139");light.light_energy=1.3;light.omni_range=3 + d.flame.hide() + +static func animate(g,d,dt,active): + if not d.has("special"):return + var fx=d.special + fx.heat=move_toward(fx.heat,1.0 if active else 0.0,dt*.6) + for player in fx.players: + player.volume_db=-18+linear_to_db(maxf(g.whip_volume,.0001))-(5 if g.dialogue.player.playing else 0) + player.stream_paused=g.paused + if active and not g.test_mode and not g.capture_mode and not g.muted and g.whip_volume>0: + if not player.playing:player.play() + else:player.stop() + for i in range(fx.notes.size()): + fx.notes[i].visible=active + fx.notes[i].position.y=2.0+fposmod(g.time*.65+i*.21,.8) + if d.selected==5: + for steam in d.device.get_children(): + if steam is MeshInstance3D and steam.material_override is ShaderMaterial and steam.material_override.shader==preload("res://steam.gdshader"): + steam.material_override.set_shader_parameter("simulation_time",g.time);steam.material_override.set_shader_parameter("heat",fx.heat) + if fx.liquid: + fx.liquid.material_override.set_shader_parameter("heat",fx.heat) + fx.liquid.material_override.set_shader_parameter("simulation_time",g.time) + for i in range(fx.bubbles.size()): + var t=fposmod(g.time*.7+i*.071,1.0) + var bubble=fx.bubbles[i];bubble.visible=fx.heat>.1 + bubble.position=Vector3(sin(i*2.4)*.95,1.62+sin(t*PI)*.20*fx.heat,cos(i*2.4)*.95) + bubble.scale=Vector3.ONE*(.035+sin(t*PI)*.045)*fx.heat diff --git a/Demon_v0.19/orbit.gd b/Demon_v0.19/orbit.gd new file mode 100644 index 0000000..680884e --- /dev/null +++ b/Demon_v0.19/orbit.gd @@ -0,0 +1,60 @@ +extends RefCounted +var g +var dragging=false +var yaw=atan2(10.0,20.0) +var pitch=0.68 +var focus=Vector3(0,0.4,-0.2) +var cursor=Vector2.ZERO +var pan=Vector3.ZERO +var keys={} +func setup(game): + g=game + update(1.0) +func begin(): + if dragging or not g.game_started or (g.paused and not (g.workshop and g.workshop.build_mode)):return + dragging=true + cursor=g.get_viewport().get_mouse_position() + Input.mouse_mode=Input.MOUSE_MODE_CAPTURED +func stop(): + if not dragging:return + dragging=false + Input.mouse_mode=Input.MOUSE_MODE_VISIBLE + g.get_viewport().warp_mouse(cursor) +func input(event): + if event is InputEventKey: + keys[event.physical_keycode if event.physical_keycode else event.keycode]=event.pressed + if event is InputEventMouseButton and event.button_index==MOUSE_BUTTON_MIDDLE and event.pressed: + if (g.workshop and g.workshop.build_mode) or g.get_viewport().gui_get_hovered_control()==null:begin() + if dragging:g.get_viewport().set_input_as_handled() + if event is InputEventMouseButton and event.button_index==MOUSE_BUTTON_MIDDLE and not event.pressed:stop() + if event is InputEventMouseMotion and dragging: + if Input.is_physical_key_pressed(KEY_SHIFT): + pan+=(-g.camera.global_basis.x*event.relative.x+g.camera.global_basis.y*event.relative.y)*g.camera.size/g.get_viewport().get_visible_rect().size.y;pan.y=0 + else: + yaw=wrapf(yaw-event.relative.x*0.006,-PI,PI) + pitch=clampf(pitch+event.relative.y*0.004,0.52,1.15) + g.get_viewport().set_input_as_handled() +func update(dt): + if g.workshop and g.workshop.build_mode: + var move=Vector2(float(held(KEY_D))-float(held(KEY_A)),float(held(KEY_S))-float(held(KEY_W))) + var right=g.camera.global_basis.x;right.y=0;right=right.normalized() + var down=g.camera.global_basis.z;down.y=0;down=down.normalized() + pan+=(right*move.x+down*move.y).limit_length(1)*dt*9.0 + if not (g.workshop and g.workshop.build_mode) and not dragging: + pan=pan.lerp(Vector3.ZERO,1-exp(-maxf(dt,0)*1.7)) + focus=focus.lerp(base_focus()+pan,1-exp(-maxf(dt,0)*3)) + var offset=Vector3(sin(yaw)*cos(pitch),sin(pitch),cos(yaw)*cos(pitch))*30.0 + g.camera.position=focus+offset + g.camera.look_at(focus) + g.architecture.update(g.camera) + +func held(key): + return keys.get(key,false) or Input.is_physical_key_pressed(key) + +func base_focus(): + if g.workshop and g.workshop.build_mode: + return g.CAMERA_TARGET+Vector3(g.architecture.growth.extra_width(g.architecture.growth.level)*.35,0,0) + return g.player.position+Vector3(0,.4,0) + +func preserve_focus():pan=focus-base_focus() + diff --git a/Demon_v0.19/pentagram.gd b/Demon_v0.19/pentagram.gd new file mode 100644 index 0000000..f2465ce --- /dev/null +++ b/Demon_v0.19/pentagram.gd @@ -0,0 +1,15 @@ +extends Button +func _ready(): + custom_minimum_size=Vector2(76,76) + tooltip_text="Развитие" + mouse_entered.connect(queue_redraw);mouse_exited.connect(queue_redraw) +func _draw(): + var center=size/2 + var c=Color("efbd77") if is_hovered() else Color("b59061") + draw_circle(center,31,Color("25131e")) + draw_arc(center,30,0,TAU,64,c,2,true) + var points=PackedVector2Array() + for i in range(6): + var a=PI/2+(i*2%5)*TAU/5 + points.append(center+Vector2(cos(a),sin(a))*25) + draw_polyline(points,c,2,true) diff --git a/Demon_v0.19/people.gd b/Demon_v0.19/people.gd new file mode 100644 index 0000000..50adcc6 --- /dev/null +++ b/Demon_v0.19/people.gd @@ -0,0 +1,77 @@ +extends RefCounted +var g +var sculpt +func build(game,demon,kind=0): + g=game;sculpt=preload("res://hero.gd").new();sculpt.g=g + var r=Node3D.new();r.name="Succubus" if demon else "Soul" + var skin=Color("94796d") if demon else Color("a79b87") + var cloth=Color("302b2a") if demon else [Color("555449"),Color("4e534d"),Color("494647"),Color("3e4548")][kind%4] + var leather=Color("332820");var metal=Color("68635a") + var width=1.12 if kind==0 and not demon else 1.0 + sculpt.loft(r,Vector3.ZERO,[[1.02,.24*width,.16,0],[1.16,.27*width,.18,0],[1.30,.23*width,.16,0],[1.50,.28*width,.18,0],[1.70,.32,.17,0],[1.78,.21,.13,0]],cloth) + sculpt.loft(r,Vector3.ZERO,[[1.13,.275*width,.185,0],[1.19,.265*width,.18,0]],leather) + g.box(r,Vector3(0,1.16,.19),Vector3(.10,.075,.025),metal) + # Natural limb lengths, fitted sleeves, articulated boots and small hands. + for side in [-1,1]: + var leg=Node3D.new();r.add_child(leg);leg.name="LegL" if side<0 else "LegR";leg.position=Vector3(side*.145,1.09,0) + sculpt.loft(leg,Vector3.ZERO,[[-.49,.085,.09,0],[-.30,.115,.12,0],[-.05,.13,.14,0],[.08,.12,.12,0]],cloth) + var knee=Node3D.new();leg.add_child(knee);knee.name="Knee";knee.position.y=-.47 + sculpt.loft(knee,Vector3.ZERO,[[-.51,.075,.09,.015],[-.31,.085,.095,0],[-.12,.095,.10,0],[.03,.087,.09,0]],leather) + g.ball(knee,Vector3(0,-.53,.055),Vector3(.18,.14,.32),leather) + for h in [-.35,-.13]:sculpt.loft(knee,Vector3.ZERO,[[h,.098,.11,0],[h+.025,.098,.11,0]],metal.darkened(.35)) + var arm=Node3D.new();r.add_child(arm);arm.name="ArmL" if side<0 else "ArmR";arm.position=Vector3(side*.30,1.68,0) + sculpt.tube(arm,[Vector3.ZERO,Vector3(side*.055,-.14,0),Vector3(side*.09,-.30,.01),Vector3(side*.10,-.45,.04),Vector3(side*.10,-.55,.045)],[.11,.105,.075,.075,.055],cloth) + g.ball(arm,Vector3(side*.1,-.61,.045),Vector3(.095,.14,.065),skin) + for finger in range(4): + var p=Vector3(side*.1+(finger-1.5)*.021,-.66,.045) + sculpt.tube(arm,[p,p+Vector3(0,-.055,.012),p+Vector3(0,-.075,.025)],[.012,.01,.006],skin) + sculpt.tube(arm,[Vector3(side*.065,-.60,.055),Vector3(side*.03,-.64,.065)],[.018,.009],skin) + if demon:g.ball(arm,Vector3(side*.015,-.02,0),Vector3(.25,.15,.25),metal.darkened(.35)) + # Head is approximately one seventh of body height, with restrained facial features. + sculpt.loft(r,Vector3.ZERO,[[1.74,.075,.075,0],[1.87,.075,.08,0]],skin) + sculpt.loft(r,Vector3.ZERO,[[1.82,.055,.065,.025],[1.87,.09,.095,.02],[1.96,.128,.115,0],[2.07,.13,.12,-.01],[2.15,.10,.09,-.01],[2.18,.025,.025,-.01]],skin) + var hair=Color("29211e") if demon else Color("494137") + sculpt.loft(r,Vector3.ZERO,[[2.05,.133,.121,-.015],[2.15,.112,.10,-.02],[2.19,.04,.04,-.015]],hair) + for side in [-1,1]: + g.ball(r,Vector3(side*.125,1.97,0),Vector3(.045,.085,.045),skin) + g.ball(r,Vector3(side*.052,2.02,.105),Vector3(.045,.019,.018),Color("292b29")) + sculpt.tube(r,[Vector3(side*.025,2.045,.108),Vector3(side*.076,2.045,.098)],[.009,.006],hair) + if demon: + sculpt.tube(r,[Vector3(side*.10,2.13,-.03),Vector3(side*.19,2.24,-.08),Vector3(side*.19,2.38,-.10),Vector3(side*.13,2.43,-.04)],[.05,.038,.019,.001],Color("4c4034")) + for j in range(3):sculpt.tube(r,[Vector3(side*.1,2.12,-.04-j*.025),Vector3(side*.15,1.99,-.09-j*.025),Vector3(side*.15,1.77,-.10-j*.025)],[.04,.045,.006],hair) + sculpt.tube(r,[Vector3(side*.025,1.9,.103),Vector3(side*.047,1.902,.091)],[.006,.003],skin.darkened(.35)) + sculpt.tube(r,[Vector3(0,2.035,.11),Vector3(0,1.968,.148),Vector3(0,1.952,.121)],[.018,.023,.012],skin) + if demon: + # Compact folded wings retain the demon silhouette without oversized cartoon features. + for side in [-1,1]: + var wing=Node3D.new();r.add_child(wing) + var pts=[Vector3(side*.16,1.63,-.14),Vector3(side*.47,1.93,-.32),Vector3(side*.60,1.59,-.38),Vector3(side*.43,1.08,-.29)] + var st=SurfaceTool.new();st.begin(Mesh.PRIMITIVE_TRIANGLES) + for v in [pts[0],pts[1],pts[2],pts[0],pts[2],pts[3]]:st.add_vertex(v) + st.generate_normals();var membrane=g.mesh_node(wing,st.commit(),Vector3.ZERO,Color("452c29"));membrane.material_override.cull_mode=BaseMaterial3D.CULL_DISABLED + for j in range(3):sculpt.tube(wing,[pts[j],pts[j+1]],[.024,.012],leather) + sculpt.tube(wing,[pts[0],pts[2]],[.02,.01],leather) + sculpt.tube(r,[Vector3(0,1.1,-.17),Vector3(.23,.8,-.40),Vector3(.42,.63,-.43),Vector3(.53,.8,-.35)],[.035,.025,.016,.002],skin.darkened(.25)) + # Seams, lacing, layered belts and fasteners read as clothing rather than smooth primitives. + for side in [-1,1]: + for j in range(12): + var y=1.28+j*.036 + sculpt.tube(r,[Vector3(side*.075,y,.18),Vector3(-side*.045,y+.025,.183)],[.004,.004],Color("7c6e58")) + for j in range(7): + var y=1.30+j*.057 + g.ball(r,Vector3(side*.22,y,.13),Vector3.ONE*.014,metal) + var leg=r.get_node("LegL" if side<0 else "LegR") + var knee=leg.get_node("Knee") + for y in [-.16,-.36]: + g.box(knee,Vector3(.055,y,.093),Vector3(.045,.035,.012),metal) + g.box(knee,Vector3(.055,y,.101),Vector3(.022,.017,.008),leather) + if demon: + var arm=r.get_node("ArmL" if side<0 else "ArmR") + for j in range(4):sculpt.tube(arm,[Vector3(side*.04,-.02-j*.035,.085),Vector3(side*.1,-.035-j*.035,.07)],[.007,.005],metal) + if demon: + for j in range(4): + var coil=g.torus(r,Vector3(.29,1.06-j*.015,.08),.095,leather);coil.rotation.x=PI/2;coil.material_override=g.mat(leather) + for side in [-1,1]: + for j in range(6):sculpt.tube(r,[Vector3(side*.11,2.15,-.06-j*.01),Vector3(side*.15,2.01,-.11-j*.01),Vector3(side*.17,1.82,-.13-j*.01)],[.012,.01,.001],hair.lightened(.035)) + r.rotation.y=.58 + return r diff --git a/Demon_v0.19/pillory.gd b/Demon_v0.19/pillory.gd new file mode 100644 index 0000000..f0de5ca --- /dev/null +++ b/Demon_v0.19/pillory.gd @@ -0,0 +1,34 @@ +extends RefCounted +# Three open apertures, each meshed from a circle to the edge of its wooden cell. +func board(g,parent,cx,half_width,radius): + var st=SurfaceTool.new();st.begin(Mesh.PRIMITIVE_TRIANGLES) + for i in range(64): + var points=[] + for angle in [TAU*i/64,TAU*(i+1)/64]: + var v=Vector2(cos(angle),sin(angle));var distance=minf(half_width/maxf(absf(v.x),.0001),.23/maxf(absf(v.y),.0001)) + points.append(v*radius);points.append(v*distance) + for z in [-.105,.105]: + for index in [0,1,3,0,3,2]: + var v=points[index];st.set_uv(v*3);st.add_vertex(Vector3(v.x+cx,1.70+v.y,z)) + for index in [0,2]: + var a=points[0] if index==0 else points[1];var b=points[2] if index==0 else points[3] + for v in [Vector3(a.x+cx,1.7+a.y,-.105),Vector3(b.x+cx,1.7+b.y,-.105),Vector3(b.x+cx,1.7+b.y,.105),Vector3(a.x+cx,1.7+a.y,-.105),Vector3(b.x+cx,1.7+b.y,.105),Vector3(a.x+cx,1.7+a.y,.105)]:st.set_uv(Vector2(v.x,v.y));st.add_vertex(v) + st.generate_normals();var node=g.mesh_node(parent,st.commit(),Vector3.ZERO,Color.WHITE) + var mat=ShaderMaterial.new();mat.shader=preload("res://pillory_wood.gdshader");mat.set_shader_parameter("tint",Color("695039"));node.material_override=mat + # The board has interior faces as well as the two visible surfaces. +func build(g,d): + var root=d.device;root.set_meta("pillory_apertures",3) + var wood=Color("5e4430");var iron=Color("36383b") + for side in [-1,1]: + g.box(root,Vector3(side*.85,1.12,0),Vector3(.19,2.24,.24),wood) + g.box(root,Vector3(side*.85,.12,0),Vector3(.30,.24,1.65),wood) + for z in [-.65,.65]:g.line(root,Vector3(side*.85,.18,z),Vector3(side*.85,.85,0),.065,wood) + for y in [1.48,1.94]: + g.box(root,Vector3(side*.85,y,.14),Vector3(.23,.065,.06),iron) + g.ball(root,Vector3(side*.85,y,.18),Vector3.ONE*.065,Color("a49b80")) + board(g,root,0,.28,.158) + board(g,root,-.59,.31,.085);board(g,root,.59,.31,.085) + for x in [-.72,.72]: + g.box(root,Vector3(x,1.70,.125),Vector3(.055,.44,.04),iron) + for y in [1.54,1.86]:g.ball(root,Vector3(x,y,.15),Vector3.ONE*.045,Color("a49b80")) + var hinge=g.cylinder(root,Vector3(-.93,1.70,0),.045,.5,iron);hinge.rotation.x=PI/2 diff --git a/Demon_v0.19/pillory_wood.gdshader b/Demon_v0.19/pillory_wood.gdshader new file mode 100644 index 0000000..f4b829c --- /dev/null +++ b/Demon_v0.19/pillory_wood.gdshader @@ -0,0 +1,12 @@ +shader_type spatial; +render_mode cull_disabled; +uniform vec4 tint:source_color=vec4(0.28,0.17,0.09,1); +varying vec3 p; +void vertex(){p=VERTEX;} +void fragment(){ + float grain=sin(p.z*67.0+sin(p.x*7.0+p.y*12.0)*2.5); + float fiber=sin(p.z*219.0+p.x*5.0); + ALBEDO=tint.rgb*(0.85+grain*0.12+fiber*0.04); + ROUGHNESS=0.82;SPECULAR=0.25; + NORMAL=normalize(NORMAL+vec3(0,grain*0.025,fiber*0.018)); +} diff --git a/Demon_v0.19/pose_probe.gd b/Demon_v0.19/pose_probe.gd new file mode 100644 index 0000000..fa3bcf3 --- /dev/null +++ b/Demon_v0.19/pose_probe.gd @@ -0,0 +1,13 @@ +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() + for n in actor.find_children("*","MeshInstance3D",true,false):print("MESH ",n.name) + 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") or n.begins_with("toe"): + 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() diff --git a/Demon_v0.19/posture_capture.gd b/Demon_v0.19/posture_capture.gd new file mode 100644 index 0000000..a79c6ab --- /dev/null +++ b/Demon_v0.19/posture_capture.gd @@ -0,0 +1,28 @@ +extends RefCounted +func shot(g,name): + await RenderingServer.frame_post_draw + var folder="res://captures/v0181" if OS.has_feature("editor") else OS.get_executable_path().get_base_dir()+"/captures/v0181" + 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("POSTURE CAPTURE failed");g.get_tree().quit(1);return + print("POSTURE_CAPTURE: "+name) +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.set_process(false);g.avatar.set_process(false) + for s in g.souls:s.node.hide();s.task_badge.hide() + if is_instance_valid(g.life.hero_bubble):g.life.hero_bubble.hide() + for frame in range(1800): + var angle=frame*.015 + g.player.position=Vector3(2+cos(angle),0,sin(angle));g.avatar.rotation.y=atan2(-sin(angle),cos(angle)) + g.avatar.set_walking(true);g.avatar._process(1.0/60) + g.camera.size=4.5;g.camera.position=g.player.position+g.avatar.global_basis.z.normalized()*7+g.avatar.global_basis.x.normalized()*4+Vector3.UP*8;g.camera.look_at(g.player.position+Vector3(0,1,0)) + await shot(g,"upright-walk") + g.avatar.set_walking(false) + for frame in range(60):g.avatar._process(1.0/60) + await shot(g,"upright-idle") + for hit in range(20): + g.avatar.strike(.45) + for frame in range(40):g.avatar._process(1.0/60) + await shot(g,"upright-after-whip") + print("POSTURE_CAPTURE_BUILD: "+g.build_id) + g.get_tree().quit() diff --git a/Demon_v0.19/posture_probe.gd b/Demon_v0.19/posture_probe.gd new file mode 100644 index 0000000..3b87cf1 --- /dev/null +++ b/Demon_v0.19/posture_probe.gd @@ -0,0 +1,24 @@ +extends SceneTree +class Game: + extends RefCounted + var paused=false +func _initialize():call_deferred("run") +func lean(a): + var hip=a.gait.point("root");var head=a.gait.point("head") + var v=a.global_basis.inverse()*(head-hip) + return rad_to_deg(atan2(v.x,v.y)) +func run(): + var g=Game.new();var anchor=Node3D.new();root.add_child(anchor) + var actor=preload("res://succubus_actor.gd").new();anchor.add_child(actor);actor.configure(g);actor.set_process(false);actor.rotation=Vector3.ZERO;actor.reset_gait() + for mode in ["constant_walk","stop_start","idle","whip_then_walk"]: + var minimum=999.0;var maximum=-999.0 + for frame in range(1800): + var moving=mode=="constant_walk" or (mode=="stop_start" and frame%30<15) or (mode=="whip_then_walk" and frame%90>30) + actor.set_walking(moving) + if moving:anchor.position+=Vector3.BACK*3.3/60 + if mode=="whip_then_walk" and frame%90==0:actor.strike(.45) + actor._process(1.0/60) + minimum=minf(minimum,lean(actor));maximum=maxf(maximum,lean(actor)) + print("LEAN ",mode," min=",minimum," max=",maximum," end=",lean(actor)) + actor.game=null;actor.queue_free();await process_frame + quit() diff --git a/Demon_v0.19/posture_tests.gd b/Demon_v0.19/posture_tests.gd new file mode 100644 index 0000000..3187a35 --- /dev/null +++ b/Demon_v0.19/posture_tests.gd @@ -0,0 +1,30 @@ +extends RefCounted +var failures=[] +func check(ok,label): + if not ok and not label in failures:failures.append(label);push_error("POSTURE QA: "+label) +func lean(actor): + var direction=actor.global_basis.inverse()*(actor.gait.point("head")-actor.gait.point("root")) + return rad_to_deg(atan2(direction.x,direction.y)) +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.set_process(false);g.avatar.set_process(false) + for i in range(3):g.workshop.add_helper() + var actors=[g.avatar] + for h in g.workshop.helpers:h.model.set_process(false);actors.append(h.model) + for index in range(actors.size()): + var actor=actors[index];actor.get_parent().position=Vector3.ZERO;actor.rotation=Vector3(0,index*.7,0);actor.reset_gait() + for scenario in ["continuous_walk","stop_start","idle","whip_walk"]: + var maximum=0.0 + for frame in range(1800): + var moving=scenario=="continuous_walk" or (scenario=="stop_start" and frame%30<15) or (scenario=="whip_walk" and frame%90>30) + actor.set_walking(moving) + if moving:actor.get_parent().position+=actor.global_basis.z.normalized()*(3.3 if index==0 else 2.5)/60 + if scenario=="whip_walk" and frame%90==0:actor.strike(.45) + actor._process(1.0/60) + maximum=maxf(maximum,absf(lean(actor))) + check(maximum<2.0,"torso remains upright: actor %d %s"%[index,scenario]) + if scenario=="idle":check(absf(lean(actor))<.1,"idle returns to neutral") + print("POSTURE_METRIC ",JSON.stringify({"actor":index,"scenario":scenario,"simulated_seconds":30,"max_lateral_tilt_degrees":maximum})) + g.paused=true;var before=actor.gait.point("head");actor._process(.05);check(actor.gait.point("head").is_equal_approx(before),"pause retains pose");g.paused=false + if failures.is_empty():print("ALL POSTURE TESTS PASSED: four succubi, 480 simulated seconds, continuous walking, stop/start, idle and repeated whip transitions; lateral tilt under 2 degrees") + g.get_tree().quit(0 if failures.is_empty() else 1) diff --git a/Demon_v0.19/progression.gd b/Demon_v0.19/progression.gd new file mode 100644 index 0000000..9c1f077 --- /dev/null +++ b/Demon_v0.19/progression.gd @@ -0,0 +1,35 @@ +extends RefCounted +const MAX_RESOURCE=10_000_000 +# A save belongs to exactly one exported build. Settings use a separate file. +static func defaults(build_id: String) -> Dictionary: + return {"build_id":build_id,"coins":0,"essence":0,"done":0,"speed":0,"power":0,"auto":false,"development":{}} + +static func decode(data, build_id: String) -> Dictionary: + var result=defaults(build_id) + if not data is Dictionary or data.get("build_id","")!=build_id: + return result + for key in ["coins","essence","done","speed","power"]: + var value=data.get(key,0) + if typeof(value) in [TYPE_INT,TYPE_FLOAT] and is_finite(float(value)): + var limit=3 if key=="speed" else (2 if key=="power" else MAX_RESOURCE) + result[key]=clampi(int(value),0,limit) + result["auto"]=data.get("auto",false)==true + var dev=data.get("development",{}) + if dev is Dictionary: + for key in ["tier","selected","xp","points","action","leadership"]: + var value=dev.get(key,0) + if typeof(value) in [TYPE_INT,TYPE_FLOAT] and is_finite(float(value)): + result.development[key]=clampi(int(value),0,3 if key in ["tier","selected","action","leadership"] else MAX_RESOURCE) + var workshop=data.get("workshop",{}) + if workshop is Dictionary:result["workshop"]=workshop + return result + +static func read_save(path: String, build_id: String) -> Dictionary: + if not FileAccess.file_exists(path): return defaults(build_id) + return decode(JSON.parse_string(FileAccess.get_file_as_string(path)),build_id) + +static func write_save(path: String, data: Dictionary) -> Error: + var file=FileAccess.open(path,FileAccess.WRITE) + if not file: return FileAccess.get_open_error() + file.store_string(JSON.stringify(data)) + return OK diff --git a/Demon_v0.19/project.godot b/Demon_v0.19/project.godot new file mode 100644 index 0000000..a71a605 --- /dev/null +++ b/Demon_v0.19/project.godot @@ -0,0 +1,24 @@ +config_version=5 +[application] +config/name="DEMON — Испытательный срок" +run/main_scene="res://main.tscn" +config/features=PackedStringArray("4.3", "Forward Plus") +[display] +window/size/viewport_width=1600 +window/size/viewport_height=900 +window/size/window_width_override=1600 +window/size/window_height_override=900 +window/stretch/mode="canvas_items" +[rendering] +anti_aliasing/quality/msaa_3d=3 +textures/default_filters/anisotropic_filtering_level=3 +renderer/rendering_method="forward_plus" +renderer/rendering_method.mobile="gl_compatibility" +textures/default_filters/use_nearest_mipmap_filter=false +environment/defaults/default_clear_color=Color(0.055,0.035,0.085,1) + +[editor_plugins] +enabled=PackedStringArray("res://addons/build_stamp/plugin.cfg") + +[gui] +theme/custom="res://fantasy_theme.tres" diff --git a/Demon_v0.19/room_decor_tests.gd b/Demon_v0.19/room_decor_tests.gd new file mode 100644 index 0000000..17d225d --- /dev/null +++ b/Demon_v0.19/room_decor_tests.gd @@ -0,0 +1,32 @@ +extends RefCounted +var failures=0 +func check(ok,label): + if not ok:failures+=1;push_error("ROOM DECOR QA: "+label) +func shot(g,name): + await g.get_tree().process_frame;await RenderingServer.frame_post_draw + g.get_viewport().get_texture().get_image().save_png("res://captures/clean-room/"+name+".png") +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false + var a=g.architecture;var w=g.workshop;var station=w.add_station(0,Vector3(3,0,0)) + check(g.get_meta("dressing_parts")==0 and a.growth.wall_dressing.is_empty(),"tables shelves pipes and miscellaneous dressing removed") + check(a.braziers.size()==6,"exactly six grouped room braziers") + DirAccess.make_dir_recursive_absolute("res://captures/clean-room") + for rank in range(4): + w.expansion_level=rank;a.growth.set_level(rank);w.make_grid() + var left=-7.95;var right=a.growth.right_edge();var center=(left+right)*.5 + var positions=a.braziers.map(func(b):return b.position) + for b in a.braziers: + check(positions.any(func(p):return p.distance_to(Vector3(left+right-b.position.x,0,b.position.z))<.001),"left/right symmetry rank %d"%rank) + check(positions.any(func(p):return p.distance_to(Vector3(b.position.x,0,-b.position.z))<.001),"front/back symmetry rank %d"%rank) + check(not Rect2(w.ORIGIN,w.grid_area()).grow(.4).has_point(Vector2(b.position.x,b.position.z)),"brazier clears construction cells") + var lights=b.find_children("*","OmniLight3D",true,false) + check(lights.size()==1 and lights[0].global_position.distance_to(b.position+Vector3(0,1.45,0))<.001,"light follows brazier on growth") + check(b.find_children("*","GPUParticles3D",true,false).all(func(p):return p.local_coords),"embers stay attached during growth") + check(positions.filter(func(p):return absf(p.x-center)<.001).size()==2,"two central wall braziers") + check(is_instance_valid(station.device) and station.device.position==Vector3(3,0,0),"purchased apparatus unaffected") + g.camera.position=Vector3(20,26,32);g.camera.look_at(Vector3(center,0,0));g.camera.size=29+rank*2;a.update(g.camera);g.hud.hide();g.player.hide() + for imp in g.life.imps:imp.root.hide() + await shot(g,"rank-%d"%rank) + print("ROOM DECOR QA ","PASSED" if failures==0 else "FAILED",": no clutter, six braziers, four growth ranks, mirrored corners and wall centers, moving lights and clear placement zone") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/room_growth.gd b/Demon_v0.19/room_growth.gd new file mode 100644 index 0000000..0ba227b --- /dev/null +++ b/Demon_v0.19/room_growth.gd @@ -0,0 +1,50 @@ +extends RefCounted +var g +var level=0 +var extension: Node3D +var smog: FogVolume +var wall_root: Node3D +var wall_dressing=[] +const BASE_RIGHT=12.0 +const NEIGHBOUR_SHIFT=16.0 +static func extra_width(rank):return 12.0*(pow(1.2,rank)-1.0) +static func neighbour_x(gx):return gx*22.0+(NEIGHBOUR_SHIFT if gx>0 else 0.0) +func setup(game): + g=game + smog=FogVolume.new();smog.name="LightHellSmog";smog.shape=RenderingServer.FOG_VOLUME_SHAPE_BOX;g.add_child(smog) + var fog=FogMaterial.new();fog.density=.010;fog.albedo=Color("a09683");fog.height_falloff=.22;fog.edge_fade=.2;smog.material=fog + for node in g.get_children(): + if node.has_meta("right_wall_dressing"):wall_dressing.append(node) + set_level(0) +func right_edge():return BASE_RIGHT+extra_width(level) +func set_level(rank): + level=clampi(rank,0,3) + var delta=extra_width(level) + for node in wall_dressing: + for record in node.get_meta("right_wall_dressing"): + var tr=record.transform;tr.origin.x+=delta;node.multimesh.set_instance_transform(record.index,tr) + smog.position=Vector3((BASE_RIGHT+delta-8.05)/2,1.45,0);smog.size=Vector3(BASE_RIGHT+delta+8.3,3.4,13.3) + if is_instance_valid(extension):extension.free() + extension=Node3D.new();extension.name="PurchasedRoomExtension";g.add_child(extension) + if delta>0: + piece(Vector3(12+delta/2,-.65,0),Vector3(delta+.2,1.25,13.4),Color("565853")) + var columns=ceili(delta/.5) + for x in range(columns): + var width=minf(.5,delta-x*.5) + for z in range(28):piece(Vector3(12+x*.5+width/2,-.08,-6.55+z*.48),Vector3(width-.018,.18,.455),Color("565853").darkened(((x+z)%5)*.035)) + rebuild_walls() + g.architecture.arrange_braziers(-7.95,right_edge()) + g.set_meta("room_expansions",level);g.set_meta("build_area_scale",pow(1.2,level)) + if g.stage_effects and g.stage_effects.bokeh:g.stage_effects.bokeh.material_override.set_shader_parameter("room_right",right_edge()+.3) +func piece(pos,size,color): + var n=g.dungeon.block(pos,size,color,.025);n.reparent(extension);return n + +func rebuild_walls(): + g.architecture.walls.clear() + if is_instance_valid(wall_root):wall_root.free() + wall_root=Node3D.new();wall_root.name="SymmetricCastleWalls";g.add_child(wall_root) + for part in preload("res://castle_walls.gd").layout(-7.95,right_edge(),6.65,-5.3): + var n=g.dungeon.block(part.position,part.size,Color("494d47"),.025) + n.reparent(wall_root);n.set_meta("castle_feature",part.feature) + n.set_meta("wall_normal",part.normal) + if part.position.y>.6:g.architecture.walls.append(n) diff --git a/Demon_v0.19/roster_capture.gd b/Demon_v0.19/roster_capture.gd new file mode 100644 index 0000000..3ce70b6 --- /dev/null +++ b/Demon_v0.19/roster_capture.gd @@ -0,0 +1,26 @@ +extends RefCounted +func run(g): + await g.get_tree().create_timer(.4).timeout + g.start_game();g.paused=true;g.workshop.reset();g.player.hide();g.hud.hide() + for s in g.souls:s.node.queue_free() + g.souls.clear() + for imp in g.life.imps:imp.root.hide() + var actors=[] + for kind in range(10): + var a=g.make_person(false,kind);g.add_child(a);g.make_ghost(a,kind);g.set_soul_reveal(a,1) + a.position=Vector3(-2.7+(kind%5)*2.55,.55,-2.2 if kind<5 else 1.3);a.rotation.y=.08 + actors.append(a) + g.camera.position=Vector3(4,7.5,18);g.camera.look_at(Vector3(2.4,1.3,-.4));g.camera.size=10.2 + await g.get_tree().create_timer(.8).timeout + await RenderingServer.frame_post_draw + DirAccess.make_dir_recursive_absolute("res://captures/roster-v03") + g.get_viewport().get_texture().get_image().save_png("res://captures/roster-v03/in-game-roster.png") + for kind in [0,5,8]: + for a in actors:a.hide() + var a=actors[kind];a.show();a.position=Vector3(2,.55,0) + g.camera.position=Vector3(3.2,2.8,5);g.camera.look_at(Vector3(2,1.65,0));g.camera.size=3.1 + await g.get_tree().create_timer(.35).timeout + await RenderingServer.frame_post_draw + g.get_viewport().get_texture().get_image().save_png("res://captures/roster-v03/soul-%02d.png"%kind) + print("ROSTER CAPTURES COMPLETE: ten characters in game, exposed legs and feet") + g.get_tree().quit() diff --git a/Demon_v0.19/roster_tests.gd b/Demon_v0.19/roster_tests.gd new file mode 100644 index 0000000..02f9c1a --- /dev/null +++ b/Demon_v0.19/roster_tests.gd @@ -0,0 +1,39 @@ +extends RefCounted +var failures=0 +func check(ok,label): + if not ok:failures+=1;push_error("ROSTER QA: "+label) +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.paused=true + var women=0;var men=0;var hairstyles=[] + for kind in range(10): + var actor=g.make_person(false,kind);g.add_child(actor) + if actor.get_meta("gender")=="female":women+=1 + else:men+=1 + hairstyles.append(actor.get_meta("hair_style")) + check(actor.get_meta("visible_legs"),"legs enabled %d"%kind) + for clip in ["Idle","Float","Walk","Rack","Wheel","Maiden"]:check(actor.clips.has(clip),"clip %s / %d"%[clip,kind]) + var legs=0;var feet=0 + for mesh in actor.find_children("*","MeshInstance3D",true,false): + for surface in range(mesh.mesh.get_surface_count()): + var arrays=mesh.mesh.surface_get_arrays(surface) + for vertex in arrays[Mesh.ARRAY_VERTEX]: + if vertex.y>.15 and vertex.y<.70:legs+=1 + if vertex.y<.15:feet+=1 + check(legs>80 and feet>20,"anatomical leg and foot mesh geometry %d"%kind) + actor.mount_station(4);actor.update_torture(.1,false) + check(actor.skeleton.get_bone_count()==166,"anatomical rig %d"%kind) + for side in ["L","R"]:check(actor.skeleton.find_bone("foot."+side)>=0,"separate foot bones %d"%kind) + actor.unmount_station();actor.queue_free() + check(women==5 and men==5,"five women and five men") + check(hairstyles.size()==10 and hairstyles.all(func(h):return hairstyles.count(h)==1),"ten distinct hairstyles") + var s=g.souls[0];s.entering=false + var serial=g.dialogue.serial + g.workshop.dialogue_clock=1000;g.workshop.update_soul_dialogue(100) + g.workshop.announce_soul(s,"Не показывать");g.development.speak(s,"Не показывать");g.dialogue.speak(s.kind) + check(not is_instance_valid(g.development.bubble),"no automatic or manually triggered soul bubble") + check(g.dialogue.serial==serial and g.dialogue.pending.is_empty(),"soul chatter is silent") + g.paused=false;g.say("Героиня продолжает говорить") + check(is_instance_valid(g.life.hero_bubble) and g.dialogue.last_kind==10,"heroine dialogue preserved") + if failures==0:print("ALL ROSTER TESTS PASSED: 5 women + 5 men, ten hair silhouettes, legs/feet, six clips, 166-bone rigs; soul dialogue disabled, heroine preserved") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/ruby_ui_tests.gd b/Demon_v0.19/ruby_ui_tests.gd new file mode 100644 index 0000000..afe6b8e --- /dev/null +++ b/Demon_v0.19/ruby_ui_tests.gd @@ -0,0 +1,42 @@ +extends RefCounted +var failures=0 +func check(ok,label): + if not ok:failures+=1;push_error("RUBY UI QA: "+label) +func node(w,key):return w.node_buttons.filter(func(n):return n.key==key)[0] +func shot(g,name): + await g.get_tree().process_frame;await RenderingServer.frame_post_draw + g.get_viewport().get_texture().get_image().save_png("res://captures/ruby-ui/"+name+".png") +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false + var w=g.workshop;g.coins=10000;g.essence=1000;g.development.points=9 + w.toggle_tree();w.refresh();DirAccess.make_dir_recursive_absolute("res://captures/ruby-ui") + for n in w.node_buttons: + check(n.gems.filled==0,"empty sockets before purchase") + check(n.button.modulate==Color.WHITE,"all nodes initially bright") + await shot(g,"empty") + for key in ["speed","power","leadership","hire","haste","diligence"]: + var n=node(w,key);check(n.gems.slots==3,"three sockets: "+key) + for rank in range(1,4): + n.button.pressed.emit() + check(n.gems.filled==rank,"ruby added per purchase: %s/%d"%[key,rank]) + check(n.button.modulate==Color.WHITE,"purchased node stays bright") + check(n.gems.mouse_filter==Control.MOUSE_FILTER_IGNORE,"rubies do not block button clicks") + check(n.button.disabled and n.gems.filled==3,"maximum remains non-purchasable with three rubies") + var gold=g.coins;var souls=g.essence;var points=g.development.points;n.button.pressed.emit() + check(g.coins==gold and g.essence==souls and g.development.points==points,"max cannot spend currency again") + for key in ["unlock1","unlock2","unlock3","unlock4","unlock5","auto"]: + var n=node(w,key);n.button.pressed.emit() + check(n.gems.slots==1 and n.gems.filled==1 and n.button.disabled,"one-time purchase gets one ruby") + for n in w.node_buttons: + check(n.button.modulate==Color.WHITE,"no dimming in any branch") + check(n.button.get_theme_stylebox("disabled")==n.button.get_theme_stylebox("normal"),"disabled and normal stone have same brightness") + check(n.gems.get_rect().end.y<=n.button.size.y+1,"rubies fit button bottom") + await shot(g,"purchased") + for scroll in w.tree.find_children("*","ScrollContainer",true,false):scroll.scroll_vertical=10000 + await shot(g,"purchased-lower") + g.speed_level=1;g.development.action_level=2;g.development.leadership=3;w.helper_speed=1;w.helper_diligence=2;w.refresh() + for scroll in w.tree.find_children("*","ScrollContainer",true,false):scroll.scroll_vertical=0 + await shot(g,"mixed-levels") + print("RUBY UI QA ","PASSED" if failures==0 else "FAILED",": zero/one/two/three ranks, singleton rubies, brightness, disabled maxima, purchase safety and layout") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/runtime_burn_tests.gd b/Demon_v0.19/runtime_burn_tests.gd new file mode 100644 index 0000000..7385e2b --- /dev/null +++ b/Demon_v0.19/runtime_burn_tests.gd @@ -0,0 +1,38 @@ +extends RefCounted +var failures=0 +func check(ok,label): + if not ok:failures+=1;push_error("RUNTIME BURN QA: "+label) +func shot(g,name): + await RenderingServer.frame_post_draw + g.get_viewport().get_texture().get_image().save_png("res://captures/runtime-burn/"+name+".png") +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.reset_shift();g.game_started=true;g.paused=false;g.hud.show();g.menu.show_page("") + DirAccess.make_dir_recursive_absolute("res://captures/runtime-burn") + var w=g.workshop;var d=w.add_station(0,Vector3(3,0,0));w.spawn();var soul=g.souls.back();var id=soul.id;var root=soul.node + soul.entering=false;soul.entry_time=1;g.set_soul_reveal(soul.visual,1);w.attach(soul,0) + w.add_station(1,Vector3(-1,0,-1));w.rebuild_nav() + g.player.position=w.approach(d);g.avatar.reset_gait();g.camera.size=10 + g.orbit.pan=Vector3(3,1,0)-g.CAMERA_TARGET-g.player.position*.1 + var imp_start=g.life.imps[0].root.position + await g.get_tree().create_timer(.7).timeout + check(d.placement==0,"assembly advances through normal game frames") + for i in range(5): + var point=g.camera.unproject_position(soul.node.position+Vector3(0,1,0)) + await preload("res://workshop_tests.gd").new().click_world(g,point) + check(d.hits==i+1,"actual mouse hit %d"%(i+1)) + check(not w.context.visible,"no title panel required") + if i<4:await g.get_tree().create_timer(.5).timeout + check(g.done==1 and d.soul==-1 and g.index_of(id)<0,"five clicks complete and reward soul") + check(g.life.burns.size()==1,"burn starts in real game loop") + await shot(g,"just-finished") + await g.get_tree().create_timer(.65).timeout + check(not g.life.burns.is_empty() and g.life.burns[0].t>.5,"burn clock advances with hidden context panel") + await shot(g,"burning") + await g.get_tree().create_timer(1.8).timeout + check(not is_instance_valid(root) and g.life.burns.is_empty(),"body cloth and fire disappear without manually advancing life") + check(g.life.imps[0].root.position.distance_to(imp_start)>.1,"imps also update with hidden context") + check(g.done==1,"completion reward not duplicated") + await shot(g,"gone") + print("RUNTIME BURN QA ","PASSED" if failures==0 else "FAILED",": normal process frames, five real mouse hits, hidden UI, two stations, animated burn, body/cloth cleanup and imp movement") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/sentence_tests.gd b/Demon_v0.19/sentence_tests.gd new file mode 100644 index 0000000..85a0e77 --- /dev/null +++ b/Demon_v0.19/sentence_tests.gd @@ -0,0 +1,92 @@ +extends RefCounted +var checks=0 +func check(value): + checks+=1 + if not value:push_error("SENTENCE QA failed #%d" % checks);Engine.get_main_loop().quit(1) + +func clear(g): + for soul in g.souls:soul.node.queue_free() + g.souls.clear();g.held=-1 + g.workshop.reset() + g.paused=false;g.game_started=true + +func new_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 finish(g,d): + g.workshop.step_station(d,1,false) + for i in range(600):g.time+=1.0/60;g.workshop.step_station(d,1.0/60,true) + +func run(g): + g.start_game();var w=g.workshop + check(g.get_meta("level_area_scale")==1.25 and g.get_meta("main_floor_tiles")==1120) + check(w.AREA==Vector2i(12,9) and w.TITLES.size()==6) + clear(g) + var a=w.add_station(0,Vector3(-1,0,3)) + var wheel=w.add_station(2,Vector3(1,0,-1.5)) + var chair=w.add_station(4,Vector3(4.5,0,1.5)) + var kettle=w.add_station(5,Vector3(8,0,-1)) + w.rebuild_nav();check(w.accessible()) + check(chair.special.music.stream.loop_mode==AudioStreamWAV.LOOP_FORWARD and chair.special.music.stream.get_length()>7.9) + check(kettle.special.bubbles.size()==16 and kettle.special.liquid!=null) + g.development.xp=0 + w.spawn();check(g.souls.back().required.size()==1) + g.development.xp=210;g.uid=3 + w.spawn();check(g.souls.back().required.size()==1) + g.development.xp=570;g.uid=8 + w.spawn();check(g.souls.back().required.size()==1) + g.uid=8;w.spawn();check(g.souls.back().required.size()==1) + for soul in g.souls: + for kind in soul.required:check(kind in [0,2,4,5]) + for soul in g.souls:soul.node.queue_free() + g.souls.clear() + g.development.xp=0 + var s=new_soul(g,[0,2]);var gold=g.coins;var done=g.done + check(not w.attach(s,2)) + check(w.attach(s,0));finish(g,a) + check(s.state=="ready" and s.served==[0] and g.coins==gold and g.done==done and g.life.burns.is_empty()) + check(s.label.text.is_empty() and not s.label.visible) + check(s.task_icon_nodes.size()==2 and s.task_icon_nodes[0].completed and not s.task_icon_nodes[1].completed) + check(s.task_icon_nodes[0].kind==w.Icon.APPARATUS[0] and s.task_icon_nodes[1].kind==w.Icon.APPARATUS[2]) + check(a.ready and a.soul==s.id) + w.sentences.pickup(s);check(s.state=="held" and not s.queue_reserved) + w.drop_held();check(s.state=="ready" and a.soul==s.id) + w.sentences.pickup(s);check(w.attach(s,1));g.held=-1 + check(a.soul==-1 and not a.ready) + finish(g,wheel) + check(g.index_of(s.id)==-1 and g.done==done+1 and g.coins==gold+27 and g.life.burns.size()==1) + check(not w.attach(new_soul(g,[4,5]),0)) + var t=g.souls.back();check(w.attach(t,2));finish(g,chair) + check(t.state=="ready" and t.served==[4] and not chair.special.music.playing) + check(w.attach(t,3));finish(g,kettle) + check(g.index_of(t.id)==-1 and g.done==done+2 and g.coins==gold+68) + print("PASS: expanded level +25%, six apparatus, progressive 1/2/3 sentences, wrong-tool rejection, intermediate transfer, final-only rewards and burn, chair and cauldron") + # Three-stage route entirely operated by an assistant, with no manual carrying. + clear(g);g.development.xp=0 + a=w.add_station(0,Vector3(-1,0,3));chair=w.add_station(4,Vector3(4.5,0,1.5));kettle=w.add_station(5,Vector3(8,0,-1));w.rebuild_nav() + w.add_helper();w.automation=true;w.helper_speed=3 + s=new_soul(g,[0,4,5]);s.node.position=Vector3(-5.3,0,3.4) + var target_done=g.done+1 + for frame in range(6000): + g.time+=1.0/60;w.update_helpers(1.0/60) + for d in w.stations:w.step_station(d,1.0/60,d.operator>=0) + if g.done==target_done:break + check(g.done==target_done and g.souls.is_empty()) + check(w.helpers[0].model.get_meta("helper_tint")==Color("779fff")) + var helper_mesh=w.helpers[0].model.find_children("*","MeshInstance3D",true,false)[0] + var hero_mesh=g.avatar.find_children("*","MeshInstance3D",true,false)[0] + check(helper_mesh.get_active_material(0)!=hero_mesh.get_active_material(0)) + check(not g.avatar.has_meta("helper_tint")) + s=new_soul(g,[0]);w.dialogue_clock=w.DIALOGUE_INTERVAL;w.update_soul_dialogue(.01) + check(not is_instance_valid(g.development.bubble)) + var serial=g.dialogue.serial;g.dialogue.speak(s.kind) + check(g.dialogue.serial==serial and g.dialogue.pending.is_empty()) + g.paused=true;w.update(.1);g.paused=false;w.update(.1) + check(not is_instance_valid(g.development.bubble)) + print("PASS: assistant routes a soul through three matching devices; blue materials preserve heroine; soul dialogue stays disabled across pause") + print("ALL SENTENCE TESTS PASSED — DEMON 0.19") + g.get_tree().quit() diff --git a/Demon_v0.19/separation.gd b/Demon_v0.19/separation.gd new file mode 100644 index 0000000..2c15e18 --- /dev/null +++ b/Demon_v0.19/separation.gd @@ -0,0 +1,43 @@ +extends RefCounted +static func resolve(g): + var actors=[{"node":g.player,"radius":0.40,"weight":1.0}] + for s in g.souls: + var radius=1.35 if s.id==g.working and g.development.selected>0 else (0.53 if s.kind in [0,3] else 0.38) + actors.append({"node":s.node,"radius":radius,"weight":0.0 if s.entering or s.id==g.working else 0.65}) + for imp in g.life.imps:actors.append({"node":imp.root,"radius":0.22,"weight":1.0}) + for burn in g.life.burns: + if is_instance_valid(burn.root):actors.append({"node":burn.root,"radius":0.52,"weight":0.0}) + for iteration in range(4): + for i in range(actors.size()): + for j in range(i+1,actors.size()): + var a=actors[i];var b=actors[j] + var delta=a.node.position-b.node.position;delta.y=0 + var minimum=a.radius+b.radius+0.04 + var distance=delta.length() + var total=a.weight+b.weight + if distance>=minimum or total<=0:continue + var axis=delta/distance if distance>0.0001 else Vector3.RIGHT + var correction=axis*(minimum-distance) + a.node.position+=correction*a.weight/total + b.node.position-=correction*b.weight/total + # Keep mobile actors on the walkable floor after separation. + for a in actors: + if a.weight<=0:continue + if a.node==g.player or not g.souls.any(func(s):return s.node==a.node): + resolve_equipment(g,a.node,a.radius) + a.node.position.x=clampf(a.node.position.x,-7.3,7.2) + a.node.position.z=clampf(a.node.position.z,-4.8,5.7) + +static func resolve_equipment(g,node,radius): + if g.development.selected==0:return + var extents=[Vector2.ZERO,Vector2(1.05,1.7),Vector2(1.55,1.15),Vector2(1.14,1.12)][g.development.selected] + var p=Vector2(node.position.x-g.STATION.x,node.position.z-g.STATION.z) + var nearest=Vector2(clampf(p.x,-extents.x,extents.x),clampf(p.y,-extents.y,extents.y)) + var delta=p-nearest + if delta.length_squared()>0.00001: + if delta.length()=0 else -1) + else:p.y=(extents.y+radius+.015)*(1 if p.y>=0 else -1) + node.position.x=g.STATION.x+p.x;node.position.z=g.STATION.z+p.y diff --git a/Demon_v0.19/single_punishment_tests.gd b/Demon_v0.19/single_punishment_tests.gd new file mode 100644 index 0000000..7a05b07 --- /dev/null +++ b/Demon_v0.19/single_punishment_tests.gd @@ -0,0 +1,28 @@ +extends RefCounted +var failures=0 +func check(ok,label): + if not ok:failures+=1;push_error("SINGLE PUNISHMENT QA: "+label) +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.set_process(false) + for kind in range(6): + for gender_kind in [0,5]: + g.reset_shift();g.game_started=true;g.paused=false + var w=g.workshop;w.unlock=5;g.development.xp=2170 + var d=w.add_station(kind,Vector3(3,0,0));g.uid=gender_kind;w.spawn();var s=g.souls.back() + s.entering=false;s.entry_time=1;g.set_soul_reveal(s.visual,1) + check(s.required==[kind] and s.task_icon_nodes.size()==1,"one assigned icon at max level") + var reward=w.Economy.reward([kind],2170);var gold=g.coins;var root=s.node + w.attach(s,0);w.step_station(d,.5,false) + for i in range(220): + if d.soul<0:break + w.step_station(d,.1,true) + check(d.soul==-1 and not d.ready and g.index_of(s.id)<0,"completed device releases soul %d/%d"%[kind,gender_kind]) + check(g.done==1 and g.coins==gold+reward.gold and g.essence==1,"single reward after one device") + check(g.life.burns.size()==1,"completion starts burning") + w.finish(d);check(g.done==1 and g.coins==gold+reward.gold,"no duplicate reward") + g.life.update(1.7);check(not root.visible,"body and cloth gone at end of dissolve") + g.life.update(.31);await g.get_tree().process_frame + check(not is_instance_valid(root) and g.life.burns.is_empty(),"body cloth and fire removed") + print("SINGLE PUNISHMENT QA ","PASSED" if failures==0 else "FAILED",": six apparatuses, male/female souls, max level, one icon, burning, rewards and cleanup") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/skill_rubies.gd b/Demon_v0.19/skill_rubies.gd new file mode 100644 index 0000000..0f6ca10 --- /dev/null +++ b/Demon_v0.19/skill_rubies.gd @@ -0,0 +1,15 @@ +extends Control +var slots=1 +var filled=0: + set(value):filled=clampi(value,0,slots);queue_redraw() +func _draw(): + for i in range(slots): + var center=Vector2(size.x*.5+(i-(slots-1)*.5)*21,size.y*.5) + var points=PackedVector2Array([center+Vector2(0,-7),center+Vector2(6,0),center+Vector2(0,7),center+Vector2(-6,0)]) + draw_colored_polygon(points,Color("981d36") if i=0 else global_position + +func bone_local(bone):return to_local(bone_world(bone)) + +func align_bone(bone,child,target): + var i=skeleton.find_bone(bone);var j=skeleton.find_bone(child) + if i<0 or j<0:return + var a=skeleton.get_bone_global_pose(i);var b=skeleton.get_bone_global_pose(j).origin + var desired=skeleton.to_local(to_global(target))-a.origin + if desired.length()<.001:return + var current=a.basis.orthonormalized().get_rotation_quaternion() + var parent=skeleton.get_bone_parent(i);var parent_q=Quaternion.IDENTITY + if parent>=0:parent_q=skeleton.get_bone_global_pose(parent).basis.orthonormalized().get_rotation_quaternion() + var q=Quaternion((b-a.origin).normalized(),desired.normalized())*current + skeleton.set_bone_pose_rotation(i,parent_q.inverse()*q) + skeleton.force_update_all_bone_transforms() + +func limb(upper,lower,end,target,bend): + var a=bone_local(upper);var b=bone_local(lower);var c=bone_local(end) + var l1=a.distance_to(b);var l2=b.distance_to(c);var direction=(target-a).normalized() + var distance=clampf(a.distance_to(target),absf(l1-l2)+.002,l1+l2-.002) + var along=(l1*l1-l2*l2+distance*distance)/(2*distance) + var perpendicular=(bend-direction*bend.dot(direction)).normalized() + var elbow=a+direction*along+perpendicular*sqrt(maxf(0,l1*l1-along*along)) + align_bone(upper,lower,elbow);align_bone(lower,end,target) + +func turn(bone,axis,angle): + var i=skeleton.find_bone(bone) + if i>=0:skeleton.set_bone_pose_rotation(i,skeleton.get_bone_pose_rotation(i)*Quaternion(axis,angle));skeleton.force_update_all_bone_transforms() + +func whip_reaction():impulse=1.0;cry_clock=0.0 + +func update_torture(dt,active): + if not mounted:return + pose_clock+=dt;impulse=move_toward(impulse,0,dt*4) + for i in range(base_pose.size()): + skeleton.set_bone_pose_position(i,base_pose[i].origin) + skeleton.set_bone_pose_rotation(i,base_pose[i].basis.get_rotation_quaternion()) + model.position=Vector3.ZERO;skeleton.force_update_all_bone_transforms() + var struggle=1.0 if active else .15 + var wave=sin(pose_clock*8.0)*struggle + if station_kind==4: + model.position=Vector3(0,.90,-.12)-bone_local("root");skeleton.force_update_all_bone_transforms() + for side in ["L","R"]: + var sign_x=1 if side=="L" else -1 + limb("upperleg01."+side,"lowerleg01."+side,"foot."+side,Vector3(sign_x*.23,.13,.66),Vector3.FORWARD*-1) + align_bone("foot."+side,"toe2-1."+side,bone_local("foot."+side)+Vector3(0,-.045,.18)) + limb("upperarm01."+side,"lowerarm01."+side,"wrist."+side,Vector3(sign_x*.61,1.15,.2),Vector3(0,0,-1)) + turn("head",Vector3.UP,wave*.13);turn("spine02",Vector3.RIGHT,sin(pose_clock*5)*.025*struggle) + elif station_kind==0: + turn("spine02",Vector3.RIGHT,.38+impulse*.11) + model.position=Vector3(0,1.74,.15)-bone_local("head");skeleton.force_update_all_bone_transforms() + for side in ["L","R"]: + var sign_x=1 if side=="L" else -1 + limb("upperarm01."+side,"lowerarm01."+side,"wrist."+side,Vector3(sign_x*.59,1.70,.08),Vector3(0,0,-1)) + limb("upperleg01."+side,"lowerleg01."+side,"foot."+side,Vector3(sign_x*.25,.1,-.4),Vector3(0,0,1)) + turn("head",Vector3.RIGHT,impulse*.11) + elif station_kind==1: + for side in ["L","R"]: + var sign_x=1 if side=="L" else -1 + limb("upperarm01."+side,"lowerarm01."+side,"wrist."+side,Vector3(sign_x*.38,2.30,.02),Vector3(sign_x,0,0)) + turn("head",Vector3.UP,wave*.10) + elif station_kind==5: + for side in ["L","R"]: + var sign_x=1 if side=="L" else -1 + limb("upperarm01."+side,"lowerarm01."+side,"wrist."+side,Vector3(sign_x*(.72+sin(pose_clock*5)*.12),1.65+sin(pose_clock*6+sign_x)*.2,.32),Vector3(sign_x,0,1)) + turn("head",Vector3.UP,wave*.16) + else:turn("head",Vector3.UP,wave*.10) + turn("jaw",Vector3.RIGHT,(.06+maxf(0,sin(pose_clock*7))*.13)*struggle) + if game and cry: + cry.stream_paused=game.paused + cry_clock-=dt + if active and cry_clock<=0 and not game.muted and not game.test_mode and not game.capture_mode: + cry.volume_db=-18+linear_to_db(maxf(game.voice_volume,.0001));cry.pitch_scale=.96+fmod(float(get_meta("soul_class"))*.03,.12);cry.play();cry_clock=4.5+fmod(float(get_meta("soul_class")),3) + if cry.playing and cry.get_playback_position()>.48:cry.stop() + +func _process(_delta): + if game: + animator.speed_scale=0.0 if game.paused else 1.0 + if cry: + cry.stream_paused=game.paused + if cry.playing and cry.get_playback_position()>.48:cry.stop() + if game.paused:return + if not mounted: + restore_flight_pose() + animator.advance(minf(_delta,.05)) + flight_pose.clear() + for i in range(skeleton.get_bone_count()):flight_pose.append(skeleton.get_bone_pose(i)) + pose_clock+=minf(_delta,.05) + if get_meta("gender")=="male": + turn("spine01",Vector3.RIGHT,.10);turn("spine02",Vector3.RIGHT,.14) + turn("neck",Vector3.RIGHT,.06);turn("head",Vector3.RIGHT,-.08) + relax_flight_arms() + cloth.update(self,minf(_delta,.05)) + +func restore_flight_pose(): + for i in range(flight_pose.size()):skeleton.set_bone_pose(i,flight_pose[i]) + skeleton.force_update_all_bone_transforms() + +func relax_flight_arms(): + skeleton.force_update_all_bone_transforms() + for side in ["L","R"]: + var sign_x=1 if side=="L" else -1 + var upper="upperarm01."+side;var lower="lowerarm01."+side;var wrist="wrist."+side + var shoulder=bone_local(upper) + var reach=shoulder.distance_to(bone_local(lower))+bone_local(lower).distance_to(bone_local(wrist)) + var sway=sin(pose_clock*2.8+sign_x*.45)*(.018 if following else .006) + var target=shoulder+Vector3(-sign_x*.025,-reach*.992,.015+sway) + limb(upper,lower,wrist,target,Vector3(sign_x*.12,0,1)) + align_bone(wrist,"finger3-1."+side,bone_local(wrist)+Vector3(0,-.12,.01)) + diff --git a/Demon_v0.19/soul_catalog.gd b/Demon_v0.19/soul_catalog.gd new file mode 100644 index 0000000..57205ba --- /dev/null +++ b/Demon_v0.19/soul_catalog.gd @@ -0,0 +1,4 @@ +extends RefCounted +const NAMES=["Обжора","Курильщица","Аферистка","Взяточница","Сплетница","Алкоголик","Блогер","Нарцисс","Скандалист","Мошенник"] +const HAIR=["flow","bob","tail","braid","bun","crop","quiff","slick","buzz","long"] +static func is_female(kind):return kind>=0 and kind<5 diff --git a/Demon_v0.19/soul_cloth.gd b/Demon_v0.19/soul_cloth.gd new file mode 100644 index 0000000..bb3332b --- /dev/null +++ b/Demon_v0.19/soul_cloth.gd @@ -0,0 +1,33 @@ +extends RefCounted +var strips=[] +var clock=0.0 +func build(actor,kind): + for i in range(3): + var tool=SurfaceTool.new();tool.begin(Mesh.PRIMITIVE_TRIANGLES) + var width=.065+i*.008;var length=.20+i*.035 + var points=[];var uv=[] + for row in range(13): + var t=row/12.0 + for col in range(5): + var u=col/4.0 + points.append(Vector3((u-.5)*width*(1-.20*t),-t*length-(sin(col*2.7+i)*.012 if row==12 else 0),0)) + uv.append(Vector2(u,t)) + for row in range(12): + for col in range(4): + var a=row*5+col;var b=a+1;var c=a+5;var d=c+1 + for index in [a,c,b,b,c,d]:tool.set_uv(uv[index]);tool.add_vertex(points[index]) + tool.generate_normals();tool.index() + var node=MeshInstance3D.new();actor.add_child(node);node.name="SoulClothScrap%d"%i;node.mesh=tool.commit();node.set_meta("soul_cloth",true) + node.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + var material=ShaderMaterial.new();material.shader=preload("res://soul_cloth.gdshader");material.set_shader_parameter("phase",kind*.71+i*2.4) + material.set_shader_parameter("base_color",[Color("7b897d"),Color("69767f"),Color("8b8580")][(kind+i)%3]);material.render_priority=110;node.material_override=material + strips.append({"node":node,"material":material,"index":i}) +func update(actor,dt): + clock+=dt + for strip in strips: + var index=strip.index + var anchor=actor.bone_local("upperleg01.L" if index==0 else "upperleg01.R" if index==1 else "root") + strip.node.position=anchor+Vector3(.105 if index==0 else -.105 if index==1 else 0,.07,-.015 if index<2 else -.13) + strip.node.rotation.y=.5 if index==0 else -.5 if index==1 else 0 + strip.material.set_shader_parameter("clock",clock) + strip.material.set_shader_parameter("flutter",1.0 if actor.following and not actor.mounted else .16) diff --git a/Demon_v0.19/soul_cloth.gdshader b/Demon_v0.19/soul_cloth.gdshader new file mode 100644 index 0000000..6d3fb29 --- /dev/null +++ b/Demon_v0.19/soul_cloth.gdshader @@ -0,0 +1,23 @@ +shader_type spatial; +render_mode cull_disabled, depth_prepass_alpha; +uniform vec4 base_color:source_color=vec4(.48,.52,.47,1.0); +uniform float clock=0.0; +uniform float flutter=.15; +uniform float phase=0.0; +uniform float reveal=1.0; +uniform float transfer_visibility=1.0; +void vertex(){ + float free_edge=UV.y*UV.y; + VERTEX.z+=free_edge*(sin(clock*5.0+UV.y*6.5+phase)*.025+sin(clock*8.0+UV.x*4.0+phase)*.009)*flutter; + VERTEX.x+=free_edge*sin(clock*3.5+UV.y*4.0+phase)*.012*flutter; +} +void fragment(){ + if(transfer_visibility<=0.0||reveal<=.2)discard; + float grain=fract(sin(dot(floor(UV*120.0),vec2(12.9898,78.233)))*43758.5453); + if(grain>transfer_visibility)discard; + float thread=.92+.08*sin(UV.x*130.0)*sin(UV.y*180.0); + ALBEDO=base_color.rgb*thread; + ROUGHNESS=1.0; + EMISSION=base_color.rgb*.12; + ALPHA=.70*smoothstep(.2,.6,reveal); +} diff --git a/Demon_v0.19/soul_transfer.gd b/Demon_v0.19/soul_transfer.gd new file mode 100644 index 0000000..b414b83 --- /dev/null +++ b/Demon_v0.19/soul_transfer.gd @@ -0,0 +1,55 @@ +extends Node3D +var g +var soul +var snapshot: Node3D +var source_materials=[] +var sparks=[] +var targets=[] +var clock=0.0 +const DURATION=.5 +const BONES=["head","spine02","wrist.L","wrist.R","foot.L","foot.R"] +func begin(game,s): + g=game;soul=s + snapshot=s.visual.model.duplicate(0);add_child(snapshot);snapshot.global_transform=s.visual.model.global_transform + for player in snapshot.find_children("*","AnimationPlayer",true,false):player.stop(true) + var original=s.visual.model.find_children("*","Skeleton3D",true,false)[0] + var copy=snapshot.find_children("*","Skeleton3D",true,false)[0] + for i in range(original.get_bone_count()):copy.set_bone_pose(i,original.get_bone_pose(i)) + for mesh in snapshot.find_children("*","MeshInstance3D",true,false): + for surface in range(mesh.mesh.get_surface_count()): + var material=mesh.get_active_material(surface).duplicate();mesh.set_surface_override_material(surface,material);source_materials.append(material) + var source=s.node.global_position+Vector3(0,1.1,0) + for i in range(36): + var spark=g.ball(self,source,Vector3.ONE*(.025+(i%3)*.009),Color("acebd8") if i%3 else Color("ffdba0")) + spark.material_override=g.mat(Color("a5e8d3") if i%3 else Color("ffd79d"),true) + spark.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + var from=source+Vector3(sin(i*2.4)*.28,cos(i*1.7)*.8,cos(i*2.4)*.22) + sparks.append({"node":spark,"size":spark.scale,"from":from,"scatter":from+Vector3(sin(i*3.1),cos(i*1.3)*.6,cos(i*2.7))*.45}) +func target_ready(): + soul.visual.skeleton.force_update_all_bone_transforms() + for i in range(sparks.size()):targets.append(soul.visual.bone_world(BONES[i%BONES.size()])+Vector3(sin(i)*.06,cos(i*2)*.06,sin(i*3)*.06)) + visibility(0) +func visibility(value): + if not is_instance_valid(soul.visual):return + for mesh in soul.visual.find_children("*","MeshInstance3D",true,false): + for surface in range(mesh.mesh.get_surface_count()): + var mat=mesh.get_active_material(surface) + if mat is ShaderMaterial:mat.set_shader_parameter("transfer_visibility",value) +func advance(dt): + clock=minf(DURATION,clock+dt) + var p=clock/DURATION + for mat in source_materials: + if mat is ShaderMaterial:mat.set_shader_parameter("transfer_visibility",1-smoothstep(0,.42,p)) + # Dither grain can be exactly zero: hide the dissolved source completely. + snapshot.visible=p<.42 + visibility(smoothstep(.40,1.0,p)) + for i in range(sparks.size()): + var s=sparks[i] + if p<.4:s.node.global_position=s.from.lerp(s.scatter,smoothstep(0,.4,p)) + else:s.node.global_position=s.scatter.lerp(targets[i],smoothstep(.4,1,p)) + s.node.scale=s.size*(.65+sin(p*PI)*.8) + if clock>=DURATION-.00001:finish() +func finish(): + clock=DURATION;visibility(1);hide();queue_free() +func cancel(): + finish() diff --git a/Demon_v0.19/stage_effects.gd b/Demon_v0.19/stage_effects.gd new file mode 100644 index 0000000..546f3de --- /dev/null +++ b/Demon_v0.19/stage_effects.gd @@ -0,0 +1,30 @@ +extends RefCounted +var g +var glow: MeshInstance3D +var light: OmniLight3D +var summon_time=0.0 +var bokeh: MeshInstance3D +func build(game): + g=game + bokeh=MeshInstance3D.new();g.camera.add_child(bokeh) + var quad=QuadMesh.new();quad.size=Vector2(2,2);bokeh.mesh=quad + bokeh.extra_cull_margin=16384;bokeh.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + var material=ShaderMaterial.new();material.shader=preload("res://focus_bokeh.gdshader");material.render_priority=100;bokeh.material_override=material + glow=MeshInstance3D.new();g.add_child(glow) + quad=QuadMesh.new();quad.size=Vector2(2.1,3.7);glow.mesh=quad + glow.position=g.GATE_SPAWN+Vector3(0,1.9,.10) + material=ShaderMaterial.new();material.shader=preload("res://summon.gdshader");glow.material_override=material + glow.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + light=OmniLight3D.new();g.add_child(light);light.position=glow.position+Vector3(0,0,1) + light.light_color=Color("70e8cb");light.omni_range=5.5;light.light_energy=0 + for mesh in g.gate.get_children(): + if mesh is MeshInstance3D: + material=ShaderMaterial.new();material.shader=preload("res://gate_clip.gdshader");mesh.material_override=material +func summon(): + summon_time=2.7 +func update(dt): + summon_time=maxf(0,summon_time-dt) + var strength=minf(1.0,summon_time/1.3) + strength*=.88+.12*sin(g.time*8) + glow.material_override.set_shader_parameter("strength",strength) + light.light_energy=strength*3.2 diff --git a/Demon_v0.19/steam.gdshader b/Demon_v0.19/steam.gdshader new file mode 100644 index 0000000..91149fa --- /dev/null +++ b/Demon_v0.19/steam.gdshader @@ -0,0 +1,13 @@ +shader_type spatial; +render_mode unshaded,cull_disabled,depth_draw_never; +uniform float simulation_time=0.0; +uniform float heat=0.0; +uniform float phase=0.0; +void vertex(){ + MODELVIEW_MATRIX=VIEW_MATRIX*mat4(INV_VIEW_MATRIX[0],INV_VIEW_MATRIX[1],INV_VIEW_MATRIX[2],MODEL_MATRIX[3]); +} +void fragment(){ + float t=fract(simulation_time*.35+phase);vec2 p=UV-vec2(.5,.65-t*.3);p.x+=sin(UV.y*8.0+simulation_time+phase)*.09; + float fog=exp(-dot(p*vec2(4.0,2.1),p*vec2(4.0,2.1)))*sin(t*3.14159); + ALBEDO=vec3(.75,.83,.82);ALPHA=fog*.16*heat; +} diff --git a/Demon_v0.19/stone.gdshader b/Demon_v0.19/stone.gdshader new file mode 100644 index 0000000..4683a64 --- /dev/null +++ b/Demon_v0.19/stone.gdshader @@ -0,0 +1,15 @@ +shader_type spatial; +uniform sampler2D stone_tex : source_color, filter_linear_mipmap_anisotropic, repeat_enable; +uniform vec4 tint : source_color = vec4(0.45,0.42,0.48,1.0); +varying vec3 wp; +varying vec3 wn; +void vertex(){wp=(MODEL_MATRIX*vec4(VERTEX,1.0)).xyz; wn=normalize(mat3(MODEL_MATRIX)*NORMAL);} +void fragment(){ + vec3 blend=pow(abs(wn),vec3(4.0)); blend/=max(dot(blend,vec3(1)),0.001); + vec3 tex=texture(stone_tex,wp.zy*0.32).rgb*blend.x+texture(stone_tex,wp.xz*0.32).rgb*blend.y+texture(stone_tex,wp.xy*0.32).rgb*blend.z; + float bevel=step(0.1,wn.y)*(1.0-step(0.98,wn.y)); + ALBEDO=mix(tex,vec3(dot(tex,vec3(0.333))),0.5)*tint.rgb*3.0+vec3(0.015)*bevel; + float damp=smoothstep(.3,.85,sin(wp.x*.8+sin(wp.z*.6))*.5+.5)*step(.7,wn.y); + ALBEDO*=1.0-damp*.18; + ROUGHNESS=mix(.90,.65,damp);SPECULAR=.22; +} diff --git a/Demon_v0.19/succubus_actor.gd b/Demon_v0.19/succubus_actor.gd new file mode 100644 index 0000000..1435fb8 --- /dev/null +++ b/Demon_v0.19/succubus_actor.gd @@ -0,0 +1,88 @@ +extends Node3D +var game +var animator: AnimationPlayer +var walking=false +var striking=false +var clips={} +var gait=preload("res://catwalk.gd").new() +var animation_pose: Array[Transform3D]=[] +var skeleton: Skeleton3D + + +func _init(): + name="ApprovedSuccubus" + set_meta("approved_model","succubus_v01") + set_meta("wardrobe_revision","corset_thigh_boots_v02") + var model=preload("res://art/succubus/succubus_v02.glb").instantiate() + add_child(model) + model.scale=Vector3.ONE*1.20 + for node in model.find_children("*","AnimationPlayer",true,false): + animator=node + break + assert(animator!=null) + for name in animator.get_animation_list(): + for clip in ["Idle","Walk","Whip"]: + if String(name).ends_with(clip):clips[clip]=name + for clip in ["Idle","Walk"]: + if clips.has(clip):animator.get_animation(clips[clip]).loop_mode=Animation.LOOP_LINEAR + if clips.has("Whip"):animator.get_animation(clips["Whip"]).loop_mode=Animation.LOOP_NONE + animator.callback_mode_process=AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL + animator.animation_finished.connect(_finished) + rotation.y=.58 + +func configure(g): + game=g + animator.play(clips["Idle"]);animator.advance(0) + gait.setup(self);skeleton=gait.skeleton + remember_animation_pose() + refresh() + +func set_walking(value): + if walking==value:return + walking=value # Locomotion is procedural; the Idle base clip must not restart. + +func strike(duration): + if not clips.has("Whip"):return + restore_animation_pose() + striking=true + var speed=animator.get_animation(clips["Whip"]).length/maxf(.20,duration) + animator.play(clips["Whip"],.035,speed) + animator.seek(0,true) + remember_animation_pose() + +func refresh(): + restore_animation_pose() + var key="Idle" # Grounded gait supplies the lower body and runway motion. + if clips.has(key):animator.play(clips[key],.12,1.0) + +func _finished(name): + if clips.has("Whip") and name==clips["Whip"]: + striking=false + refresh() + +func reset_gait(): + if gait.initialized:gait.reset() + +func _process(delta): + if game and game.paused:return + var dt=minf(delta,.05) + restore_animation_pose() + animator.advance(dt) + remember_animation_pose() + gait.update(dt) + +func remember_animation_pose(): + if not is_instance_valid(skeleton):return + animation_pose.resize(skeleton.get_bone_count()) + for i in range(animation_pose.size()):animation_pose[i]=skeleton.get_bone_pose(i) + +func restore_animation_pose(): + if not is_instance_valid(skeleton):return + # Godot can skip writing unchanged animation tracks. Remove the previous + # procedural offsets before sampling or starting a blend to avoid feedback. + for i in range(animation_pose.size()): + var pose=animation_pose[i] + skeleton.set_bone_pose_position(i,pose.origin) + skeleton.set_bone_pose_rotation(i,pose.basis.get_rotation_quaternion()) + skeleton.set_bone_pose_scale(i,pose.basis.get_scale()) + skeleton.force_update_all_bone_transforms() diff --git a/Demon_v0.19/summon.gdshader b/Demon_v0.19/summon.gdshader new file mode 100644 index 0000000..18af359 --- /dev/null +++ b/Demon_v0.19/summon.gdshader @@ -0,0 +1,13 @@ +shader_type spatial; +render_mode unshaded,blend_add,cull_disabled,depth_draw_never; +uniform float strength=0.0; +void fragment(){ + vec2 p=UV*2.0-1.0; + float r=length(p*vec2(1.0,.65)); + float swirl=.55+.45*sin(atan(p.y,p.x)*7.0-r*18.0+TIME*5.0); + float glow=exp(-r*r*3.0); + float rim=exp(-pow((r-.72)*15.0,2.0)); + ALBEDO=vec3(.27,.65,.62); + EMISSION=vec3(.25,.85,.72)*(glow*1.5+rim*swirl)*strength; + ALPHA=(glow*.65+rim*.5)*strength*(1.0-smoothstep(.80,1.05,r)); +} diff --git a/Demon_v0.19/surface_water.gdshader b/Demon_v0.19/surface_water.gdshader new file mode 100644 index 0000000..c6579c1 --- /dev/null +++ b/Demon_v0.19/surface_water.gdshader @@ -0,0 +1,26 @@ +shader_type spatial; +render_mode cull_disabled; +uniform float simulation_time=0.0; +uniform float agitation=0.15; +uniform float heat=0.0; +uniform bool boiling=false; +varying vec2 local_position; +float waves(vec2 p){ + float t=simulation_time; + float amplitude=boiling ? .006+heat*.016 : .012+agitation*.026; + return (sin(p.x*8.0+t*2.4)*.55+sin(p.y*11.0-t*2.1)*.32+sin((p.x+p.y)*17.0+t*3.9)*.13)*amplitude; +} +void vertex(){ + local_position=VERTEX.xz; + VERTEX.y+=waves(VERTEX.xz); + float dx=(waves(VERTEX.xz+vec2(.01,0.0))-waves(VERTEX.xz-vec2(.01,0.0)))/.02; + float dz=(waves(VERTEX.xz+vec2(0.0,.01))-waves(VERTEX.xz-vec2(0.0,.01)))/.02; + NORMAL=normalize(vec3(-dx,1.0,-dz)); +} +void fragment(){ + float fresnel=pow(1.0-max(dot(NORMAL,VIEW),0.0),3.0); + float flecks=pow(max(sin(local_position.x*39.0+simulation_time*2.0)*sin(local_position.y*41.0-simulation_time*1.7),0.0),12.0); + vec3 deep=vec3(.035,.13,.17);vec3 shallow=vec3(.16,.36,.39); + ALBEDO=mix(deep,shallow,.35+fresnel*.6)+vec3(.5,.59,.57)*flecks*heat*.6; + METALLIC=.25;ROUGHNESS=.18;SPECULAR=.85; +} diff --git a/Demon_v0.19/talent_icon.gd b/Demon_v0.19/talent_icon.gd new file mode 100644 index 0000000..a1726a1 --- /dev/null +++ b/Demon_v0.19/talent_icon.gd @@ -0,0 +1,62 @@ +extends Control +const APPARATUS=["whip","hammer","wheel","maiden","speaker","cauldron"] +var kind="hammer": + set(value):kind=value;queue_redraw() +var tint=Color("bac4bd"): + set(value):tint=value;queue_redraw() +var completed=false: + set(value):completed=value;queue_redraw() +var progress=-1.0: + set(value):progress=value;queue_redraw() +func _ready(): + mouse_filter=Control.MOUSE_FILTER_IGNORE +func _draw(): + draw_set_transform(size/2,0,Vector2.ONE*minf(size.x,size.y)/52.0) + var c=Vector2.ZERO + draw_arc(c,22,0,TAU,48,tint,1.2,true) + match kind: + "coin": + draw_circle(c,17,Color("5a411e"));draw_arc(c,17,0,TAU,40,tint,3,true) + draw_arc(c,12,0,TAU,32,tint,1,true) + draw_polyline(PackedVector2Array([Vector2(0,-9),Vector2(-6,-2),Vector2(6,2),Vector2(0,9)]),tint,3,true) + "build": + draw_line(Vector2(-13,15),Vector2(9,-12),tint,4,true) + draw_polyline(PackedVector2Array([Vector2(-1,-17),Vector2(15,-4),Vector2(20,-11),Vector2(4,-23),Vector2(-1,-17)]),tint,3,true) + draw_line(Vector2(-16,-10),Vector2(13,17),tint,2,true) + "book": + draw_polyline(PackedVector2Array([Vector2(0,-12),Vector2(-17,-17),Vector2(-17,13),Vector2(0,18),Vector2(17,13),Vector2(17,-17),Vector2(0,-12),Vector2(0,18)]),tint,2.5,true) + for side in [-1,1]: + for y in [-7,0,7]:draw_line(Vector2(side*5,y),Vector2(side*12,y-2),tint,1.5,true) + "speaker": + draw_rect(Rect2(c-Vector2(11,17),Vector2(22,34)),tint,false,2) + draw_arc(c+Vector2(0,6),7,0,TAU,24,tint,2,true) + draw_circle(c+Vector2(0,-8),3,tint) + "cauldron": + draw_arc(c+Vector2(0,-3),14,0,PI,28,tint,3,true) + draw_line(c+Vector2(-15,-4),c+Vector2(15,-4),tint,3,true) + for x in [-6,0,6]:draw_line(c+Vector2(x,-9),c+Vector2(x+2,-17),tint,2,true) + "hammer": + draw_line(c+Vector2(-9,12),c+Vector2(8,-9),tint,4,true) + draw_polyline(PackedVector2Array([c+Vector2(-1,-15),c+Vector2(14,-5),c+Vector2(19,-12),c+Vector2(4,-21),c+Vector2(-1,-15)]),tint,3,true) + "wheel": + draw_arc(c,14,0,TAU,32,tint,3,true) + for i in range(8):draw_line(c,c+Vector2.from_angle(i*TAU/8)*14,tint,2,true) + "maiden": + draw_circle(c+Vector2(0,-13),5,tint) + draw_polyline(PackedVector2Array([c+Vector2(-6,-7),c+Vector2(-12,15),c+Vector2(12,15),c+Vector2(6,-7)]),tint,3,true) + "boot": + draw_polyline(PackedVector2Array([c+Vector2(-8,-16),c+Vector2(4,-16),c+Vector2(4,3),c+Vector2(15,9),c+Vector2(15,15),c+Vector2(-8,15),c+Vector2(-8,-16)]),tint,3,true) + "whip": + draw_polyline(PackedVector2Array([c+Vector2(-13,16),c+Vector2(-2,0),c+Vector2(13,-6),c+Vector2(13,-16),c+Vector2(3,-17),c+Vector2(-2,-10)]),tint,3,true) + "wings": + for side in [-1,1]:draw_polyline(PackedVector2Array([c,c+Vector2(side*19,-15),c+Vector2(side*16,8),c+Vector2(side*7,3),c+Vector2(0,15)]),tint,2.5,true) + "soul": + draw_circle(c+Vector2(0,-9),6,tint) + draw_polyline(PackedVector2Array([c+Vector2(-6,-2),c+Vector2(-11,15),c+Vector2(0,9),c+Vector2(11,15),c+Vector2(6,-2)]),tint,2.5,true) + _: + draw_rect(Rect2(c-Vector2(9,6),Vector2(18,19)),tint,false,2) + draw_arc(c+Vector2(0,-6),9,PI,TAU,20,tint,2,true) + if progress>=0:draw_arc(c,23,-PI/2,-PI/2+TAU*clampf(progress,0,1),48,Color("a7ddae"),3,true) + if completed: + draw_circle(Vector2(14,14),9,Color("14291c")) + draw_polyline(PackedVector2Array([Vector2(9,14),Vector2(13,18),Vector2(20,9)]),Color("9fe5ae"),3,true) diff --git a/Demon_v0.19/tests.gd b/Demon_v0.19/tests.gd new file mode 100644 index 0000000..ebe9e6a --- /dev/null +++ b/Demon_v0.19/tests.gd @@ -0,0 +1,456 @@ +extends RefCounted + +func check(condition): + if not condition: + push_error('QA check failed: '+str(get_stack())) + Engine.get_main_loop().quit(1) + + +func advance(g,seconds: float): + for i in range(ceili(seconds*60)): + g.advance_spawns(1.0/60.0) + +func prepare_work(g): + advance(g,3.0) + check(g.souls.size()==1 and not g.souls[0].entering) + var id=g.souls[0].id + g.player.position=g.souls[0].node.position + g.grab(id) + check(g.held==id) + g.souls[0].node.position=g.STATION + g.player.position=g.STATION+Vector3(0,0,1) + g.release_soul() + check(g.working==id and g.held==-1) + check(g.development.placement_clock>0) + g.development.advance_placement(.81) + check(g.development.placement_clock==0 and g.souls[0].node.position.is_equal_approx(g.STATION)) + +func run(g): + check(g.paused and not g.game_started and not g.hud.visible) + check(g.menu.current_page=="main" and g.souls.is_empty()) + check(g.avatar.get_meta("approved_model")=="succubus_v01") + check(g.avatar.clips.size()==3) + var skeleton=g.avatar.find_children("*","Skeleton3D",true,false)[0] + check(skeleton.get_bone_count()==166) + g.avatar.set_walking(true);g.avatar.animator.speed_scale=1;g.avatar.animator.advance(.3) + check(g.avatar.animator.current_animation==g.avatar.clips["Walk"]) + g.avatar.strike(.45);g.avatar.animator.advance(.10) + check(g.avatar.striking and g.avatar.animator.current_animation==g.avatar.clips["Whip"]) + g.avatar._process(0);check(is_zero_approx(g.avatar.animator.speed_scale)) + g.avatar.striking=false;g.avatar.set_walking(false);g.avatar.refresh() + check(g.get_meta("lava_channels")==6) + check(g.stage_effects.bokeh.material_override.shader==preload("res://focus_bokeh.gdshader")) + print("PASS: approved 166-bone succubus, Idle/Walk/Whip clips, hit playback, pause; six framed lava channels") + check(g.menu.main_start.text=="Новая игра") + check(g.menu.main_settings.text=="Настройки") + check(g.menu.main_exit.text=="Выйти") + check(g.menu.main_exit.pressed.get_connections().size()==1) + check(g.coins==0 and g.done==0 and g.speed_level==0 and g.power_level==0 and not g.automatic) + + g.menu.main_settings.pressed.emit() + check(g.menu.current_page=="settings") + g.menu.volume_slider.value=25 + check(is_equal_approx(g.whip_volume,0.25)) + check(is_equal_approx(g.audio_player.volume_db,-3.0+linear_to_db(0.25))) + check(is_zero_approx(AudioServer.get_bus_volume_db(0))) + g.menu.mute_check.button_pressed=true + check(g.muted and AudioServer.is_bus_mute(0)) + g.menu.mute_check.button_pressed=false + g.menu.volume_slider.value=75 + g.menu.vsync_check.button_pressed=false + check(not g.vsync) + g.menu.vsync_check.button_pressed=true + check(g.vsync) + g.menu.settings_back.pressed.emit() + check(g.menu.current_page=="main" and not g.game_started) + print("PASS: main-menu buttons, settings, volume/mute, VSync, return") + + var clips=[] + for path in DirAccess.get_files_at("res://audio"): + if path.get_extension() in ["mp3","wav","ogg"]: clips.append(path) + clips.sort() + check(clips==["burn_female.ogg","burn_male.ogg","cemetery_ambience_loop.ogg","whip.mp3"]) + check(g.audio_player.stream.resource_path=="res://audio/whip.mp3") + check(g.audio_player.stream.get_length()>0.3) + check(not g.audio_player.stream.loop) + check(g.audio_player.pitch_scale==1.0) + check(g.ambience_player.stream.loop) + check(g.ambience_player.stream.get_length()>230 and g.ambience_player.stream.get_length()<245) + print("PASS: whip, ambience and male/female groans; loop enabled; whip pitch unchanged") + + var codec=preload("res://progression.gd") + var saved={"build_id":"test-build-A","coins":123,"done":8,"speed":2,"power":1,"auto":true,"development":{"tier":2,"selected":1,"xp":140,"points":1,"action":1}} + var path="res://qa/progress-test.json" + DirAccess.make_dir_recursive_absolute(ProjectSettings.globalize_path("res://qa")) + check(codec.write_save(path,saved)==OK) + check(codec.read_save(path,"test-build-A")==saved) + check(codec.read_save(path,"test-build-B")==codec.defaults("test-build-B")) + check(codec.decode({"coins":999,"done":99},"new")==codec.defaults("new")) + check(codec.decode(null,"new")==codec.defaults("new")) + check(codec.decode({"build_id":"new","speed":999,"power":-5,"coins":"bad"},"new").speed==3) + print("PASS: same-build disk save restored; different-build/legacy/corrupt save reset") + + g.menu.main_start.pressed.emit() + check(g.game_started and not g.paused and g.hud.visible and not g.menu.visible) + check(g.souls.size()==1 and g.souls[0].node.position==g.GATE_SPAWN) + + check(g.get_meta("endless_room_count")==363) + check(g.life.imps.size()==4 and g.life.neighbours.size()==24) + for imp in g.life.imps+g.life.neighbours:check(imp.model.get_meta("species")=="imp") + var previous=g.life.neighbours[0].root.position + g.time+=1;g.life.update(.1) + check(g.life.neighbours[0].root.position.distance_to(previous)>.1) + check(g.get_meta("dressing_parts")==0 and g.architecture.braziers.size()==6) + print("PASS: four local imps, 24 animated neighbouring imps, dense instanced service details") + var old_yaw=g.orbit.yaw + var press=InputEventMouseButton.new();press.button_index=MOUSE_BUTTON_MIDDLE;press.pressed=true + g._unhandled_input(press) + check(g.orbit.dragging and Input.mouse_mode==Input.MOUSE_MODE_CAPTURED) + var motion=InputEventMouseMotion.new();motion.relative=Vector2(100,1000) + g._input(motion);g.orbit.update(1) + check(not is_equal_approx(g.orbit.yaw,old_yaw) and is_equal_approx(g.orbit.pitch,1.15)) + var release=InputEventMouseButton.new();release.button_index=MOUSE_BUTTON_MIDDLE;release.pressed=false + g._input(release) + check(not g.orbit.dragging and Input.mouse_mode==Input.MOUSE_MODE_VISIBLE) + g.orbit.begin();g.set_pause(true) + check(not g.orbit.dragging and Input.mouse_mode==Input.MOUSE_MODE_VISIBLE) + g.set_pause(false);g.orbit.yaw=old_yaw;g.orbit.pitch=.68;g.orbit.update(1) + print("PASS: 363 cells, middle-button orbit, pitch clamp, release and pause restore cursor") + var first_id=g.souls[0].id + g.player.position=g.GATE_SPAWN + g.grab(first_id) + check(g.held==-1) + advance(g,0.5) + check(g.gate.position.y>0 and g.souls[0].entering) + advance(g,3) + check(g.souls[0].node.position.is_equal_approx(g.GATE_EXIT)) + check(not g.souls[0].entering and is_zero_approx(g.gate.position.y)) + check(g.souls[0].visual.position.y>.45) + check(g.souls[0].visual.animator.current_animation==g.souls[0].visual.clips["Float"]) + for bar in g.gate.get_children(): + if bar is MeshInstance3D:check(bar.material_override.shader==preload("res://gate_clip.gdshader")) + for i in range(20): g.spawn_soul() + advance(g,20) + check(g.souls.size()==1 and g.souls[0].id==first_id) + print("PASS: portcullis opens, one sinner exits, no grab during entry or timer duplicates") + g.player.position=g.souls[0].node.position + var solver=preload("res://separation.gd") + solver.resolve(g) + check(g.player.position.distance_to(g.souls[0].node.position)>=0.96) + g.life.imps[0].root.position=g.player.position + solver.resolve(g) + check(g.life.imps[0].root.position.distance_to(g.player.position)>=0.65) + print("PASS: player, soul and decorative imp are separated even from identical starting positions") + g.player.position=g.souls[0].node.position + g.grab(first_id) + var up=InputEventMouseButton.new();up.button_index=MOUSE_BUTTON_LEFT;up.pressed=false + g._unhandled_input(up) + check(g.held==first_id) + g.player.position=g.STATION+Vector3(-2.1,0,0);g.souls[0].node.position=g.STATION+Vector3(-2.0,0,0) + g._process(.016) + check(g.working==first_id and g.held==-1 and g.development.placement_clock>0) + print("PASS: Float pose, one-click telekinetic following, automatic animated placement; gate clipped above arch") + + g.set_pause(true) + check(g.menu.current_page=="pause") + g.menu.pause_settings.pressed.emit() + check(g.menu.current_page=="settings") + var escape=InputEventKey.new() + escape.keycode=KEY_ESCAPE + escape.pressed=true + g._unhandled_input(escape) + check(g.menu.current_page=="pause" and g.paused) + g.menu.pause_main.pressed.emit() + check(g.menu.current_page=="main" and not g.hud.visible) + g.coins=777;g.done=25;g.development.xp=420;g.speed_level=2 + var old_soul=g.souls[0].node + g.menu.main_start.pressed.emit() + check(not g.paused and g.souls.size()==1 and g.souls[0].node!=old_soul) + check(g.coins==0 and g.done==0 and g.development.xp==0 and g.speed_level==0 and g.development.selected==0) + print("PASS: New Game clears progression, skills, station and previous soul; pause still resumes") + + prepare_work(g) + for i in range(4): + g.hit_clock=0 + g.hit() + check(g.done==0 and g.souls.size()==1) + g.hit_clock=0 + g.hit() + check(g.done==1 and g.coins==10 and g.working==-1 and g.souls.is_empty()) + check(g.life.burns.size()==1) + check(g.voice_player.stream==g.MALE_GROAN) + g.complete_soul() + check(g.coins==10) + g.life.update(1.0) + check(g.life.burns.size()==1) + g.life.update(1.1) + check(g.life.burns.is_empty()) + check(not g.quote.visible and not g.status.visible and not g.dossier.visible) + check(g.life.imps.size()==4) + g.set_pause(true) + advance(g,5.0) + check(g.souls.is_empty()) + g.menu.resume_button.pressed.emit() + advance(g,0.5) + check(g.souls.is_empty()) + advance(g,2.5) + check(g.souls.size()==1 and g.souls[0].kind==1) + check(g.development.xp==20 and g.development.points==0) + check(is_instance_valid(g.development.bubble)) + check(g.development.bubble.get_child(0).text==g.LINES[1]) + g.development.purchase_station(2) + check(g.development.tier==0) + g.development.purchase_station(1) + check(g.coins==10 and g.development.tier==0) + for expected in range(1,5): + prepare_work(g) + for i in range(5): + g.hit_clock=0;g.hit() + advance(g,3) + check(g.coins==50 and g.development.points==1 and g.development.xp==100) + check(g.voice_player.stream==g.FEMALE_GROAN) + g.development.purchase_skill("speed") + check(g.speed_level==1 and g.development.points==0 and g.coins==50) + g.development.purchase_skill("action") + check(g.development.action_level==0) + g.development.purchase_station(1) + check(g.coins==0 and g.development.selected==1) + for tool in [1,2,3]: + g.development.selected=tool;g.player.position=g.STATION + solver.resolve_equipment(g,g.player,.4) + check(g.player.position.distance_to(g.STATION)>1.4) + g.development.selected=1 + print("PASS: all apparatus footprints prevent player overlap, including empty devices") + prepare_work(g) + g.development.purchase_station(0) + check(g.development.selected==1) + g.development.step(1.01,true) + check(g.development.stage==1 and g.working>=0) + check(g.development.action_bar.value>=33 and g.development.action_bar.value<35) + g.development.motion.update(0.5,true) + check(g.souls[0].visual.scale.y>1.05) + g.development.step(1,true) + check(g.development.action_bar.value>65 and g.development.action_bar.value<68) + g.development.step(0.1,false) + check(g.development.elapsed==0) + g.set_pause(true) + g.development.step(3,true) + check(g.working>=0) + g.set_pause(false) + g.development.step(2.01,true) + check(g.coins==10 and g.working==-1) + check(g.development.action_bar.value==100) + g.coins=280 + g.development.purchase_station(2) + check(g.coins==180) + advance(g,3);prepare_work(g) + g.player.position=Vector3(-6,0,4) + g.development.step(6,true) + check(g.working>=0 and g.development.elapsed==0) + g.player.position=g.STATION + g.development.step(PI/4,true) + g.development.motion.update(0.1,true) + check(g.development.motion.submerged and g.development.motion.splash_count==1) + g.development.elapsed=0;g.development.crank.rotation.z=0 + g.development.step(4.9,true) + check(g.working>=0) + g.development.step(0.11,true) + check(g.working==-1 and g.coins==190) + g.development.purchase_station(3) + check(g.coins==10) + advance(g,3);prepare_work(g) + g.development.step(10,true) + check(g.working>=0 and g.development.stage==0) + g.development.activate() + check(g.development.stage==1 and is_instance_valid(g.development.second_door)) + g.development.step(0.36,true) + g.development.step(2,true) + g.development.motion.update(1,true) + check(g.development.motion.heat>0.5) + check(g.working>=0 and g.development.flame.visible) + g.development.step(1.01,true) + check(g.working==-1 and g.coins==20) + check(g.development.release_clock>2) + g.development.purchase_station(0) + check(g.development.selected==3) + g.development.points=1 + g.development.purchase_skill("action") + check(g.development.action_level==1 and g.development.points==0) + var state=g.progress_snapshot() + check(codec.decode(state,g.build_id)==state) + check(codec.decode(state,"next-build")==codec.defaults("next-build")) + print("PASS: speech bubble, 10 coin / 20 XP rewards, level points, separate skills, station prices and prerequisites") + print("PASS: all four stations, rack tension reset and 2s hold, 5s wheel, maiden close then fire; pause and range gates") + print("PASS: rack stretches, wheel submerges head and splashes, maiden heats and stays locked while soul burns, correct voice selection") + print("ALL TESTS PASSED — DEMON 0.12") + g.get_tree().quit() + +func click(g,control): + await g.get_tree().process_frame + var point=control.get_global_rect().get_center() + var motion=InputEventMouseMotion.new() + motion.position=point + motion.global_position=point + Input.parse_input_event(motion) + for pressed in [true,false]: + var event=InputEventMouseButton.new() + event.position=point + event.global_position=point + event.button_index=MOUSE_BUTTON_LEFT + event.pressed=pressed + event.button_mask=MOUSE_BUTTON_MASK_LEFT if pressed else 0 + Input.parse_input_event(event) + await g.get_tree().process_frame + +func run_ui(g): + await g.get_tree().create_timer(0.3).timeout + await click(g,g.menu.main_settings) + check(g.menu.current_page=="settings") + await click(g,g.menu.volume_slider) + check(g.whip_volume>0.45 and g.whip_volume<0.55) + await click(g,g.menu.ambience_slider) + check(g.ambience_volume>0.45 and g.ambience_volume<0.55) + await click(g,g.menu.mute_check) + check(g.muted) + await click(g,g.menu.settings_back) + check(g.menu.current_page=="main") + await click(g,g.menu.main_start) + check(g.game_started and not g.paused and g.souls.size()==1) + await click(g,g.development.tree_icon) + check(g.development.tree_panel.visible and g.paused) + await click(g,g.development.tree_panel.get_child(1).get_child(-1)) + check(not g.paused and not g.development.tree_panel.visible) + + var old_yaw=g.orbit.yaw + var middle=InputEventMouseButton.new();middle.position=Vector2(900,500);middle.global_position=middle.position;middle.button_index=MOUSE_BUTTON_MIDDLE;middle.pressed=true;middle.button_mask=MOUSE_BUTTON_MASK_MIDDLE + Input.parse_input_event(middle) + await g.get_tree().process_frame + check(g.orbit.dragging) + var turn=InputEventMouseMotion.new();turn.relative=Vector2(120,30);turn.button_mask=MOUSE_BUTTON_MASK_MIDDLE + Input.parse_input_event(turn) + await g.get_tree().process_frame + check(absf(g.orbit.yaw-old_yaw)>.5) + middle=InputEventMouseButton.new();middle.button_index=MOUSE_BUTTON_MIDDLE;middle.pressed=false;middle.position=Vector2(20,20) + Input.parse_input_event(middle) + await g.get_tree().process_frame + check(not g.orbit.dragging and Input.mouse_mode==Input.MOUSE_MODE_VISIBLE) + g.orbit.yaw=old_yaw;g.orbit.pitch=.68 + print("PASS: real viewport MMB drag rotates camera and release over HUD restores cursor") + g.coins=50;g.development.purchase_station(1) + prepare_work(g) + var motion=InputEventMouseMotion.new();motion.position=Vector2(950,620);motion.global_position=motion.position + Input.parse_input_event(motion) + await g.get_tree().process_frame + var oldkey=InputEventKey.new();oldkey.physical_keycode=KEY_E;oldkey.pressed=true;Input.parse_input_event(oldkey) + await g.get_tree().create_timer(0.2).timeout + check(g.development.elapsed==0) + oldkey=InputEventKey.new();oldkey.physical_keycode=KEY_E;oldkey.pressed=false;Input.parse_input_event(oldkey) + var right=InputEventMouseButton.new();right.position=motion.position;right.global_position=motion.position;right.button_index=MOUSE_BUTTON_RIGHT;right.pressed=true;right.button_mask=MOUSE_BUTTON_MASK_RIGHT + Input.parse_input_event(right) + await g.get_tree().create_timer(1.2).timeout + check(g.development.stage==1 and g.working>=0) + await g.get_tree().create_timer(2.2).timeout + check(g.done==1 and g.life.burns.size()==1) + right=InputEventMouseButton.new();right.position=motion.position;right.global_position=motion.position;right.button_index=MOUSE_BUTTON_RIGHT;right.pressed=false + Input.parse_input_event(right) + await g.get_tree().create_timer(2.1).timeout + check(g.life.burns.is_empty()) + print("PASS: pentagram opens/closes modal tree; E does nothing; actual held RMB completes rack; burn effect cleans up") + var cash=g.coins + for i in range(2): + for down in [true,false]: + var boost=InputEventKey.new();boost.keycode=KEY_F5;boost.physical_keycode=KEY_F5;boost.pressed=down + Input.parse_input_event(boost) + await g.get_tree().process_frame + check(g.coins==cash+2000 and g.development.xp==600 and g.development.points==6) + g.development.purchase_skill("speed") + g.development.test_boost() + check(g.speed_level==1 and g.development.points==5 and g.development.xp==600) + g.development.reward() + check(g.development.xp==600 and g.development.points==5) + check(g.Progression.decode(g.progress_snapshot(),g.build_id)==g.progress_snapshot()) + print("PASS: F5 adds 1000 per press, caps level at 7, preserves skills, avoids duplicate points, persists save") + var key=InputEventKey.new() + key.keycode=KEY_ESCAPE + key.pressed=true + Input.parse_input_event(key) + await g.get_tree().process_frame + key=InputEventKey.new() + key.keycode=KEY_ESCAPE + key.pressed=false + Input.parse_input_event(key) + check(g.paused and g.menu.current_page=="pause") + await click(g,g.menu.pause_main) + check(g.menu.current_page=="main") + print("PASS: real viewport mouse input — settings, slider, mute, back, start, Esc, main menu") + print("UI_EXIT_CLICK: invoking the actual Exit button") + await click(g,g.menu.main_exit) + +func run_audio(g): + # Exercise the actual Vorbis loop silently, close to the hour-long boundary. + g.ambience_fade=1.0 + g.whip_volume=0.25 + g.ambience_volume=0.70 + g.set_sound_muted(true) + check(g.ambience_player.stream.loop and is_zero_approx(g.ambience_player.stream.loop_offset)) + check(is_equal_approx(g.audio_player.volume_db,-3.0+linear_to_db(0.25))) + check(is_equal_approx(g.ambience_player.volume_db,linear_to_db(0.70))) + g.ambience_player.play(g.ambience_player.stream.get_length()-0.15) + await g.get_tree().create_timer(0.8).timeout + check(g.ambience_player.playing) + check(g.ambience_player.get_playback_position()<2.0) + g.start_game() + g.set_pause(true) + check(not g.ambience_player.stream_paused) + var before=g.ambience_player.get_playback_position() + await g.get_tree().create_timer(0.15).timeout + check(g.ambience_player.get_playback_position()>before) + g.return_to_main_menu() + check(g.ambience_player.playing) + g.menu.main_settings.pressed.emit() + g.menu.ambience_slider.value=20 + check(is_equal_approx(g.ambience_volume,0.20)) + check(is_equal_approx(g.whip_volume,0.25)) + g.menu.voice_slider.value=30 + check(is_equal_approx(g.voice_volume,0.3) and is_equal_approx(g.voice_player.volume_db,linear_to_db(0.3))) + for clip in [g.MALE_GROAN,g.FEMALE_GROAN]: + g.voice_player.stream=clip;g.voice_player.stream_paused=false;g.voice_player.play() + await g.get_tree().create_timer(0.10).timeout + check(g.voice_player.playing and g.voice_player.get_playback_position()>0) + g.voice_player.stop() + for kind in range(11): + for variant in range(2): + var clip=load("res://audio/dialogue/voice_%02d_%d.ogg" % [kind,variant]) + check(clip is AudioStreamOggVorbis and clip.get_length()>1.3 and not clip.loop) + for kind in [0,4,10]: + g.paused=false + g.dialogue.player.stream=load("res://audio/dialogue/voice_%02d_0.ogg" % kind) + g.dialogue.player.stream_paused=false;g.dialogue.player.play() + await g.get_tree().create_timer(.1).timeout + check(g.dialogue.player.playing) + g.dialogue.stop() + g.paused=true + print("PASS: 22 nonverbal voice variants; male, female and succubus streams decode/play") + print("PASS: male and female groans decode/play; independent voice volume; master mute remains active") + for placed in [true,false]: + g.workshop.play_build_sound(placed) + var player=g.workshop.build_player + check(player.stream.get_length()>.3) + check(is_equal_approx(player.volume_db,-3.0+linear_to_db(g.whip_volume))) + player.play() + await g.get_tree().create_timer(.08).timeout + check(player.playing and player.get_playback_position()>0) + player.stop() + print("PASS: original placement and deletion effects decode/play; effects volume and master mute") + var pop=AudioStreamPlayer.new();g.add_child(pop) + pop.stream=preload("res://audio/infernal_pop.wav").duplicate() + pop.stream.loop_mode=AudioStreamWAV.LOOP_FORWARD;pop.stream.loop_end=int(pop.stream.get_length()*pop.stream.mix_rate) + check(pop.stream.get_length()>7.9) + pop.play(7.85) + await g.get_tree().create_timer(.45).timeout + check(pop.playing and pop.get_playback_position()<1.0) + pop.stop();pop.queue_free() + print("PASS: original pop loop decodes/plays and wraps; no third-party music") + g.ambience_player.stop() + print("PASS: real Ogg playback wraps at the end; ambience continues through pause/menu; independent levels and master mute") + g.get_tree().quit() diff --git a/Demon_v0.19/timber.gdshader b/Demon_v0.19/timber.gdshader new file mode 100644 index 0000000..538b813 --- /dev/null +++ b/Demon_v0.19/timber.gdshader @@ -0,0 +1,11 @@ +shader_type spatial; +uniform vec4 tint:source_color=vec4(0.28,0.17,0.09,1); +varying vec3 p; +void vertex(){p=VERTEX;} +void fragment(){ + float grain=sin(p.z*67.0+sin(p.x*7.0+p.y*12.0)*2.5); + float fiber=sin(p.z*219.0+p.x*5.0); + ALBEDO=tint.rgb*(0.85+grain*0.12+fiber*0.04); + ROUGHNESS=0.82;SPECULAR=0.25; + NORMAL=normalize(NORMAL+vec3(0,grain*0.025,fiber*0.018)); +} diff --git a/Demon_v0.19/ui.gd b/Demon_v0.19/ui.gd new file mode 100644 index 0000000..aa00f47 --- /dev/null +++ b/Demon_v0.19/ui.gd @@ -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=preload("res://infernal_ui.gd").panel(false,10) + style.content_margin_left=16;style.content_margin_right=16 + 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" diff --git a/Demon_v0.19/visual_tests.gd b/Demon_v0.19/visual_tests.gd new file mode 100644 index 0000000..c42c8c9 --- /dev/null +++ b/Demon_v0.19/visual_tests.gd @@ -0,0 +1,40 @@ +extends RefCounted +var failures=0 +func check(ok,label): + if not ok:failures+=1;push_error("VISUAL QA: "+label) +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();g.paused=true + var w=g.workshop + for kind in range(10): + var actor=preload("res://soul_actor.gd").new(kind);g.add_child(actor);actor.configure(g);actor.rotation=Vector3.ZERO + actor.mount_station(4);actor.update_torture(.1,true) + check(actor.bone_local("root").distance_to(Vector3(0,.90,-.12))<.02,"chair pelvis %d"%kind) + for side in ["L","R"]: + var x=1 if side=="L" else -1 + print("CHAIR ",kind," ",side," foot=",actor.bone_local("foot."+side)," wrist=",actor.bone_local("wrist."+side)) + check(actor.bone_local("foot."+side).distance_to(Vector3(x*.23,.13,.66))<.13,"chair ankle %d"%kind) + check(actor.bone_local("wrist."+side).distance_to(Vector3(x*.61,1.15,.2))<.12,"chair wrist %d"%kind) + var before=actor.bone_world("head");actor.update_torture(.2,true) + check(actor.bone_world("head").distance_to(before)>.001,"chair reaction") + actor.mount_station(0);actor.update_torture(.1,false);actor.whip_reaction();actor.update_torture(.05,true);check(actor.impulse>0,"whip recoil") + actor.mount_station(5);actor.update_torture(.1,true);before=actor.bone_world("wrist.L");actor.update_torture(.2,true);check(actor.bone_world("wrist.L").distance_to(before)>.01,"cauldron arm animation") + actor.unmount_station();check(actor.model.position==Vector3.ZERO and not actor.mounted,"pose reset");actor.queue_free() + for kind in [0,1,2,4,5]: + var d=w.add_station(kind,Vector3(kind*2,0,0)) + if kind==0:check(d.device.get_meta("pillory_apertures")==3,"open pillory") + if kind==2:check(d.motion.water.get_meta("water_vertices")>18000,"dense wheel water") + if kind==5:check(d.special.liquid.get_meta("water_vertices")>18000,"dense boiling water") + for node in g.get_children(): + if node is MultiMeshInstance3D: + for index in range(node.multimesh.instance_count): + var at=node.multimesh.get_instance_transform(index).origin + check(not (absf(at.x-7.65)<.05 and at.y>.3 and absf(at.z)<5.1),"old interior wall removed") + var soul=g.souls[0];soul.required=[0];w.sentences.update_label(soul) + check(soul.task_icon_nodes[0].custom_minimum_size.is_equal_approx(Vector2(28.8,28.8)),"icons +20 percent") + var effect=preload("res://whip_impact.gd").new();soul.visual.mount_station(0);soul.visual.update_torture(0,false);effect.play(g,w.stations[0].device,soul.visual) + check(effect.particles.size()==14,"whip particles") + effect._process(.2);check(effect.age==0,"effect freezes on pause");g.paused=false;effect._process(.4) + await g.get_tree().process_frame;check(not is_instance_valid(effect),"effect expires") + if failures==0:print("ALL VISUAL TESTS PASSED: ten skeletons, chair IK, device reactions, dense water, enlarged icons, VFX pause and cleanup") + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/water.gdshader b/Demon_v0.19/water.gdshader new file mode 100644 index 0000000..ba90e87 --- /dev/null +++ b/Demon_v0.19/water.gdshader @@ -0,0 +1,12 @@ +shader_type spatial; +render_mode cull_disabled; +uniform float agitation=0.0; +varying vec3 wp; +void vertex(){wp=(MODEL_MATRIX*vec4(VERTEX,1.0)).xyz;VERTEX.y+=sin(VERTEX.x*8.0+TIME*2.0)*0.014+cos(VERTEX.z*9.0-TIME*2.5)*0.012;} +void fragment(){ + float wave=sin(wp.x*14.0-TIME*3.0)*cos(wp.z*17.0+TIME*2.0); + float rings=pow(0.5+0.5*sin(length(wp.xz-vec2(2.0,0.5))*28.0-TIME*8.0),12.0); + ALBEDO=mix(vec3(0.018,0.065,0.075),vec3(0.09,0.25,0.27),wave*0.5+0.5)+vec3(0.20)*rings*agitation; + ROUGHNESS=0.18;METALLIC=0.3;SPECULAR=0.7; + NORMAL=normalize(NORMAL+vec3(wave*0.08,0.0,cos(wp.x*12.0+TIME)*0.08)); +} diff --git a/Demon_v0.19/water_surface.gd b/Demon_v0.19/water_surface.gd new file mode 100644 index 0000000..889814b --- /dev/null +++ b/Demon_v0.19/water_surface.gd @@ -0,0 +1,15 @@ +extends RefCounted +func build(g,parent,radius,at,hot): + var st=SurfaceTool.new();st.begin(Mesh.PRIMITIVE_TRIANGLES) + var rings=24;var segments=128 + for r in range(rings): + for i in range(segments): + var a=TAU*i/segments;var b=TAU*(i+1)/segments + var inner=radius*r/rings;var outer=radius*(r+1)/rings + var points=[Vector3(cos(a)*inner,0,sin(a)*inner),Vector3(cos(b)*inner,0,sin(b)*inner),Vector3(cos(b)*outer,0,sin(b)*outer),Vector3(cos(a)*outer,0,sin(a)*outer)] + for j in [0,1,2,0,2,3]: + st.set_normal(Vector3.UP);st.set_uv(Vector2(points[j].x,points[j].z)/radius*.5+Vector2.ONE*.5);st.add_vertex(points[j]) + var node=g.mesh_node(parent,st.commit(),at,Color.WHITE) + var mat=ShaderMaterial.new();mat.shader=preload("res://surface_water.gdshader");mat.set_shader_parameter("boiling",hot);node.material_override=mat + node.set_meta("water_vertices",rings*segments*6) + return node diff --git a/Demon_v0.19/whip_impact.gd b/Demon_v0.19/whip_impact.gd new file mode 100644 index 0000000..ed84a06 --- /dev/null +++ b/Demon_v0.19/whip_impact.gd @@ -0,0 +1,25 @@ +extends Node3D +var game +var age=0.0 +var particles=[] +func play(g,device,actor,source=Vector3.INF): + game=g;g.add_child(self);global_position=actor.bone_world("spine01") + var mat=StandardMaterial3D.new();mat.shading_mode=BaseMaterial3D.SHADING_MODE_UNSHADED;mat.transparency=BaseMaterial3D.TRANSPARENCY_ALPHA;mat.albedo_color=Color(1,.79,.42,.85);mat.render_priority=115;mat.billboard_mode=BaseMaterial3D.BILLBOARD_ENABLED + for i in range(14): + var node=MeshInstance3D.new();add_child(node);var mesh=QuadMesh.new();mesh.size=Vector2(.025,.09);node.mesh=mesh;node.material_override=mat + particles.append({"node":node,"velocity":Vector3(sin(i*2.4),.3+fmod(i*.37,1),cos(i*2.4))*(.7+fmod(i*.23,1))}) + var st=SurfaceTool.new();st.begin(Mesh.PRIMITIVE_TRIANGLES) + var start=to_local(g.player.global_position+Vector3(0,1.45,0) if source==Vector3.INF else source) + for i in range(20): + var a=start.lerp(Vector3.ZERO,float(i)/20)+Vector3(0,sin(PI*i/20)*.32,0) + var b=start.lerp(Vector3.ZERO,float(i+1)/20)+Vector3(0,sin(PI*(i+1)/20)*.32,0) + for p in [a+Vector3.UP*.012,a-Vector3.UP*.012,b-Vector3.UP*.012,a+Vector3.UP*.012,b-Vector3.UP*.012,b+Vector3.UP*.012]:st.add_vertex(p) + st.generate_normals();var ribbon=MeshInstance3D.new();add_child(ribbon);ribbon.mesh=st.commit();var trail=mat.duplicate();trail.billboard_mode=BaseMaterial3D.BILLBOARD_DISABLED;trail.cull_mode=BaseMaterial3D.CULL_DISABLED;ribbon.material_override=trail;ribbon.name="WhipTrail" + var light=OmniLight3D.new();add_child(light);light.light_color=Color("ffd395");light.light_energy=.4;light.omni_range=1.4 + set_meta("whip_impact",true) +func _process(dt): + if game.paused:return + age+=dt + for p in particles:p.node.position=p.velocity*age+Vector3.DOWN*age*age*2;p.node.scale=Vector3.ONE*maxf(0,1-age/.34) + $WhipTrail.visible=age<.11 + if age>.36:queue_free() diff --git a/Demon_v0.19/workflow_capture.gd b/Demon_v0.19/workflow_capture.gd new file mode 100644 index 0000000..60ce27c --- /dev/null +++ b/Demon_v0.19/workflow_capture.gd @@ -0,0 +1,37 @@ +extends RefCounted +var folder="res://captures/workflow" +func shot(g,name): + g.workshop.sentences.update_icons() + await g.get_tree().process_frame + await RenderingServer.frame_post_draw + g.get_viewport().get_texture().get_image().save_png(folder+"/"+name+".png") +func run(g): + await g.get_tree().create_timer(.4).timeout + DirAccess.make_dir_recursive_absolute(folder);DirAccess.make_dir_recursive_absolute(folder+"/assembly") + g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false;g.hud.hide();g.player.hide() + for imp in g.life.imps:imp.root.hide() + var w=g.workshop;var d=w.add_station(4,Vector3(3,0,0));w.spawn();var s=g.souls[0] + s.required=[4];s.entering=false;s.entry_time=1;g.set_soul_reveal(s.visual,1);s.node.position=Vector3(4.4,0,2.2) + g.camera.position=Vector3(7,4.5,7);g.camera.look_at(Vector3(3.3,1.3,.7));g.camera.size=5.5 + for i in range(8):await shot(g,"assembly/%03d"%i) + w.attach(s,0) + for i in range(11): + if i>0:w.step_station(d,.05,false) + await shot(g,"assembly/%03d"%(8+i)) + for i in range(8):await shot(g,"assembly/%03d"%(19+i)) + w.step_station(d,.1,true);await shot(g,"chair-corrected") + w.step_station(d,10,false);g.life.update(.35);await shot(g,"idle-soul-burns") + g.reset_shift();g.game_started=true;g.paused=false;g.hud.hide();g.player.hide() + for i in range(7): + w.spawn();s=g.souls.back();s.entering=false;s.entry_time=1;s.node.position=w.queue_target(i,7);g.set_soul_reveal(s.visual,1) + w.losses.queue_step(10);w.losses.update_departures(.7) + g.camera.position=Vector3(10,17,20);g.camera.look_at(Vector3(1,.5,0));g.camera.size=19 + await shot(g,"conveyor-exit") + g.coins=2000;w.toggle_build() + for i in range(3):w.purchase_expansion() + g.camera.position=Vector3(22,24,32);g.camera.look_at(Vector3(7,0,0));g.camera.size=29 + g.hud.show();await shot(g,"expanded-room-menu");w.catalogue.hide();g.hud.hide();await shot(g,"expanded-room-clearance") + g.hud.show();w.add_station(1,Vector3(3,0,1));w.selected=0;w.begin_move();w.drag.active=true;w.drag.strip.show();w.drag.update(0) + await shot(g,"drag-delete-strip") + print("WORKFLOW CAPTURE COMPLETE: assembly sequence, corrected chair, burn, conveyor exit and three expansions") + g.get_tree().quit() diff --git a/Demon_v0.19/workflow_tests.gd b/Demon_v0.19/workflow_tests.gd new file mode 100644 index 0000000..90be0c6 --- /dev/null +++ b/Demon_v0.19/workflow_tests.gd @@ -0,0 +1,86 @@ +extends RefCounted +var failures=0 +var checks=0 +func check(ok,label): + checks+=1 + if not ok:failures+=1;push_error("WORKFLOW QA: "+label) +func clear(g): + g.reset_shift();g.game_started=true;g.paused=false;g.coins=1000;g.set_process(false) +func soul(g,recipe): + g.workshop.spawn();var s=g.souls.back();s.entering=false;s.entry_time=1;s.required=recipe;s.served=[];g.set_soul_reveal(s.visual,1);return s +func run(g): + await g.get_tree().create_timer(.3).timeout + g.start_game();clear(g);var w=g.workshop + var d=w.add_station(4,Vector3(3,0,0));var s=soul(g,[4]);var start=s.node.position + check(w.attach(s,0),"attach starts particle transfer") + check(d.placement==.5 and s.node.position==d.device.position and d.transfer.sparks.size()==36,"half-second assembly at final pose, no body flight") + w.step_station(d,.25,true) + check(is_equal_approx(d.placement,.25) and d.elapsed==0,"work blocked during transfer") + check(d.transfer.sparks.all(func(spark):return spark.node.scale.length()<.12),"transfer uses tiny sparks rather than large glowing spheres") + g.paused=true;var clock=d.transfer.clock;w.update(5) + check(d.transfer.clock==clock,"assembly freezes during pause") + g.paused=false;w.step_station(d,.25,false) + check(d.placement==0 and d.transfer==null and d.idle_time==0,"assembly completes after exactly half a second") + w.step_station(d,9.99,false);check(d.soul==s.id and g.coins==1000,"station waits full ten seconds") + w.step_station(d,.01,false) + check(d.soul==-1 and g.souls.is_empty() and g.coins==950 and g.done==0 and g.development.xp==0 and g.essence==0,"idle soul burns, fine exactly 50, no rewards") + w.step_station(d,20,false);check(g.coins==950,"failed soul cannot charge twice") + clear(g);d=w.add_station(2,Vector3(3,0,0));s=soul(g,[2]);w.attach(s,0);w.step_station(d,.5,false) + w.step_station(d,9,false);w.step_station(d,.1,true);check(d.idle_time==0,"real work resets idle countdown") + w.step_station(d,9.99,false);check(d.soul==s.id,"ten consecutive idle seconds required") + w.step_station(d,.01,false);check(d.soul==-1 and g.coins==950,"interrupted wheel work expires once") + clear(g);d=w.add_station(0,Vector3(3,0,0));s=soul(g,[0,4]);w.attach(s,0);w.step_station(d,.5,false) + for i in range(5):w.step_station(d,.5,true) + check(d.ready and s.state=="ready","intermediate stage waits on apparatus") + w.step_station(d,10,false);check(d.soul==-1 and g.coins==950,"forgotten completed intermediate stage also burns") + clear(g);d=w.add_station(0,Vector3(3,0,0));var a=soul(g,[0]);var b=soul(g,[0]);w.add_helper();w.update_helpers(.001) + check(d.reserved==0,"queue head may be reserved for helper") + check(g.wisps.is_empty() and not w.helpers[0].root.get_children().any(func(node):return node is MeshInstance3D and node.mesh is TorusMesh),"blue orbiting markers and floor halos removed") + w.losses.queue_step(9.99);check(g.souls.size()==2 and g.coins==1000,"queue head gets ten seconds") + w.losses.queue_step(.01) + check(g.index_of(a.id)<0 and g.index_of(b.id)>=0 and g.coins==950 and w.losses.departures.size()==1,"one FIFO soul leaves and costs 50") + check(w.helpers[0].soul==-1 and d.reserved==-1,"expired queue reservation releases helper and apparatus") + w.losses.queue_step(.01);check(g.souls.size()==1 and g.coins==950,"next head starts its own countdown") + w.losses.queue_step(9.99);check(g.souls.is_empty() and g.coins==900,"one departure per ten seconds, not entire queue") + var z=w.losses.departures[0].node.position.z;w.losses.update_departures(.25) + check(w.losses.departures[0].node.position.z>z,"departed soul flies toward opposite gate") + g.paused=true;z=w.losses.departures[0].node.position.z;w.update(10) + check(w.losses.departures[0].node.position.z==z,"conveyor freezes on pause") + g.paused=false;w.losses.update_departures(10);check(w.losses.departures.is_empty() and g.coins==900,"departure cleanup has no second fine") + clear(g);g.coins=1500;w.toggle_build();var width=w.build_area().x + for i in range(3): + if i==0: + await g.get_tree().process_frame + await preload("res://workshop_tests.gd").new().click(g,w.expansion_button) + check(w.expansion_level==1,"buy first expansion with real mouse input") + else:check(w.purchase_expansion(),"buy expansion %d"%i) + check(is_equal_approx(w.build_area().x,width*1.2),"each purchase adds twenty percent of current area");width=w.build_area().x + check(g.coins==0 and w.expansion_level==3 and not w.purchase_expansion(),"three purchases cost 1500, fourth rejected") + check(g.architecture.growth.smog.size.x>28 and g.architecture.growth.smog.material.density<.015,"light smog covers entire expanded room") + check(w.valid_position(Vector3(16,0,0),0),"construction allowed in new right-hand area") + check(preload("res://room_growth.gd").neighbour_x(1)-7.9-g.architecture.growth.right_edge()>4,"full growth leaves over four metres clear of neighbouring floor") + d=w.add_station(0,Vector3(16,0,0));w.rebuild_nav();check(w.accessible(),"helper navigation reaches expanded area") + var saved=w.snapshot();w.reset();w.restore(saved) + check(w.expansion_level==3 and w.stations.size()==1 and is_equal_approx(w.stations[0].device.position.x,16),"expansion restored before extended apparatus placement") + w.reset();check(w.expansion_level==0 and is_equal_approx(g.architecture.growth.right_edge(),12),"new game restores original room bounds") + g.paused=false;d=w.add_station(4,Vector3(3,0,0)) + for speaker in d.special.speaker_roots: + var target=(Vector3(0,1.05,.10)-speaker.position).normalized() + check(speaker.basis.z.dot(target)>.99,"speaker faces seated soul") + for kind in range(10): + var actor=g.make_person(false,kind);g.add_child(actor);actor.mount_station(4);actor.update_torture(0,false) + for side in ["L","R"]: + var hip=actor.bone_local("upperleg01."+side);var knee=actor.bone_local("lowerleg01."+side) + if side=="L":print("SEAT_POINTS ",kind," hip=",hip," knee=",knee) + for t in [.2,.4,.6]: + var point=hip.lerp(knee,t) + check(point.z>d.special.seat.position.z+d.special.seat.mesh.get_aabb().end.z+.075 or point.y>d.special.seat.position.y+d.special.seat.mesh.get_aabb().end.y+.07,"thigh clears seat %d %s %.1f"%[kind,side,t]) + actor.queue_free() + check(d.special.players.size()==2,"sound comes from both speakers") + g.test_mode=false;g.muted=false;g.whip_volume=.6;w.EXTRA.animate(g,d,.1,true) + await g.get_tree().create_timer(.15).timeout + check(d.special.players.all(func(player):return player.playing),"both speaker loops play") + g.muted=true;w.EXTRA.animate(g,d,.1,true);check(d.special.players.all(func(player):return not player.playing),"master mute stops both speaker loops") + g.test_mode=true;g.muted=false + if failures==0:print("ALL WORKFLOW TESTS PASSED (%d): transfer, idle losses, FIFO conveyor, helper cleanup, growth/save/clearance, ten seated skeletons, inward stereo speakers"%checks) + g.get_tree().quit(1 if failures else 0) diff --git a/Demon_v0.19/workshop.gd b/Demon_v0.19/workshop.gd new file mode 100644 index 0000000..3899bcc --- /dev/null +++ b/Demon_v0.19/workshop.gd @@ -0,0 +1,1100 @@ +extends Node + +const Economy=preload("res://economy.gd") +const TITLES=["Колодки","Дыба","Колесо","Железная дева","Музыкальный стул","Котёл"] +const PRICES=Economy.TOOL_PRICES +const FOOTPRINTS=[Vector2i(2,2),Vector2i(3,4),Vector2i(4,4),Vector2i(3,3),Vector2i(3,3),Vector2i(4,4)] +const ORIGIN=Vector2(-2,-4) +const AREA=Vector2i(12,9) +const EXTRA=preload("res://new_equipment.gd") +const QUEUE_CAPACITY=7 +const PLACE_SOUND=preload("res://audio/apparatus_place.wav") +const REMOVE_SOUND=preload("res://audio/apparatus_remove.wav") +const Icon=preload("res://talent_icon.gd") +var g +var sentences +const DIALOGUE_INTERVAL=30.0 +const HERO_INTERVAL=100.0 +var dialogue_clock=0.0 +var dialogue_turn=0 +var stations=[] +var expansion_level=0 +var drag=preload("res://build_drag.gd").new() +var expansion_button: Button +var losses=preload("res://workshop_losses.gd").new() +var helpers=[] +var unlock=0 +var helper_speed=0 +var automation=false +var helper_diligence=0 +var pressure_time=0.0 +var penalty_clock=0.0 +var penalty_gold_lost=0 +var penalty_souls_lost=0 +var pressure_label: Label +var tree_summary: Label +var build_mode=false +var pending=-1 +var pending_turns=0 +var moving=-1 +var selected=-1 +var spawn_clock=0.0 +var darkness=0.0 +var grid: Node3D +var preview: MeshInstance3D +var ghost: Node3D +var ghost_material: StandardMaterial3D +var pointer_position=null +var panel: PanelContainer +var context: PanelContainer +var context_title: Label +var catalogue: PanelContainer +var tree: PanelContainer +var tree_backdrop: ColorRect +var shade: ColorRect +var pressure: Label +var info: Label +var notice: Label +var timer_label: Label +var build_button: Button +var grimoire_button: Button +var buy_labels=[] +var buy_icons=[] +var help_primary: Label +var help_secondary: Label +var build_player: AudioStreamPlayer +var node_buttons=[] +var buy_buttons=[] +var bars=[] +var notice_time=0.0 +var nav=AStarGrid2D.new() +var revision=0 +var mesh_walking=preload("res://mesh_walking.gd").new() + +func setup(game): + g=game + mesh_walking.setup(g) + sentences=preload("res://judgement.gd").new();sentences.setup(self) + losses.setup(self) + build_player=AudioStreamPlayer.new();g.add_child(build_player);build_player.max_polyphony=4 + g.development.device.hide() + g.development.tree_icon.hide() + g.development.xp_label.get_parent().get_parent().hide() + g.development.action_bar.hide() + g.development.action_bar.reparent(g.ui_compat) + g.development.tree_icon.reparent(g.ui_compat) + g.zone.hide();g.ring.hide() + make_grid() + make_ui() + drag.setup(self) + make_level_bar() + rebuild_nav() + var saved=g.get_meta("workshop_save",{}) + if saved is Dictionary and not saved.is_empty(): + restore(saved) + if not stations.is_empty() or g.done>0: + var parent=g.menu.main_start.get_parent() + var resume=g.button("Продолжить",resume_saved) + parent.add_child(resume);parent.move_child(resume,g.menu.main_start.get_index()) + +func style(bg=Color("141018"),edge=Color("776044")): + return preload("res://infernal_ui.gd").panel(false,18) + +func make_panel(pos,dimensions): + var p=PanelContainer.new();g.hud.add_child(p);p.position=pos;p.size=dimensions + p.add_theme_stylebox_override("panel",style()) + return p + +func text(parent,value,font_size=18,color=Color("d5c9b5")): + var l=g.label(value,font_size,color);parent.add_child(l) + l.vertical_alignment=VERTICAL_ALIGNMENT_CENTER + l.size_flags_horizontal=Control.SIZE_EXPAND_FILL + return l + +func action(parent,value,callback): + var b=g.button(value,callback);parent.add_child(b) + preload("res://infernal_ui.gd").apply_button(b) + b.add_theme_font_size_override("font_size",17) + return b + +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.z_index=50 + for state in ["normal","hover","pressed","disabled"]:b.add_theme_stylebox_override(state,preload("res://infernal_ui.gd").icon(state)) + 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 + catalogue=make_panel(Vector2(1080,116),Vector2(496,680));catalogue.z_index=12 + v=VBoxContainer.new();catalogue.add_child(v);v.add_theme_constant_override("separation",10) + text(v,"КУЗНЯ ИСТЯЗАНИЙ",25,Color("d8d4c4")).horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER + text(v,"ЛКМ — установить · Колесо — поворот / масштаб\nWASD — камера · СКМ — вращение\nЛКМ 1 с — перенос · Снизу — удаление",16) + var scroll=ScrollContainer.new();v.add_child(scroll);scroll.custom_minimum_size=Vector2(452,335);scroll.size_flags_vertical=Control.SIZE_EXPAND_FILL + scroll.horizontal_scroll_mode=ScrollContainer.SCROLL_MODE_DISABLED;preload("res://infernal_ui.gd").apply_scroll(scroll) + var tools=VBoxContainer.new();scroll.add_child(tools);tools.size_flags_horizontal=Control.SIZE_EXPAND_FILL;tools.add_theme_constant_override("separation",8) + for i in range(TITLES.size()): + var b=action(tools,"",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) + buy_icons.append(icon) + var l=text(entry,"",16);l.mouse_filter=Control.MOUSE_FILTER_IGNORE;buy_labels.append(l) + expansion_button=action(v,"",purchase_expansion);expansion_button.name="BuyRoomExpansion" + action(v,"Завершить строительство [B]",toggle_build) + catalogue.hide() + context=make_panel(Vector2.ZERO,Vector2(336,52));context.z_index=10 + v=VBoxContainer.new();context.add_child(v);context_title=text(v,"",19,Color("dedacb")) + context.hide() + make_tree() + g.hud.move_child(build_button,-1);g.hud.move_child(grimoire_button,-1) + refresh() + +func make_tree(): + tree_backdrop=ColorRect.new();g.hud.add_child(tree_backdrop);tree_backdrop.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) + tree_backdrop.color=Color(.018,.022,.025,.90);tree_backdrop.z_index=39;tree_backdrop.hide() + tree=make_panel(Vector2(190,58),Vector2(1220,742));tree.z_index=40 + var root=VBoxContainer.new();tree.add_child(root);root.add_theme_constant_override("separation",12) + text(root,"Г Р И М У А Р Ц Е Х А",30,Color("d8d4c4")).horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER + tree_summary=text(root,"",16);tree_summary.horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER + var columns=HBoxContainer.new();root.add_child(columns);columns.add_theme_constant_override("separation",22) + var tool_nodes=[] + for kind in range(TITLES.size()): + if kind>0:tool_nodes.append([Icon.APPARATUS[kind],"Чертёж: "+TITLES[kind],"Открывает покупку в кузне","unlock%d"%kind]) + var specs=[ + {"title":"I ОРУДИЯ", "subtitle":"Золото · покупка новых орудий", "nodes":tool_nodes}, + {"title":"II СУККУБА", "subtitle":"1 очко за каждый новый уровень", "nodes":[["boot","Поступь тени","+25% к скорости","speed"],["whip","Владычица боли","+20% к своим действиям","power"],["wings","Хозяйка цеха","+8% к работе всей команды","leadership"],["lock","Крылья госпожи","Будущее развитие","future"]]}, + {"title":"III СВИТА", "subtitle":"Души · до 3 помощниц", "nodes":[["wings","Призвать помощницу","Доставка душ к свободным орудиям","hire"],["soul","Надсмотрщицы","Самостоятельная работа у орудий","auto"],["boot","Стремительная свита","+25% к скорости движения","haste"],["whip","Усердная свита","+25% к скорости работы","diligence"],["lock","Легион тьмы","Будущее развитие","future"]]} + ] + for spec in specs: + var column=VBoxContainer.new();columns.add_child(column);column.custom_minimum_size=Vector2(376,0) + column.add_theme_constant_override("separation",0) + text(column,spec.title,23,Color("d8d4c4")).horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER + text(column,spec.subtitle,15).horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER + var scroll=ScrollContainer.new();column.add_child(scroll);scroll.custom_minimum_size=Vector2(376,470);scroll.horizontal_scroll_mode=ScrollContainer.SCROLL_MODE_DISABLED + preload("res://infernal_ui.gd").apply_scroll(scroll) + 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()): + var n=spec.nodes[i] + if i>0: + var link=Control.new();branch.add_child(link);link.custom_minimum_size=Vector2(356,14) + var key=n[3] + var b=action(branch,"",func():upgrade(key));b.custom_minimum_size=Vector2(356,132) + b.add_theme_stylebox_override("disabled",b.get_theme_stylebox("normal")) + b.add_theme_color_override("font_disabled_color",b.get_theme_color("font_color")) + var content=Control.new();b.add_child(content);content.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT);content.mouse_filter=Control.MOUSE_FILTER_IGNORE + var icon=Icon.new();icon.kind=n[0];content.add_child(icon);icon.position=Vector2(18,42);icon.size=Vector2(40,40);icon.custom_minimum_size=Vector2(40,40) + var title=text(content,n[1],18,Color("d7d5c7"));title.mouse_filter=Control.MOUSE_FILTER_IGNORE + title.set_anchors_and_offsets_preset(Control.PRESET_TOP_WIDE);title.offset_left=12;title.offset_right=-12;title.offset_top=12;title.offset_bottom=36;title.horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER + var desc=text(content,n[2],14);desc.mouse_filter=Control.MOUSE_FILTER_IGNORE;desc.autowrap_mode=TextServer.AUTOWRAP_WORD_SMART + desc.set_anchors_and_offsets_preset(Control.PRESET_TOP_WIDE);desc.offset_left=66;desc.offset_right=-66;desc.offset_top=40;desc.offset_bottom=76;desc.horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER + var rank=text(content,"",14,Color("b8afa1"));rank.mouse_filter=Control.MOUSE_FILTER_IGNORE + rank.set_anchors_and_offsets_preset(Control.PRESET_TOP_WIDE);rank.offset_left=12;rank.offset_right=-12;rank.offset_top=80;rank.offset_bottom=98;rank.horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER + var gems=preload("res://skill_rubies.gd").new();b.add_child(gems);gems.mouse_filter=Control.MOUSE_FILTER_IGNORE + gems.slots=3 if key in ["speed","power","leadership","hire","haste","diligence"] else 1 + gems.set_anchors_and_offsets_preset(Control.PRESET_BOTTOM_WIDE);gems.offset_top=-29;gems.offset_bottom=-5 + node_buttons.append({"button":b,"key":key,"rank":rank,"description":desc,"gems":gems}) + text(root,"Одно орудие — одно наказание. После завершения душа сгорает и приносит награду.",15).horizontal_alignment=HORIZONTAL_ALIGNMENT_CENTER + action(root,"Вернуться в цех [T / Esc]",toggle_tree) + tree.hide() + +func make_grid(): + if is_instance_valid(grid):grid.free() + if is_instance_valid(preview):preview.free() + var area=grid_area() + grid=Node3D.new();g.add_child(grid) + var plane=PlaneMesh.new();plane.size=area + var lines=MeshInstance3D.new();grid.add_child(lines);lines.mesh=plane + lines.position=Vector3(ORIGIN.x+area.x/2,.205,ORIGIN.y+area.y/2) + lines.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + var grid_material=ShaderMaterial.new();grid_material.shader=preload("res://build_grid.gdshader") + grid_material.render_priority=110 + grid_material.set_shader_parameter("grid_origin",ORIGIN);grid_material.set_shader_parameter("grid_area",area) + lines.material_override=grid_material + preview=MeshInstance3D.new();g.add_child(preview) + preview.mesh=BoxMesh.new();preview.mesh.size=Vector3(2,.06,2) + var m=StandardMaterial3D.new();m.transparency=BaseMaterial3D.TRANSPARENCY_ALPHA;m.shading_mode=BaseMaterial3D.SHADING_MODE_UNSHADED;m.albedo_color=Color(.2,1,.65,.35) + preview.material_override=m;preview.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + m.render_priority=110 + grid.hide();preview.hide() + +func reset(): + if g.life: g.life.activities.reset() + losses.reset();expansion_level=0;g.architecture.growth.set_level(0) + cancel_placement(false) + for s in stations:dispose_station(s) + for h in helpers:h.root.queue_free() + for b in bars:b.queue_free() + stations.clear();helpers.clear();bars.clear() + make_grid() + unlock=0;helper_speed=0;helper_diligence=0;automation=false;spawn_clock=0;darkness=0 + pressure_time=0;penalty_clock=0;penalty_gold_lost=0;penalty_souls_lost=0 + if is_instance_valid(pressure_label):pressure_label.text="" + dialogue_clock=0;dialogue_turn=0 + selected=-1;pending=-1;moving=-1;build_mode=false + tree.hide();tree_backdrop.hide();context.hide();catalogue.hide();grid.hide();preview.hide();shade.color.a=0 + g.coins=240 + rebuild_nav();refresh() + +func message(value): + notice.text=value;notice_time=4.0 + +func toggle_build(): + if tree.visible:toggle_tree() + if not g.game_started or (g.paused and not build_mode):return + if g.held>=0:drop_held() + cancel_placement(false) + build_mode=not build_mode;g.paused=build_mode + g.orbit.preserve_focus() + g.orbit.stop();pending=-1;moving=-1;preview.hide();context.hide() + grid.visible=build_mode;catalogue.visible=build_mode + refresh() + +func toggle_tree(): + if not g.game_started:return + if tree.visible: + tree.hide();g.paused=false + else: + if g.paused and not build_mode:return + if build_mode:toggle_build() + if g.held>=0:drop_held() + context.hide();g.orbit.stop();g.paused=true;tree.show() + notice.text="" + tree_backdrop.visible=tree.visible + refresh() + +func begin_purchase(kind): + if not build_mode or kind<0 or kind>unlock or g.coins=0 and moving=0: + ghost=stations[moving].device.duplicate() + g.add_child(ghost) + else: + ghost=make_device(pending,Vector3.ZERO).device + ghost.name="PlacementGhost";ghost.show() + ghost_material=StandardMaterial3D.new() + ghost_material.transparency=BaseMaterial3D.TRANSPARENCY_ALPHA + ghost_material.shading_mode=BaseMaterial3D.SHADING_MODE_UNSHADED + # The full-screen bokeh pass uses priority 100 and would overwrite transparent previews. + ghost_material.render_priority=110 + ghost_material.albedo_color=Color(.3,.95,.7,.55) + var nodes=[ghost] + while not nodes.is_empty(): + var node=nodes.pop_back() + for child in node.get_children():nodes.append(child) + if node is MeshInstance3D: + node.material_override=ghost_material + node.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + elif node is StaticBody3D: + node.collision_layer=0;node.collision_mask=0 + elif node is Light3D:node.hide() + elif node is AudioStreamPlayer3D:node.stop() + update_preview() + +func track_pointer(event): + if event is InputEventMouseButton and event.button_index==MOUSE_BUTTON_LEFT:drag.left_down=event.pressed + if event is InputEventMouseMotion or event is InputEventMouseButton: + pointer_position=event.position + update_preview() + if drag.active and event is InputEventMouseMotion and drag.hover_delete(event.position): + drag.confirm(event.position);g.get_viewport().set_input_as_handled();return + if drag.active and event is InputEventMouseButton and event.button_index==MOUSE_BUTTON_LEFT: + if event.pressed:drag.confirm(event.position) + else:drag.release(event.position) + g.get_viewport().set_input_as_handled();return + +func update_preview(): + if not build_mode or pending<0:return + var p=snap_to_grid(ground_point(pointer_position),pending,pending_turns) + preview.position=p+Vector3(0,.25,0) + var size=footprint(pending,pending_turns) + preview.mesh.size=Vector3(size.x,.06,size.y) + var valid=valid_position(p,pending,moving,pending_turns) + preview.material_override.albedo_color=Color(.15,.9,.55,.4) if valid else Color(.95,.12,.18,.5) + if is_instance_valid(ghost): + ghost.position=p + ghost.rotation.y=pending_turns*PI/2 + ghost_material.albedo_color=Color(.3,.95,.7,.55) if valid else Color(1,.2,.25,.55) + +func delete_selected(): + if not build_mode or pending>=0 or selected<0 or not is_free(stations[selected]):return + var s=stations[selected] + var removed=selected + var refund=int(PRICES[s.selected]/2) + g.coins+=refund + dispose_station(s);bars.erase(s.bar);stations.remove_at(selected) + for h in helpers: + if h.station>removed:h.station-=1 + elif h.station==removed:h.station=-1 + for soul in g.souls: + if soul.get("state","")=="mounted" and soul.assigned>removed:soul.assigned-=1 + if soul.get("origin_station",-1)>removed:soul.origin_station-=1 + selected=-1;context.hide();rebuild_nav();refresh();g.save_progress() + message("Орудие разобрано. Возвращено %d золота." % refund) + play_build_sound(false) + +func play_build_sound(placed): + build_player.stream=PLACE_SOUND if placed else REMOVE_SOUND + build_player.volume_db=-3.0+linear_to_db(maxf(.0001,g.whip_volume)) + if not g.test_mode and not g.capture_mode and not g.muted and g.whip_volume>0:build_player.play() + +func rotate_pending(direction): + if not build_mode:return + if pending<0: + if not context.visible or selected<0 or not is_free(stations[selected]):return + begin_move() + if pending<0:return + pending_turns=wrapi(pending_turns+direction,0,4) + update_preview() + +func is_free(s): + return s.soul<0 and s.reserved<0 and s.cooldown<=0 + +func dispose_station(s): + # Break the reference cycle between the apparatus state and its motion driver. + s.motion.d=null;s.motion.g=null;s.motion=null + if s.get("transfer") and is_instance_valid(s.transfer):s.transfer.cancel() + s.device.queue_free();s.bar.queue_free() + +func _exit_tree(): + for s in stations: + if s.motion:s.motion.d=null;s.motion.g=null;s.motion=null + +func ground_point(mouse=null): + if mouse==null:mouse=g.get_viewport().get_mouse_position() + var origin=g.camera.project_ray_origin(mouse) + var direction=g.camera.project_ray_normal(mouse) + if absf(direction.y)<.00001:return Vector3.ZERO + return origin+direction*((.18-origin.y)/direction.y) + +func footprint(kind,turns=0): + var size=FOOTPRINTS[kind] + return Vector2i(size.y,size.x) if turns%2!=0 else size + +func station_rect(s): + return rect_at(s.device.position,s.selected,s.turns) + +func service_rect(p,kind,turns): + var forward=Vector3.BACK.rotated(Vector3.UP,turns*PI/2) + var center=p+forward*(FOOTPRINTS[kind].y/2.0+.5) + return Rect2(Vector2(center.x-.5,center.z-.5),Vector2.ONE) + +func snap_to_grid(p,kind,turns=0): + var size=footprint(kind,turns) + return Vector3(ORIGIN.x+floorf(p.x-ORIGIN.x-size.x/2.0+.5)+size.x/2.0,0,ORIGIN.y+floorf(p.z-ORIGIN.y-size.y/2.0+.5)+size.y/2.0) + +func rect_at(p,kind,turns=0): + var size=Vector2(footprint(kind,turns)) + return Rect2(Vector2(p.x,p.z)-size/2,size) + +func valid_position(p,kind,ignore=-1,turns=0): + var r=rect_at(p,kind,turns) + if not Rect2(ORIGIN,build_area()).encloses(r):return false + # Keep an approach lane in front of every device, including neighbouring devices. + var service=service_rect(p,kind,turns) + if not Rect2(-7.1,-4.8,walk_right()+7.1,10.5).encloses(service):return false + for i in range(stations.size()): + if i==ignore:continue + var other=stations[i] + var o=station_rect(other) + if r.intersects(o) or service.intersects(o) or r.intersects(service_rect(other.device.position,other.selected,other.turns)):return false + return true + +func place(p): + if pending<0 or not valid_position(p,pending,moving,pending_turns):return false + var old=Vector3.ZERO + var old_turns=0 + if moving>=0: + old=stations[moving].device.position;old_turns=stations[moving].turns + stations[moving].device.position=p;stations[moving].turns=pending_turns;stations[moving].device.rotation.y=pending_turns*PI/2 + else: + if g.coinsunlock:return false + add_station(pending,p,pending_turns) + rebuild_nav() + if not accessible(): + if moving>=0: + stations[moving].device.position=old;stations[moving].turns=old_turns;stations[moving].device.rotation.y=old_turns*PI/2 + else: + var s=stations.pop_back();dispose_station(s);bars.erase(s.bar) + rebuild_nav();message("Нужен свободный проход от ворот ко всем орудиям.");return false + if moving<0:g.coins-=PRICES[pending] + var placed=stations[moving] if moving>=0 else stations.back() + var occupied=rect_at(p,pending,pending_turns).grow(.4) + if occupied.has_point(Vector2(g.player.position.x,g.player.position.z)):g.player.position=approach(placed) + for h in helpers: + if occupied.has_point(Vector2(h.root.position.x,h.root.position.z)):h.root.position=approach(placed) + for imp in g.life.imps: + if occupied.has_point(Vector2(imp.root.position.x,imp.root.position.z)): + imp.root.position=free_floor(imp.root.position);imp.revision=-1;imp.velocity=Vector3.ZERO;imp.gait.reset() + placed.device.show() + cancel_placement(false) + selected=-1;context.hide();refresh();g.save_progress() + catalogue.visible=build_mode + play_build_sound(true) + return true + +func make_device(kind,p): + var root=Node3D.new();g.add_child(root);root.position=p + var s={"device":root,"selected":kind,"crank":null,"door":null,"second_door":null,"flame":null,"elapsed":0.0,"stage":0,"release_clock":0.0,"soul":-1,"reserved":-1,"cooldown":0.0,"hits":0,"hit_clock":0.0,"placement":0.0,"idle_time":0.0,"transfer":null,"from":Vector3.ZERO,"motion":null,"operator":-1,"ready":false} + preload("res://equipment.gd").new().build(g,s) + return s + +func add_station(kind,p,turns=0): + var s=make_device(kind,p) + s["turns"]=wrapi(turns,0,4);s.device.rotation.y=s.turns*PI/2 + var motion=preload("res://apparatus_motion.gd").new();motion.setup(g,s);s.motion=motion + mesh_walking.build(s.device) + var bar=ProgressBar.new();g.ui_compat.add_child(bar);bar.size=Vector2(96,9);bar.show_percentage=false;bar.mouse_filter=Control.MOUSE_FILTER_IGNORE + var fill=StyleBoxFlat.new();fill.bg_color=Color("a88b52") + var track=StyleBoxFlat.new();track.bg_color=Color("211826");track.border_color=Color("66513a");track.set_border_width_all(1) + fill.bg_color=Color("719a96");track.bg_color=Color("141b1d");track.border_color=Color("757f7b") + bar.add_theme_stylebox_override("fill",fill);bar.add_theme_stylebox_override("background",track) + bar.add_theme_font_size_override("font_size",1);bar.size=Vector2(96,9) + bar.hide();s["bar"]=bar;bars.append(bar);stations.append(s) + return s + +func approach(s): + var p=s.device.position + return p+Vector3(0,0,FOOTPRINTS[s.selected].y/2.0+.55).rotated(Vector3.UP,s.turns*PI/2) + +func cell(p): + return Vector2i(clampi(roundi((p.x+7.5)*2),0,nav.region.size.x-1),clampi(roundi((p.z+5)*2),0,21)) + +func rebuild_nav(): + mesh_walking.rebuild(stations) + nav.region=Rect2i(0,0,38+ceili(g.architecture.growth.extra_width(expansion_level)*2),22);nav.cell_size=Vector2(.5,.5);nav.offset=Vector2(-7.5,-5) + nav.diagonal_mode=AStarGrid2D.DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES;nav.update() + for x in range(nav.region.size.x): + for z in range(22): + var p=Vector2(-7.5+x*.5,-5+z*.5) + var blocked=mesh_walking.blocked(p) or p.x>walk_right() + nav.set_point_solid(Vector2i(x,z),blocked) + revision+=1 + +func accessible(): + for s in stations: + if nav.get_id_path(cell(g.GATE_EXIT),cell(approach(s))).is_empty():return false + return true + +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 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=3:return + var cost=Economy.HASTE_PRICES[helper_speed] + if g.essence=3:return + var cost=Economy.DILIGENCE_PRICES[helper_diligence] + if g.essence=0 else g.development.action_level*.20 + return (1.0+skill)*(1.0+g.development.leadership*.08)/Economy.work_multiplier(g.development.xp) + +func can_afford_upgrade(cost): + # Keep enough for the first altar: spending everything on blueprints/staff must not strand a new game. + return g.coins>=cost+(PRICES[0] if stations.is_empty() else 0) + +func add_helper(): + var root=Node3D.new();g.add_child(root);root.position=Vector3(-3+helpers.size(),0,4.8) + var model=preload("res://succubus_actor.gd").new();root.add_child(model);model.scale=Vector3.ONE*.9;model.configure(g) + model.set_meta("helper_tint",Color("779fff")) + for mesh in model.find_children("*","MeshInstance3D",true,false): + for surface in range(mesh.mesh.get_surface_count()): + var original=mesh.get_active_material(surface) + if original is StandardMaterial3D: + var tinted=original.duplicate();tinted.albedo_color=original.albedo_color.lerp(Color(.20,.60,.95),.45) + tinted.emission_enabled=true;tinted.emission=Color(.035,.055,.14);tinted.emission_energy_multiplier=.35 + mesh.set_surface_override_material(surface,tinted) + root.set_meta("floor_halo",false) + helpers.append({"root":root,"model":model,"soul":-1,"station":-1,"state":"idle","path":PackedVector2Array(),"destination":Vector2i(-1,-1),"revision":-1}) + +func refresh(): + if expansion_button: + expansion_button.text="Площадь +20%% · 500 золота · %d / 3"%expansion_level if expansion_level<3 else "Площадь расширена · 3 / 3" + expansion_button.disabled=expansion_level>=3 or g.coins<500 + if not is_instance_valid(info):return + g.refresh_ui() + 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 золота · %d×%d%s" % [TITLES[i],PRICES[i],FOOTPRINTS[i].x,FOOTPRINTS[i].y," [закрыто]" if i>unlock else ""] + buy_buttons[i].disabled=i>unlock or g.coins0 and rank<3;value="1 очко уровня" + "hire": + enabled=helpers.size()<3 and g.essence>=Economy.HIRE_PRICES[mini(2,helpers.size())] + value="%d душ"%Economy.HIRE_PRICES[mini(2,helpers.size())] + "auto":enabled=not helpers.is_empty() and not automation and g.essence>=Economy.AUTOMATION_PRICE;value="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 душ"%prices[mini(rank,2)] + _:value="—" + n.button.disabled=not enabled;n.rank.text=value + var purchased=0 + if key.begins_with("unlock"):purchased=1 if unlock>=int(key.right(1)) else 0 + else: + match key: + "speed":purchased=g.speed_level + "power":purchased=g.development.action_level + "leadership":purchased=g.development.leadership + "hire":purchased=helpers.size() + "auto":purchased=1 if automation else 0 + "haste":purchased=helper_speed + "diligence":purchased=helper_diligence + n.gems.filled=purchased + n.button.modulate=Color.WHITE + build_button.text="";build_button.set_pressed_no_signal(build_mode) + grimoire_button.text="";grimoire_button.set_pressed_no_signal(tree.visible) + help_primary.text="ЛКМ — установить · Колесо — поворот" if build_mode else "ЛКМ — душа / удар · ПКМ — работать" + help_secondary.text="ПКМ / Esc — отменить · [B] — выйти" if build_mode else "WASD — идти · Колесо — камера" + +func queued(): + return g.souls.filter(func(s):return s.get("state","queue")=="queue") + +func waiting(): + return g.souls.filter(func(s):return s.get("state","queue") in ["queue","reserved"]) + +func queue_load(): + # Carrying a soul reserves its queue slot so dropping it can never create an eighth occupant. + return waiting().size()+g.souls.filter(func(s):return s.get("state","")=="held" and s.get("queue_reserved",true)).size() + +func spawn(): + if not g.game_started or stations.is_empty() or queue_load()>=QUEUE_CAPACITY:return false + g.spawn_soul() + var s=g.souls.back();s["state"]="queue";s["assigned"]=-1;s["entry_time"]=0.0 + return true + +func queue_target(index,count): + return Vector3(-5.3,0,3.4-mini(index,QUEUE_CAPACITY-1)*1.15) + +func drop_held(): + var i=g.index_of(g.held) + if i>=0:sentences.drop(g.souls[i]) + g.held=-1 + +func attach(s,station_index,operator_id=-1,claimant_id=-1): + if station_index<0 or station_index>=stations.size():return false + var d=stations[station_index] + if d.soul>=0 or d.cooldown>0 or not sentences.accepts(s,d.selected):return false + var displaced=d.reserved + if claimant_id>=0 and displaced!=claimant_id:return false + var transfer=preload("res://soul_transfer.gd").new();g.add_child(transfer);transfer.begin(g,s) + sentences.release_origin(s) + s.queue_reserved=false;d.ready=false + d.soul=s.id;d.reserved=-1;d.operator=operator_id;d.elapsed=0;d.stage=0;d.hits=0;d.placement=.5;d.idle_time=0;d.transfer=transfer;d.from=s.node.position + s.state="mounted";s.assigned=station_index;s.visual.position=Vector3.ZERO;s.visual.rotation=Vector3.ZERO;s.visual.scale=Vector3.ONE;s.visual.mount_station(d.selected) + d.motion.reset() + if d.selected==1:s.visual.rotation.x=-PI/2;s.visual.position=Vector3(0,1.04,1.13) + elif d.selected==2:s.visual.position=Vector3(0,.47,.27) + elif d.selected==3:s.visual.position=Vector3(0,.22,0) + elif d.selected==4:s.visual.position=Vector3.ZERO + elif d.selected==5:s.visual.position=Vector3(0,.45,0);s.visual.scale=Vector3.ONE*.85 + s.visual.update_torture(0,false) + s["pose_target"]=s.visual.transform;s.node.position=d.device.position;s.node.rotation=Vector3(0,d.turns*PI/2,0) + transfer.target_ready() + sentences.update_label(s) + announce_soul(s) + # Arrival wins over a helper's advance reservation, never over an occupied device. + if displaced>=0 and displaced!=claimant_id:reroute_helper(displaced) + return true + +func try_player_attach(station_index): + var index=g.index_of(g.held) + if index<0 or station_index<0 or station_index>=stations.size():return false + var d=stations[station_index] + if g.player.position.distance_to(approach(d))>1.5:return false + if not attach(g.souls[index],station_index):return false + g.held=-1 + return true + +func reroute_helper(hi): + if hi<0 or hi>=helpers.size():return false + var h=helpers[hi] + if h.station>=0 and h.station=0:stations[h.station].reserved=hi + else:h.model.set_walking(false) + return h.station>=0 + +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 + if soul.has("task_badge"):soul.task_badge.hide() + g.life.burn(soul);g.souls.remove_at(index) + var count=soul.required.size() + var reward=Economy.reward(soul.required,g.development.xp) + g.coins+=reward.gold;g.essence+=reward.souls;g.done+=1 + g.development.reward(reward.xp) + + 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() + +func step_station(s,dt,active): + s.cooldown=maxf(0,s.cooldown-dt);s.hit_clock=maxf(0,s.hit_clock-dt) + s.release_clock=maxf(0,s.release_clock-dt) + if s.cooldown<=.45 and s.soul<0 and s.door: + s.door.rotation.y=move_toward(s.door.rotation.y,-1.8,dt*4) + s.second_door.rotation.y=move_toward(s.second_door.rotation.y,1.8,dt*4) + var i=g.index_of(s.soul) + if i<0: + EXTRA.animate(g,s,dt,false) + if s.selected==3: + g.working=-1;s.motion.update(dt,false) + return + var soul=g.souls[i] + if s.placement>0: + var elapsed=minf(dt,s.placement);s.placement=maxf(0,s.placement-dt) + if is_instance_valid(s.transfer):s.transfer.advance(elapsed) + if s.placement<=.00001: + s.placement=0 + if is_instance_valid(s.transfer):s.transfer.finish() + s.transfer=null + return + if soul.state in ["held","transit"]:s.idle_time=0;return + s.idle_time=0.0 if active and not s.ready else s.idle_time+dt + if s.idle_time+.00001>=losses.TIMEOUT:losses.station_timeout(s);return + if s.ready: + soul.visual.update_torture(dt,false);EXTRA.animate(g,s,dt,false) + s.bar.visible=soul.state in ["ready","reserved_next"] + s.bar.position=g.camera.unproject_position(s.device.position+Vector3(0,3.4,0))-Vector2(48,0) + return + soul.node.position=s.device.position + var rate=action_rate(s) + if active: + if s.selected==0: + if s.hit_clock<=0: + s.hit_clock=.45/rate;s.hits+=1;g.play_whip() + soul.visual.whip_reaction() + preload("res://whip_impact.gd").new().play(g,s.device,soul.visual,(g.avatar.global_position if s.operator<0 else helpers[s.operator].model.global_position)+Vector3(0,1.45,0)) + if s.operator<0:g.avatar.strike(s.hit_clock) + elif s.operator=1:s.stage=1;s.elapsed=0 + elif s.selected==2:s.elapsed+=dt*rate + elif s.selected>=4:s.elapsed+=dt*rate + else: + if s.stage==0: + s.elapsed+=dt;s.door.rotation.y=move_toward(s.door.rotation.y,0,dt*5.2);s.second_door.rotation.y=move_toward(s.second_door.rotation.y,0,dt*5.2) + if s.elapsed>=.35:s.stage=1;s.elapsed=0 + else:s.elapsed+=dt*rate + if s.crank:s.crank.rotation.z+=dt*rate*4 + elif s.selected==1 and s.stage==1:s.elapsed=0 + if s.selected==2: + var a=s.crank.rotation.z;soul.visual.rotation.z=a;soul.visual.position=Vector3(sin(a)*1.15,1.62-cos(a)*1.15,.27) + var progress=s.elapsed + if s.selected==1:progress=(s.elapsed if s.stage==0 else 1+s.elapsed)/3.0 + elif s.selected==2:progress=s.elapsed/5 + elif s.selected==3:progress=(s.elapsed if s.stage==0 else .35+s.elapsed)/3.35 + elif s.selected>=4:progress=s.elapsed/(6.0 if s.selected==4 else 7.0) + s.bar.value=progress*100;s.bar.show() + s.bar.position=g.camera.unproject_position(s.device.position+Vector3(0,3.4,0))-Vector2(48,0) + if s.flame:s.flame.visible=active and (s.stage==1 or s.selected==5) + soul.visual.update_torture(dt,active) + g.working=s.soul;g.STATION=s.device.position;s.motion.update(dt,active);g.working=-1 + EXTRA.animate(g,s,dt,active) + if (s.selected==0 and s.hits>=5) or (s.selected==1 and s.stage==1 and s.elapsed>=2) or (s.selected==2 and s.elapsed>=5) or (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) + +func move_helper(h,target,dt): + var destination=cell(target) + if h.destination!=destination or h.revision!=revision: + h.destination=destination;h.revision=revision;h.path=nav.get_point_path(cell(h.root.position),destination) + if not h.path.is_empty():h.path.remove_at(0) + var next=target + if not h.path.is_empty():next=Vector3(h.path[0].x,0,h.path[0].y) + var delta=next-h.root.position;delta.y=0 + var walking=delta.length()>.06 + if walking: + mesh_walking.move_actor(h.root,h.root.position.move_toward(next,dt*(2.5+helper_speed*.625))-h.root.position) + h.model.rotation.y=lerp_angle(h.model.rotation.y,atan2(delta.x,delta.z),minf(1,dt*10)) + if h.root.position.distance_to(next)<.08 and not h.path.is_empty():h.path.remove_at(0) + h.model.set_walking(walking) + return h.root.position.distance_to(target)<.3 + +func update_helpers(dt): + for hi in range(helpers.size()): + var h=helpers[hi] + if h.state=="idle": + var waiting=g.souls.filter(func(s):return s.state=="ready")+queued().filter(func(s):return not s.entering) + var free=-1 + 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 + h.soul=soul.id;h.station=free;h.state="collect";stations[free].reserved=hi + var index=g.index_of(h.soul) + if h.state in ["collect","deliver"]: + if index<0: + reroute_helper(hi);continue + if h.station<0 or h.station>=stations.size() or stations[h.station].reserved!=hi or stations[h.station].soul>=0: + if not reroute_helper(hi):continue + if h.state=="collect": + if index<0:h.state="idle";stations[h.station].reserved=-1;continue + 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]) + elif h.state=="deliver": + if index<0:h.state="idle";stations[h.station].reserved=-1;continue + var s=g.souls[index] + s.node.position=s.node.position.move_toward(h.root.position+Vector3(-.65,0,0),dt*5) + s.visual.position.y=.65+sin(g.time*2)*.06 + if move_helper(h,approach(stations[h.station]),dt): + if attach(s,h.station,hi if automation else -1,hi): + h.state="operate" if automation else "idle";h.soul=-1 + else:reroute_helper(hi) + elif h.state=="operate": + h.model.set_walking(false) + if stations[h.station].soul<0 or stations[h.station].ready:h.state="idle" + +func click_station(index): + if not build_mode:context.hide();return + selected=index;var s=stations[index] + context.hide();refresh() + if g.held>=0 and is_free(s):message("Подведи душу к передней стороне орудия.") + +func announce_soul(s,override_text=""): + if not g.dialogue.souls_enabled:return + if g.paused or s.entering:return + if dialogue_clock=0:cancel_placement();return true + if tree.visible:toggle_tree();return true + if build_mode:toggle_build();return true + if context.visible:context.hide();return true + if event is InputEventMouseButton and event.pressed: + if build_mode and event.button_index in [MOUSE_BUTTON_WHEEL_UP,MOUSE_BUTTON_WHEEL_DOWN]: + if (pending>=0 or context.visible) and not event.ctrl_pressed: + rotate_pending(1 if event.button_index==MOUSE_BUTTON_WHEEL_UP else -1) + else:g.camera.size=clampf(g.camera.size+(-1 if event.button_index==MOUSE_BUTTON_WHEEL_UP else 1),12,48) + return true + if event.button_index==MOUSE_BUTTON_RIGHT and build_mode: + cancel_placement();return true + if event.button_index==MOUSE_BUTTON_LEFT: + if build_mode and pending>=0:place(snap_to_grid(ground_point(event.position),pending,pending_turns));return true + if g.paused and not build_mode:return false + if not build_mode: + # Hit the visible mounted soul without opening any construction controls. + var picked=g.index_of(g.pick_soul(event.position)) + if picked>=0 and g.souls[picked].state=="ready": + var origin=g.souls[picked].origin_station + if g.player.position.distance_to(approach(stations[origin]))<2.5:sentences.pickup(g.souls[picked]) + else:message("Подойди ближе к душе.") + return true + if picked>=0 and g.souls[picked].get("state","")=="mounted": + var target=g.souls[picked].assigned + if target>=0 and target=0 and try_player_attach(i):return true + if not build_mode and stations[i].ready and g.player.position.distance_to(approach(stations[i]))<2.5: + var ready_index=g.index_of(stations[i].soul) + if ready_index>=0:sentences.pickup(g.souls[ready_index]) + return true + if not build_mode and stations[i].selected==0 and g.player.position.distance_to(approach(stations[i]))<2: + step_station(stations[i],0,true) + return true + context.hide();selected=-1 + if build_mode:return true + var id=g.pick_soul(event.position);var si=g.index_of(id) + if si>=0 and g.souls[si].get("state","")=="queue": + if g.player.position.distance_to(g.souls[si].node.position)>2.5:message("Подойди ближе к душе.");return true + if g.held>=0:drop_held() + sentences.pickup(g.souls[si]);message("Душа следует за тобой. Осталось: "+sentences.remaining_text(g.souls[si])) + elif g.held>=0:drop_held() + return true + return false + +func update(dt): + for imp in g.life.imps+g.life.neighbours:g.life.activities.sync_audio(imp) + if not g.game_started:return + for device in stations: + if device.has("special"): + for player in device.special.players:player.stream_paused=g.paused + if is_instance_valid(g.life.hero_bubble):g.life.hero_bubble.visible=not g.paused + if is_instance_valid(g.development.bubble):g.development.bubble.visible=not g.paused + if not build_mode:context.hide() + if build_mode and context.visible and selected>=0 and selectedHERO_INTERVAL:g.say(g.quips[g.rng.randi_range(0,g.quips.size()-1)]) + notice_time=maxf(0,notice_time-dt) + if notice_time<=0:notice.text="" + spawn_clock=0.0 if stations.is_empty() else minf(Economy.SPAWN_INTERVAL,spawn_clock+dt) + if spawn_clock>=Economy.SPAWN_INTERVAL and spawn():spawn_clock=0 + var queue=waiting() + var count=queue_load() + timer_label.text="Очередь: %d / 7%s\n%s" % [count," (1 в пути)" if g.held>=0 else "","Ворота ждут свободного места" if count>=QUEUE_CAPACITY else "Следующая душа через %.1f с" % (Economy.SPAWN_INTERVAL-spawn_clock)] + if stations.is_empty():timer_label.text="Установи первое орудие, чтобы появились души" + var target=.42 if count>=QUEUE_CAPACITY else 0.0 + darkness=move_toward(darkness,target,dt*.035);shade.color.a=darkness + pressure.text="ОЧЕРЕДЬ ЗАПОЛНЕНА\nУскорь работу цеха" if count>=QUEUE_CAPACITY else "" + update_pressure(dt,count) + for i in range(queue.size()): + var s=queue[i];s.entry_time+=dt + s.entering=s.entry_time<.7 + s.node.position=s.node.position.move_toward(queue_target(i,count),dt*2.5) + s.visual.position.y=.55+sin(g.time*2+s.phase)*.06 + g.set_soul_reveal(s.visual,minf(1,s.entry_time/.7)) + losses.queue_step(dt);losses.update_departures(dt) + update_soul_dialogue(dt) + g.gate_target=3.5 if not stations.is_empty() and spawn_clock<1.2 else 0 + g.gate.position.y=move_toward(g.gate.position.y,g.gate_target,dt*5) + g.stage_effects.update(dt);g.update_wisps(dt) + move_player(dt) + if g.held>=0: + var index=g.index_of(g.held) + if index>=0: + var s=g.souls[index] + sentences.follow_carrier(s,g.player.position,g.face,dt) + var candidates=range(stations.size()) + candidates.sort_custom(func(a,b):return g.player.position.distance_squared_to(approach(stations[a]))=0 and automation + step_station(s,dt,automatic or (manual and s.selected>0)) + g.life.update(dt) + for i in range(g.popups.size()-1,-1,-1): + var p=g.popups[i];p.ttl-=dt;p.node.position.y+=dt*.7 + if p.ttl<=0:p.node.queue_free();g.popups.remove_at(i) + +func move_player(dt): + var move=Vector2(float(Input.is_physical_key_pressed(KEY_D) or Input.is_physical_key_pressed(KEY_RIGHT))-float(Input.is_physical_key_pressed(KEY_A) or Input.is_physical_key_pressed(KEY_LEFT)),float(Input.is_physical_key_pressed(KEY_S) or Input.is_physical_key_pressed(KEY_DOWN))-float(Input.is_physical_key_pressed(KEY_W) or Input.is_physical_key_pressed(KEY_UP))) + var right=g.camera.global_basis.x;right.y=0;right=right.normalized() + var down=g.camera.global_basis.z;down.y=0;down=down.normalized() + var direction=(right*move.x+down*move.y).normalized() + var previous_position=g.player.position + var desired=g.player.position+direction*dt*(3.3+g.speed_level*.825) + desired.x=clampf(desired.x,-7.1,walk_right());desired.z=clampf(desired.z,-4.8,5.6) + mesh_walking.move_actor(g.player,desired-g.player.position) + if direction.length()>.01: + g.face=direction;g.avatar.rotation.y=lerp_angle(g.avatar.rotation.y,atan2(direction.x,direction.z),minf(1,dt*12)) + g.avatar.set_walking(g.player.position.distance_squared_to(previous_position)>.000001) + g.orbit.update(dt) + +func snapshot(): + var devices=[] + for s in stations:devices.append({"kind":s.selected,"x":s.device.position.x,"z":s.device.position.z,"turns":s.turns}) + return {"expansions":expansion_level,"unlock":unlock,"helpers":helpers.size(),"haste":helper_speed,"automation":automation,"diligence":helper_diligence,"pressure_time":pressure_time,"penalty_clock":penalty_clock,"stations":devices} + +func restore(saved): + expansion_level=clampi(int(saved.get("expansions",0)),0,3);g.architecture.growth.set_level(expansion_level);make_grid() + unlock=clampi(int(saved.get("unlock",0)),0,TITLES.size()-1) + helper_speed=clampi(int(saved.get("haste",0)),0,3) + automation=saved.get("automation",false)==true + helper_diligence=clampi(int(saved.get("diligence",0)),0,3) + pressure_time=clampf(float(saved.get("pressure_time",0)),0,300) + penalty_clock=clampf(float(saved.get("penalty_clock",0)),0,Economy.PENALTY_INTERVAL) + var devices=saved.get("stations",[]) + if devices is Array: + for record in devices: + if not record is Dictionary:continue + var kind=clampi(int(record.get("kind",0)),0,unlock) + var p=Vector3(float(record.get("x",0)),0,float(record.get("z",0))) + if not is_finite(p.x) or not is_finite(p.z):continue + var turns=wrapi(int(record.get("turns",0)),0,4) + if valid_position(p,kind,-1,turns):add_station(kind,p,turns) + for i in range(clampi(int(saved.get("helpers",0)),0,3)):add_helper() + rebuild_nav();refresh() + +func resume_saved(): + g.game_started=true;g.paused=false;g.hud.show();g.menu.show_page("") + if g.souls.is_empty():spawn() + message("Смена продолжается. Планировка и свита восстановлены.") + refresh() + +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="Первая душа уходит через 10 секунд ожидания. На орудии 10 секунд простоя вызывают сгорание. Каждый случай — штраф 50 золота." + var track=StyleBoxFlat.new();track.bg_color=Color("111719");track.border_color=Color("8c9690");track.set_border_width_all(1);track.set_corner_radius_all(3) + var fill=StyleBoxFlat.new();fill.bg_color=Color("5b8986");fill.border_color=Color("9eb5aa");fill.set_border_width_all(1);fill.set_corner_radius_all(3) + bar.add_theme_stylebox_override("background",track);bar.add_theme_stylebox_override("fill",fill) + g.development.refresh() + + +func update_pressure(_dt,count): + pressure_label.text="ОЧЕРЕДЬ %d / 7 · До ухода первой души: %.0f с · Штраф 50 золота"%[count,maxf(0,10-losses.waiting_time)] if count>0 else "" + +func build_area():return Vector2(AREA.x*pow(1.2,expansion_level),AREA.y) +func grid_area():return build_area().floor() +func walk_right():return 11.05+g.architecture.growth.extra_width(expansion_level) +func purchase_expansion(): + if not build_mode or expansion_level>=3 or g.coins<500:return false + var previous_extra=g.architecture.growth.extra_width(expansion_level) + g.coins-=500;expansion_level+=1;g.architecture.growth.set_level(expansion_level) + expansion_button.release_focus() + # Keep the current camera view while room-centering metadata changes. + g.orbit.pan.x-=(g.architecture.growth.extra_width(expansion_level)-previous_extra)*.35 + make_grid();grid.show();rebuild_nav() + refresh();g.save_progress();return true + +func station_at_screen(point): + var origin=g.camera.project_ray_origin(point);var ray=g.camera.project_ray_normal(point) + var hit=g.get_world_3d().direct_space_state.intersect_ray(PhysicsRayQueryParameters3D.create(origin,origin+ray*200,2)) + if not hit.is_empty(): + for i in range(stations.size()): + if stations[i].device.is_ancestor_of(hit.collider):return i + var p=ground_point(point) + for i in range(stations.size()-1,-1,-1): + if station_rect(stations[i]).has_point(Vector2(p.x,p.z)):return i + return -1 + +func free_floor(position): + var point=Vector2(position.x,position.z) + if not mesh_walking.blocked(point,.24):return position + var nearest=Vector3(-5.3,0,0);var best=INF + for x in range(nav.region.size.x): + for z in range(nav.region.size.y): + if nav.is_point_solid(Vector2i(x,z)):continue + var p=Vector3(-7.5+x*.5,0,-5+z*.5) + if p.x< -7.1 or p.x>walk_right() or p.z< -4.8 or p.z>5.6:continue + var distance=p.distance_squared_to(position) + if distance=0 and h.station=TIMEOUT: + remove_soul(s);s.state="departing";s.visual.unmount_station();s.visual.position.y=.55 + departures.append({"node":s.node,"visual":s.visual});fine(s.node.position);head=-1;waiting_time=0 +func update_departures(dt): + for i in range(departures.size()-1,-1,-1): + var d=departures[i];d.node.position=d.node.position.move_toward(EXIT,dt*3.7) + if d.node.position.distance_to(EXIT)<.08:d.node.queue_free();departures.remove_at(i) diff --git a/Demon_v0.19/workshop_tests.gd b/Demon_v0.19/workshop_tests.gd new file mode 100644 index 0000000..57a1523 --- /dev/null +++ b/Demon_v0.19/workshop_tests.gd @@ -0,0 +1,256 @@ +extends RefCounted +var check_number=0 +var failures=0 + +func check(condition): + check_number+=1 + if not condition: + failures+=1 + push_error('QA check failed #%d: ' % check_number+str(get_stack())) + Engine.get_main_loop().quit(1) + + +func tick(g,seconds): + for i in range(ceili(seconds*60)): + g.time+=1.0/60 + g.workshop.update(1.0/60) + +func clear_souls(g): + for s in g.souls:s.node.queue_free() + g.souls.clear();g.held=-1;g.workshop.losses.reset() + +func run(g): + g.set_process(false) + var w=g.workshop + check(g.paused and g.menu.current_page=="main") + g.start_game() + check(g.coins==240 and w.stations.is_empty() and g.souls.size()==1) + w.upgrade("hire");check(w.helpers.is_empty()) + g.essence=6;w.upgrade("hire");w.upgrade("hire") + check(w.helpers.size()==1 and g.coins==240 and g.essence==0) + w.reset() + w.toggle_build();check(w.grid.visible and g.paused) + w.begin_purchase(0) + var before_sound=w.build_player.stream + check(is_instance_valid(w.ghost) and w.stations.is_empty()) + check(w.ghost_material.render_priority>g.stage_effects.bokeh.material_override.render_priority) + w.pointer_position=g.camera.unproject_position(Vector3(0,.18,0));w.update_preview() + check(w.ghost.position==Vector3.ZERO and w.ghost_material.albedo_color.g>.8) + w.pointer_position=g.camera.unproject_position(Vector3(-6,.18,-4));w.update_preview() + check(w.ghost_material.albedo_color.r>.9 and g.coins==240) + check(not w.place(Vector3(-7,0,-3))) + check(w.build_player.stream==before_sound) + check(g.coins==240) + check(w.place(Vector3(0,0,0))) + check(w.build_player.stream==w.PLACE_SOUND) + check(g.coins==200 and w.stations.size()==1) + w.begin_purchase(0);check(not w.place(Vector3(0,0,0))) + check(w.place(Vector3(3,0,0))) + check(g.coins==160 and w.accessible()) + check(not w.valid_position(Vector3(6,0,-4),0)) + check(w.snap_to_grid(Vector3(.2,0,.2),0)==w.snap_to_grid(Vector3(.3,0,.3),0)) + w.selected=0;w.begin_move();check(w.moving==0) + check(is_instance_valid(w.ghost) and not w.stations[0].device.visible) + w.cancel_placement() + check(w.stations[0].device.visible and w.stations[0].device.position==Vector3.ZERO and not is_instance_valid(w.ghost)) + w.selected=0;w.begin_move() + check(w.place(Vector3(0,0,3))) + check(g.coins==160 and w.stations[0].device.position==Vector3(0,0,3)) + var count=g.souls.size();tick(g,5);check(g.souls.size()==count) + w.toggle_build();check(not w.grid.visible and not g.paused) + print("PASS: starting budget, grid, snapping, bounded placement, overlap rejection, approach paths, free move, construction freezes time") + tick(g,32.1) + check(w.waiting().size()>0 and w.waiting().size()<7 and w.penalty_gold_lost>0) + clear_souls(g) + for i in range(7): + w.spawn();var queued=g.souls.back();queued.entering=false;queued.entry_time=1;queued.node.position=w.queue_target(i,7) + w.spawn_clock=5 + check(g.souls.size()==7 and w.waiting().size()==7) + for i in range(7):check(g.souls[i].node.position.is_equal_approx(w.queue_target(i,7))) + check(not w.spawn()) + g.held=g.souls[0].id;g.souls[0].state="held" + check(w.queue_load()==7 and not w.spawn()) + w.drop_held();check(w.waiting().size()==7) + tick(g,3.1);check(w.darkness>0 and w.waiting().size()==7) + var darkness=w.darkness + g.set_pause(true);tick(g,10);check(w.waiting().size()==7 and is_equal_approx(w.darkness,darkness));g.set_pause(false) + clear_souls(g);tick(g,1);check(w.darkness=0 and w.stations[1].soul>=0) + check(g.souls.all(func(s):return s.state=="mounted")) + check(w.helpers.all(func(h):return h.state=="idle")) + w.selected=0;w.begin_move();check(not w.build_mode) + w.delete_selected();check(w.stations.size()==2) + print("PASS: helpers walk navigable paths, reserve FIFO souls and distinct free devices, deliver; occupied/reserved devices cannot move or delete") + var before=g.done + for s in w.stations: + w.step_station(s,1,false) + for i in range(5):w.step_station(s,.5,true) + check(g.done==before+2 and g.coins==1024) + check(w.stations.all(func(s):return s.cooldown>0)) + for s in w.stations:w.step_station(s,3,false) + w.toggle_build();w.selected=1;w.delete_selected();w.toggle_build();check(w.stations.size()==1 and g.coins==1044) + check(w.build_player.stream==w.REMOVE_SOUND) + print("PASS: independent apparatus completion, rewards, burn cooldown, half-price deletion refund") + clear_souls(g) + for s in w.stations:w.dispose_station(s) + w.stations.clear();w.bars.clear() + for kind in [1,2,3]: + g.development.xp=0 + var d=w.add_station(kind,Vector3(1,0,0)) + w.spawn();var s=g.souls.back();s.entering=false + w.attach(s,0);w.step_station(d,1,false) + if kind==1: + w.step_station(d,1.1,true);check(d.stage==1) + w.step_station(d,1,true);w.step_station(d,.1,false);check(d.elapsed==0) + w.step_station(d,2.01,true) + elif kind==2:w.step_station(d,5.01,true) + else: + w.step_station(d,.36,true);check(d.stage==1) + w.step_station(d,3.01,true);check(d.cooldown>2) + check(d.soul==-1) + w.dispose_station(d);w.stations.clear();w.bars.clear() + print("PASS: rack tension and continuous hold, wheel rotation, maiden closing/heating and locked burning") + g.essence=9;w.upgrade("haste");w.upgrade("auto");check(w.helper_speed==1 and w.automation) + var dev=w.add_station(0,Vector3(0,0,0));w.rebuild_nav() + w.spawn();g.souls.back().entering=false;g.souls.back().entry_time=1 + for h in w.helpers:h.state="idle";h.soul=-1;h.station=-1 + await g.get_tree().physics_frame + await g.get_tree().physics_frame + for i in range(2400): + w.update_helpers(1.0/60);w.step_station(dev,1.0/60,dev.operator>=0) + check(dev.soul==-1 and g.souls.is_empty()) + var snap=g.progress_snapshot();check(snap.workshop.stations.size()==1 and snap.workshop.helpers==2 and snap.workshop.automation) + check(g.Progression.decode(snap,g.build_id).workshop.helpers==2) + check(g.Progression.write_save("user://qa_workshop_v013.json",snap)==OK) + var restored=g.Progression.read_save("user://qa_workshop_v013.json",g.build_id) + DirAccess.remove_absolute(ProjectSettings.globalize_path("user://qa_workshop_v013.json")) + w.reset();w.restore(restored.workshop) + check(w.stations.size()==1 and w.helpers.size()==2 and w.automation and w.helper_speed==1) + w.toggle_tree();check(w.tree.visible and g.paused and w.node_buttons.size()==14 and w.node_buttons.all(func(n):return not n.key.begins_with("tool"))) + w.toggle_tree();check(not g.paused) + test_rotation(g) + g.reset_shift();check(w.stations.is_empty() and w.helpers.is_empty() and g.coins==240 and w.unlock==0) + print("PASS: soul-funded helper upgrades, autonomous operation after training, layout save schema, three-column skill tree, clean new game") + if failures==0:print("ALL WORKSHOP TESTS PASSED — DEMON 0.19") + g.get_tree().quit(1 if failures else 0) + +func test_rotation(g): + var w=g.workshop + w.reset();g.coins=1000;w.unlock=3;w.toggle_build();w.begin_purchase(1) + var coins=g.coins + for i in range(4):w.rotate_pending(1) + check(w.pending_turns==0 and g.coins==coins) + w.rotate_pending(1) + check(w.footprint(1,1)==Vector2i(4,3) and is_equal_approx(w.ghost.rotation.y,PI/2)) + var p=w.snap_to_grid(Vector3(1,0,.5),1,w.pending_turns) + check(w.place(p)) + var d=w.stations[0] + check(d.turns==1 and is_equal_approx(d.device.rotation.y,PI/2)) + check(w.approach(d).is_equal_approx(p+Vector3(2.55,0,0))) + check(w.station_rect(d).size==Vector2(4,3) and w.accessible()) + w.selected=0;w.begin_move();w.rotate_pending(-1);w.cancel_placement() + check(d.turns==1 and is_equal_approx(d.device.rotation.y,PI/2) and d.device.visible) + w.selected=0;w.begin_move();w.rotate_pending(1) + check(w.place(Vector3(1.5,0,0))) + check(d.turns==2 and w.station_rect(d).size==Vector2(3,4)) + var saved=w.snapshot() + w.toggle_build();w.reset();w.restore(saved) + check(w.stations[0].turns==2 and is_equal_approx(w.stations[0].device.rotation.y,PI)) + print("PASS: four wheel orientations, rotated footprint and approach, navigation, cancel/commit, saved orientation; placement/deletion sound routing") + +func click(g,control): + await g.get_tree().process_frame + var p=control.get_global_rect().get_center() + var motion=InputEventMouseMotion.new();motion.position=p;motion.global_position=p;Input.parse_input_event(motion) + var event=InputEventMouseButton.new();event.position=p;event.global_position=p;event.button_mask=MOUSE_BUTTON_MASK_LEFT;event.button_index=MOUSE_BUTTON_LEFT;event.pressed=true + Input.parse_input_event(event) + await g.get_tree().process_frame + event=InputEventMouseButton.new();event.position=p;event.global_position=p;event.button_index=MOUSE_BUTTON_LEFT;event.pressed=false;Input.parse_input_event(event) + await g.get_tree().process_frame + +func run_ui(g): + await g.get_tree().create_timer(.3).timeout + await click(g,g.menu.main_start) + check(g.game_started and not g.paused) + await click(g,g.workshop.build_button) + check(g.workshop.build_mode and g.workshop.grid.visible) + await click(g,g.workshop.buy_buttons[0]);check(g.workshop.pending==0) + var p=g.camera.unproject_position(Vector3(0,.18,0)) + var zoom=g.camera.size + var wheel=InputEventMouseButton.new();wheel.position=p;wheel.global_position=p;wheel.button_index=MOUSE_BUTTON_WHEEL_UP;wheel.pressed=true + Input.parse_input_event(wheel);await g.get_tree().process_frame + check(g.workshop.pending_turns==1 and is_equal_approx(g.camera.size,zoom)) + var motion=InputEventMouseMotion.new();motion.position=p;motion.global_position=p;Input.parse_input_event(motion) + var e=InputEventMouseButton.new();e.position=p;e.global_position=p;e.button_mask=MOUSE_BUTTON_MASK_LEFT;e.button_index=MOUSE_BUTTON_LEFT;e.pressed=true + Input.parse_input_event(e);await g.get_tree().process_frame + e=InputEventMouseButton.new();e.position=p;e.button_index=MOUSE_BUTTON_LEFT;e.pressed=false;Input.parse_input_event(e);await g.get_tree().process_frame + check(g.workshop.stations.size()==1) + p=g.camera.unproject_position(Vector3(0,.18,0));g.get_viewport().warp_mouse(p) + await g.get_tree().process_frame + motion=InputEventMouseMotion.new();motion.position=p;motion.global_position=p;Input.parse_input_event(motion) + e=InputEventMouseButton.new();e.position=p;e.global_position=p;e.button_index=MOUSE_BUTTON_LEFT;e.pressed=true;Input.parse_input_event(e) + await g.get_tree().create_timer(1.1).timeout + check(g.workshop.moving==0 and g.workshop.drag.strip.visible) + check(is_instance_valid(g.workshop.ghost) and not g.workshop.stations[0].device.visible) + var motion_target=g.camera.unproject_position(Vector3(2,.18,3)) + var movement=InputEventMouseMotion.new();movement.position=motion_target;movement.global_position=motion_target + Input.parse_input_event(movement);await g.get_tree().process_frame + check(g.workshop.ghost.position==g.workshop.snap_to_grid(Vector3(2,0,3),0)) + var key=InputEventKey.new();key.keycode=KEY_ESCAPE;key.pressed=true;Input.parse_input_event(key);await g.get_tree().process_frame + check(g.workshop.pending==-1 and g.workshop.stations.size()==1) + check(g.workshop.stations[0].device.visible and not is_instance_valid(g.workshop.ghost)) + e=InputEventMouseButton.new();e.position=p;e.button_index=MOUSE_BUTTON_LEFT;e.pressed=false;Input.parse_input_event(e);await g.get_tree().process_frame + await click(g,g.workshop.build_button) + var w=g.workshop;var d=w.stations[0] + w.click_station(0);check(not w.context.visible) + w.attach(g.souls[0],0);d.placement=0;g.souls[0].node.position=d.device.position + g.player.position=w.approach(d) + for i in range(5): + await click_world(g,g.camera.unproject_position(d.device.position+Vector3(0,1,0))) + check(not w.context.visible and not w.build_mode and not g.paused and w.pending<0) + w.step_station(d,.5,false) + check(g.done==1 and d.soul==-1) + w.step_station(d,3,false) + await click(g,w.build_button) + g.workshop.click_station(0) + var build_mouse=preload("res://building_tests.gd").new() + await build_mouse.mouse(g,g.camera.unproject_position(d.device.position+Vector3(0,.18,0)),true) + w.update(1.01) + await build_mouse.mouse(g,Vector2(800,g.get_viewport().get_visible_rect().size.y-4),false) + check(g.workshop.stations.is_empty() and g.coins==232) + await click(g,g.workshop.build_button);check(not g.paused) + g.essence=6;g.workshop.toggle_tree();await g.get_tree().process_frame + check(g.workshop.tree.visible) + await click(g,g.workshop.node_buttons.filter(func(n):return n.key=="hire")[0].button) + check(g.workshop.helpers.size()==1) + g.workshop.toggle_tree() + g.set_pause(true);check(g.menu.current_page=="pause") + print("PASS: actual mouse input buys/places a device, one-second hold moves, Esc cancels, build button resumes, grimoire recruits helper, pause opens") + print("PASS: five clicks on mounted soul complete work without construction/context UI; mesh follows pointer, cancellation restores original") + g.get_tree().quit() + +func click_world(g,p): + var motion=InputEventMouseMotion.new();motion.position=p;motion.global_position=p;Input.parse_input_event(motion) + for pressed in [true,false]: + var event=InputEventMouseButton.new();event.position=p;event.global_position=p;event.button_index=MOUSE_BUTTON_LEFT;event.pressed=pressed + event.button_mask=MOUSE_BUTTON_MASK_LEFT if pressed else 0 + Input.parse_input_event(event) + await g.get_tree().process_frame diff --git a/Demon_v0.19/world_detail.gd b/Demon_v0.19/world_detail.gd new file mode 100644 index 0000000..edb5757 --- /dev/null +++ b/Demon_v0.19/world_detail.gd @@ -0,0 +1,112 @@ +extends RefCounted +var g + +func stone(game, pos: Vector3, size: Vector3, color: Color, bevel=0.08): + # Beveled stone blocks: broad dark sides and worn, light-catching edges. + g=game + var st=SurfaceTool.new() + st.begin(Mesh.PRIMITIVE_TRIANGLES) + var hx=size.x/2 + var hz=size.z/2 + var y=size.y/2 + var top=[Vector3(-hx+bevel,y,-hz+bevel),Vector3(hx-bevel,y,-hz+bevel),Vector3(hx-bevel,y,hz-bevel),Vector3(-hx+bevel,y,hz-bevel)] + var rim=[Vector3(-hx,y-bevel,-hz),Vector3(hx,y-bevel,-hz),Vector3(hx,y-bevel,hz),Vector3(-hx,y-bevel,hz)] + var bottom=[Vector3(-hx,-y,-hz),Vector3(hx,-y,-hz),Vector3(hx,-y,hz),Vector3(-hx,-y,hz)] + quad(st,top[0],top[3],top[2],top[1]) + for i in range(4): + var j=(i+1)%4 + quad(st,top[i],top[j],rim[j],rim[i]) + quad(st,rim[i],rim[j],bottom[j],bottom[i]) + var n=g.mesh_node(g,st.commit(),pos,color) + n.material_override.cull_mode=BaseMaterial3D.CULL_DISABLED + return n + +func quad(st,a,b,c,d): + var normal=(b-a).cross(c-a).normalized() + for p in [a,c,b,a,d,c]: + st.set_normal(normal) + st.add_vertex(p) + +func dress_world(game): + g=game + # A real animated lava lake underneath the raised playable island. + var plane=PlaneMesh.new() + plane.size=Vector2(90,90) + var lava=g.mesh_node(g,plane,Vector3(0,-8.5,-5),Color("bb3516")) + var lava_material=ShaderMaterial.new() + lava_material.shader=load("res://lava.gdshader") + lava.material_override=lava_material + # Layered stone foundations, but the top stays collision-free. + for side in [-1,1]: + for z in range(-6,7,2): + stone(g,Vector3(side*7.7,-1.25,z-0.3),Vector3(0.85,1.5,1.85),Color("342b35"),0.10) + g.cylinder(g,Vector3(side*7.7,-2.5,z-0.3),0.65,1.7,Color("2b2530"),0.20) + for x in range(-7,8,2): + stone(g,Vector3(x,-1.3,6.2),Vector3(1.85,1.5,0.75),Color("342b35"),0.10) + # A few fixed chains and iron-tipped posts on the perimeter. + for x in [-7.55,7.55]: + for z in [-3.8,0,3.8]: + post(Vector3(x,0,z)) + for z in [-3.8,0]: chain(Vector3(x,0.9,z),Vector3(x,0.9,z+3.8)) + for x in [-5.5,-2.5,0.5,3.5]: + post(Vector3(x,0,6.05)) + if x<3.5:chain(Vector3(x,0.9,6.05),Vector3(x+3,0.9,6.05)) + # Banner on the right is a solid silhouette against the lava. + for side in [-1,1]: + var x=5.5+side*1.0 + stone(g,Vector3(x,1.75,-5.9),Vector3(0.45,3.5,0.5),Color("51414a"),0.07) + g.cylinder(g,Vector3(x,3.7,-5.9),0.22,0.6,Color("24212a"),0) + g.box(g,Vector3(5.5,3.32,-5.9),Vector3(2.6,0.20,0.30),Color("6c4a38")) + g.box(g,Vector3(5.5,2.4,-5.82),Vector3(1.45,1.8,0.07),Color("8e2735")) + g.cylinder(g,Vector3(5.5,1.25,-5.82),0.05,0.65,Color("8e2735"),0.72) + # Horned emblem on the cloth. + g.ball(g,Vector3(5.5,2.45,-5.74),Vector3(0.55,0.62,0.07),Color("39232c")) + for side in [-1,1]: + var horn=g.cylinder(g,Vector3(5.5+side*0.24,2.83,-5.74),0.14,0.38,Color("39232c"),0) + horn.rotation.z=-side*0.45 + # Comic workplace paddle stand and oversized cogwheels. + for x in [3.9,4.5]: + g.cylinder(g,Vector3(x,0.55,2.5),0.12,1.1,Color("55414a")) + g.box(g,Vector3(4.2,1.1,2.5),Vector3(1.1,0.15,0.3),Color("8d6652")) + g.line(g,Vector3(4.2,1.15,2.5),Vector3(4.2,2.05,2.5),0.055,Color("513740")) + g.ball(g,Vector3(4.2,2.15,2.5),Vector3(0.34,0.40,0.12),Color("a55b49")) + gear(Vector3(4.3,0.45,3.6),0.5) + gear(Vector3(5.25,0.4,3.6),0.36) + # Far cliffs break the empty background into a dungeon skyline. + for i in range(15): + var angle=i*TAU/15 + var p=Vector3(cos(angle)*19,-3,sin(angle)*18-7) + var h=1.5+g.rng.randf()*3.5 + var mesh=CylinderMesh.new() + mesh.radial_segments=5 + mesh.top_radius=0.4 + mesh.bottom_radius=1.1+g.rng.randf()*0.7 + mesh.height=h + g.mesh_node(g,mesh,p,Color("342630")) + +func post(p): + stone(g,p+Vector3(0,0.15,0),Vector3(0.40,0.30,0.40),Color("5e4245"),0.05) + g.cylinder(g,p+Vector3(0,0.65,0),0.085,0.95,Color("332936")) + g.cylinder(g,p+Vector3(0,1.28,0),0.14,0.40,Color("332936"),0) + g.ball(g,p+Vector3(0,1.01,0),Vector3.ONE*0.20,Color("bd8855")) + +func chain(a,b): + for i in range(14): + var t=float(i)/13 + var p=a.lerp(b,t)-Vector3.UP*sin(t*PI)*0.35 + var link=g.torus(g,p,0.065,Color("4c3d43")) + link.material_override=g.mat(Color("4c3d43")) + link.rotation=Vector3(PI/2,0,PI/2 if i%2 else 0) + link.scale=Vector3(1.2,0.8,1) + +func gear(p,r): + var n=Node3D.new() + g.add_child(n) + n.position=p + var hub=g.cylinder(n,Vector3.ZERO,r,0.16,Color("7d6255")) + hub.rotation.x=PI/2 + for i in range(10): + var a=i*TAU/10 + var tooth=g.box(n,Vector3(cos(a)*r,sin(a)*r,0),Vector3(0.16,0.20,0.20),Color("9c7456")) + tooth.rotation.z=a + g.moving_gears.append(n) diff --git a/HANDOFF.md b/HANDOFF.md new file mode 100644 index 0000000..2e59859 --- /dev/null +++ b/HANDOFF.md @@ -0,0 +1,88 @@ +# Handoff — Diabolo / DEMON + +Обновлено: 2026-10-28. Рабочая версия: `Demon_v0.19`. + +## С чего продолжать + +- Актуальные исходники, ассеты и тесты: `Demon_v0.19/`. +- Движок: Godot 4.3 stable. Git-ветка: `main`. +- Репозиторий: https://gt.arcade.4bqb.com/jariko/Diabolo.git +- Большие `.glb` хранятся в Git LFS. После клонирования выполнить `git lfs pull`. +- Старые папки версий, ZIP, готовые Windows-сборки, движок и кэш остаются локально. + Имеющаяся локальная сборка EXE устарела относительно исходников. +- Для запуска текущего состояния открывать `Demon_v0.19/project.godot`. + Инструкции сборки и запуска — в `README.md`. + +## Последние выполненные задачи + +- Из комнаты убраны декоративные столы, полки, трубы и мелкий реквизит. + Осталось шесть жаровен: четыре по углам, две у центров противоположных стен. + Симметрия, свет и огонь сохраняются на всех трёх расширениях. +- В пустой мастерской души не появляются. После установки первого орудия + начинается отсчёт пяти секунд. При отсутствии станков таймер стоит, + ворота закрыты, интерфейс предлагает установить первое орудие. +- По последней просьбе пользователя полностью удалена прокрутка камеры + при наведении мыши на края экрана. Следование за суккубой сохранено. + В строительстве работают WASD и средняя кнопка мыши. +- Реплики помещаются в компактное окошко одной строкой. Убраны принудительная + высота, перенос после имени и пустое место снизу; позиция учитывает размер окна. + +## Важное поведение и исправления + +- Каждой душе назначается ровно одно орудие. После его завершения душа сгорает: + скрытие на 1,7 секунде, удаление тела и эффекта на 2 секунде. +- `workshop.update()` должен вызывать `g.life.update(dt)` один раз за кадр, + вне цикла станков и условий видимости контекстного окна. Ошибка отступа здесь + уже замораживала сгорание и демонят. Для проверки нужен реальный игровой цикл, + а не только прямые вызовы обновления в тесте. +- Поднять орудие: удерживать ЛКМ одну секунду (есть круговой индикатор). + Затем мышь можно отпустить; следующий клик ставит орудие. + Наведение на нижнюю красную полосу продаёт его без клика. + Название и кнопка удаления при переносе не показываются. +- Сетка строительства содержит только полные метровые клетки. + Расширение сохраняет вид камеры и не ограничивает её старыми границами. +- В прокачке нет улучшений характеристик орудий. Уровни навыков отмечены + рубинами; изученные карточки сохраняют яркость. Текст карточек центрирован. +- Неоткрытые орудия в каталоге строительства затемнены. +- Модели суккубов используют `art/succubus/succubus_v02.glb`; + мужчины-души — `art/souls_v04`. Исходные варианты сохранены для переработки. +- Души плавно поворачиваются к носителю, следуют с левитацией и движением + опущенных рук; короткие лоскуты ткани колышутся в полёте. +- Походка демонят привязана к пройденному расстоянию с фиксацией опорной ноги. + Есть периодические занятия: уборка орудий, мытьё пола, рисунок и напевание. +- Реплики душ сейчас отключены (`dialogue.souls_enabled=false`). + +## Проверки + +Последние прогоны до первоначального переноса в Git: + +| Проверка | Результат | +| --- | --- | +| `--test-camera-controls` | PASS после удаления краевой прокрутки и изменения реплик | +| `--test-economy` | PASS, 249 проверок, включая отсутствие душ до первой постройки | +| `--test-room-decor` | PASS, шесть жаровен и симметрия при всех расширениях | + +До последних небольших правок также проходили проверки строительства, +расширений, рубинов, сгорания в реальном цикле, полёта душ и походки демонят. +Это не означает, что весь старый набор тестов повторно прогнан на текущем состоянии. +Часть старых сценариев может предполагать душу сразу после старта; теперь нужно +сначала установить орудие и дождаться спавна. + +```powershell +& tools/godot/Godot_v4.3-stable_win64_console.exe --path Demon_v0.19 -- --test-camera-controls +& tools/godot/Godot_v4.3-stable_win64_console.exe --path Demon_v0.19 -- --test-economy +``` + +Графические проверки запускать с обычным рендерером. В `--headless` dummy renderer +выдаёт ошибки для этих моделей. Скриншоты и логи генерируются локально и игнорируются Git. + +## Дальнейшая работа + +Обновлять этот файл в том же коммите, что и изменения: текущее состояние, +проверенные результаты, известные ограничения и незавершённая работа. +Подробная история предыдущих задач — `PROJECT_NOTES.md`. +На момент переноса незавершённых игровых правок нет. Первый коммит подготовлен, +но HTTPS push остановился на отсутствии сохранённых учётных данных сервера +(`could not read Username`). Нужна локальная авторизация Git пользователя, +после неё — `git push -u origin main` и проверка доступности Git/LFS с сервера. +Факт создания локального коммита пока не означает публикацию на сервере. diff --git a/PROJECT_NOTES.md b/PROJECT_NOTES.md new file mode 100644 index 0000000..c062b70 --- /dev/null +++ b/PROJECT_NOTES.md @@ -0,0 +1,251 @@ +# Рабочие договорённости + +- Делать Windows-билды и новые архивы сборок только по прямой просьбе пользователя. Обычные изменения исходников и проверки не означают разрешение на экспорт. +- Каждому явно заказанному новому билду назначается новый ID; прогрессия между билдами сбрасывается. +- Текущие согласованные звуки: плеть, Cemetery Drones (заменяет MP4-эмбиент), мужской и женский стон при сгорании. Другие звуки не добавлять без запроса. + +## Текущее состояние 0.9 + +- Исходники: Demon_v0.9. Новая локация, модели, материалы, UI и вращение камеры при зажатой средней кнопке мыши. +- Пользователь остановил сборку: «пока не собирай, будут еще правки». Не экспортировать и не упаковывать новые сборки до отдельной просьбы. +- Экспорт EXE в Demon_v0.9_Windows успел завершиться до отмены. Это промежуточный результат, не выданный релиз. Архивы 0.9 не созданы. +- По детализации реализация пока проще утверждённых концептов art_direction/v09. Пользователю показан настоящий кадр captures/workshop.png. + +## Продолжение 0.10 + +Пользователь снова явно разрешил билд: «сразу делай билд, будем смотреть». Текущая работа: Demon_v0.10; повысить насыщенность сцены, детализацию, заменить местных мини-суккуб чертятами и добавить анимированных чертят в соседние цеха. + +## Модель суккубы для утверждения + +- Новый запрос: переработать только суккубу, женственная анатомия, высокая детализация, плеть в руке, анимации. Билд явно запрещён до следующей просьбы. +- Работа ведётся отдельно: character_studio/succubus_v01. Настоящая модель Blender с CC0-основой MakeHuman, оригинальными аксессуарами и клипами Idle / Walk / Whip. +- Игровой проект 0.10 не изменяется. Сначала показать статичные рендеры и GIF для утверждения. + +## Билд 0.11 + +Пользователь явно запросил желоба для лавы и новый билд, затем отдельно подтвердил включение утверждённой модели суккубы. В Demon_v0.11 добавлены шесть каменных желобов и игровой GLB из character_studio/succubus_v01 с клипами Idle / Walk / Whip. + +0.11 проверен в Godot и финальном EXE: новая суккуба, три клипа, пауза, шесть желобов, меню, F5, механизмы, аудио. Итоговый build ID: 0.11-d0179acd92f705d3b21f4649. Артефакты: Demon_v0.11_Windows.zip и Demon_v0.11_Source.zip. + +## Рабочие изменения после 0.11 — 27 октября 2026 + +Рабочая папка остаётся Demon_v0.11. Это новые изменения исходников, НЕ новый релиз. Старые Windows-папка и ZIP 0.11 не изменены. Пользователь не просил новый билд; экспортировать только по отдельной просьбе. + +- Исправлен Walk суккубы: сгиб колена до ~69 градусов, перенос стопы, противофазный мах рук и локти. Источник character_studio/succubus_v01/succubus_walk_v02.blend; fix_walk.py воспроизводит и экспортирует GLB. Оригинальная утверждённая модель сохранена. +- Все десять душ теперь отдельные анатомические модели CC0 MakeHuman с одеждой/атрибутами категорий, 166 костями, Idle/Float/Walk/Rack/Wheel/Maiden. Генератор character_studio/build_souls.py; Blender-исходники character_studio/souls_v01; игровые GLB art/souls. Коррупционер: костюм, галстук, портфель, деньги; остальные сохраняют свои предметы. +- Души парят вертикально в Float, после одного клика следуют за суккубой без удержания ЛКМ, автоматически укладываются/ставятся на станцию за 0.8 секунды. Во время размещения работу начать нельзя. +- Спектральный шейдер сохраняет текстуры/цвета всех поверхностей, свечение контура, пульсацию и частицы. Не используется обычная альфа-прозрачность тела: она давала артефакты сортировки многослойной одежды. +- stage_effects.gd: сильное боке вне прямоугольника главной комнаты, глубинная маска в мировых координатах, свечение призыва. В focus_bokeh.gdshader применяется inverse(PROJECTION_MATRIX), т.к. INV_PROJECTION_MATRIX для ортографической камеры сломан в Godot 4.3 (официальный issue #68878). +- Решётка ворот отсекается шейдером выше y=3.70 и больше не торчит над аркой. Коллизии орудий в separation.gd работают и без души. +- Новая игра всегда очищает прогрессию, души, навыки, станцию, эффекты; пауза/Продолжить сохраняет текущую смену. Настройки звука отдельно и не сбрасываются. +- Единая шкала на душу: дыба 1с натяжение + 2с удержание в одном заполнении, колесо 5с, дева .35с закрытие + 3с нагрев, шлепки 5 ударов. Повторная награда исключена. Завершённая шкала ненадолго остаётся на 100%. +- По новому прямому запросу разрешены звуки реплик: 22 оригинальных процедурных варианта бурчания (11 характеров x 2), основаны на ранее согласованном soul_grumble_01.wav и его генераторе. audio/make_dialogue.py воспроизводит их; dialogue.gd синхронизирует с облачками, одна очередь, громкость голосов, пауза. Суккуба — мягкий женский придыхательный тембр; души различаются высотой/шероховатостью. Это синтезированные нечленораздельные звуки, не запись актёров. +- Встроены кириллические Kelly Slab и Ruslan Display (OFL), усилены готические рамки, выровнены панели, убраны лишние инструкции/надписи. +- Проверки: interaction-tests-final.log (механики), interaction-ui.log (настоящий ввод), interaction-audio.log (воспроизведение), character-review.log (скелеты/мах рук/колени). Кадры captures/, GIF ходьбы character_studio/succubus_v01/renders_v02/walk.gif. + +## Релиз 0.12 — 27 октября 2026 + +Пользователь явно запросил «собери билд». Все рабочие изменения перенесены в Demon_v0.12, текущую папку проекта для дальнейшей работы. Windows-релиз: Demon_v0.12_Windows/Demon.exe. Build ID: 0.12-bb72ab583ddcb4fd69e73de5. Старый релиз 0.11 сохранён. + +Готовый EXE прошёл --test-mode, --test-ui, --test-audio и --capture без ошибок. Подтверждены новая игра со сбросом, левитация, автоматическое размещение, коллизии пустых орудий, единая шкала, 22 голоса, меню и управление. Архивы Windows и исходников создаёт tools/release_v12.py package с проверкой ZIP CRC и SHA256. Повторная сборка: tools/build_v12.ps1. Авторские Blender-генераторы пока экспортируют в Demon_v0.11: при следующих изменениях моделей явно обновить DEST на текущую Demon_v0.12. + +## Получены исходники 0.19 — 27 октября 2026 + +- Пользователь передал Demon_v0.19_Source.zip с другого ПК. Распаковано в Demon_v0.19; это актуальная база для следующих правок. Старые версии сохранены. +- Скрипты из корневой папки tools архива сохранены отдельно в imported_v0.19/tools, без замены местных инструментов. +- По README_RU.md и BALANCE.md: строительство по сетке, шесть типов орудий, помощницы, составные наказания, минимальный HUD, новая походка с исправлением накопления наклона, экономика золото/души/опыт, уровни 1–10 и штрафы за полную очередь. +- В доступной прочитанной истории последняя местная версия — 0.12. Изменения 0.13–0.19 восстановлены по переданному проекту. README_0.13.md содержит старые цифры; актуальный баланс описан в BALANCE.md и economy.gd. +- Проведено чтение и сравнение исходников: 16 изменённых и 29 новых файлов кода/сцен относительно 0.12. Запуск игры и тесты 0.19 при приёме не выполнялись; утверждения о QA в архиве не означают локальную проверку. +- Новый билд не запрошен. + +## Рабочие правки после приёма 0.19 + +- Ходьба героини и помощниц: mesh_walking.gd создаёт физические trimesh-коллизии из видимых мешей орудий; капсула выполняет swept movement со скольжением. Повороты и движущиеся части наследуют трансформы мешей. Жидкость, эффекты и мелкие крепления исключены. Сетка сохранена для строительства/маршрутизации; препятствия для маршрутов получаются из геометрии компонентов, вместо строительных прямоугольников. +- Убраны хвостики-стрелки из реплик героини и душ. +- ghost.gdshader: полупрозрачность с depth prepass, холодный спектральный цвет, светящийся контур, растворение ног и мягкое колебание. Усилены семь шлейфов на душу, отключена твёрдая тень. Прозрачные материалы рисуются после bokeh; шумовая alpha hash отвергнута после просмотра кадров. +- Крепления рук/ног на дыбе, колесе и стуле заменены широкими кожаными манжетами с тонкими швами и тёмными пряжками. leather_cuff.gd / leather.gdshader. Декоративный металл прочих частей сохранён. +- Изученные чертежи/навыки и ветки с купленными рангами приглушены. Покупка следующих рангов остаётся доступной. +- Проверки на Vulkan: changes-mesh.log, changes-final-sentences.log, changes-final-hud.log — PASSED. Проверены реальные sweep/slide, свободная часть клеток, поворот и удаление коллизий, реплики без стрелок и приглушение навыков. Кадры captures/v013 просмотрены. Headless dummy renderer давал ошибки mesh_get_surface_count, поэтому финальные проверки выполнены с настоящим рендерером. +- Это изменения исходников 0.19; новый экспорт/ZIP не запрошен и не создавался. + +## Исправлен приоритет доставки душ — 0.19 + +- Резерв орудия помощницей больше не запрещает ручную установку: если героиня доставила совместимую душу к пустому готовому орудию первой, ручная установка получает приоритет. +- Помощница освобождает старый резерв и выбирает ближайшее свободное подходящее орудие; её путь сбрасывается. При отсутствии альтернатив сохраняет свою душу и ждёт, затем повторяет поиск. Занятое орудие перехватывать нельзя. +- Единый try_player_attach используется для авторазмещения и клика по орудию; зона доставки расширена с 1.1 до 1.5 для новых mesh-коллизий. Из нескольких близких устройств сначала проверяется ближайшее. held очищается только после успешной установки. +- Добавлен --test-priority / delivery_priority_tests.gd. На Vulkan прошли priority-priority.log и priority-sentences.log: перехват резерва до/после подбора помощницей, альтернативный маршрут, ожидание/возобновление, запрет перезаписи занятого орудия, отсутствие потери/дублирования душ; прежние цепочки и помощницы также проходят. + +## Варианты душ и интерфейс по новым референсам + +- Пользователь запросил проработку моделей/естественных анимаций душ и GIF для выбора, как ранее для суккубы. Затем дал конкретный ориентир качества: детальная женская призрачная фигура, длинные волосы, рваное многослойное платье. Референс сохранён в art_direction/souls_quality_reference_2026-10-27.png. +- Первые A/B/C в character_studio/souls_review_v02 были упрощёнными исследованиями и после уточнения больше не являются предлагаемым направлением. +- Новый отдельный образец: character_studio/ghost_soul_v01/spectral_soul_v01.blend. Настоящая 3D-модель на взрослой CC0 MakeHuman основе и существующем 166-костном скелете, три слоя ткани с модельными складками/разрывами, 688 отдельных прядей/локонов, швы и вышивка. Скрипт create_model.py воспроизводит. Это промежуточный образец направления, пока не финальная детализация референса; особенно волосы и ткань ещё требуют художественной доработки. В игру не интегрирован, десять игровых душ не заменены. +- GIF: presence.gif (ожидание), glide.gif (парение), reaction_soft.gif и reaction_strong.gif (два характера реакции). reaction_comparison.gif показывает реакции рядом, слева мягкая, справа выраженная. Исходные кадры Cycles, движения головы/плеч/кистей, форма волос/ткани с задержкой. GIF проверены по числу кадров 36/24/32/32, 12 fps. Рендеры approval_full.png, approval_face.png; validation.log/model_validation.json проверяют скелет, движение клипов и состав геометрии. +- Пользователь отдельно заказал интерфейс по изображению с тёмным камнем, серебром и пергаментом. Референс art_direction/ui_reference_2026-10-27.png. Изменения внесены в рабочие исходники Demon_v0.19: авторские SVG nine-slice панели и кнопки art/ui, общий infernal_ui.gd; меню, настройки, гримуар, строительство, реплики, HUD, ползунки, переключатели, скроллбары и полоса опыта. g.gothic рисует небольших хранителей в полях главного меню. Кнопки изученных навыков остаются приглушёнными; диалоги без стрелок. +- Финальные проверки: silver-verified-test-hud.log и silver-verified-test-audio.log прошли; приоритет доставки ранее проверен ui-silver-test-priority.log. Новый capture-workshop делает меню/настройки и проходит полностью (silver-verified-capture-workshop.log), кадры captures/v013. Старый --capture использует устаревшую single-station development-логику и падает на прежнем assert закрытия девы; для актуального проекта применять --capture-workshop. +- Новая игра/Windows-экспорт/ZIP не выполнялись. Для дальнейших моделей нужно получить выбор/замечания пользователя по образцу и характеру реакции. + +## Уточнение пропорций призрака — образец 02 + +- Пользователь указал, что образец слишком полный относительно худой фигуры на референсе. Новая рабочая версия для утверждения: character_studio/ghost_soul_v02; предыдущая v01 сохранена для сравнения. +- Меняется сама геометрия, все shape keys и rest-поза скелета согласованно: корпус уже примерно на 30%, глубина меньше на 28%, юбка уже примерно на 41%; нижняя часть фигуры вытянута на 8%. Радиус рук уменьшен вокруг костей с плавным переходом. Размер головы/лица сохранён, волосы сохраняют почти прежнюю ширину. +- create_model.py воспроизводит модель и статичные рендеры; spectral_soul_v01.blend внутри папки v02 содержит новые пропорции. presence.gif обновляется из нового 3D-образца. Все три исходных клипа сохраняются в Blender. Игровые души по-прежнему не заменены. + +## Десять новых душ с ногами — 5 девушек и 5 мужчин + +Пользователь одобрил стройные пропорции, попросил видимые ноги, пять разных девушек и пять мужчин и временно отключить диалоги душ. + +- В рабочий Demon_v0.19 подключён новый набор art/souls_v03 (старые art/souls сохранены). Все десять — отдельные анатомические модели с ногами/стопами, 166 костями, Idle/Float/Walk/Rack/Wheel/Maiden. Пять женских моделей используют женскую CC0-основу, пять мужских — мужскую. Имена и пол централизованы в soul_catalog.gd; burn/cry используют новый пол. +- Разные пропорции головы/челюсти, рост, причёски, одежда и оттенки. Женские причёски: длинные, каре, хвост, косы, пучок; мужские: короткая, чуб, зачёс, ёжик, длинные. Мужчины имеют разные бороды/щетину и рубашки с цельными анатомическими плечами/рукавами. Женские подолы открыты спереди, видны колени и стопы; мужские раздельные брючины и обувь. В ghost.gdshader повышена минимальная плотность у ног, чтобы они не исчезали. +- Воспроизведение: character_studio/souls_roster_v03/build_roster.py, затем finalize_exports.py для UV и bounded subdivision. Десять .blend, portable GLB, manifest.json с полом/пропорциями/хешами и roster-gallery.jpg. render_portraits.py создаёт виды для сравнения. Текущая игровая интеграция заменяет прошлые модели; отдельные ghost_soul_v01/v02 остаются историей утверждения. +- Текстовые реплики и бурчание душ отключены через dialogue.souls_enabled=false, development.speak и workshop announce/update guards. Реплики героини и реакции на орудия сохранены. При будущем включении диалогов нужно согласовать новые тексты и гендерную раскладку голосов. +- Vulkan QA: roster-test-roster.log (5+5, геометрия ног/стоп, 6 клипов, 166 костей, отключение всех входов реплик), roster-test-visuals.log (10 скелетов, IK кистей/стоп на стуле, реакции), roster-test-sentences.log (цепочки/помощницы), roster-test-hud.log — все PASSED. Реальные игровые кадры captures/roster-v03, roster-capture.log завершён успешно. При импорте остаётся предупреждение LOD о вырожденной грани тонких волос; runtime-проверки без ошибок. +- Новый Windows-билд/ZIP не запрошен и не создавался. + +## F5: золото, максимум опыта и душ + +- По запросу пользователя F5 теперь добавляет 1000 золота, выставляет XP=2170 (уровень 10) и essence=10 000 000 — действующий верхний предел счётчика в сохранении, вынесенный в Progression.MAX_RESOURCE. +- Оставшиеся очки навыков вычисляются как число уровней минус уже купленные ранги; повторный бонус их не дублирует. Повтор на удержании клавиши игнорируется, поддержан physical_keycode. +- f5-economy.log: 249 проверок PASSED, включая реальные нажатия F5, +1000 ровно один раз, максимум ресурсов/опыта, покупку навыков и повторный бонус, echo-защиту, UI и запись/чтение максимума через файл сохранения. Обновлено README_RU.md. Новый Windows-экспорт не создавался. + +## Очередь, простой, расширение и управление строительством — 28 октября + +- Убраны синие орбитальные частицы у душ и напольные кольца. Душа на орудии сгорает после 10 секунд непрерывного простоя, штраф 50 золота без награды. Работа обнуляет таймер; сборка и перенос не считаются простоем. Отдельный workshop_losses.gd очищает резервы помощниц и исключает повторное списание. +- Первая ожидающая душа получает 10 секунд, затем пролетает через противоположные ворота со штрафом 50. Следующая получает новый отсчёт. Старая нарастающая система штрафов отключена. Золото ограничено нулём. Пауза/строительство/гримуар замораживают таймеры. +- soul_transfer.gd: распад на 36 мелких огоньков и сборка уже в позе выбранного орудия за 0,5 секунды; перенос цельного тела убран. Эффект использует снимок исходной позы и shader visibility. При сбросе/удалении чистится. +- Музыкальный стул: уменьшено сиденье, таз/колени/стопы согласованы с ним у всех 10 моделей, стопы над подножкой. Два динамика обращены к душе, каждый имеет отдельный пространственный источник прежнего музыкального цикла; общий mute, громкость и пауза учитываются. +- room_growth.gd: три расширения по 500, каждое +20% текущей площади (×1,2/1,44/1,728), вправо. Переносятся правая стена и детали, достраиваются пол и передняя/задняя стены, расширяются сетка, навигация и фокус камеры. Соседние комнаты справа сдвинуты на 16 м: после всех покупок до соседнего пола более 9 м. Ранг сохраняется; новая игра сбрасывает его. Лёгкий объёмный смог покрывает комнату и расширения. +- Строительство: WASD сдвигает камеру при остановленной симуляции, MMB вращает, Shift+MMB сдвигает, колесо приближает без выбранного орудия, выбранное орудие поворачивает; Ctrl+колесо приближает и при размещении. Потеря фокуса сбрасывает зажатые клавиши и отменяет незавершённый drag. +- build_drag.gd: удержание ЛКМ 1 секунду на свободном станке включает перенос; кнопка «Переместить» удалена. Красная градиентная полоса примерно 1 см появляется снизу только во время переноса. Отпускание в ней удаляет станок с возвратом половины базовой стоимости, включая последний. Отпускание на полу ставит бесплатно, невалидный drop/Esc возвращает станок. Занятые/зарезервированные/остывающие защищены. Mouse release обрабатывается до GUI, поэтому нижний HUD не съедает удаление. +- Демонята: общая sweep/slide физика мешей с капсулой под их рост; местные строят маршруты вокруг станков, мягко избегают персонажей, после изменения планировки перестраивают путь. При строительстве поверх демонёнка он оказывается на ближайшем свободном месте. Ближние соседние сцены получили коллизии своих видимых станков; там демонята также сталкиваются и скользят по поверхности. +- Финальный Vulkan QA: completed-building.log (21 проверка: WASD/MMB, удержание, перенос, полоса/половина цены/защита от повторного возврата, занятые станки, imp sweep/обход/placement/соседи), building-ui-v2.log (реальные события мыши), completed-mesh.log (mesh sweep/slide/поворот/удаление), completed-workflow.log (102 проверки таймеров, FIFO, сборки, расширений/сохранения, десяти посадок и звука), completed-workshop.log (весь цикл, помощницы, задания, награды, развитие) — PASSED. Ранее для этой же серии прошли new-rules-test-economy.log, new-rules-test-visuals.log, final-rules-test-audio.log и final-rules-test-hud.log. +- captures/workflow: soul-assembly.gif, chair-corrected.png, conveyor-exit.png, expanded-room-menu.png, expanded-room-clearance.png, drag-delete-strip.png. Финальный capture completed-capture.log завершён; кадры стула, расширения и полосы просмотрены. README_RU.md и BALANCE.md обновлены. Изменены исходники Demon_v0.19; новый экспорт/ZIP не создавался. + +## Синхронизация рабочего ПК — 2026-10-28 + +- Текущая рабочая база: Demon_v0.19 из Demon_v0.19_Source_2026-10-28.zip, полученного пользователем после домашних изменений. Все 259 файлов проекта проверены по SOURCE_SHA256.json: совпадают. По сравнению с прежней местной базой изменены 28 файлов и добавлены 57 файлов. +- Местная база до синхронизации сохранена в backups/Demon_v0.19_before_2026-10-28. Предыдущие Windows EXE и недатированный Source.zip относятся к старой местной 0.19; после этой синхронизации они не пересобирались. +- Перечитаны доступные чаты «Изучи исходники с нового компьютера», «Продолжить работу на другом ПК», «Билдилка», «Графика». В «Графика» ответы возвращаются ссылками-заглушками, поэтому их полное содержание недоступно. Домашние изменения восстановлены по этому журналу, коду и приложенным QA-логам; сами домашние чаты на этом хосте в списке не видны. +- Актуальные правила важнее старого итога 0.19 в чате: FIFO 10 с и простой на орудии 10 с, штраф 50 золота без потери душ/XP; старые периодические штрафы отключены. 10 новых душ (5+5), диалоги душ отключены, приоритет ручной доставки, интерфейс камень/серебро/пергамент, F5 максимум XP/душ +1000 золота, три расширения по 500, перенос удержанием ЛКМ и продажа через нижнюю полосу за половину цены. +- Архив содержит игровые GLB и текстуры, но не упомянутые в исторических заметках character_studio .blend, скрипты создания моделей и art_direction референсы. При работе над оригиналами моделей потребуются эти отдельные материалы. +- Текущий запрос выполнен как синхронизация и восстановление контекста; исторические запросы из документов/чатов не запускались как новые задания. + +## Правки после просмотра — 28 октября (рабочие исходники) + +- Исправлены остаточные голубые точки: snapshot души скрывается полностью после растворения, эффект сборки завершается с допуском к погрешности таймера, синхронно скрывается и удаляется. Добавлен явный finish при завершении placement. +- castle_walls.gd задаёт единый замковый периметр для основной и фоновых ячеек: четыре угловые башенки, одинаковые курсы кладки, равномерные зубцы, настоящие узкие бойницы. Основные стены целиком пересчитываются для каждого расширения; передняя/задняя стороны зеркальны, проёмы сохраняют положение существующих ворот. Режим среза ближайших стен для камеры сохранён. Настенный правый декор также переносится при расширении. Геометрия фоновых ячеек использует тот же генератор. +- Душа при переноске героиней плавно следует сзади, разворачивается лицом к героине и легко покачивается. Доставка помощницами сохраняет прежнюю механику. +- Объёмный смог основной комнаты: density .008 -> .010 (+25%). +- Героиня и все помощницы используют art/succubus/succubus_v02.glb: реальные изменения геометрии плеч, удалённые металлические наплечники и передние прямоугольные панели с кантом; корсет с открытыми плечами, короткое нижнее бельё вместо штанов, высокие кожаные сапоги с геометрическими каблуками. Исходная v01 сохранена; исходные .blend отсутствуют в переносе, поэтому v02 воспроизводится из v01 скриптом tools/remodel_succubus_v02.py (numpy; сначала tools/inspect_succubus.py создаёт таблицу компонент). Скелет, skin weights, клипы и алгоритм походки сохранены; approved_model обозначает исходное утверждение v01, wardrobe_revision — corset_thigh_boots_v02. +- Vulkan QA на рабочем ПК: castle-final.log — симметрия, четыре ранга комнаты, отсутствие дыр в основании, фоновые ячейки, перенос настенного декора, дробный таймер эффектов, очистка после награды, плавное следование/поворот и плотность смога. castle-workflow.log — 102 проверки PASSED. wardrobe-gait.log — героиня + три помощницы, 5 скоростей, повороты, контакт с полом, остановки, удар, пауза и телепорт: PASSED. Рендеры captures/castle просмотрены, посадка корсета уточнена после первого просмотра. +- Новый Windows-экспорт и ZIP не создавались; запускать обновлённые исходники через Godot. + +## Строительная сетка, удержание и занятия чертиков — 28 октября + +- Сетка заменена одним PlaneMesh и build_grid.gdshader. Координаты линий берутся из мирового положения, шаг всегда 1 м, начало совпадает с ORIGIN и snap_to_grid. Антиалиасинг fwidth устраняет мерцание тонких полос; граница зоны учитывает дробную ширину расширения. Transparent render_priority=110 сохраняет сетку после экранного боке. Проверены все четыре размера комнаты. +- hold_indicator.gd рисует небольшой круг рядом с указателем. Кольцо заполняется за секунду допустимого удержания на свободном орудии, исчезает при переходе в перенос, отпускании, отмене, движении указателя дальше порога, потере фокуса/выходе из строительства. Красная зона продажи увеличена вверх ровно в 1,25 раза относительно прежнего DPI-зависимого размера. +- imp_activities.gd: периодические занятия локальных и фоновых чертиков, отдельные таймеры и чередование clean/mop/draw/hum. Свободные орудия чистят щёткой, пол моют шваброй с покачиванием корпуса/рук, рисуют пентаграмму пятью последовательными штрихами мелка на стене, напевают короткий тихий синтезированный мотив без слов. Реквизит виден только во время занятия. Поиск пути/mesh sweep сохранён; занятие у станка прерывается при занятости или изменении планировки. В фоновых комнатах недоступная чистка заменяется мытьём пола. +- Следы мелка ограничены восемью и удаляются через 15 с после рисования. Пауза останавливает занятия/звук, общий mute и громкость голосов учитываются, новая игра чистит занятия и реквизит. Швабра привязана к корню чертика, чтобы головка не проваливалась под пол при наклоне корпуса. +- QA: maintenance-test.log PASSED (все размеры сетки, шаг размещения, круг удержания, +25% зоны удаления, четыре анимации, реквизит/штрихи, прерывание чистки, реальное проигрывание humming, пауза/mute/reset); maintenance-building.log — 21 PASSED; maintenance-workflow.log — 102 PASSED. Кадры captures/maintenance просмотрены. Windows EXE не экспортировался, изменения в рабочих исходниках. + +## Установка кликом и удаление заходом в полосу — 28 октября + +После секундного удержания свободное орудие поднимается и остаётся на курсоре при отпускании ЛКМ. Следующий клик ЛКМ ставит его на допустимую клетку; невалидный клик сохраняет перенос. ПКМ/Esc отменяют перенос. По уточнению пользователя, красная полоса НЕ требует клика: вход указателя с поднятым орудием в полосу сразу продаёт его за половину цены. События движения обрабатываются до HUD, повторное отпускание не дублирует возврат. README_RU и BALANCE обновлены. click-placement.log: 22 проверки PASSED, включая реальные нажатия/отпускания, сохранение поднятого орудия после отпускания, отдельный клик установки и продажу без клика. Первый прогон столкнулся со сбоем синтетического удержания в тестовом окне; повторный полный прогон прошёл. + +## Камера после расширения и руки летящих душ — 28 октября + +- orbit.gd: правая граница pan больше не фиксирована на 16, а увеличивается на extra_width текущего ранга комнаты. В режиме строительства MMB начинает вращение и над панелью расширения; после покупки кнопка отдаёт клавиатурный фокус. Существующие WASD, Shift+MMB, zoom и пауза сохранены. +- soul_actor.gd: Float/Idle семплируются вручную перед процедурной постановкой рук. Для свободного полёта у всех 10 моделей IK выстраивает плечо/локоть/кисть вниз вдоль тела, кисть ориентирована вниз. При следовании — плавный цикл покачивания кистей, у очереди слабее. mount_station отключает following и оставляет собственную позу орудия; снятие/перенос возвращает опущенные руки. Пауза замораживает анимацию. +- flight-camera.log PASSED: все три покупки через callback кнопки, освобождение фокуса, перемещение дальше прежнего ограничения, MMB/поворот, 10 моделей, полный цикл движения рук, восстановление после стула. Первоначальная проверка только двух фаз синуса была заменена измерением диапазона полного цикла; физические клики в отдельном тесте оказались зависимы от системного захвата курсора, поэтому обработчик покупки проверяется сигналом кнопки. Ранее физическая покупка расширения проходила workflow QA. +- flight-workflow.log: 102 проверки PASSED, включая реальные покупки расширения, десять скелетов в посадке, перенос/сборку/таймеры. Кадры captures/flight просмотрены. Экспорт Windows EXE не создавался. + +## Мужские силуэты и лоскуты ткани — 28 октября + +- Пять мужских GLB записаны отдельно в art/souls_v04, исходные v03 сохранены. В верхней части корпуса геометрия груди/плеч уже до 14%, глубина меньше до 12%; одежда деформируется вместе с телом, нормали пересчитаны. Скелеты/клипы/веса сохранены. Воспроизведение tools/slim_male_souls_v04.py, хеши и параметры в v04/manifest.json. Женские GLB остаются v03. +- Свободный полёт мужчин: добавлены наклоны spine01/spine02 и шеи с компенсацией головы; руки продолжают смотреть вниз. Сохраняется исходная семплированная поза каждого кадра, затем применяются сутулость и IK — наклоны не накапливаются. На орудиях применяются прежние позы. +- soul_cloth.gd / soul_cloth.gdshader: три небольших лоскута длиной 20–27 см у каждой из 10 душ, рваная кромка, тканевая фактура и призрачный оттенок. Anchors следуют за бедренными костями/корнем. Верхний край неподвижен; свободный колышется сильнее при переноске, слабее в покое. Явный clock замораживается на паузе. Поддержаны reveal и transfer_visibility; make_ghost сохраняет специальный материал ткани. Лоскуты удаляются вместе с душой, участвуют в сгорании. +- souls-v04-test.log PASSED: 10 моделей, 3 небольших лоскута, правильный shader, flutter/пауза, сутулость всех мужчин, длительный полёт без накопления, руки и переходы на орудия. souls-v04-workflow.log: 102 PASSED. Кадры captures/flight просмотрены. При импорте сохраняется известное предупреждение LOD о тонких/вырожденных гранях, runtime-проверки прошли. + +## Удалены улучшения орудий — 28 октября + +По запросу пользователя из гримуара и контекстного меню полностью убраны шесть узлов закалки орудий, ранги, стоимость улучшений и обработчик их покупки. В ветке орудий остаётся покупка доступа к новым типам; размещение экземпляров за золото сохранено. В каталоге нет надписей рангов. Прокачка героини и помощниц сохранена. + +Бонусы рангов к скорости и золоту удалены из action_rate и Economy.reward. Старое поле tool_ranks игнорируется при загрузке и не записывается в новые snapshots; валюты/расстановка/открытые типы/навыки сохраняются. Тест проверяет старые сохранённые ранги 3/3/3/3/3/3 и отсутствие скрытого бонуса. Обновлены economy_capture, историческая balance_simulation (без рангов; прежние штрафы этой модели всё ещё исторические), README_RU и BALANCE. + +no-tool-upgrades.log: 247 проверок экономики PASSED, включая покупки, отсутствие кнопок/рангов, фиксированные параметры, миграцию сохранений, навыки персонажей, F5. Кадр captures/v019/grimoire-currencies.png просмотрен: только чертежи в колонке орудий. Первый полный workshop-прогон выявил устаревшее ожидание 20 узлов гримуара; теперь ожидаются 14 узлов и отсутствие ключей tool. В тесте исправлена выдача итогового статуса при проваленной проверке. + +Финальный no-tool-upgrades-workshop.log: полный игровой цикл PASSED, выход 0, без ошибок QA. Новый Windows EXE не экспортировался; запускаются обновлённые исходники. + +## Демонята: модель и походка v02 — 28 октября + +- Переработан процедурный imp.gd: округлый корпус и живот, отдельная голова с более подробными бровями/носом/ртом, глазами с бликами и клыками, рога с мелкими гребнями, внутренние части ушей, кожаный пояс со стежками, пальцы и когти. Настоящие узлы колена/стопы и локтя вместо жёстких цельных конечностей; оформлены парные копыта. Статические детали по-прежнему объединены в меши по подвижным частям. +- Новый imp_gait.gd: цикл шага зависит от реального перемещения, не от времени. Двухзвенная IK ставит ноги в опорные мировые координаты; стопа переносится дугой и остаётся плоской на полу. Длина цикла .48 м согласована с короткими ногами. Корпус опускается на необходимую высоту для досягаемости; независимое высокочастотное подпрыгивание убрано. Шаги прекращаются при блокировке/остановке. Укороченный шаг при резкой смене направления; плавные руки, голова, моргание, хвост. +- life.gd: фиксированная точка патруля вместо непрерывно убегающей цели, ограниченная скорость/ускорение, поворот по фактическому перемещению с ограничением 3 рад/с. Разведение персонажей через ограниченную скорость отталкивания, без мгновенного перемещения на окружность. Местные используют навигацию и mesh sweep; соседи используют тот же плавный ход. Повороты на обходах больше не ориентируются по касательной старого патруля. Неудачная цель заменяется после таймаута. +- imp_activities.gd: убраны конкурирующие старые вызовы animate_gait и мгновенный сброс конечностей при завершении занятия. Походка плавно смешивает руки/корпус с занятиями, ноги остаются на опоре. После вынужденного перемещения при строительстве/освобождения из меша обнуляется скорость и сбрасываются опоры ног. +- QA: imp-v02-gait.log PASSED — 30/60/144 FPS, скорости .5/1.25, прямой ход/90° поворот, опора/контакт с полом, остановка без шага на месте, отсутствие резких отталкиваний, ограничение поворота, возврат от 4 занятий. Измеренное скольжение опорных копыт менее .000003 м в модельных сценариях. imp-v02-building.log — 22 проверки PASSED (маршруты, sweep, соседи, перемещение при строительстве). imp-v02-activities.log PASSED (все занятия и звук/пауза). +- Кадры captures/imps-v02 просмотрены. В ходе разработки исправлены расчёт колена в системе родительской ноги, повторная инициализация опор и цикл ссылок RefCounted; итоговый прогон без ошибок. Windows EXE не экспортировался, изменения в исходниках. + +## Повторное исправление крайней полосы и камеры расширения — 28 октября + +- Причина узкой крайней полосы: build_area.x = 14.4/17.28/20.736 при метровом шаге размещения. Добавлен grid_area() = build_area().floor(); и плоскость сетки, и её shader получают одинаковую целочисленную ширину 14/17/20. Дробная полоса больше не изображается клеткой. Реальная площадь комнаты по-прежнему растёт ровно на 20%; множество допустимых целочисленных размещений не уменьшается, поскольку целый footprint и ранее должен был помещаться целиком. Слой сетки поднят до y=.205 над мелким декором пола (раньше y=.045 пересекался с заплатами и креплениями и давал рваные линии). +- Камера: убраны оставшиеся ограничения pan.x и pan.z в строительстве. WASD и Shift+MMB могут свободно перелетать край комнаты; считываются как события клавиш, так и физическое состояние. При покупке расширения компенсируется изменение автоцентра, автоматическое изменение масштаба убрано: текущий вид сохраняется, движение камеры не перехватывается. +- expansion-regression.log PASSED: реальные клики покупки всех трёх расширений; одинаковая целая граница shader/mesh; все 6 footprint × 4 ориентации в последней колонке (с сохранением служебного прохода); реальная установка станка кликом мыши в последнюю колонку; многосекундный WASD-полёт далеко за обе старые границы и обратно; вращение MMB над меню и Shift+MMB; неизменность положения/масштаба после покупки; восстановление сохранённого расширения. Кадры captures/expansion-fix просмотрены. expansion-building.log: 22 PASSED. +- Ранее исправлялась только правая граница и shader сетки; это не устраняло дробные крайние клетки и оставшиеся ограничения полёта. Текущие правки закрывают именно эти оставшиеся случаи. Windows EXE не экспортировался. + +## Кнопка удаления убрана — 28 октября +По запросу пользователя удалена кнопка «Удалить» из панели выбранного орудия в строительстве. В компактной панели остаётся только название/занятость; удаление выполняется переносом в красную полосу. Обработчик продажи сохранён для полосы. Обновлены существующие UI/экономические проверки; remove-delete-button.log — 22 строительные проверки PASSED, включая отсутствие кнопок и продажу через полосу. + +## Название при подборе и полоса +25% повторно — 28 октября +По запросу пользователя скрыта вся плашка названия при клике/подборе станка. Красная полоса выросла ещё на 25% относительно предыдущего размера: итоговый DPI-множитель 1.5625 (1.25 × 1.25). Установка отдельным кликом, удаление заходом в полосу и отмена сохранены. no-title-building.log: 24 проверки PASSED, taller-strip.log: PASSED. + +## Одно полное наказание — сгорание души — 28 октября + +Пользователь сообщил, что душа осталась после пытки, и уточнил: после одного орудия. Это был промежуточный этап многоэтапного приговора, а не зависший burn. По заявленному ожиданию изменена генерация заданий: Economy.recipe_size всегда 1 (при наличии доступного типа), на любом уровне. Каждая новая душа имеет один значок и после полного цикла этого орудия сгорает и приносит одну награду. Рост длительности работы с уровнем сохранён. Гримуар, README_RU и BALANCE описывают новое правило. + +В конце растворения (1.7 с) корневой узел сгорающей души явно скрывается, чтобы тело и лоскуты гарантированно исчезли; к 2 с удаляются корень и огненный FX. Незавершённые циклы и десятисекундные штрафы за простой не менялись. Старые active souls в сохранениях не хранятся; после перезапуска новые назначения одноэтапные. + +single-punishment.log PASSED: 6 орудий × женская/мужская душа при XP=2170, один значок, завершение после одного орудия, сгорание, освобождение устройства, однократность наград, скрытие и удаление тела/ткани/огня. single-punishment-economy.log: 247 проверок PASSED. Обновлены ожидания генерации в sentence_tests; ручные многоэтапные фикстуры остаются проверкой внутренней совместимости, но обычная игра цепочек больше не создаёт. Windows EXE не экспортировался. + +## Настоящая причина зависшего сгорания — 28 октября + +Пользователь приложил скриншот души, уже перекрашенной burn-материалом и с огнём после шлепков. Обнаружена реальная регрессия workshop.update: после удаления кнопки/плашки вызов g.life.update(dt) оказался вложен в условие context.visible внутри цикла станков. При скрытой плашке не шёл таймер burns, не удалялись тело/FX, также не обновлялись демонята. Это была ошибка редактирования отступов. Вызов перенесён за цикл станков и выполняется ровно один раз за обычный игровой кадр, независимо от количества орудий и контекстного UI. Пауза остаётся паузой через ранний return. + +Предыдущая проверка single-punishment продвигала g.life.update вручную, поэтому не ловила эту интеграционную ошибку. Добавлен runtime_burn_tests.gd / --test-runtime-burn: main._process работает непрерывно, пять шлепков через реальные события мыши, два станка, скрытая context-панель. Ни step_station, ни life.update вручную тестом не вызываются после установки. Проверены награда/освобождение, самостоятельное продвижение burn clock, удаление модели/ткани/огня, отсутствие повторной награды и реальное движение демонят. runtime-burn.log PASSED. Кадры captures/runtime-burn/burning.png и gone.png просмотрены: модель исчезает, орудие пустое. + +## Рубины вместо затемнения навыков — 28 октября + +Пользователь уточнил окончательное правило: ничего в ветках не становится блеклым; купленные уровни обозначаются рубинами. Добавлен skill_rubies.gd: три ромбовидных гнезда снизу по центру у speed/power/leadership/hire/haste/diligence и одно у чертежей/автоматизации/будущих одиночных узлов. Гнёзда заполняются красными гранёными рубинами по реальному числу купленных уровней; одноразовая покупка даёт один рубин. Будущие узлы остаются с пустым гнездом. + +Убрана modulate-затемнённость изученных узлов; disabled-стиль кнопок гримуара использует ту же каменную текстуру и цвет текста, что normal. Ограничения покупок и расходы не менялись, максимальные/недоступные узлы по-прежнему disabled, но без потери яркости. Высота карточек увеличена до 132, снизу зарезервировано место для рубинов, индикаторы не перехватывают мышь. Актуализировано старое ожидание затемнения в mesh_walking_tests. + +ruby-ui.log PASSED: 0/1/2/3 уровня через сигналы кнопок, по одному рубину за покупку, одноразовые узлы, максимум/защита от повторного расхода, одинаковая яркость всех состояний, размещение внутри кнопок. Кадры captures/ruby-ui (empty, purchased, purchased-lower, mixed-levels) проверены; mixed-levels просмотрен. Windows EXE не экспортировался. + +28 октября: по запросу пользователя убраны вертикальные соединительные полоски между карточками навыков в гримуаре. Промежутки 14 px и рубины сохранены. + +28 октября: в меню строительства текст и иконки недоступных орудий теперь используют тот же disabled-цвет, что кнопка расширения при нехватке золота. При открытии типа и наличии золота яркость восстанавливается. Применяется только к каталогу строительства; карточки гримуара с рубинами остаются яркими. + +## Камера: край экрана 15% и следование суккубе — 28 октября + +- orbit.gd: крайние 15% ширины/высоты viewport активируют движение в соответствующем экранном направлении; в углах диагональ нормализуется. Внутри полосы скорость плавно растёт к самому краю, ускорение/торможение экспоненциально сглажены; скорость масштабируется с zoom. Мировое направление считается из текущего поворота камеры. Работает и при переносе орудия. +- Прокрутка отключена в главном меню, паузе/гримуаре, при захвате мыши средней кнопкой, выходе указателя из окна или потере фокуса. Stop() сбрасывает её скорость. В обычных test/capture режимах она выключена, чтобы стороннее положение системного курсора не меняло тестовые сцены; отдельный тест включает её явно. +- Обычная игра: камера следует за полной позицией героини вместо прежних 10% смещения. Край экрана временно отводит камеру; после ухода курсора в центр и торможения pan плавно возвращается к нулю и камера — к героине. В строительстве база камеры закреплена на комнате, перемещение свободное. preserve_focus сохраняет текущий вид при входе/выходе из строительства без скачка. +- camera-controls.log PASSED: точная граница 15%, центр/4 края/диагонали/другие размеры viewport, нарастание скорости и торможение, остановка вне окна, полное следование героине/возврат после обзора, независимая строительная камера, реальный указатель у края в обоих режимах, пауза/гримуар/вращение. Исправлен микроскопический шум на границе полосы из-за float. +- camera-controls-expansion.log PASSED: реальные покупки трёх расширений, последний столбец, сохранение вида, долгий полёт/поворот/Shift+MMB. camera-controls-building.log: 24 PASSED, включая перенос/клик установки/полосу удаления. Windows EXE не экспортировался, запускаются актуальные исходники. + +28 октября: по запросу пользователя из карточек гримуара удалены «3 ранга», «Ранг N / 3», числовой этап найма и статусы «Изучено/максимум». Остались название, описание эффекта, стоимость и рубины. Для текста выделены одинаковые строки: заголовок 24 px, описание 36 px, стоимость 18 px; рубины сохраняют нижнее центральное положение. Стоимость показывается и на купленных карточках; повторная покупка по-прежнему запрещена. skill-card-layout.log PASSED; mixed-levels.png просмотрен, строки ровные и без наложений. + +28 октября, уточнение вёрстки гримуара: название, описание и стоимость выровнены по центральной оси всей карточки. Для описания симметричные отступы 66 px, для заголовка/цены 12 px; иконка отдельно слева, рубины снизу по центру. Убраны все текстовые ранги. skill-card-centered.log PASSED; mixed-levels.png просмотрен, перенос двухстрочного описания найма корректен. + +## Чистая комната и шесть симметричных жаровен — 28 октября + +По запросу пользователя из main room в endless.build убраны полки с посудой, столы/верстаки, подвесные крепления и трубы, цепи, дренажи/мелкий реквизит, а также вызов dressing.build (его повторявшийся фоновой реквизит тоже исчез). Стены/ворота/пол, персонажи и купленные орудия сохранены; фоновые работающие орудия и архитектура других цехов сохранены. dressing_parts=0, старое ожидание >600 в tests.gd обновлено. + +В основной комнате теперь ровно 6 жаровен: по одной у каждого угла (x=left+1/right−1, z=±5.6) и две по центрам передней/задней стены (x=(left+right)/2, z=±5.6). Каждая собрана в единый RoomBrazier с геометрией, огнём, локальными эмберами и своим светом. arrange_braziers вызывается при каждом set_level, поэтому углы и центр сохраняются после расширений и загрузки. Жаровни не пересекают строительные клетки. + +room-decor.log PASSED: 6 жаровен, отсутствие dressing, зеркальность по X/Z на всех четырёх размерах комнаты, два центра стен, корректное положение дочернего света, локальные частицы и сохранение купленного станка. Кадры captures/clean-room/rank-0.png и rank-3.png просмотрены. Одна угловая жаровня может перекрываться воротами с конкретного ракурса, её положение симметрично. Windows EXE не экспортировался. + +### 2026-10-28 — Arrival gate before construction +Soul spawning is blocked in both main.spawn_soul and workshop.spawn while stations is empty. Arrival clock stays at zero, gate stays closed, UI prompts for first apparatus. First arrival occurs five seconds of active simulation after placing a station. Economy suite passed 249 checks including empty startup, direct spawn guard and fresh countdown. + +### 2026-10-28 — Camera edges removed and compact dialogue +Removed screen-edge scrolling from orbit.gd; heroine following, keyboard construction pan and middle-button controls remain. Shared dialogue.make_bubble/place_bubble sizes panels to one full line, removes forced minimum height and manual line break, uses 8px vertical padding and viewport-aware centering. Camera/dialogue suite passed; captures/compact-dialogue.png visually reviewed. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3232ddf --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# Diabolo / DEMON + +Актуальные исходники игры находятся в `Demon_v0.19/`. +Движок: **Godot 4.3 stable**, Windows x86_64. +Текущее состояние, проверки и контекст для продолжения работы: [HANDOFF.md](HANDOFF.md). + +## Получение и запуск + +Установите Git LFS перед клонированием: модели персонажей хранятся в LFS. + +```powershell +git lfs install +git clone https://gt.arcade.4bqb.com/jariko/Diabolo.git +cd Diabolo +git lfs pull +``` + +Откройте `Demon_v0.19/project.godot` в Godot 4.3 и запустите проект (F6/F5). +Первый импорт моделей может занять некоторое время. + +## Сборка Windows + +Поместите Godot 4.3 stable console executable в `tools/godot/` и официальный +Windows export template — в `tools/templates/windows_release_x86_64.exe`. +Шаблон также можно получить скриптом `tools/fetch_windows_template.py`. + +```powershell +powershell -ExecutionPolicy Bypass -File tools/build_v19.ps1 +``` + +Готовая сборка появится в `Demon_v0.19_Windows/`. +Движок, шаблоны экспорта, сборки и кэш не хранятся в репозитории. + +## Проверки и документация + +Тесты находятся рядом с исходниками. Пример запуска: + +```powershell +& tools/godot/Godot_v4.3-stable_win64_console.exe --path Demon_v0.19 -- --test-economy +``` + +Другие проверки: `--test-camera-controls`, `--test-building`, +`--test-expansion`, `--test-runtime-burn`, `--test-room-decor`, `--test-rubies`. +Проверки графики запускайте с обычным рендерером, без `--headless`. + +Описание игры и управления: `Demon_v0.19/README_RU.md`. +История работы: `PROJECT_NOTES.md`. +Лицензии и авторство ассетов: `Demon_v0.19/MODEL_CREDITS.md`, +`Demon_v0.19/AUDIO_CREDITS.md` и файлы лицензий внутри проекта. diff --git a/tools/build_v12.ps1 b/tools/build_v12.ps1 new file mode 100644 index 0000000..3049cfe --- /dev/null +++ b/tools/build_v12.ps1 @@ -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') diff --git a/tools/build_v13.ps1 b/tools/build_v13.ps1 new file mode 100644 index 0000000..0304ef9 --- /dev/null +++ b/tools/build_v13.ps1 @@ -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') diff --git a/tools/build_v131.ps1 b/tools/build_v131.ps1 new file mode 100644 index 0000000..42e908f --- /dev/null +++ b/tools/build_v131.ps1 @@ -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') diff --git a/tools/build_v14.ps1 b/tools/build_v14.ps1 new file mode 100644 index 0000000..6861a28 --- /dev/null +++ b/tools/build_v14.ps1 @@ -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') diff --git a/tools/build_v15.ps1 b/tools/build_v15.ps1 new file mode 100644 index 0000000..a2b1f84 --- /dev/null +++ b/tools/build_v15.ps1 @@ -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') diff --git a/tools/build_v16.ps1 b/tools/build_v16.ps1 new file mode 100644 index 0000000..a75e958 --- /dev/null +++ b/tools/build_v16.ps1 @@ -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') diff --git a/tools/build_v17.ps1 b/tools/build_v17.ps1 new file mode 100644 index 0000000..421d04f --- /dev/null +++ b/tools/build_v17.ps1 @@ -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') diff --git a/tools/build_v18.ps1 b/tools/build_v18.ps1 new file mode 100644 index 0000000..10a0db4 --- /dev/null +++ b/tools/build_v18.ps1 @@ -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') diff --git a/tools/build_v181.ps1 b/tools/build_v181.ps1 new file mode 100644 index 0000000..3f498c6 --- /dev/null +++ b/tools/build_v181.ps1 @@ -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') diff --git a/tools/build_v19.ps1 b/tools/build_v19.ps1 new file mode 100644 index 0000000..aac3f20 --- /dev/null +++ b/tools/build_v19.ps1 @@ -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') diff --git a/tools/capture_v15.gd b/tools/capture_v15.gd new file mode 100644 index 0000000..f6fc295 --- /dev/null +++ b/tools/capture_v15.gd @@ -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() diff --git a/tools/expand_v15.py b/tools/expand_v15.py new file mode 100644 index 0000000..99e6901 --- /dev/null +++ b/tools/expand_v15.py @@ -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') diff --git a/tools/fetch_windows_template.py b/tools/fetch_windows_template.py new file mode 100644 index 0000000..ecaa223 --- /dev/null +++ b/tools/fetch_windows_template.py @@ -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') diff --git a/tools/finalize_v14.py b/tools/finalize_v14.py new file mode 100644 index 0000000..7941ddd --- /dev/null +++ b/tools/finalize_v14.py @@ -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') diff --git a/tools/finalize_v15.py b/tools/finalize_v15.py new file mode 100644 index 0000000..879e14c --- /dev/null +++ b/tools/finalize_v15.py @@ -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') diff --git a/tools/finalize_v16.py b/tools/finalize_v16.py new file mode 100644 index 0000000..7bdeef1 --- /dev/null +++ b/tools/finalize_v16.py @@ -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') diff --git a/tools/implement_v15.py b/tools/implement_v15.py new file mode 100644 index 0000000..74ad9b6 --- /dev/null +++ b/tools/implement_v15.py @@ -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') diff --git a/tools/implement_v16.py b/tools/implement_v16.py new file mode 100644 index 0000000..c766d1e --- /dev/null +++ b/tools/implement_v16.py @@ -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_clock20:','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') diff --git a/tools/implement_v19.py b/tools/implement_v19.py new file mode 100644 index 0000000..0638025 --- /dev/null +++ b/tools/implement_v19.py @@ -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=3:return + var cost=Economy.HASTE_PRICES[helper_speed] + if g.essence=3:return + var cost=Economy.DILIGENCE_PRICES[helper_diligence] + if g.essence=0 and selected=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=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=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=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) diff --git a/tools/inspect_succubus.py b/tools/inspect_succubus.py new file mode 100644 index 0000000..b998e20 --- /dev/null +++ b/tools/inspect_succubus.py @@ -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('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)) diff --git a/tools/make_build_sfx.py b/tools/make_build_sfx.py new file mode 100644 index 0000000..781cede --- /dev/null +++ b/tools/make_build_sfx.py @@ -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('=0 and s.assigned0: 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'); diff --git a/tools/prepare_v131.py b/tools/prepare_v131.py new file mode 100644 index 0000000..f23c50f --- /dev/null +++ b/tools/prepare_v131.py @@ -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') diff --git a/tools/prepare_v14.py b/tools/prepare_v14.py new file mode 100644 index 0000000..25dd886 --- /dev/null +++ b/tools/prepare_v14.py @@ -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') diff --git a/tools/prepare_v15.py b/tools/prepare_v15.py new file mode 100644 index 0000000..82cceea --- /dev/null +++ b/tools/prepare_v15.py @@ -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('.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('=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') diff --git a/tools/verify_v19.ps1 b/tools/verify_v19.ps1 new file mode 100644 index 0000000..d3446cc --- /dev/null +++ b/tools/verify_v19.ps1 @@ -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')} +}