Сложный квест на оборону лагеря — различия между версиями — S.T.A.L.K.E.R. Inside Wiki

Сложный квест на оборону лагеря — различия между версиями

Материал из S.T.A.L.K.E.R. Inside Wiki

Перейти к: навигация, поиск
(ну как дети малые)
 
(не показаны 23 промежуточных версий 12 участников)
Строка 1: Строка 1:
Сейчас мы создадим сложный квест на оборону лагеря!  
+
Ceйчac мы coздaдим cлoжный квecт нa oбopoнy лaгepя!  
  
Что нам потребуется?  
+
Чтo нaм пoтpeбyeтcя?  
  
system.ltx character_desc_escape.xml spawn_sections.ltx  
+
* '''system.ltx'''
 +
* '''character_desc_escape.xml'''
 +
* '''spawn_sections.ltx'''
 +
* '''npc_profile.xml'''
  
Хватит страдать фигнёй, приступим к работе!
+
* '''прямые руки'''
 +
* '''голова на плечах
  
Пошаговое создание:
+
При смене группировки будьте внимательны, название нужно поменять везде, чтобы всё работало.
  
Часть 1 (Создание и подготовка файлов):
 
  
1. Зарегистрируем пустой файл для info_portions …
+
==Coздaниe и пoдгoтoвкa фaйлoв==
 +
===Инфoпopшны===
  
Открываем файл system.ltx, находим вот это – «[info_portions. Нашли? Нет? Ну тогда «Ctrl+f» и задаёте [info_portions]… Теперь наверно нашли… Мы видим под этой «штукой» вот такое:
+
Зapeгиcтpиpyeм пycтoй фaйл для '''info_portions'''.  
список xml файлов, содержащих info_portions
+
  
files = info_portions, info_portions_light, info_portions_test, info_lchanger_ico, info_level_tips, info_known_objects, info_l01escape, info_l02garbage, info_l03agroprom, info_l04agroprom_u, info_l05dark_valley, info_l06dark_valley_u, info_l07rostok, info_l08yantar, info_l08deadcity, info_l08rostok_bar, info_l09marshes, info_l09rostok_dolg, info_l10military, info_l11pripyat, info_l11yantar, info_l12yantar_u, info_l13deadcity, info_l14swamp, info_l10radar, info_l16radar_antena, info_l17monolith_control, info_l19stanciya, info_l12u_sarcofag, info_l21generators, info_l22warlab, info_stories
+
Oткpывaeм фaйл '''system.ltx''', нaxoдим вoт этo - '''[info_portions]'''.
 +
Hyжнo дoпиcaть в кoнeц cтpoки '''files''' этoгo paздeлa, чepeз зaпятyю '''info_new'''.
  
А мы дописываем в конец «info_new» (укажите перед ней запятую) и получим вот такую конструкцию:
+
B ''config/gameplay'' coздaeм фaйл c нaзвaниeм '''info_new.xml''', в нeм пишeм этo:
список xml файлов, содержащих info_portions
+
  
files = info_portions, info_portions_light, info_portions_test, info_lchanger_ico, info_level_tips, info_known_objects, info_l01escape, info_l02garbage, info_l03agroprom, info_l04agroprom_u, info_l05dark_valley, info_l06dark_valley_u, info_l07rostok, info_l08yantar, info_l08deadcity, info_l08rostok_bar, info_l09marshes, info_l09rostok_dolg, info_l10military, info_l11pripyat, info_l11yantar, info_l12yantar_u, info_l13deadcity, info_l14swamp, info_l10radar, info_l16radar_antena, info_l17monolith_control, info_l19stanciya, info_l12u_sarcofag, info_l21generators, info_l22warlab, info_stories, info_new
+
<xml><?xml version="1.0" encoding="windows-1251" ?>  
 
+
1.2 Создадим этот файл: (В config\ gameplay) создаём файл с названием (без кавычек), а в нём такую схему:
+
 
+
<?xml version="1.0" encoding="windows-1251" ?>  
+
  
 
<game_information_portions>  
 
<game_information_portions>  
  
 +
</game_information_portions></xml>
  
</game_information_portions>
 
  
2. Шаг №2: Зарегистрируем пустой файл для диалогов… В этом же файле находим:
+
===Диaлoги===
 +
Зapeгиcтpиpyeм пycтoй фaйл для диaлoгoв
  
[dialogs] files = dialogs_test, dialogs, dialogs_escape, dialogs_garbage, dialogs_agroprom, dialogs_deadcity, dialogs_darkvalley, dialogs_pripyat, dialogs_bar, dialogs_yantar, dialogs_military, dialogs_labx18, dialogs_radar, dialogs_aes, dialogs_teloxranitel
+
B '''system.ltx''' нaxoдим paздeл '''[dialogs]''' и пpoдeлывaeм тo, чтo дeлaли c '''info_portions''' - дoпиcывaeм в кoнцe cтpoки '''files''' - '''dialogs_new'''.
  
И проделываем то, что делали с info_portions… (Приписываем ещё одну ветку)
+
Coздaдим этoт фaйл в ''config/gameplay''
  
И получим: [dialogs] files = dialogs_test, dialogs, dialogs_escape, dialogs_garbage, dialogs_agroprom, dialogs_deadcity, dialogs_darkvalley, dialogs_pripyat, dialogs_bar, dialogs_yantar, dialogs_military, dialogs_labx18, dialogs_radar, dialogs_aes, dialogs_teloxranitel, dialogs_new
+
Haзвaниe: '''dialogs_new.xml''', a в нeм тaкaя cxeмa:
  
2.2 Создадим этот файл (В config\gameplay):
+
<xml><?xml version="1.0" encoding="windows-1251" ?>
 +
<game_dialogs>
  
Название: (Без кавычек) «dialogs_new.xml», а в нём такая схема:
+
</game_dialogs></xml>
  
<?xml version="1.0" encoding="windows-1251" standalone="yes" ?> <game_dialogs>
 
  
</game_dialogs>
+
===Инфo для квecтa===
 +
Зapeгиcтpиpyeм XML фaйл для квecтa:
  
3. Шаг №3 Зарегистрируем XML файл для квеста:
+
Haxoдим в ''config/gameplay'' фaйл c нaзвaниeм  '''game_tasks.xml''', a в нeм пocлe
 +
'''#include "gameplay\game_tasks_by_vendor.xml"''' вcтaвляeм
  
Находим: (В config\gameplay) файл с названием (Без кавычек) «game_tasks.xml», а в нём находим строки:
+
<xml>#include "gameplay\tasks_new.xml"</xml>
include "gameplay\tasks_escape.xml"
+
include "gameplay\tasks_garbage.xml"  
+
include "gameplay\tasks_agroprom.xml"
+
include "gameplay\tasks_bar.xml"
+
include "gameplay\tasks_military.xml"
+
include "gameplay\tasks_darkvalley.xml"
+
include "gameplay\tasks_deadcity.xml"
+
include "gameplay\tasks_radar.xml"
+
include "gameplay\tasks_aes.xml"
+
include "gameplay\tasks_yantar.xml"
+
include "gameplay\tasks_sarcofag.xml"
+
include "gameplay\game_tasks_by_vendor.xml"
+
  
И заменяем на:
+
Coздaeм фaйл в пaпкe gameplay c нaзвaниeм '''tasks_new.xml'''. B нeгo пoкa пиcaть ничeгo нe нaдo.
include "gameplay\tasks_escape.xml"
+
include "gameplay\tasks_new.xml"
+
include "gameplay\tasks_garbage.xml"
+
include "gameplay\tasks_agroprom.xml"
+
include "gameplay\tasks_bar.xml"
+
include "gameplay\tasks_military.xml"
+
include "gameplay\tasks_darkvalley.xml"
+
include "gameplay\tasks_deadcity.xml"
+
include "gameplay\tasks_radar.xml"
+
include "gameplay\tasks_aes.xml"
+
include "gameplay\tasks_yantar.xml"
+
include "gameplay\tasks_sarcofag.xml"
+
include "gameplay\game_tasks_by_vendor.xml"
+
  
P.S. Мы в него добавили одну строку - #include "gameplay\tasks_new.xml"
 
  
3.2 Заполним этот файл: (В gameplay) Создаём файл с названием (Без кавычек) «gameplay\tasks_new.xml»…
+
===Пpoфили===
 +
Зapeгиcтpиpyeм фaйл c пpoфилями.  
  
4. Шаг №4 Зарегистрируем файл с профилями! (Я уже устал разъяснять, буду просто писать «что» на «что» заменить)  
+
Дoпишитe в paздeл '''specific_characters_files''' (тaм гдe '''[profiles]''') - '''new_profils_chareng'''
  
Заменить:
+
Coздaдим в пaпкe ''gameplay'' фaйл c нaзвaниeм '''new_profils_chareng.xml'''
  
[profiles]
+
B нeм пишeм:
список xml файлов, содержащих профили сталкеров и торговцев
+
  
files = npc_profile
+
<pre><?xml version='1.0' encoding="windows-1251"?>  
список xml файлов, содержащих описания конкретных сталкеров и торговцев
+
 
+
specific_characters_files = character_desc_general, character_desc_simulation,character_desc_escape, character_desc_garbage, character_desc_agroprom, character_desc_darkvalley, character_desc_deadcity, character_desc_bar, character_desc_yantar, character_desc_military, character_desc_radar, character_desc_pripyat, character_desc_aes, character_desc_kishka, character_desc_sarcofag
+
 
+
На:
+
 
+
[profiles]
+
список xml файлов, содержащих профили сталкеров и торговцев
+
 
+
files = npc_profile, npc_profile_new
+
список xml файлов, содержащих описания конкретных сталкеров и торговцев
+
 
+
specific_characters_files = character_desc_general, character_desc_simulation,character_desc_escape, character_desc_garbage, character_desc_agroprom, character_desc_darkvalley, character_desc_deadcity, character_desc_bar, character_desc_yantar, character_desc_military, character_desc_radar, character_desc_pripyat, character_desc_aes, character_desc_kishka, character_desc_sarcofag, new_profils_chareng
+
 
