Initial dialog, updated girl model

This commit is contained in:
Vladislav Khorev committed 2026-05-08 19:17:47 +03:00
1 parent 8214342248
commit d4bc73f732
9 files changed
+201028 -13

No files matched your search

+4 -4
View File
@@ -37,10 +37,10 @@
{ {
"id": "npc_02_woman", "id": "npc_02_woman",
"name": "Студентка", "name": "Студентка",
"animationIdlePath": "resources/w/new_anims/girl_stand_idle005.txt", "animationIdlePath": "resources/w/girl/girl_walk001.txt",
"animationWalkPath": "resources/w/new_anims/girl_walk005.txt", "animationWalkPath": "resources/w/girl/girl_walk001.txt",
"meshTextures": { "meshTextures": {
"polySurface1": "resources/w/new_anims/Chat_02_diff.png" "polySurface1": "resources/w/girl/Chat_02_diff_1.png"
}, },
"positionX": 19.5, "positionX": 19.5,
"positionY": 0.0, "positionY": 0.0,
@@ -48,7 +48,7 @@
"facingAngle" : 3.141592, "facingAngle" : 3.141592,
"walkSpeed": 1.5, "walkSpeed": 1.5,
"rotationSpeed": 8.0, "rotationSpeed": 8.0,
"modelScale": 0.00016, "modelScale": 0.01,
"modelCorrectionRotX": 0.0, "modelCorrectionRotX": 0.0,
"modelCorrectionRotY": 180.0, "modelCorrectionRotY": 180.0,
"modelCorrectionRotZ": 0.0, "modelCorrectionRotZ": 0.0,
+20 -1
View File
@@ -1,5 +1,24 @@
{ {
"npcs": [ "npcs": [
{
"id": "npc_02_woman",
"name": "Студентка",
"animationIdlePath": "resources/w/girl/girl_walk002.txt",
"animationWalkPath": "resources/w/girl/girl_walk002.txt",
"meshTextures": {
"polySurface1": "resources/w/girl/Chat_02_diff_1.png"
},
"positionX": 1.03298,
"positionY": 0.0,
"positionZ": -4.61801,
"facingAngle" : 3.141592,
"walkSpeed": 1.66,
"rotationSpeed": 8.0,
"modelScale": 0.016,
"modelCorrectionRotX": 0.0,
"modelCorrectionRotY": 180.0,
"modelCorrectionRotZ": 0.0,
"interactionRadius": 2.0
}
] ]
} }
+32
View File
@@ -0,0 +1,32 @@
{
"dialogues": [
{
"id": "dialog_start001",
"start": "line_1",
"nodes": [
{
"id": "line_1",
"type": "Line",
"speaker": "Бекзат",
"portrait": "resources/w/gg/gg2_s_podsvetkoy5.png",
"text": "Новый день! Я проснулся, позавтракал и готов поехать в универ!",
"next": "line_2"
},
{
"id": "line_2",
"type": "Line",
"speaker": "Бекзат",
"portrait": "resources/w/gg/gg2_s_podsvetkoy5.png",
"text": "Надо проверить телефон, и не забыть взять свою записную книжку.",
"next": "end_1"
},
{
"id": "end_1",
"type": "End"
}
]
}
],
"cutscenes": [
]
}
+11
View File
@@ -2,5 +2,16 @@
-- NPC PATROL WAYPOINTS -- NPC PATROL WAYPOINTS
-- ============================================ -- ============================================
local function step2()
game_api.npc_walk_to(0, 1.03298, 0, -4.61801, step1)
end
function step1()
game_api.npc_walk_to(0, -6.65295, 0, 4.15397, step2)
end
step1()
game_api.start_dialogue("dialog_start001")
print("Lua script loaded successfully--!") print("Lua script loaded successfully--!")
Binary file not shown.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+7 -5
View File
@@ -190,12 +190,13 @@ namespace ZL
params_dorm.roomTexturePath = ""; params_dorm.roomTexturePath = "";
params_dorm.gameObjectsJsonPath = "resources/config2/gameobjects_dorm.json"; params_dorm.gameObjectsJsonPath = "resources/config2/gameobjects_dorm.json";
params_dorm.npcsJsonPath = "resources/config2/npcs_dorm.json"; params_dorm.npcsJsonPath = "resources/config2/npcs_dorm.json";
params_dorm.dialoguesJsonPath = "resources/dialogue/sample_dialogues.json"; params_dorm.dialoguesJsonPath = "resources/dialogue/dorm_dialogues.json";
params_dorm.navigationJsonPath = "resources/config2/navigation_dorm.json"; params_dorm.navigationJsonPath = "resources/config2/navigation_dorm.json";
params_dorm.teleportsJsonPath = "resources/config2/teleports_dorm.json"; params_dorm.teleportsJsonPath = "resources/config2/teleports_dorm.json";
params_dorm.scriptPath = "resources/start_dorm.lua"; params_dorm.scriptPath = "resources/start_dorm.lua";
params_dorm.playerPosition = Eigen::Vector3f(6.0357, 0, -16.0581); params_dorm.playerPosition = Eigen::Vector3f(6.0357, 0, -16.0581);
locations["location_dorm"] = std::make_shared<Location>(renderer, inventory); locations["location_dorm"] = std::make_shared<Location>(renderer, inventory);
locations["location_dorm"]->setup(params_dorm); locations["location_dorm"]->setup(params_dorm);
@@ -516,15 +517,16 @@ namespace ZL
case SDLK_o: case SDLK_o:
//y = y + 0.002; //y = y + 0.002;
//currentLocation->player->hp = 200; //currentLocation->player->hp = 200;
//currentLocation->npcs[3]->walkSpeed += 0.02f; currentLocation->npcs[0]->walkSpeed += 0.02f;
//std::cout << "Walk speed: " << currentLocation->npcs[3]->walkSpeed << std::endl; std::cout << "Walk speed: " << currentLocation->npcs[0]->walkSpeed << std::endl;
break; break;
case SDLK_k: case SDLK_k:
//y = y - 0.002; //y = y - 0.002;
std::cout << "Player pos: " << currentLocation->player->position.transpose() << std::endl; std::cout << "Player pos: " << currentLocation->player->position.transpose() << std::endl;
//currentLocation->npcs[3]->walkSpeed -= 0.02f; currentLocation->npcs[0]->walkSpeed -= 0.02f;
//std::cout << "Walk speed: " << currentLocation->npcs[3]->walkSpeed << std::endl; std::cout << "Walk speed: " << currentLocation->npcs[0]->walkSpeed << std::endl;
break; break;
case SDLK_p: case SDLK_p:
+3 -3
View File
@@ -145,8 +145,6 @@ namespace ZL
setupNavigation(params.navigationJsonPath); setupNavigation(params.navigationJsonPath);
scriptEngine.init(this, &inventory, params.scriptPath);
dialogueSystem.init(renderer, CONST_ZIP_FILE); dialogueSystem.init(renderer, CONST_ZIP_FILE);
dialogueSystem.loadDatabase(params.dialoguesJsonPath); dialogueSystem.loadDatabase(params.dialoguesJsonPath);
@@ -155,7 +153,7 @@ namespace ZL
std::cerr << "Failed to init NPC name TextRenderer" << std::endl; std::cerr << "Failed to init NPC name TextRenderer" << std::endl;
npcNameText.reset(); npcNameText.reset();
} }
dialogueSystem.loadDatabase("resources/dialogue/sample_dialogues.json"); //dialogueSystem.loadDatabase("resources/dialogue/sample_dialogues.json");
/*dialogueSystem.addTriggerZone({ /*dialogueSystem.addTriggerZone({
"ghost_room_trigger", "ghost_room_trigger",
"test_line_dialogue", "test_line_dialogue",
@@ -165,6 +163,8 @@ namespace ZL
false false
});*/ });*/
scriptEngine.init(this, &inventory, params.scriptPath);
} }