Working on new dialogues

This commit is contained in:
Vladislav Khorev 2026-07-04 22:45:47 +03:00
parent f7e63f933b
commit 8a6366098c
10 changed files with 8388 additions and 70 deletions

View File

@ -122,7 +122,7 @@
},
{
"name": "Note001",
"texturePath": "resources/w/interior/note001_text001.png",
"texturePath": "resources/w/interior/note001_tex003.png",
"meshPath": "resources/w/interior/note001_002.txt.bin",
"rotationX": 0.0,
"rotationY": 0.0,

View File

@ -2,7 +2,7 @@
"npcs": [
{
"id": "npc_teacher01",
"name": "Aida Dzhenibekovna",
"name": "Аида Дженибекова",
"animationIdlePath": "resources/w/new_anims/teacher_stand_idle001_small.anim",
"animationWalkPath": "resources/w/new_anims/teacher_walk001_small.anim",
"meshTextures": {
@ -22,7 +22,7 @@
},
{
"id": "npc_02_woman",
"name": "Aiperi",
"name": "Айпери",
"animationIdlePath": "resources/w/girlfriend/girlfriend_idle003_small.anim",
"animationWalkPath": "resources/w/girlfriend/girlfriend_walk003_small.anim",
"meshTextures": {
@ -43,7 +43,7 @@
},
{
"id": "npc_04_ghost",
"name": "Ghost",
"name": "Призрак",
"animationIdlePath": "resources/w/ghost/ghost_idle004_small.anim",
"animationWalkPath": "resources/w/ghost/ghost_idle004_small.anim",
"meshTextures": {
@ -64,7 +64,7 @@
},
{
"id": "ghost_01x",
"name": "Shadow",
"name": "Тень",
"meshTextures": {
"Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png"
},
@ -90,7 +90,7 @@
},
{
"id": "ghost_02x",
"name": "Shadow",
"name": "Тень",
"meshTextures": {
"Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png"
},
@ -116,7 +116,7 @@
},
{
"id": "ghost_03x",
"name": "Shadow",
"name": "Тень",
"meshTextures": {
"Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png"
},
@ -142,7 +142,7 @@
},
{
"id": "npc_02_woman",
"name": "Altynai",
"name": "Алтынай",
"animationIdlePath": "resources/w/girl/girl_idle001_small.anim",
"animationWalkPath": "resources/w/girl/girl_walk010_small.anim",
"meshTextures": {

View File

@ -600,7 +600,7 @@
"objectiveComplete": "ghost_lore.ghost_lore_alik",
"objectiveVisible": "ghost_lore.ghost_lore_alik",
"questUnlock": "ghost_coursework",
"next": "end_1"
"next": "setflag_1"
},
{
"id": "end_1",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -18,9 +18,9 @@
"autoComplete": true,
"description": "В университете каждую ночь появляется призрак студентки. Она заявляет, что ее зовут Бегимай и что она должна сдать курсовую работу. Я не помню студентки с таким именем, но может быть она с другого курса? Я должен узнать об этом подробнее.",
"objectives": [
{ "id": "ghost_lore_teacher", "text": "Поговорить с Аидой Джаныбековой", "completed": false },
{ "id": "ghost_lore_aiperi", "text": "Поговорить с Айпери", "completed": false },
{ "id": "ghost_lore_alik", "text": "Поговорить с Аликом", "completed": false, "visible": false }
{ "id": "ghost_lore_alik", "text": "Поговорить с Аликом", "completed": false, "visible": false },
{ "id": "ghost_lore_teacher", "text": "Поговорить с Аидой Джаныбековой", "completed": false }
]
},
{

View File

@ -4,7 +4,7 @@ teacher_door_opened = false
player_hold_book = false
player_hold_knife = false
player_hold_key = false
--player_hold_key = false
teacher_arrived = false
teacher_told_about_book = false
@ -30,14 +30,12 @@ morning_did_open_door_index = 0
ghost_gone = false
function dialog_aiperi_give_key()
if (player_hold_key == false) then
local player_hold_key = game_api.getIntValue("player_hold_key")
if (player_hold_key == 0) then
game_api.pickup_item("teacher_room_key")
game_api.quest_unlock("aiperi_knife")
game_api.quest_set_objective_completed("aiperi_knife", "aiperi_knife_keys")
player_hold_key = true
print("dialog_aiperi_give_key, player_hold_key set to")
print(player_hold_key)
game_api.setIntValue("player_hold_key", 1)
local aiperi_chat_opened = game_api.getIntValue("aiperi_chat_opened")
@ -68,12 +66,13 @@ game_api.set_trigger_zone_callbacks("lection_hall_zone001",
function knife_dialog_zone001_enter_callback()
print("knife_dialog_zone001_enter_callback--!")
local day = game_api.getIntValue("day")
local player_hold_key = game_api.getIntValue("player_hold_key")
if (day == 0) then
if (player_hold_knife == false) then
local lection_is_over = game_api.getIntValue("lection_is_over")
if lection_is_over == 1 then
if (player_hold_key) then
if (player_hold_key==1) then
game_api.start_dialogue("knife_dialog002")
else
game_api.start_dialogue("knife_dialog001")
@ -159,14 +158,15 @@ end
function on_npc_interact(npc_index)
local player_ghost_aware = game_api.getIntValue("ghost_aware")
local player_hold_key = game_api.getIntValue("player_hold_key")
local day = game_api.getIntValue("day")
print("[Lua] NPC interaction! Index: " .. tostring(npc_index))
if npc_index == 1 then
local day = game_api.getIntValue("day")
if (game_api.is_dawn()) or (day > 0) then
game_api.start_dialogue("dialog_aiperi_morning001")
else
if (player_hold_key) then
if (player_hold_key==1) then
game_api.start_dialogue("knife_dialog002")
else
game_api.start_dialogue("knife_dialog001")
@ -174,6 +174,29 @@ function on_npc_interact(npc_index)
end
end
if npc_index == 0 then
if (day == 0) then
if (teacher_told_about_book) then
game_api.start_dialogue("teacher_dialog006")
else
game_api.start_dialogue("teacher_dialog001")
end
else
local player_has_coursework = game_api.getIntValue("player_has_coursework")
local player_has_report_card = game_api.getIntValue("player_has_report_card")
local report_card_signed = game_api.getIntValue("report_card_signed")
if (report_card_signed == 1) then
game_api.start_dialogue("teacher_dialog004")
elseif (player_has_coursework == 1 and player_has_report_card == 1) then
game_api.start_dialogue("teacher_dialog005")
game_api.remove_item("coursework")
game_api.setIntValue("report_card_signed", 1)
else
game_api.start_dialogue("teacher_dialog007")
end
end
--[[
if (player_ghost_aware == 1) then
--game_api.setIntValue("player_has_coursework", 1)
local player_has_coursework = game_api.getIntValue("player_has_coursework")
@ -181,19 +204,17 @@ function on_npc_interact(npc_index)
local report_card_signed = game_api.getIntValue("report_card_signed")
if (report_card_signed == 1) then
game_api.start_dialogue("teacher_dialog002")
game_api.start_dialogue("teacher_dialog004")
elseif (player_has_coursework == 1 and player_has_report_card == 1) then
game_api.start_dialogue("teacher_dialog005")
game_api.remove_item("coursework")
game_api.setIntValue("report_card_signed", 1)
elseif (player_has_coursework == 1) then
game_api.start_dialogue("teacher_dialog004")
else
game_api.start_dialogue("teacher_dialog003")
game_api.start_dialogue("teacher_dialog007")
end
else
game_api.start_dialogue("teacher_dialog001")
end
end]]
end
if npc_index == 2 then
local report_card_signed = game_api.getIntValue("report_card_signed")
@ -238,12 +259,12 @@ function on_library_door_click()
if (day == 0) then
if game_api.is_dawn() then
game_api.start_dialogue("door_dialog001")
game_api.start_dialogue("door_dialog007")
elseif game_api.is_night() then
game_api.start_dialogue("door_night_dialog001")
else
if (lection_is_over == 0) then
game_api.start_dialogue("door_dialog001")
game_api.start_dialogue("door_dialog003")
end
end
else
@ -268,14 +289,15 @@ end
function on_teachers_door_click()
print("on_teachers_door_click---")
local player_hold_key = game_api.getIntValue("player_hold_key")
local day = game_api.getIntValue("day")
print("day is")
print(day)
if (day == 0) and not game_api.is_dawn() then
if (player_hold_key) then
if (player_hold_key==1) then
if (not teacher_door_opened) then
teacher_door_opened = true
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
@ -285,7 +307,7 @@ function on_teachers_door_click()
game_api.switch_navigation(3)
end
else
game_api.start_dialogue("door_teacher_dialog001")
game_api.start_dialogue("door_dialog004")
end
else
if (game_api.is_dawn()) then
@ -381,17 +403,21 @@ function on_hall_door_click()
local day = game_api.getIntValue("day")
if (day == 0) and not game_api.is_dawn() then
if (not hall_door_opened) then
hall_door_opened = true
game_api.switch_navigation(1)
game_api.rotate_object("Hall_Leaf001", 90, 0.5, nil)
game_api.fade_object("Room_Cover_Main_Hall_001", 0, 0.5, function()
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
end)
game_api.set_npc_enabled(0, true)
game_api.set_npc_enabled(6, true)
game_api.npc_rotate_to(6, 180)
if (day == 0) then
if (game_api.is_dawn()) then
game_api.start_dialogue("door_dialog007")
else
if (not hall_door_opened) then
hall_door_opened = true
game_api.switch_navigation(1)
game_api.rotate_object("Hall_Leaf001", 90, 0.5, nil)
game_api.fade_object("Room_Cover_Main_Hall_001", 0, 0.5, function()
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
end)
game_api.set_npc_enabled(0, true)
game_api.set_npc_enabled(6, true)
game_api.npc_rotate_to(6, 180)
end
end
else
if (game_api.is_night()) then
@ -403,37 +429,41 @@ function on_hall_door_click()
end
function on_s1_door_click()
--if (player_left_darklands) then
if (game_api.is_night()) then
if not (morning_did_open_door_index == 1) then
game_api.start_dialogue("door_dialog001")
end
if (day == 0) and(game_api.is_dawn()) then
game_api.start_dialogue("door_dialog007")
else
game_api.start_dialogue("door_dialog001")
if (game_api.is_night()) then
if not (morning_did_open_door_index == 1) then
game_api.start_dialogue("door_dialog001")
end
else
game_api.start_dialogue("door_dialog006")
end
end
end
function on_s2_door_click()
--if (player_left_darklands) then
if (game_api.is_night()) then
if not (morning_did_open_door_index == 2) then
game_api.start_dialogue("door_dialog001")
end
if (day == 0) and(game_api.is_dawn()) then
game_api.start_dialogue("door_dialog007")
else
game_api.start_dialogue("door_dialog001")
if (game_api.is_night()) then
if not (morning_did_open_door_index == 2) then
game_api.start_dialogue("door_dialog001")
end
else
game_api.start_dialogue("door_dialog006")
end
end
end
function on_n2_door_click()
print("morning_can_open_door_index")
print(morning_can_open_door_index)
print("morning_did_open_door_index")
print(morning_did_open_door_index)
if (game_api.is_night()) then
if not (morning_did_open_door_index == 4) then
game_api.start_dialogue("door_dialog001")
if (day == 0) and(game_api.is_dawn()) then
game_api.start_dialogue("door_dialog007")
else
if (game_api.is_night()) then
if not (morning_did_open_door_index == 4) then
game_api.start_dialogue("door_dialog001")
end
end
end
end
@ -1012,6 +1042,8 @@ game_api.set_enter_night_callback(
game_api.set_chat_callbacks(
function()
local player_hold_key = game_api.getIntValue("player_hold_key")
if (game_api.is_night()) then
if (game_api.is_dawn()) then
local morning_player_can_leave = game_api.getIntValue("morning_player_can_leave")
@ -1054,9 +1086,7 @@ game_api.set_chat_callbacks(
print("dialogx step 4")
if (lection_is_over == 1) then
print("dialogx step 5")
print("player_hold_key")
print(player_hold_key)
if (player_hold_key == false) then
if (player_hold_key == 0) then
print("dialogx step 6")
game_api.start_dialogue("dialog_chat_aiperi002")
end

BIN
resources/w/interior/note001_tex003.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
resources/w/interior/note001_text001.png (Stored with Git LFS)

Binary file not shown.

View File

@ -15,6 +15,7 @@
#include <android/log.h>
#endif
#ifdef EMSCRIPTEN
#include <emscripten.h>
#endif
@ -357,10 +358,11 @@ namespace ZL
gameState.globalFloats["player_hp"] = 200;
LocationSetup uniInteriorParams;
uniInteriorParams.gameObjectsJsonPath = "resources/config2/gameobjects_uni_interior_x.json";
uniInteriorParams.npcsJsonPath = "resources/config2/npcs_uni_interior.json";
uniInteriorParams.dialoguesJsonPath = "resources/dialogue/uni_interior_dialogues_006.json";
uniInteriorParams.dialoguesJsonPath = "resources/dialogue/uni_interior_dialogues_008.json";
uniInteriorParams.navigationJsonPaths = {
"resources/navigation/uni_interior4_unlocked_n2.txt", //0