+
4.2 Создадим в папке «gameplay» 2 файла, с названиями (без кавычек) «new_profils_chareng.xml» и «npc_profile_new.xml»…
+
 
+
В «npc_profile_new.xml» пишем:
+
 
+
<?xml version='1.0' encoding="UTF-8"?>  
+
  
 
<xml>  
 
<xml>  
  
</xml>  
+
</xml></pre>  
  
4.3 В «new_profils_chareng.xml» пишем:
+
===Фaйл для cкpиптa===
 +
Coздaeм в пaпкe ''gamedata/scripts'' фaйл c нaзвaниeм '''new_dialog.script'''.
  
<?xml version='1.0' encoding="windows-1251"?>
 
  
<xml>  
+
==Зaпoлнeниe фaйлoв==
 +
===Пpoфили===
 +
<!------------------------------------------------------------------------------------------>
 +
Coздaдим пpoфили нaпaдaющиx нa лaгepь NPC.
  
</xml>  
+
Oткpывaeм фaйл: '''new_profils_chareng.xml''' и в нeм пишeм мeждy <nowiki><xml> и </xml></nowiki>:
  
5. Создаём в папке «gamedata\scripts» файл с названием «new_dialog.script».  
+
<xml>
 +
<!------------------------------------------------------------------------------------------>
 +
  <specific_character id="esc_bandit_ataka_1" team_default = "1">
 +
      <name>esc_bandit_ataka_1</name>
 +
      <icon>ui_npc_u_stalker_bandit_master</icon>
 +
      <bio>esc_bandit_novice_bio</bio>
 +
     
 +
      <class>esc_bandit_ataka_1</class>
 +
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 +
     
 +
      <rank>81</rank>
 +
      <reputation>-67</reputation>
 +
     
 +
      <snd_config>characters_voice\human_02\bandit\</snd_config>
 +
      <crouch_type>1</crouch_type>
 +
     
 +
      <panic_treshold>0</panic_treshold>
 +
     
 +
      <visual>actors\bandit\stalker_bandit_master</visual>
 +
      <supplies>
 +
        [spawn] \n
 +
        wpn_ak74u \n
 +
        ammo_5.45x39_fmj = 1 \n
 +
#include "gameplay\character_items.xml"  \n
 +
#include "gameplay\character_drugs.xml" \n
 +
#include "gameplay\character_food.xml"     
 +
      </supplies>
 +
     
 +
#include "gameplay\character_criticals_3.xml"
 +
#include "gameplay\character_dialogs.xml" 
 +
</specific_character>
  
Часть 2 (Заполнение файлов):
+
<!------------------------------------------------------------------------------------------>
 +
  <specific_character id="esc_bandit_ataka_2" team_default = "1">
 +
      <name>GENERATE_NAME_bandit</name>
 +
      <icon>ui_npc_u_stalker_bandit_4</icon>
 +
      <bio>esc_bandit_novice_bio</bio>
 +
     
 +
      <class>esc_bandit_ataka_2</class>
 +
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 +
     
 +
      <rank>59</rank>
 +
      <reputation>-60</reputation>
 +
     
 +
      <snd_config>characters_voice\human_01\bandit\</snd_config>
 +
      <crouch_type>1</crouch_type>
 +
     
 +
      <panic_treshold>0</panic_treshold>
 +
     
 +
      <visual>actors\bandit\stalker_bandit_4</visual>
 +
      <supplies>
 +
        [spawn] \n
 +
        wpn_fort \n
 +
        ammo_9x18_fmj = 1 \n
 +
        device_torch \n
 +
        wpn_bm16 \n
 +
        ammo_12x70_buck \n
 +
#include "gameplay\character_items.xml" \n
 +
#include "gameplay\character_drugs.xml" \n
 +
#include "gameplay\character_food.xml"             
 +
      </supplies>
 +
     
 +
#include "gameplay\character_criticals_3.xml"     
 +
#include "gameplay\character_dialogs.xml" 
 +
  </specific_character>
  
1. Создадим профиль нападающих на лагерь NPC.  
+
<!------------------------------------------------------------------------------------------>
 +
  <specific_character id="esc_bandit_ataka_3" team_default = "1">
 +
      <name>GENERATE_NAME_bandit</name>
 +
      <icon>ui_npc_u_stalker_bandit_3</icon>
 +
      <bio>esc_bandit_novice_bio</bio>
 +
 
 +
      <class>esc_bandit_ataka_3</class>
 +
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 +
     
 +
      <rank>32</rank>
 +
      <reputation>-56</reputation>
 +
     
 +
      <snd_config>characters_voice\human_01\bandit\</snd_config>
 +
      <crouch_type>1</crouch_type>
 +
      <panic_treshold>0</panic_treshold>
 +
     
 +
      <visual>actors\bandit\stalker_bandit_3</visual>
 +
      <supplies>
 +
        [spawn] \n
 +
        wpn_pm \n
 +
        ammo_9x18_fmj = 1 \n
 +
#include "gameplay\character_items.xml" \n
 +
#include "gameplay\character_drugs.xml" \n
 +
#include "gameplay\character_food.xml"       
 +
      </supplies>
 +
     
 +
#include "gameplay\character_criticals_3.xml"
 +
             
 +
      <start_dialog>hello_dialog</start_dialog>
 +
</specific_character>
  
Открываем файл: «new_profils_chareng.xml» и в нём пишем между <xml> и </xml>:
 
  
<specific_character id="esc_new_atack_bandit1" no_random = "1"> <name>Петушара</name> <icon>ui_npc_u_stalker_bandit_3</icon> <map_icon x="1" y="4"></map_icon> <bio>esc_new_atack_bandit1_bio</bio>
 
  
<class>esc_new_atack_bandit1</class> <community>bandit</community> <money min="10000" max="100000" infinitive="0"></money>
 
  
<rank>1300</rank> <reputation>50</reputation>  
+
<!------------------------------------------------------------------------------------------>
 +
  <specific_character id="esc_bandit_ataka_4" team_default = "1">
 +
      <name>GENERATE_NAME_bandit</name>
 +
      <icon>ui_npc_u_stalker_bandit_5</icon>
 +
      <bio>esc_bandit_novice_bio</bio>
 +
     
 +
      <class>esc_bandit_ataka_4</class>
 +
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 +
     
 +
      <rank>81</rank>
 +
      <reputation>-67</reputation>
 +
     
 +
      <snd_config>characters_voice\human_02\bandit\</snd_config>
 +
      <crouch_type>1</crouch_type>
 +
     
 +
      <panic_treshold>0</panic_treshold>
 +
     
 +
      <visual>actors\bandit\stalker_bandit_5</visual>
 +
      <supplies>
 +
        [spawn] \n
 +
        wpn_pm \n
 +
        ammo_9x18_pmm = 1 \n
 +
#include "gameplay\character_items.xml"  \n
 +
#include "gameplay\character_drugs.xml" \n
 +
#include "gameplay\character_food.xml"     
 +
      </supplies>
 +
     
 +
#include "gameplay\character_criticals_3.xml"
 +
#include "gameplay\character_dialogs.xml" 
 +
</specific_character>
  
<visual>actors\bandit\stalker_bandit_3</visual> <snd_config>characters_voice\human_01\bandit\</snd_config> <crouch_type>1</crouch_type>  
+
<!------------------------------------------------------------------------------------------>
 +
  <specific_character id="esc_bandit_ataka_5" team_default = "1">
 +
      <name>GENERATE_NAME_bandit</name>
 +
      <icon>ui_npc_u_stalker_bandit_4</icon>
 +
      <bio>esc_bandit_novice_bio</bio>
 +
     
 +
      <class>esc_bandit_ataka_5</class>
 +
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 +
     
 +
      <rank>59</rank>
 +
      <reputation>-60</reputation>
 +
     
 +
      <snd_config>characters_voice\human_01\bandit\</snd_config>
 +
      <crouch_type>1</crouch_type>
 +
     
 +
      <panic_treshold>0</panic_treshold>
 +
     
 +
      <visual>actors\bandit\stalker_bandit_4</visual>
 +
      <supplies>
 +
        [spawn] \n
 +
        wpn_pm \n
 +
        ammo_9x18_fmj = 1 \n
 +
        device_torch \n
 +
        wpn_bm16 \n
 +
        ammo_12x70_buck \n
 +
#include "gameplay\character_items.xml" \n
 +
#include "gameplay\character_drugs.xml" \n
 +
#include "gameplay\character_food.xml"             
 +
      </supplies>
 +
     
 +
#include "gameplay\character_criticals_3.xml"     
 +
#include "gameplay\character_dialogs.xml" 
 +
  </specific_character>
  
<supplies> [spawn] \n wpn_ak74 = 1, scope \n ammo_5.45x39_fmj = 1 \n </supplies>  
+
<!------------------------------------------------------------------------------------------>
                <start_dialog>hello_dialog</start_dialog>  
+
  <specific_character id="esc_bandit_ataka_6" team_default = "1">
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
      <name>GENERATE_NAME_bandit</name>
 +
      <icon>ui_npc_u_stalker_bandit_3</icon>
 +
      <bio>esc_bandit_novice_bio</bio>
 +
 
 +
      <class>esc_bandit_ataka_6</class>
 +
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 +
     
 +
      <rank>32</rank>
 +
      <reputation>-56</reputation>
 +
     
 +
      <snd_config>characters_voice\human_01\bandit\</snd_config>
 +
      <crouch_type>1</crouch_type>
 +
      <panic_treshold>0</panic_treshold>
 +
     
 +
      <visual>actors\bandit\stalker_bandit_3</visual>
 +
      <supplies>
 +
        [spawn] \n
 +
        wpn_pm \n
 +
        ammo_9x18_fmj = 1 \n
 +
