This file stores all friendly NPC data with dialogues start logic.
{
"zob_profile":{ // NPC profile ID
"name": "npc.zob.name", // name with lang key
"trader_profile": null, // null or string with trader ID (if not null, then player' will not be able to talk, only trade)
"texture": "pstalker", // texture name in assets/textures/
"idle_animation": "sit_ground", // animation ID, full list can be founded in scripts/p_game.gd
"weapon": "w_lr300", // name of 3D model in assets/models/
"gasmask": true, // show gasmask on face
"gasmask_type": "antigas", // texture name of gasmask in assets/textures/
"weapon_hold": "backpack", // bone name for holding weapon model (l_hand, r_hand, backpack)
"dialogues": [ // dialogues list, when player press F, the game loops through this array and starts first available dialogue, then stops
{
"dont_has_event_key": "zob.quest", // if player don't has event key - dialogue will start, else pass it and will go to the next one
"dialogue": "zob_dialogue" // dialogue ID (it's file name in assets/dialogues/)
},
{
"has_event_key": "zob.quest.completed", // if player has even't key - start dialogue, else, keep searching next one dialogue
"dont_has_event_key": "zob.no.dialogue", // if player don't has event key - dialogue will start, else pass it and will go to the next one
"dialogue": "zob_dialogue",
"start_phrase_id": "completed_quest" // we can use one dialogue file, but starts from different phrases using phrase ID
},
{
"has_event_key": "zob.no.dialogue",
"dialogue": "zob_dialogue",
"start_phrase_id": "no_dialogue"
}
]
}
}
Basically dialogue logic can be different, like very simple one:
Infinity repeatable dialogue. After closing and starting to talk again it will repeat from the beginning.
{
"dialogue": "dialogue_id"
}
Changeable dialogue to the next_dialogue variant or can be the next dialogue.
{
"dont_has_event_key": "event.key.id", <- you can add this key after this dialogue ends
"dialogue": "dialogue_id"
} ,
{
"has_event_key": "event.key.id", <- if we have condition, dialogue will start, else not.
So here you can add key id from dont_has_event_key