Post tutorial RSS Making a primitive/simple quest

A simple tutorial showing how to make a simple "bring item" quest. No more than 15 minutes is required for this,and you gain the scripting knowledge to do much bigger stuff. Good luck to all who try this. Kaplan994

Posted by on - Intermediate Other

So i will show you how to create a basic/primitive quest in Stalker Call of Pripyat.

The first thing you need is Notepad ++,this little tool is making this much easier.
So the files we need to edit are:
Configs/gameplay/character_desc_zaton.xml ,dialogs_zaton.xml , info_zaton.xml .
Configs /text/eng/st_quests_zaton.xml

So first thing is to create a dialog for the quest.
Open dialogs_zaton.xml and at the bottom before add this

xml code:
<dialog id="spas12_quest">
  <phrase id="1">
    <text>Bring the shotgun.</text>
  <phrase id="0">
    <text>Do you need a rifle?</text>

This is the dialog with Gonta,the one that starts the quest.
Now to explain this a little.

Do you need a rifle?
Phrase id 0 means that this is the first line that is shown when talking to Gonta,now when selecting that line you will start the quest.
if you look down you will see 1,this means that when you select the previous line,when selected leads to Phrase 1,and that phrase starts the quest.
Now that is just the first dialog,now add a second below this one.

xml code:
<dialog id="spas12_quest_bring">
  <phrase id="1">
    <text>Thank you stalker.</text>
  <phrase id="0">
    <text>Here's the shotgun.</text>

This is the dialog for bringing the weapon back to Gonta,and taking the reward.
Same things as in the first one so i won't explain anything here.
When you are finished,it should look like this.

Now we have the dialog.
Now open info_zaton.xml and add these lines at the end before .

<info_portion id="quest_spas12_give"></info_portion>
<info_portion id="quest_has_spas12"></info_portion>
<info_portion id="quest_spas12_done"></info_portion>

And then open character_desc_zaton.xml and find
and add these lines before actor_break_dialog

<actor_dialog>spas12_quest</actor_dialog>   <actor_dialog>spas12_quest_bring</actor_dialog>

When finished it should look like this.

Now open tm_zaton.xml,and add this at the botom

icon = ui_inGame2_Put_v_pripyat
prior = 2
storyline = false
title = {=actor_has_item(wpn_spas12) =actor_has_item(wpn_spas12)}spas12_gonta_bring_name, spas12_gonta_find_name
descr = spas12_gonta_descr
target = {=actor_has_item(wpn_spas12) =actor_has_item(wpn_spas12)}zat_b106_stalker_gonta
condlist_0 = {+quest_spas12_done} complete

It look like this
Now to add a description to the quest.
open st_quests_zaton.xml
and add these lines

<string id="spas12_gonta_find_name">
    <text>Find Gonta a SPAS 12.</text>
  <string id="spas12_gonta_bring_name">
    <text>Bring Gonta the shotgun.</text>
  <string id="spas12_gonta_descr">
    <text>Gonta needs a good weapon for hunting,a better shotgun.He was interested in the SPAS 12 shotgun.</text>

You can add whatever you want here,i kept it simple.

Now the last part of the quest is to add something to dialogs_zaton.scripts
So open the file and add this at the top.

function give_spas12_quest()
function is_has_spas12_gonta()
  if"wpn_spas12") then
    return true
  return false
function transfer_wpn_spas12_to_gonta(first_speaker, second_speaker)
  dialogs.relocate_item_section_from_actor(first_speaker, second_speaker, "wpn_spas12")
  dialogs.relocate_money_to_actor(first_speaker, second_speaker, 1000)

So now your quest is done.
Speak to Gonta and you will receive a quest to get him a Spas 12 shotgun.
This shows what to do to make a simple quest.
For more complex things there is more work.

Das_P0m - - 539 comments

Its about some time this was written... but hey:

Thanks man!

Will use this to try to add my own quests in Clear Sky.
Yes... I know, its a bit different, there, but the basics are the same... at least from what I can see and understand.^^

Reply Good karma Bad karma+2 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.