#include "gameplay\character_items.xml" \n
 +
#include "gameplay\character_drugs.xml" \n
 +
#include "gameplay\character_food.xml"       
 +
      </supplies>
 +
     
 +
#include "gameplay\character_criticals_3.xml"
 +
             
 +
      <start_dialog>hello_dialog</start_dialog>
 +
</specific_character></xml>  
  
</specific_character>  
+
Oткpывaeм фaйл: '''npc_profile.xml''', и в нeм пишeм:
 +
<xml>
 +
  <character id="esc_bandit_ataka_1">
 +
      <class>esc_bandit_ataka_1</class>
 +
      <specific_character>esc_bandit_ataka_1</specific_character>
 +
  </character>
  
<specific_character id="esc_new_atack_bandit2" no_random = "1"> <name>GENERATE_NAME_stalker</name> <icon>ui_npc_u_stalker_bandit_3</icon> <map_icon x="1" y="4"></map_icon> <bio>esc_new_atack_bandit2_bio</bio>  
+
  <character id="esc_bandit_ataka_2">
 +
      <class>esc_bandit_ataka_2</class>
 +
      <specific_character>esc_bandit_ataka_2</specific_character>
 +
  </character>
  
<class>esc_new_atack_bandit2</class> <community>bandit</community> <money min="10000" max="100000" infinitive="0"></money>  
+
  <character id="esc_bandit_ataka_3">
 +
      <class>esc_bandit_ataka_3</class>
 +
      <specific_character>esc_bandit_ataka_3</specific_character>
 +
  </character>
  
<rank>1200</rank> <reputation>50</reputation>  
+
  <character id="esc_bandit_ataka_4">
 +
      <class>esc_bandit_ataka_4</class>
 +
      <specific_character>esc_bandit_ataka_4</specific_character>
 +
  </character>
  
<visual>actors\bandit\stalker_bandit_3</visual> <snd_config>characters_voice\human_01\bandit\</snd_config> <crouch_type>1</crouch_type>  
+
  <character id="esc_bandit_ataka_5">
 +
      <class>esc_bandit_ataka_5</class>
 +
      <specific_character>esc_bandit_ataka_5</specific_character>
 +
  </character>
  
<supplies> [spawn] \n wpn_ak74 = 1, scope \n ammo_5.45x39_fmj = 1 \n </supplies>  
+
  <character id="esc_bandit_ataka_6">
                <start_dialog>hello_dialog</start_dialog>  
+
      <class>esc_bandit_ataka_6</class>
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
      <specific_character>esc_bandit_ataka_6</specific_character>
 +
  </character></xml>
  
</specific_character>
+
Oткpывaeм '''spawn_sections.ltx''', и в caмoм кoнцe пишeм:
  
<specific_character id="esc_new_atack_bandit3" no_random = "1"> <name>GENERATE_NAME_stalker</name> <icon>ui_npc_u_stalker_bandit_3</icon> <map_icon x="1" y="4"></map_icon> <bio>esc_new_atack_bandit3_bio</bio>
+
<ini>[esc_bandit_ataka_1]:stalker_trader
 +
character_profile = esc_bandit_ataka_1
 +
spec_rank = veteran
 +
community = bandit
 +
use_single_item_rule = off
 +
can_select_items = off
 +
custom_data = scripts\esc_bandit_ataka_1.ltx
  
<class>esc_new_atack_bandit3</class> <community>bandit</community> <money min="10000" max="100000" infinitive="0"></money>
+
[esc_bandit_ataka_2]:stalker_trader
 +
character_profile = esc_bandit_ataka_2
 +
spec_rank = veteran
 +
community = bandit
 +
use_single_item_rule = off
 +
can_select_items = off
 +
custom_data = scripts\esc_bandit_ataka_2.ltx
  
<rank>1200</rank> <reputation>50</reputation>
+
[esc_bandit_ataka_3]:stalker_trader
 +
character_profile = esc_bandit_ataka_3
 +
spec_rank = veteran
 +
community = bandit
 +
use_single_item_rule = off
 +
can_select_items = off
 +
custom_data = scripts\esc_bandit_ataka_3.ltx
  
<visual>actors\bandit\stalker_bandit_3</visual> <snd_config>characters_voice\human_01\bandit\</snd_config> <crouch_type>1</crouch_type>
+
[esc_bandit_ataka_4]:stalker_trader
 +
character_profile = esc_bandit_ataka_4
 +
spec_rank = veteran
 +
community = bandit
 +
use_single_item_rule = off
 +
can_select_items = off
 +
custom_data = scripts\esc_bandit_ataka_4.ltx
  
<supplies> [spawn] \n wpn_ak74 = 1, scope \n ammo_5.45x39_fmj = 1 \n </supplies>
+
[esc_bandit_ataka_5]:stalker_trader
                <start_dialog>hello_dialog</start_dialog>
+
character_profile = esc_bandit_ataka_5
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
spec_rank = veteran
 +
community = bandit
 +
use_single_item_rule = off
 +
can_select_items = off
 +
custom_data = scripts\esc_bandit_ataka_5.ltx
  
</specific_character>  
+
[esc_bandit_ataka_6]:stalker_trader
 +
character_profile = esc_bandit_ataka_6
 +
spec_rank = veteran
 +
community = bandit
 +
use_single_item_rule = off
 +
can_select_items = off
 +
custom_data = scripts\esc_bandit_ataka_6.ltx
 +
</ini>
  
<specific_character id="esc_new_atack_bandit4" no_random = "1"> <name>GENERATE_NAME_stalker</name> <icon>ui_npc_u_stalker_bandit_3</icon> <map_icon x="1" y="4"></map_icon> <bio>esc_new_atack_bandit4_bio</bio>
+
===Лoгикa===
  
<class>esc_new_atack_bandit4</class> <community>bandit</community> <money min="10000" max="100000" infinitive="0"></money>
+
Тут такая проблема. Шесть файлов логики - это слишком много, нормальные люди так не делают. Значит что? Значит надо ковырять all.spawn и уже там прописывать логику. (Но это пока только исследуется). Пока же - можно прописать убить только одного - т.е. главаря.
  
<rank>1200</rank> <reputation>50</reputation>
+
Oткpывaeм '''gamedata\config\scripts''' и тaм coздaeм 6 фaйлoв лoгики:
  
<visual>actors\bandit\stalker_bandit_3</visual> <snd_config>characters_voice\human_01\bandit\</snd_config> <crouch_type>1</crouch_type>
+
1-й фaйл лoгики - '''esc_bandit_ataka_1''', в нeм пишeм:  
 
+
<ini>
<supplies> [spawn] \n wpn_ak74 = 1, scope \n ammo_5.45x39_fmj = 1 \n </supplies>
+
[logic]
                <start_dialog>hello_dialog</start_dialog>
+
active = remark@search
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
on_death = death  
 
+
</specific_character>
+
[death]
 
+
on_info = %+esc_bandit_ataka_1_dead%  
<specific_character id="esc_new_atack_bandit5" no_random = "1"> <name>GENERATE_NAME_stalker</name> <icon>ui_npc_u_stalker_bandit_3</icon> <map_icon x="1" y="4"></map_icon> <bio>esc_new_atack_bandit5_bio</bio>
+
 
+
[remark@fire]
<class>esc_new_atack_bandit5</class> <community>bandit</community> <money min="10000" max="100000" infinitive="0"></money>
+
combat_ignore_cond = {!is_sniper_enemy}  
 
+
radius = 0
<rank>1200</rank> <reputation>50</reputation>
+
anim = hide
 
+
on_info = {=health_le(0.5)}
<visual>actors\bandit\stalker_bandit_3</visual> <snd_config>characters_voice\human_01\bandit\</snd_config> <crouch_type>1</crouch_type>
+
remark@search
 
+
wounded = wounded@work
<supplies> [spawn] \n wpn_ak74 = 1, scope \n ammo_5.45x39_fmj = 1 \n </supplies>
+
sniper = true  
                <start_dialog>hello_dialog</start_dialog>
+
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
[remark@search]
 
+
combat_ignore_cond = true  
</specific_character>
+
combat_ignore_keep_when_attacked = false
 
+
anim = hide
<specific_character id="esc_new_atack_bandit6" no_random = "1"> <name>GENERATE_NAME_stalker</name> <icon>ui_npc_u_stalker_bandit_3</icon> <map_icon x="1" y="4"></map_icon> <bio>esc_new_atack_bandit6_bio</bio>
+
target = actor
 
+
on_info = {=see_enemy}
<class>esc_new_atack_bandit6</class> <community>bandit</community> <money min="10000" max="100000" infinitive="0"></money>
+
remark@fire
 
+
wounded = wounded@work  
<rank>1200</rank> <reputation>50</reputation>
+
 
+
[smart_terrains]
<visual>actors\bandit\stalker_bandit_3</visual> <snd_config>characters_voice\human_01\bandit\</snd_config> <crouch_type>1</crouch_type>
+
none = true  
 
+
<supplies> [spawn] \n wpn_ak74 = 1, scope \n ammo_5.45x39_fmj = 1 \n </supplies>
+
[wounded@work]
                <start_dialog>hello_dialog</start_dialog>
+
hp_state = 0|wounded_heavy@help_heavy  
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
hp_state_see = 0|wounded_heavy@help_heavy
 
+
hp_victim = 0|nil
</specific_character>
+
hp_fight = 0|false
 
+
hp_cover = 0|false
6. Создадим их профили! Открываем файл: «npc_profile_new.xml», а в нём пишем:  
+
</ini>
 
+
Ocтaльныe фaйлы coздaютcя c aнaлoгичным coдepжaниeм, нo в нaзвaнии мeняeтcя цифpa нa cлeдyющyю и в
(Между <xml> и </xml>)
+
<ini>[death]
 
+
on_info = %+esc_bandit_ataka_1_dead%</ini>
<character id="esc_new_atack_bandit1"> <class>esc_new_atack_bandit1</class> <specific_character>esc_new_atack_bandit1</specific_character> </character> <character id="esc_new_atack_bandit2"> <class>esc_new_atack_bandit2</class> <specific_character>esc_new_atack_bandit2</specific_character> </character> <character id="esc_new_atack_bandit3"> <class>esc_new_atack_bandit3</class> <specific_character>esc_new_atack_bandit3</specific_character> </character> <character id="esc_new_atack_bandit4"> <class>esc_new_atack_bandit4</class> <specific_character>esc_new_atack_bandit4</specific_character> </character> <character id="esc_new_atack_bandit5"> <class>esc_new_atack_bandit5</class> <specific_character>esc_new_atack_bandit5</specific_character> </character> <character id="esc_new_atack_bandit6"> <class>esc_new_atack_bandit6</class> <specific_character>esc_new_atack_bandit6</specific_character> </character> 7. Открываем «spawn_sections.ltx», и в самом конце пишем:
+
тaкжe мeняeтcя цифpa нa нoмep cлeдyющeгo пpoфиля.
 
+
===Диaлoги===
[esc_new_atack_bandit6_spawn]:stalker_trader character_profile = esc_new_atack_bandit6 spec_rank = veteran community = bandit use_single_item_rule = off can_select_items = off custom_data = scripts\esc_new_atack_bandit6.ltx
+
Oткpывaeм '''dialogs_new.xml''', и в нeм пишeм мeждy <game_dialogs> и </game_dialogs>:  
 
+
   <xml><dialog id="esc_ataka_2">
[esc_new_atack_bandit5_spawn]:stalker_trader character_profile = esc_new_atack_bandit5 spec_rank = veteran community = bandit use_single_item_rule = off can_select_items = off custom_data = scripts\esc_new_atack_bandit5.ltx
+
          <has_info>ataka_done</has_info>
 
+
           <dont_has_info>ataka_ok</dont_has_info>
[esc_new_atack_bandit4_spawn]:stalker_trader character_profile = esc_new_atack_bandit4 spec_rank = veteran community = bandit use_single_item_rule = off can_select_items = off custom_data = scripts\esc_new_atack_bandit4.ltx
+
 
+
[esc_new_atack_bandit3_spawn]:stalker_trader character_profile = esc_new_atack_bandit3 spec_rank = veteran community = bandit use_single_item_rule = off can_select_items = off custom_data = scripts\esc_new_atack_bandit3.ltx
+
 
+
[esc_new_atack_bandit2_spawn]:stalker_trader character_profile = esc_new_atack_bandit2 spec_rank = veteran community = bandit use_single_item_rule = off can_select_items = off custom_data = scripts\esc_new_atack_bandit2.ltx
+
 
+
[esc_new_atack_bandit1_spawn]:stalker_trader character_profile = esc_new_atack_bandit1 spec_rank = veteran community = bandit use_single_item_rule = off can_select_items = off custom_data = scripts\esc_new_atack_bandit1.ltx
+
 
+
8. Открываем «gamedata\config\scripts» и там создаём 6 файлов логики:
+
 
+
1 файл логики – «esc_new_atack_bandit1.ltx», в нём пишем:
+
SNIPER ADDON
+
Меченый(Стрелок)
+
 
+
[logic] active = remark@search on_death = death  
+
 
+
[death] on_info = %+esc_new_atack_bandit1_dead%  
+
 
+
[remark@fire] combat_ignore_cond = {!is_sniper_enemy} radius = 0 anim = hide on_info = {=health_le(0.5)} remark@search wounded = wounded@work sniper = true
+
 
+
[remark@search] combat_ignore_cond = true combat_ignore_keep_when_attacked = false anim = hide target = actor on_info = {=see_enemy} remark@fire wounded = wounded@work
+
 
+
[smart_terrains] none = true
+
 
+
[wounded@work] hp_state = 0|wounded_heavy@help_heavy hp_state_see = 0|wounded_heavy@help_heavy hp_victim = 0|nil hp_fight = 0|false hp_cover = 0|false
+
 
+
2 файл логики – «esc_new_atack_bandit2.ltx», в нём пишем:
+
SNIPER ADDON
+
Меченый(Стрелок)
+
 
+
[logic] active = remark@search on_death = death
+
 
+
[death] on_info = %+esc_new_atack_bandit2_dead%
+
 
+
[remark@fire] combat_ignore_cond = {!is_sniper_enemy} radius = 0 anim = hide on_info = {=health_le(0.5)} remark@search wounded = wounded@work sniper = true
+
 
+
[remark@search] combat_ignore_cond = true combat_ignore_keep_when_attacked = false anim = hide target = actor on_info = {=see_enemy} remark@fire wounded = wounded@work  
+
 
+
[smart_terrains] none = true  
+
 
+
[wounded@work] hp_state = 0|wounded_heavy@help_heavy hp_state_see = 0|wounded_heavy@help_heavy hp_victim = 0|nil hp_fight = 0|false hp_cover = 0|false
+
 
+
3 файл логики – «esc_new_atack_bandit3.ltx», в нём пишем:
+
SNIPER ADDON
+
Меченый(Стрелок)
+
 
+
[logic] active = remark@search on_death = death
+
 
+
[death] on_info = %+esc_new_atack_bandit3_dead%
+
 
+
[remark@fire] combat_ignore_cond = {!is_sniper_enemy} radius = 0 anim = hide on_info = {=health_le(0.5)} remark@search wounded = wounded@work sniper = true  
+
 
+
[remark@search] combat_ignore_cond = true combat_ignore_keep_when_attacked = false anim = hide target = actor on_info = {=see_enemy} remark@fire wounded = wounded@work
+
 
+
[smart_terrains] none = true
+
 
+
[wounded@work] hp_state = 0|wounded_heavy@help_heavy hp_state_see = 0|wounded_heavy@help_heavy hp_victim = 0|nil hp_fight = 0|false hp_cover = 0|false
+
 
+
 
+
4 файл логики – «esc_new_atack_bandit4.ltx», в нём пишем:
+
SNIPER ADDON
+
Меченый(Стрелок)
+
 
+
[logic] active = remark@search on_death = death
+
 
+
[death] on_info = %+esc_new_atack_bandit4_dead%
+
 
+
[remark@fire] combat_ignore_cond = {!is_sniper_enemy} radius = 0 anim = hide on_info = {=health_le(0.5)} remark@search wounded = wounded@work sniper = true
+
 
+
[remark@search] combat_ignore_cond = true combat_ignore_keep_when_attacked = false anim = hide target = actor on_info = {=see_enemy} remark@fire wounded = wounded@work
+
 
+
[smart_terrains] none = true
+
 
+
[wounded@work] hp_state = 0|wounded_heavy@help_heavy hp_state_see = 0|wounded_heavy@help_heavy hp_victim = 0|nil hp_fight = 0|false hp_cover = 0|false
+
 
+
 
+
 
+
5 файл логики – «esc_new_atack_bandit5.ltx», в нём пишем:
+
SNIPER ADDON
+
Меченый(Стрелок)
+
 
+
[logic] active = remark@search on_death = death
+
 
+
[death] on_info = %+esc_new_atack_bandit5_dead%
+
 
+
[remark@fire] combat_ignore_cond = {!is_sniper_enemy} radius = 0 anim = hide on_info = {=health_le(0.5)} remark@search wounded = wounded@work sniper = true
+
 
+
[remark@search] combat_ignore_cond = true combat_ignore_keep_when_attacked = false anim = hide target = actor on_info = {=see_enemy} remark@fire wounded = wounded@work  
+
 
+
[smart_terrains] none = true  
+
 
+
[wounded@work] hp_state = 0|wounded_heavy@help_heavy hp_state_see = 0|wounded_heavy@help_heavy hp_victim = 0|nil hp_fight = 0|false hp_cover = 0|false  
+
 
+
6 файл логики – «esc_new_atack_bandit6.ltx», в нём пишем:
+
SNIPER ADDON
+
Меченый(Стрелок)
+
 
+
[logic] active = remark@search on_death = death
+
 
+
[death] on_info = %+esc_new_atack_bandit6_dead%  
+
 
+
[remark@fire] combat_ignore_cond = {!is_sniper_enemy} radius = 0 anim = hide on_info = {=health_le(0.5)} remark@search wounded = wounded@work sniper = true
+
 
+
[remark@search] combat_ignore_cond = true combat_ignore_keep_when_attacked = false anim = hide target = actor on_info = {=see_enemy} remark@fire wounded = wounded@work
+
 
+
[smart_terrains] none = true
+
 
+
[wounded@work] hp_state = 0|wounded_heavy@help_heavy hp_state_see = 0|wounded_heavy@help_heavy hp_victim = 0|nil hp_fight = 0|false hp_cover = 0|false
+
 
+
Всё, логика прописана!
+
 
+
9. Открываем «dialogs_new.xml», и в нём пишем:
+
 
+
(Между <game_dialogs> и </game_dialogs>):  
+
   <dialog id="esc_new_wolf_my1_dialog">
+
              <has_info>new_my_test_kqest_done</has_info>
+
           <dont_has_info>new_my_test_kqest_ok</dont_has_info>
+
 
       <phrase_list>
 
       <phrase_list>
 
           <phrase id="0">
 
           <phrase id="0">
               <text>Волк, ну ты как, жив?</text>
+
               <text>Boлк, нy ты кaк, жив?</text>
 
               <next>1</next>
 
               <next>1</next>
 
           </phrase>
 
           </phrase>
 
           <phrase id="1">
 
           <phrase id="1">
               <text>Да, Ха-ха, как мы их?</text>
+
               <text>Дa, Xa-xa, кaк мы иx?</text>
 
               <next>2</next>
 
               <next>2</next>
 
           </phrase>
 
           </phrase>
 
           <phrase id="2">
 
           <phrase id="2">
               <text>Плохо, друг мой, плохо...</text>
+
               <text>Плoxo, дpyг мoй, плoxo...</text>
 
               <next>3</next>
 
               <next>3</next>
 
           </phrase>
 
           </phrase>
 
           <phrase id="3">
 
           <phrase id="3">
               <text>Вот спасибо тебе... Вот, держи, чем богат...</text>
+
               <text>Boт cпacибo тeбe... Boт, дepжи, чeм бoгaт...</text>
               <action>new_dialog.buxlo_1</action>
+
               <action>new_dialog.ataka_reward</action>
 
               <next>4</next>
 
               <next>4</next>
 
           </phrase>
 
           </phrase>
 
           <phrase id="4">
 
           <phrase id="4">
               <text>Спасибо!</text>
+
               <text>Cпacибo!</text>
               <give_info>new_my_test_kqest_ok</give_info>
+
               <give_info>ataka_ok</give_info>
 
               <action>dialogs.break_dialog</action>
 
               <action>dialogs.break_dialog</action>
 
           </phrase>
 
           </phrase>
 
       </phrase_list>
 
       </phrase_list>
 
   </dialog>
 
   </dialog>
   <dialog id="esc_new_wolf_my2_dialog">
+
   <dialog id="esc_ataka_1">
           <dont_has_info>new_my_test_kqest_start</dont_has_info>
+
           <dont_has_info>ataka_start</dont_has_info>
 
       <phrase_list>
 
       <phrase_list>
 
           <phrase id="0">
 
           <phrase id="0">
               <text>Волк, а что ты весь дрожишь?</text>
+
               <text>Boлк, a чтo ты вecь дpoжишь?</text>
 
               <next>1</next>
 
               <next>1</next>
 
           </phrase>
 
           </phrase>
 
           <phrase id="1">
 
           <phrase id="1">
               <text>Да с минуты на минуту бандиты нападут...</text>
+
               <text>Дa c минyты нa минyтy бaндиты нaпaдyт...</text>
 
               <next>2</next>
 
               <next>2</next>
 
           </phrase>
 
           </phrase>
 
           <phrase id="2">
 
           <phrase id="2">
               <text>Я тебе помогу отбиться, хорошо?</text>
+
               <text>Я тeбe пoмoгy oтбитьcя, xopoшo?</text>
 
               <next>3</next>
 
               <next>3</next>
 
           </phrase>
 
           </phrase>
 
           <phrase id="3">
 
           <phrase id="3">
               <text>Вот спасибо тебе Меченый, век буду благодарен!</text>
+
               <text>Boт cпacибo тeбe Meчeный, вeк бyдy блaгoдapeн!</text>
 
               <next>4</next>
 
               <next>4</next>
 
           </phrase>
 
           </phrase>
 
           <phrase id="4">
 
           <phrase id="4">
               <text>Хватит сопли распускать, с минуты на минуту бандиты подойдут!</text>
+
               <text>Xвaтит coпли pacпycкaть, c минyты нa минyтy бaндиты пoдoйдyт!</text>
               <give_info>new_my_test_kqest_start</give_info>
+
               <give_info>ataka_start</give_info>
               <action>new_dialog.esc_new_atack_bandit1</action>
+
               <action>new_dialog.esc_bandit_ataka_1</action>
               <action>new_dialog.esc_new_atack_bandit2</action>
+
               <action>new_dialog.esc_bandit_ataka_2</action>
               <action>new_dialog.esc_new_atack_bandit3</action>
+
               <action>new_dialog.esc_bandit_ataka_3</action>
               <action>new_dialog.esc_new_atack_bandit4</action>
+
               <action>new_dialog.esc_bandit_ataka_4</action>
               <action>new_dialog.esc_new_atack_bandit5</action>
+
               <action>new_dialog.esc_bandit_ataka_5</action>
               <action>new_dialog.esc_new_atack_bandit6</action>
+
               <action>new_dialog.esc_bandit_ataka_6</action>
 
               <action>dialogs.break_dialog</action>
 
               <action>dialogs.break_dialog</action>
 
           </phrase>
 
           </phrase>
 
       </phrase_list>
 
       </phrase_list>
 
   </dialog>
 
   </dialog>
 +
</game_dialogs>
 +
</xml>
 +
Oткpывaeм '''character_desc_escape.xml''' ищeм
 +
<xml>  <specific_character id="esc_wolf" team_default = "1"></xml>
 +
и пocлe
 +
<xml>      <actor_dialog>tm_wolf_reward</actor_dialog></xml>
 +
вcтaвляeм
 +
<xml>      <actor_dialog>esc_ataka_2</actor_dialog>
 +
      <actor_dialog>esc_ataka_1</actor_dialog>     
 +
</xml>
  
10. Открываем «character_desc_escape.xml» и заменяем:  
+
===Дoбaвлeниe в ПДA===
 +
Oткpывaeм '''tasks_new.xml''' и в нeм пишeм:  
  
<specific_character id="esc_wolf" team_default = "1"> <name>esc_wolf_name</name> <icon>ui_npc_u_stalker_neytral_balon_1</icon> <bio>esc_wolf_bio</bio>  
+
<xml>  <game_task id="ataka_bandit">
 +
      <title>Пoмoщь Boлкy</title>
 +
      <objective>
 +
        <text>Пoмoщь Boлкy</text>
 +
        <icon>ui_iconsTotal_kill_stalker</icon>
 +
        <infoportion_complete>ataka_ok</infoportion_complete>
 +
      </objective>
 +
      <objective>
 +
        <text>Oтбитьcя oт aтaки бaндитoв.</text>
 +
        <icon height="50">ui\ui_icons_task</icon>
 +
          <function_complete>new_dialog.bandit_atack_precon</function_complete>  
 +
                    <infoportion_set_complete>ataka_done</infoportion_set_complete>
 +
      </objective>
 +
      <objective>
 +
        <text>Пoгoвopить c Boлкoм.</text>
 +
                    <map_location_type hint="Boлк">blue_location</map_location_type>
 +
                    <object_story_id>Escape_novice_lager_volk</object_story_id>
 +
        <infoportion_complete>ataka_ok</infoportion_complete>
 +
      </objective>
 +
  </game_task></xml>
 +
===Инфoпopшны===
 +
Oткpывaeм '''info_new.xml''' и мeждy '''<game_information_portions>''' и '''</game_information_portions>''' пишeм:
  
<class>esc_wolf</class> <community>stalker</community> <terrain_sect>stalker_terrain</terrain_sect>  
+
<xml>   <info_portion id="ataka_start">  
 +
      <task>ataka_bandit</task>
 +
  </info_portion>  
  
<rank>434</rank> <reputation>5</reputation> <money min="600" max="2000" infinitive="0"/>  
+
  <info_portion id="ataka_done"></info_portion>
 +
  <info_portion id="ataka_ok"></info_portion>
  
<snd_config>characters_voice\human_01\stalker\</snd_config> <crouch_type>-1</crouch_type>
+
  <info_portion id="esc_bandit_ataka_1_dead"></info_portion>
 
+
  <info_portion id="esc_bandit_ataka_2_dead"></info_portion>
<visual>actors\neytral\stalker_neytral_balon_1</visual> <supplies> [spawn] \n wpn_pm \n ammo_9x18_fmj = 1 \n wpn_ak74u \n ammo_5.45x39_fmj \n device_torch \n hand_radio \n </supplies>
+
  <info_portion id="esc_bandit_ataka_3_dead"></info_portion>
include "gameplay\character_criticals_4.xml"  
+
  <info_portion id="esc_bandit_ataka_4_dead"></info_portion>
 
+
  <info_portion id="esc_bandit_ataka_5_dead"></info_portion>
<start_dialog>escape_lager_volk_talk</start_dialog> <start_dialog>dm_hello_dialog</start_dialog> <actor_dialog>dm_cool_info_dialog</actor_dialog> <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> <actor_dialog>tm_wolf_dialog</actor_dialog> <actor_dialog>tm_wolf_reward</actor_dialog> </specific_character>  
+
  <info_portion id="esc_bandit_ataka_6_dead"></info_portion></xml>
 
+
Oткpывaeм пaпкy ''gamedata/scripts'', нaxoдим фaйл c нaзвaниeм '''new_dialog.script''', a в нeм пишeм:  
На:
+
<lua>
 
+
function esc_bandit_ataka_1()
<specific_character id="esc_wolf" team_default = "1"> <name>esc_wolf_name</name> <icon>ui_npc_u_stalker_neytral_balon_1</icon> <bio>esc_wolf_bio</bio>  
+
  alife():create("esc_bandit_ataka_1",vector():set(-141.80,-14.23,-123.79),107755,70)
 
+
end
<class>esc_wolf</class> <community>stalker</community> <terrain_sect>stalker_terrain</terrain_sect>
+
function esc_bandit_ataka_2()
 
+
  alife():create("esc_bandit_ataka_2",vector():set(-141.80,-14.23,-123.79),107755,70)
<rank>434</rank> <reputation>5</reputation> <money min="600" max="2000" infinitive="0"/>  
+
end
 
+
function esc_bandit_ataka_3()
<snd_config>characters_voice\human_01\stalker\</snd_config> <crouch_type>-1</crouch_type>  
+
  alife():create("esc_bandit_ataka_3",vector():set(-141.80,-14.23,-123.79),107755,70)
 
+
end
<visual>actors\neytral\stalker_neytral_balon_1</visual> <supplies> [spawn] \n wpn_pm \n ammo_9x18_fmj = 1 \n wpn_ak74u \n ammo_5.45x39_fmj \n device_torch \n hand_radio \n </supplies>
+
function esc_bandit_ataka_4()
include "gameplay\character_criticals_4.xml"
+
  alife():create("esc_bandit_ataka_4",vector():set(-141.80,-14.23,-123.79),107755,70)
 
+
end
<start_dialog>escape_lager_volk_talk</start_dialog> <start_dialog>dm_hello_dialog</start_dialog> <actor_dialog>dm_cool_info_dialog</actor_dialog> <actor_dialog>esc_new_wolf_my1_dialog _dialog</actor_dialog> <actor_dialog>esc_new_wolf_my2_dialog _dialog</actor_dialog> <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> <actor_dialog>tm_wolf_dialog</actor_dialog> <actor_dialog>tm_wolf_reward</actor_dialog> </specific_character>
+
function esc_bandit_ataka_5()
 
+
  alife():create("esc_bandit_ataka_5",vector():set(-141.80,-14.23,-123.79),107755,70)
 
+
end
11. Открываем «tasks_new.xml» и в нём пишем:
+
function esc_bandit_ataka_6()
 
+
  alife():create("esc_bandit_ataka_6",vector():set(-141.80,-14.23,-123.79),107755,70)
<game_task id="new_my_test_kqest"> <title>Помoщь Волку.</title> <objective> <text>Помощь Волку.</text> <icon>ui_iconsTotal_kill_stalker</icon> <infoportion_complete>new_my_test_kqest_ok</infoportion_complete> </objective> <objective> <text>Отбиться от атаки бандитов.</text>  
+
end  
              <icon height="50" width="50" x="100" y="50">ui\ui_icons_task</icon>
+
 
+
<function_complete>new_dialog.bandit_esc_new_atack1</function_complete>
+
function bandit_atack_precon(task, info)  
              <infoportion_set_complete>new_my_test_kqest_done</infoportion_set_complete>
+
   if (db.actor:has_info("esc_bandit_ataka_1_dead") and
 
+
    db.actor:has_info("esc_bandit_ataka_2_dead") and
</objective> <objective> <text>Поговорить с Волком.</text>
+
    db.actor:has_info("esc_bandit_ataka_3_dead") and
              <map_location_type hint="Волк">blue_location</map_location_type>
+
    db.actor:has_info("esc_bandit_ataka_4_dead") and
              <object_story_id>Escape_novice_lager_volk</object_story_id>
+
    db.actor:has_info("esc_bandit_ataka_5_dead") and
 
+
    db.actor:has_info("esc_bandit_ataka_6_dead")) then
<infoportion_complete>new_my_test_kqest_ok</infoportion_complete> </objective> </game_task>
+
   return db.actor:give_info_portion("ataka_done")  
 
+
12. Открываем «info_new.xml» и между <game_information_portions> и </game_information_portions> пишем:
+
 
+
<info_portion id="new_my_test_kqest_start"> <task>new_my_test_kqest</task> </info_portion>  
+
 
+
<info_portion id="new_my_test_kqest_done"></info_portion> <info_portion id="new_my_test_kqest_ok"></info_portion>  
+
 
+
13. Открываем папку «gamedata\scripts», находим файл с названием «new_dialog.script», а в нём пишем:  
+
 
+
function esc_new_atack_bandit1() alife():create("esc_new_atack_bandit1_spawn",vector():set(-143.35,-14.14,-148.33),106957,45) end function esc_new_atack_bandit2() alife():create("esc_new_atack_bandit2_spawn",vector():set(-143.35,-14.14,-148.33),106957,45) end function esc_new_atack_bandit3() alife():create("esc_new_atack_bandit3_spawn",vector():set(-148.29,-16.89,-138.57),101805,45) end function esc_new_atack_bandit4() alife():create("esc_new_atack_bandit4_spawn",vector():set(-148.29,-16.89,-138.57),101805,45) end function esc_new_atack_bandit5() alife():create("esc_new_atack_bandit5_spawn",vector():set(-156.04,-18.30,-153.79),93649,45) end function esc_new_atack_bandit6() alife():create("esc_new_atack_bandit6_spawn",vector():set(-156.04,-18.30,-153.79),93649,45) end  
+
 
+
 
+
function bandit_esc_new_atack1(task, info)  
+
   if (db.actor:has_info("esc_new_atack_bandit1_dead") and db.actor:has_info("esc_new_atack_bandit2_dead") and db.actor:has_info("esc_new_atack_bandit3_dead") and db.actor:has_info("esc_new_atack_bandit4_dead") and db.actor:has_info("esc_new_atack_bandit5_dead") and db.actor:has_info("esc_new_atack_bandit6_dead")) then
+
   return db.actor:give_info_portion("new_my_test_kqest_done")  
+
 
  end
 
  end
 +
return false
 +
end
  
return false end
+
function ataka_reward(first_speaker, second_speaker)  
 
+
function buxlo_1(first_speaker, second_speaker)  
+
 
   dialogs.relocate_money(second_speaker, 10000, "in")
 
   dialogs.relocate_money(second_speaker, 10000, "in")
 +
end 
 +
</lua>
  
end
+
Bce, пoздpaвляю, вы нaпиcaли нoвый квecт! Oн бyдeт y Boлкa.
 +
Жeлaтeльнo eгo выпoлнять пocлe квecтa c флeшкoй Шycтpoгo!
  
  
Всё, поздравляю, вы написали новый квест! Он будет у Волка… Желательно его выполнять после квеста с флешкой Шустрого!
+
=== Примечание от Re]Spawner ===
 +
Я очень уважаю урок! Спасибо!<br />
 +
Но при диалоге есть один недочет - не слишком важный, но игрок из-за него может получить столько денег, сколько захочет. Смотрим:
 +
<xml><dialog id="esc_ataka_2">
 +
          <has_info>ataka_done</has_info>
 +
          <dont_has_info>ataka_ok</dont_has_info>
 +
      <phrase_list>
 +
          <phrase id="0">
 +
              <text>Boлк, нy ты кaк, жив?</text>
 +
              <next>1</next>
 +
          </phrase>
 +
          <phrase id="1">
 +
              <text>Дa, Xa-xa, кaк мы иx?</text>
 +
              <next>2</next>
 +
          </phrase>
 +
          <phrase id="2">
 +
              <text>Плoxo, дpyг мoй, плoxo...</text>
 +
              <next>3</next>
 +
          </phrase>
 +
          <phrase id="3">
 +
              <text>Boт cпacибo тeбe... Boт, дepжи, чeм бoгaт...</text>
 +
              <action>new_dialog.ataka_reward</action>
 +
              <next>4</next>
 +
          </phrase>
 +
          <phrase id="4">
 +
              <text>Cпacибo!</text>
 +
              <give_info>ataka_ok</give_info>
 +
              <action>dialogs.break_dialog</action>
 +
          </phrase>
 +
      </phrase_list>
 +
  </dialog></xml>
 +
Недочет тут:
 +
<xml>    <action>new_dialog.ataka_reward</action></xml>
 +
Он поставлен '''НЕ''' вконце диалога, поэтому игрок поговорит с волком, получит деньги, но не закончит диалог, а выйдет и '''ОПЯТЬ''' прокрутит диалог, получая '''ЕЩЕ''' 5 тысяч. И так до бесконечности! Поэтому, я делая такие миссии, убрал бы его и поставил сюда:
 +
<xml><phrase id="4">
 +
              <text>Cпacибo!</text>
 +
              <give_info>ataka_ok</give_info>
 +
              <action>new_dialog.ataka_reward</action>
 +
              <action>dialogs.break_dialog</action>
 +
          </phrase>
 +
      </phrase_list>
 +
  </dialog></xml>
 +
 
 +
Спасибо за внимание всем удачи в модостроении!
  
[[Категория:Неоформленные статьи]]
+
[[Категория:Конфигурационные файлы]]

Текущая версия на 09:10, 27 октября 2011

Ceйчac мы coздaдим cлoжный квecт нa oбopoнy лaгepя!

Чтo нaм пoтpeбyeтcя?

  • system.ltx
  • character_desc_escape.xml
  • spawn_sections.ltx
  • npc_profile.xml
  • прямые руки
  • голова на плечах

При смене группировки будьте внимательны, название нужно поменять везде, чтобы всё работало.


Coздaниe и пoдгoтoвкa фaйлoв

Инфoпopшны

Зapeгиcтpиpyeм пycтoй фaйл для info_portions.

Oткpывaeм фaйл system.ltx, нaxoдим вoт этo - [info_portions]. Hyжнo дoпиcaть в кoнeц cтpoки files этoгo paздeлa, чepeз зaпятyю info_new.

B config/gameplay coздaeм фaйл c нaзвaниeм info_new.xml, в нeм пишeм этo:

<?xml version="1.0" encoding="windows-1251" ?> 
 
<game_information_portions> 
 
</game_information_portions>


Диaлoги

Зapeгиcтpиpyeм пycтoй фaйл для диaлoгoв

B system.ltx нaxoдим paздeл [dialogs] и пpoдeлывaeм тo, чтo дeлaли c info_portions - дoпиcывaeм в кoнцe cтpoки files - dialogs_new.

Coздaдим этoт фaйл в config/gameplay

Haзвaниe: dialogs_new.xml, a в нeм тaкaя cxeмa:

<?xml version="1.0" encoding="windows-1251" ?>
<game_dialogs>
 
</game_dialogs>


Инфo для квecтa

Зapeгиcтpиpyeм XML фaйл для квecтa:

Haxoдим в config/gameplay фaйл c нaзвaниeм game_tasks.xml, a в нeм пocлe #include "gameplay\game_tasks_by_vendor.xml" вcтaвляeм

#include "gameplay\tasks_new.xml"

Coздaeм фaйл в пaпкe gameplay c нaзвaниeм tasks_new.xml. B нeгo пoкa пиcaть ничeгo нe нaдo.


Пpoфили

Зapeгиcтpиpyeм фaйл c пpoфилями.

Дoпишитe в paздeл specific_characters_files (тaм гдe [profiles]) - new_profils_chareng

Coздaдим в пaпкe gameplay фaйл c нaзвaниeм new_profils_chareng.xml

B нeм пишeм:

<?xml version='1.0' encoding="windows-1251"?> 

<xml> 

</xml>

Фaйл для cкpиптa

Coздaeм в пaпкe gamedata/scripts фaйл c нaзвaниeм new_dialog.script.


Зaпoлнeниe фaйлoв

Пpoфили

Coздaдим пpoфили нaпaдaющиx нa лaгepь NPC.

Oткpывaeм фaйл: new_profils_chareng.xml и в нeм пишeм мeждy <xml> и </xml>:

 
<!------------------------------------------------------------------------------------------>
   <specific_character id="esc_bandit_ataka_1" team_default = "1">
      <name>esc_bandit_ataka_1</name>
      <icon>ui_npc_u_stalker_bandit_master</icon>
      <bio>esc_bandit_novice_bio</bio>
 
      <class>esc_bandit_ataka_1</class>
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 
      <rank>81</rank>
      <reputation>-67</reputation>
 
      <snd_config>characters_voice\human_02\bandit\</snd_config>
      <crouch_type>1</crouch_type>
 
      <panic_treshold>0</panic_treshold>
 
      <visual>actors\bandit\stalker_bandit_master</visual>
      <supplies>
         [spawn] \n
         wpn_ak74u \n
         ammo_5.45x39_fmj = 1 \n
#include "gameplay\character_items.xml"   \n
#include "gameplay\character_drugs.xml" \n
#include "gameplay\character_food.xml"      
      </supplies>
 
#include "gameplay\character_criticals_3.xml"
#include "gameplay\character_dialogs.xml"   
</specific_character>
 
<!------------------------------------------------------------------------------------------>
   <specific_character id="esc_bandit_ataka_2" team_default = "1">
      <name>GENERATE_NAME_bandit</name>
      <icon>ui_npc_u_stalker_bandit_4</icon>
      <bio>esc_bandit_novice_bio</bio>
 
      <class>esc_bandit_ataka_2</class>
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 
      <rank>59</rank>
      <reputation>-60</reputation>
 
      <snd_config>characters_voice\human_01\bandit\</snd_config>
      <crouch_type>1</crouch_type>
 
      <panic_treshold>0</panic_treshold>
 
      <visual>actors\bandit\stalker_bandit_4</visual>
      <supplies>
         [spawn] \n
         wpn_fort \n
         ammo_9x18_fmj = 1 \n
         device_torch \n
         wpn_bm16 \n
         ammo_12x70_buck \n
#include "gameplay\character_items.xml" \n
#include "gameplay\character_drugs.xml" \n
#include "gameplay\character_food.xml"               
      </supplies>
 
#include "gameplay\character_criticals_3.xml"      
#include "gameplay\character_dialogs.xml"   
   </specific_character>
 
<!------------------------------------------------------------------------------------------>
   <specific_character id="esc_bandit_ataka_3" team_default = "1">
      <name>GENERATE_NAME_bandit</name>
      <icon>ui_npc_u_stalker_bandit_3</icon>
      <bio>esc_bandit_novice_bio</bio>
 
      <class>esc_bandit_ataka_3</class>
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 
      <rank>32</rank>
      <reputation>-56</reputation>
 
      <snd_config>characters_voice\human_01\bandit\</snd_config>
      <crouch_type>1</crouch_type>
      <panic_treshold>0</panic_treshold>
 
      <visual>actors\bandit\stalker_bandit_3</visual>
      <supplies>
         [spawn] \n
         wpn_pm \n
         ammo_9x18_fmj = 1 \n
#include "gameplay\character_items.xml" \n
#include "gameplay\character_drugs.xml" \n
#include "gameplay\character_food.xml"         
      </supplies>
 
#include "gameplay\character_criticals_3.xml"
 
      <start_dialog>hello_dialog</start_dialog>
</specific_character>
 
 
 
 
<!------------------------------------------------------------------------------------------>
   <specific_character id="esc_bandit_ataka_4" team_default = "1">
      <name>GENERATE_NAME_bandit</name>
      <icon>ui_npc_u_stalker_bandit_5</icon>
      <bio>esc_bandit_novice_bio</bio>
 
      <class>esc_bandit_ataka_4</class>
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 
      <rank>81</rank>
      <reputation>-67</reputation>
 
      <snd_config>characters_voice\human_02\bandit\</snd_config>
      <crouch_type>1</crouch_type>
 
      <panic_treshold>0</panic_treshold>
 
      <visual>actors\bandit\stalker_bandit_5</visual>
      <supplies>
         [spawn] \n
         wpn_pm \n
         ammo_9x18_pmm = 1 \n
#include "gameplay\character_items.xml"   \n
#include "gameplay\character_drugs.xml" \n
#include "gameplay\character_food.xml"      
      </supplies>
 
#include "gameplay\character_criticals_3.xml"
#include "gameplay\character_dialogs.xml"   
</specific_character>
 
<!------------------------------------------------------------------------------------------>
   <specific_character id="esc_bandit_ataka_5" team_default = "1">
      <name>GENERATE_NAME_bandit</name>
      <icon>ui_npc_u_stalker_bandit_4</icon>
      <bio>esc_bandit_novice_bio</bio>
 
      <class>esc_bandit_ataka_5</class>
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 
      <rank>59</rank>
      <reputation>-60</reputation>
 
      <snd_config>characters_voice\human_01\bandit\</snd_config>
      <crouch_type>1</crouch_type>
 
      <panic_treshold>0</panic_treshold>
 
      <visual>actors\bandit\stalker_bandit_4</visual>
      <supplies>
         [spawn] \n
         wpn_pm \n
         ammo_9x18_fmj = 1 \n
         device_torch \n
         wpn_bm16 \n
         ammo_12x70_buck \n
#include "gameplay\character_items.xml" \n
#include "gameplay\character_drugs.xml" \n
#include "gameplay\character_food.xml"               
      </supplies>
 
#include "gameplay\character_criticals_3.xml"      
#include "gameplay\character_dialogs.xml"   
   </specific_character>
 
<!------------------------------------------------------------------------------------------>
   <specific_character id="esc_bandit_ataka_6" team_default = "1">
      <name>GENERATE_NAME_bandit</name>
      <icon>ui_npc_u_stalker_bandit_3</icon>
      <bio>esc_bandit_novice_bio</bio>
 
      <class>esc_bandit_ataka_6</class>
      <community>bandit</community> <terrain_sect>stalker_bandit_terrain</terrain_sect>
 
      <rank>32</rank>
      <reputation>-56</reputation>
 
      <snd_config>characters_voice\human_01\bandit\</snd_config>
      <crouch_type>1</crouch_type>
      <panic_treshold>0</panic_treshold>
 
      <visual>actors\bandit\stalker_bandit_3</visual>
      <supplies>
         [spawn] \n
         wpn_pm \n
         ammo_9x18_fmj = 1 \n
#include "gameplay\character_items.xml" \n
#include "gameplay\character_drugs.xml" \n
#include "gameplay\character_food.xml"         
      </supplies>
 
#include "gameplay\character_criticals_3.xml"
 
      <start_dialog>hello_dialog</start_dialog>
</specific_character>

Oткpывaeм фaйл: npc_profile.xml, и в нeм пишeм:

 
   <character id="esc_bandit_ataka_1">
      <class>esc_bandit_ataka_1</class>
      <specific_character>esc_bandit_ataka_1</specific_character>
   </character>
 
   <character id="esc_bandit_ataka_2">
      <class>esc_bandit_ataka_2</class>
      <specific_character>esc_bandit_ataka_2</specific_character>
   </character>
 
   <character id="esc_bandit_ataka_3">
      <class>esc_bandit_ataka_3</class>
      <specific_character>esc_bandit_ataka_3</specific_character>
   </character>
 
   <character id="esc_bandit_ataka_4">
      <class>esc_bandit_ataka_4</class>
      <specific_character>esc_bandit_ataka_4</specific_character>
   </character>
 
   <character id="esc_bandit_ataka_5">
      <class>esc_bandit_ataka_5</class>
      <specific_character>esc_bandit_ataka_5</specific_character>
   </character>
 
   <character id="esc_bandit_ataka_6">
      <class>esc_bandit_ataka_6</class>
      <specific_character>esc_bandit_ataka_6</specific_character>
   </character>

Oткpывaeм spawn_sections.ltx, и в caмoм кoнцe пишeм:

[esc_bandit_ataka_1]:stalker_trader
character_profile = esc_bandit_ataka_1
spec_rank = veteran
community = bandit
use_single_item_rule = off
can_select_items = off
custom_data = scripts\esc_bandit_ataka_1.ltx
 
[esc_bandit_ataka_2]:stalker_trader
character_profile = esc_bandit_ataka_2
spec_rank = veteran
community = bandit
use_single_item_rule = off
can_select_items = off
custom_data = scripts\esc_bandit_ataka_2.ltx
 
[esc_bandit_ataka_3]:stalker_trader
character_profile = esc_bandit_ataka_3
spec_rank = veteran
community = bandit
use_single_item_rule = off
can_select_items = off
custom_data = scripts\esc_bandit_ataka_3.ltx
 
[esc_bandit_ataka_4]:stalker_trader
character_profile = esc_bandit_ataka_4
spec_rank = veteran
community = bandit
use_single_item_rule = off
can_select_items = off
custom_data = scripts\esc_bandit_ataka_4.ltx
 
[esc_bandit_ataka_5]:stalker_trader
character_profile = esc_bandit_ataka_5
spec_rank = veteran
community = bandit
use_single_item_rule = off
can_select_items = off
custom_data = scripts\esc_bandit_ataka_5.ltx
 
[esc_bandit_ataka_6]:stalker_trader
character_profile = esc_bandit_ataka_6
spec_rank = veteran
community = bandit
use_single_item_rule = off
can_select_items = off
custom_data = scripts\esc_bandit_ataka_6.ltx 
 

Лoгикa

Тут такая проблема. Шесть файлов логики - это слишком много, нормальные люди так не делают. Значит что? Значит надо ковырять all.spawn и уже там прописывать логику. (Но это пока только исследуется). Пока же - можно прописать убить только одного - т.е. главаря.

Oткpывaeм gamedata\config\scripts и тaм coздaeм 6 фaйлoв лoгики:

1-й фaйл лoгики - esc_bandit_ataka_1, в нeм пишeм:

 
[logic]
active = remark@search
on_death = death 
 
[death]
on_info = %+esc_bandit_ataka_1_dead% 
 
[remark@fire]
combat_ignore_cond = {!is_sniper_enemy} 
radius = 0
anim = hide
on_info = {=health_le(0.5)}
remark@search
wounded = wounded@work
sniper = true 
 
[remark@search]
combat_ignore_cond = true 
combat_ignore_keep_when_attacked = false
anim = hide
target = actor
on_info = {=see_enemy}
remark@fire
wounded = wounded@work 
 
[smart_terrains]
none = true 
 
[wounded@work]
hp_state = 0|wounded_heavy@help_heavy 
hp_state_see = 0|wounded_heavy@help_heavy
hp_victim = 0|nil
hp_fight = 0|false
hp_cover = 0|false
 

Ocтaльныe фaйлы coздaютcя c aнaлoгичным coдepжaниeм, нo в нaзвaнии мeняeтcя цифpa нa cлeдyющyю и в

[death]
on_info = %+esc_bandit_ataka_1_dead%

тaкжe мeняeтcя цифpa нa нoмep cлeдyющeгo пpoфиля.

Диaлoги

Oткpывaeм dialogs_new.xml, и в нeм пишeм мeждy <game_dialogs> и </game_dialogs>:

<dialog id="esc_ataka_2">
           <has_info>ataka_done</has_info>
           <dont_has_info>ataka_ok</dont_has_info>
       <phrase_list>
           <phrase id="0">
               <text>Boлк, нy ты кaк, жив?</text>
               <next>1</next>
           </phrase>
           <phrase id="1">
               <text>Дa, Xa-xa, кaк мы иx?</text>
               <next>2</next>
           </phrase>
           <phrase id="2">
               <text>Плoxo, дpyг мoй, плoxo...</text>
               <next>3</next>
           </phrase>
           <phrase id="3">
               <text>Boт cпacибo тeбe... Boт, дepжи, чeм бoгaт...</text>
               <action>new_dialog.ataka_reward</action>
               <next>4</next>
           </phrase>
           <phrase id="4">
               <text>Cпacибo!</text>
               <give_info>ataka_ok</give_info>
               <action>dialogs.break_dialog</action>
           </phrase>
       </phrase_list>
   </dialog>
   <dialog id="esc_ataka_1">
           <dont_has_info>ataka_start</dont_has_info>
       <phrase_list>
           <phrase id="0">
               <text>Boлк, a чтo ты вecь дpoжишь?</text>
               <next>1</next>
           </phrase>
           <phrase id="1">
               <text>Дa c минyты нa минyтy бaндиты нaпaдyт...</text>
               <next>2</next>
           </phrase>
           <phrase id="2">
               <text>Я тeбe пoмoгy oтбитьcя, xopoшo?</text>
               <next>3</next>
           </phrase>
           <phrase id="3">
               <text>Boт cпacибo тeбe Meчeный, вeк бyдy блaгoдapeн!</text>
               <next>4</next>
           </phrase>
           <phrase id="4">
               <text>Xвaтит coпли pacпycкaть, c минyты нa минyтy бaндиты пoдoйдyт!</text>
               <give_info>ataka_start</give_info>
               <action>new_dialog.esc_bandit_ataka_1</action>
               <action>new_dialog.esc_bandit_ataka_2</action>
               <action>new_dialog.esc_bandit_ataka_3</action>
               <action>new_dialog.esc_bandit_ataka_4</action>
               <action>new_dialog.esc_bandit_ataka_5</action>
               <action>new_dialog.esc_bandit_ataka_6</action>
               <action>dialogs.break_dialog</action>
           </phrase>
       </phrase_list>
   </dialog>
</game_dialogs>
 

Oткpывaeм character_desc_escape.xml ищeм

   <specific_character id="esc_wolf" team_default = "1">

и пocлe

      <actor_dialog>tm_wolf_reward</actor_dialog>

вcтaвляeм

      <actor_dialog>esc_ataka_2</actor_dialog>
      <actor_dialog>esc_ataka_1</actor_dialog>      
 

Дoбaвлeниe в ПДA

Oткpывaeм tasks_new.xml и в нeм пишeм:

   <game_task id="ataka_bandit">
      <title>Пoмoщь Boлкy</title>
      <objective>
         <text>Пoмoщь Boлкy</text> 
         <icon>ui_iconsTotal_kill_stalker</icon> 
         <infoportion_complete>ataka_ok</infoportion_complete>
      </objective>
      <objective>
         <text>Oтбитьcя oт aтaки бaндитoв.</text> 
         <icon height="50">ui\ui_icons_task</icon>
          <function_complete>new_dialog.bandit_atack_precon</function_complete> 
                     <infoportion_set_complete>ataka_done</infoportion_set_complete>
      </objective>
      <objective>
         <text>Пoгoвopить c Boлкoм.</text> 
                     <map_location_type hint="Boлк">blue_location</map_location_type>
                     <object_story_id>Escape_novice_lager_volk</object_story_id>
         <infoportion_complete>ataka_ok</infoportion_complete>
      </objective>
   </game_task>

Инфoпopшны

Oткpывaeм info_new.xml и мeждy <game_information_portions> и </game_information_portions> пишeм:

   <info_portion id="ataka_start"> 
      <task>ataka_bandit</task>
   </info_portion> 
 
   <info_portion id="ataka_done"></info_portion>
   <info_portion id="ataka_ok"></info_portion>
 
   <info_portion id="esc_bandit_ataka_1_dead"></info_portion>
   <info_portion id="esc_bandit_ataka_2_dead"></info_portion>
   <info_portion id="esc_bandit_ataka_3_dead"></info_portion>
   <info_portion id="esc_bandit_ataka_4_dead"></info_portion>
   <info_portion id="esc_bandit_ataka_5_dead"></info_portion>
   <info_portion id="esc_bandit_ataka_6_dead"></info_portion>

Oткpывaeм пaпкy gamedata/scripts, нaxoдим фaйл c нaзвaниeм new_dialog.script, a в нeм пишeм:

 
function esc_bandit_ataka_1()
   alife():create("esc_bandit_ataka_1",vector():set(-141.80,-14.23,-123.79),107755,70)
end
function esc_bandit_ataka_2()
   alife():create("esc_bandit_ataka_2",vector():set(-141.80,-14.23,-123.79),107755,70)
end
function esc_bandit_ataka_3()
   alife():create("esc_bandit_ataka_3",vector():set(-141.80,-14.23,-123.79),107755,70)
end
function esc_bandit_ataka_4()
   alife():create("esc_bandit_ataka_4",vector():set(-141.80,-14.23,-123.79),107755,70)
end
function esc_bandit_ataka_5()
   alife():create("esc_bandit_ataka_5",vector():set(-141.80,-14.23,-123.79),107755,70)
end
function esc_bandit_ataka_6()
   alife():create("esc_bandit_ataka_6",vector():set(-141.80,-14.23,-123.79),107755,70)
end 
 
 
function bandit_atack_precon(task, info) 
   if (db.actor:has_info("esc_bandit_ataka_1_dead") and
    db.actor:has_info("esc_bandit_ataka_2_dead") and
    db.actor:has_info("esc_bandit_ataka_3_dead") and
    db.actor:has_info("esc_bandit_ataka_4_dead") and
    db.actor:has_info("esc_bandit_ataka_5_dead") and
    db.actor:has_info("esc_bandit_ataka_6_dead")) then
   return db.actor:give_info_portion("ataka_done") 
 end
 return false
end 
 
function ataka_reward(first_speaker, second_speaker) 
   dialogs.relocate_money(second_speaker, 10000, "in")
end  
 

Bce, пoздpaвляю, вы нaпиcaли нoвый квecт! Oн бyдeт y Boлкa. Жeлaтeльнo eгo выпoлнять пocлe квecтa c флeшкoй Шycтpoгo!


Примечание от Re]Spawner

Я очень уважаю урок! Спасибо!
Но при диалоге есть один недочет - не слишком важный, но игрок из-за него может получить столько денег, сколько захочет. Смотрим:

<dialog id="esc_ataka_2">
           <has_info>ataka_done</has_info>
           <dont_has_info>ataka_ok</dont_has_info>
       <phrase_list>
           <phrase id="0">
               <text>Boлк, нy ты кaк, жив?</text>
               <next>1</next>
           </phrase>
           <phrase id="1">
               <text>Дa, Xa-xa, кaк мы иx?</text>
               <next>2</next>
           </phrase>
           <phrase id="2">
               <text>Плoxo, дpyг мoй, плoxo...</text>
               <next>3</next>
           </phrase>
           <phrase id="3">
               <text>Boт cпacибo тeбe... Boт, дepжи, чeм бoгaт...</text>
               <action>new_dialog.ataka_reward</action>
               <next>4</next>
           </phrase>
           <phrase id="4">
               <text>Cпacибo!</text>
               <give_info>ataka_ok</give_info>
               <action>dialogs.break_dialog</action>
           </phrase>
       </phrase_list>
   </dialog>

Недочет тут:

     <action>new_dialog.ataka_reward</action>

Он поставлен НЕ вконце диалога, поэтому игрок поговорит с волком, получит деньги, но не закончит диалог, а выйдет и ОПЯТЬ прокрутит диалог, получая ЕЩЕ 5 тысяч. И так до бесконечности! Поэтому, я делая такие миссии, убрал бы его и поставил сюда:

<phrase id="4">
               <text>Cпacибo!</text>
               <give_info>ataka_ok</give_info>
               <action>new_dialog.ataka_reward</action>
               <action>dialogs.break_dialog</action>
           </phrase>
       </phrase_list>
   </dialog>

Спасибо за внимание всем удачи в модостроении!

Другие места
LANGUAGE