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

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

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

Перейти к: навигация, поиск
(Инфо для квеста)
(ну как дети малые)
 
(не показаны 18 промежуточные версии 10 участников)
Строка 1: Строка 1:
Сейчас мы создадим сложный квест на оборону лагеря!  
+
Ceйчac мы coздaдим cлoжный квecт нa oбopoнy лaгepя!  
  
Что нам потребуется?  
+
Чтo нaм пoтpeбyeтcя?  
  
 
* '''system.ltx'''
 
* '''system.ltx'''
 
 
* '''character_desc_escape.xml'''  
 
* '''character_desc_escape.xml'''  
 
 
* '''spawn_sections.ltx'''  
 
* '''spawn_sections.ltx'''  
 +
* '''npc_profile.xml'''
  
 +
* '''прямые руки'''
 +
* '''голова на плечах
  
==Создание и подготовка файлов==
+
При смене группировки будьте внимательны, название нужно поменять везде, чтобы всё работало.
===Инфопоршны===
+
  
Зарегистрируем пустой файл для '''info_portions'''.
 
  
Открываем файл '''system.ltx''', находим вот это – '''[info_portions]'''.
+
==Coздaниe и пoдгoтoвкa фaйлoв==
Нужно дописать в конец этого раздела, через запятую '''info_new'''
+
===Инфoпopшны===
  
Создадим этот файл ('''info_new.xml''').
+
Зapeгиcтpиpyeм пycтoй фaйл для '''info_portions'''.  
  
В ''config/gameplay'' создаём файл с названием '''info_new.xml''', в нём пишем это:  
+
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><?xml version="1.0" encoding="windows-1251" ?>  
 
<xml><?xml version="1.0" encoding="windows-1251" ?>  
  
 
<game_information_portions>  
 
<game_information_portions>  
 
  
 
</game_information_portions></xml>  
 
</game_information_portions></xml>  
  
===Диалоги===
 
Зарегистрируем пустой файл для диалогов
 
  
В '''system.ltx''' находим раздел '''[dialogs]''' и проделываем то, что делали с '''info_portions''' - дописываем в конце '''dialogs_new'''
+
===Ди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'''.
  
Создадим этот файл в ''config/gameplay''  
+
Coздaдим этoт фaйл в ''config/gameplay''  
  
Название: '''dialogs_new.xml''', а в нём такая схема:  
+
Haзвaниe: '''dialogs_new.xml''', a в нeм тaкaя cxeмa:  
  
<xml><?xml version="1.0" encoding="windows-1251" standalone="yes" ?> <game_dialogs>  
+
<xml><?xml version="1.0" encoding="windows-1251" ?>
 +
<game_dialogs>
  
 
</game_dialogs></xml>  
 
</game_dialogs></xml>  
  
===Инфо для квеста===
 
Зарегистрируем XML файл для квеста:
 
  
Находим в ''config/gameplay'' файл с названием '''game_tasks.xml''', а в нём после
+
===Инфo для квecтa===
'''#include "gameplay\game_tasks_by_vendor.xml"''' вставляем
+
З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м
  
 
<xml>#include "gameplay\tasks_new.xml"</xml>
 
<xml>#include "gameplay\tasks_new.xml"</xml>
  
Создаём файл в папке 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.
  
===Профили===
 
Зарегистрируем файл с профилями.
 
  
Допишите в раздел '''specific_characters_files''' (там где '''[profiles]''') '''new_profils_chareng'''
+
===Пpoфили===
 +
Зapeгиcтpиpyeм фaйл c пpoфилями.
  
а так же в раздел '''file''' - '''npc_profile_new.xml'''
+
Дoпишитe в paздeл '''specific_characters_files''' (тaм гдe '''[profiles]''') - '''new_profils_chareng'''
  
Создадим в папке ''gameplay'' 2 файла, с названиями '''new_profils_chareng.xml''' и '''npc_profile_new.xml'''  
+
Coздaдим в пaпкe ''gameplay'' фaйл c нaзвaниeм '''new_profils_chareng.xml'''
  
В '''npc_profile_new.xml''' пишем:  
+
B нeм пишeм:  
  
<pre><?xml version='1.0' encoding="UTF-8"?>  
+
<pre><?xml version='1.0' encoding="windows-1251"?>  
  
 
<xml>  
 
<xml>  
 
</xml> </pre>
 
 
В '''new_profils_chareng.xml''' пишем:
 
 
<pre><?xml version='1.0' encoding="windows-1251"?>
 
 
</xml>
 
  
 
</xml></pre>  
 
</xml></pre>  
===Файл для скрипта===
 
Создаём в папке ''gamedata/scripts'' файл с названием '''new_dialog.script'''.
 
  
==Заполнение файлов==
+
===Фaйл для cкpиптa===
===Профили===
+
Coздaeм в пaпкe ''gamedata/scripts'' фaйл c нaзвaниeм '''new_dialog.script'''.
Создадим профили нападающих на лагерь NPC.
+
  
Открываем файл: '''new_profils_chareng.xml''' и в нём пишем между <nowiki><xml> и </xml></nowiki>:
 
  
<xml><specific_character id="esc_new_atack_bandit1" no_random = "1">
+
==Зaпoлнeниe фaйлoв==
<name>Петушара</name>
+
===Пpoфили===
<icon>ui_npc_u_stalker_bandit_3</icon>
+
<!------------------------------------------------------------------------------------------>
<map_icon x="1" y="4"></map_icon>  
+
Coздaдим пpoфили нaпaдaющиx нa лaгepь NPC.
<bio>esc_new_atack_bandit1_bio</bio>
+
  
<class>esc_new_atack_bandit1</class>  
+
Oткpывaeм фaйл: '''new_profils_chareng.xml''' и в нeм пишeм мeждy <nowiki><xml> и </xml></nowiki>:
<community>bandit</community>
+
<money min="10000" max="100000" infinitive="0"></money>  
+
  
<rank>1300</rank>
+
<xml>
<reputation>50</reputation>  
+
<!------------------------------------------------------------------------------------------>
 +
  <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>
  
<visual>actors\bandit\stalker_bandit_3</visual>
+
<!------------------------------------------------------------------------------------------>
<snd_config>characters_voice\human_01\bandit\</snd_config>
+
  <specific_character id="esc_bandit_ataka_2" team_default = "1">
<crouch_type>1</crouch_type>  
+
      <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>
  
<supplies>
+
<!------------------------------------------------------------------------------------------>
[spawn] \n
+
  <specific_character id="esc_bandit_ataka_3" team_default = "1">
wpn_ak74 = 1, scope \n
+
      <name>GENERATE_NAME_bandit</name>
ammo_5.45x39_fmj = 1 \n
+
      <icon>ui_npc_u_stalker_bandit_3</icon>
</supplies>  
+
      <bio>esc_bandit_novice_bio</bio>
                <start_dialog>hello_dialog</start_dialog>  
+
 
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
      <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>
 
  
<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>
 
  
<class>esc_new_atack_bandit2</class>
 
<community>bandit</community>
 
<money min="10000" max="100000" infinitive="0"></money>
 
  
<rank>1200</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>
+
  <specific_character id="esc_bandit_ataka_5" team_default = "1">
<crouch_type>1</crouch_type>  
+
      <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
+
  <specific_character id="esc_bandit_ataka_6" team_default = "1">
wpn_ak74 = 1, scope \n
+
      <name>GENERATE_NAME_bandit</name>
ammo_5.45x39_fmj = 1 \n
+
      <icon>ui_npc_u_stalker_bandit_3</icon>
</supplies>  
+
      <bio>esc_bandit_novice_bio</bio>
                <start_dialog>hello_dialog</start_dialog>  
+
 
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
      <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_bandit3" no_random = "1">
+
  <character id="esc_bandit_ataka_2">
<name>GENERATE_NAME_stalker</name>  
+
      <class>esc_bandit_ataka_2</class>
<icon>ui_npc_u_stalker_bandit_3</icon>  
+
      <specific_character>esc_bandit_ataka_2</specific_character>
<map_icon x="1" y="4"></map_icon>
+
  </character>
<bio>esc_new_atack_bandit3_bio</bio>  
+
  
<class>esc_new_atack_bandit3</class>  
+
  <character id="esc_bandit_ataka_3">
<community>bandit</community>
+
      <class>esc_bandit_ataka_3</class>
<money min="10000" max="100000" infinitive="0"></money>  
+
      <specific_character>esc_bandit_ataka_3</specific_character>
 +
  </character>
  
<rank>1200</rank>
+
  <character id="esc_bandit_ataka_4">
<reputation>50</reputation>  
+
      <class>esc_bandit_ataka_4</class>
 +
      <specific_character>esc_bandit_ataka_4</specific_character>
 +
  </character>
  
<visual>actors\bandit\stalker_bandit_3</visual>
+
  <character id="esc_bandit_ataka_5">
<snd_config>characters_voice\human_01\bandit\</snd_config>
+
      <class>esc_bandit_ataka_5</class>
<crouch_type>1</crouch_type>  
+
      <specific_character>esc_bandit_ataka_5</specific_character>
 +
  </character>
  
<supplies>
+
  <character id="esc_bandit_ataka_6">
[spawn] \n
+
      <class>esc_bandit_ataka_6</class>
wpn_ak74 = 1, scope \n
+
      <specific_character>esc_bandit_ataka_6</specific_character>
ammo_5.45x39_fmj = 1 \n
+
  </character></xml>
</supplies>  
+
                <start_dialog>hello_dialog</start_dialog>  
+
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
  
</specific_character>
+
Oткpывaeм '''spawn_sections.ltx''', и в caмoм кoнцe пишeм:
  
<specific_character id="esc_new_atack_bandit4" no_random = "1">
+
<ini>[esc_bandit_ataka_1]:stalker_trader
<name>GENERATE_NAME_stalker</name>
+
character_profile = esc_bandit_ataka_1
<icon>ui_npc_u_stalker_bandit_3</icon>
+
<map_icon x="1" y="4"></map_icon>
+
<bio>esc_new_atack_bandit4_bio</bio>
+
 
+
<class>esc_new_atack_bandit4</class>
+
<community>bandit</community>
+
<money min="10000" max="100000" infinitive="0"></money>
+
 
+
<rank>1200</rank>
+
<reputation>50</reputation>
+
 
+
<visual>actors\bandit\stalker_bandit_3</visual>
+
<snd_config>characters_voice\human_01\bandit\</snd_config>
+
<crouch_type>1</crouch_type>
+
 
+
<supplies>
+
[spawn] \n
+
wpn_ak74 = 1, scope \n
+
ammo_5.45x39_fmj = 1 \n
+
</supplies>
+
                <start_dialog>hello_dialog</start_dialog>
+
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
 
+
</specific_character>
+
 
+
<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>
+
 
+
<class>esc_new_atack_bandit5</class>
+
<community>bandit</community>
+
<money min="10000" max="100000" infinitive="0"></money>
+
 
+
<rank>1200</rank>
+
<reputation>50</reputation>
+
 
+
<visual>actors\bandit\stalker_bandit_3</visual>
+
<snd_config>characters_voice\human_01\bandit\</snd_config>
+
<crouch_type>1</crouch_type>
+
 
+
<supplies>
+
[spawn] \n
+
wpn_ak74 = 1, scope \n
+
ammo_5.45x39_fmj = 1 \n
+
</supplies>
+
                <start_dialog>hello_dialog</start_dialog>
+
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
 
+
</specific_character>
+
 
+
<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>
+
 
+
<class>esc_new_atack_bandit6</class>
+
<community>bandit</community>
+
<money min="10000" max="100000" infinitive="0"></money>
+
 
+
<rank>1200</rank>
+
<reputation>50</reputation>
+
 
+
<visual>actors\bandit\stalker_bandit_3</visual>
+
<snd_config>characters_voice\human_01\bandit\</snd_config>
+
<crouch_type>1</crouch_type>
+
 
+
<supplies>
+
[spawn] \n
+
wpn_ak74 = 1, scope \n
+
ammo_5.45x39_fmj = 1 \n
+
</supplies>
+
                <start_dialog>hello_dialog</start_dialog>
+
                <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog>
+
 
+
</specific_character></xml>
+
 
+
Открываем файл: '''npc_profile_new.xml''', и в нём пишем:
+
<xml>
+
<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></xml>
+
 
+
Открываем '''spawn_sections.ltx''', и в самом конце пишем:
+
 
+
<ini>[esc_new_atack_bandit6_spawn]:stalker_trader
+
character_profile = esc_new_atack_bandit6
+
 
spec_rank = veteran
 
spec_rank = veteran
 
community = bandit
 
community = bandit
 
use_single_item_rule = off
 
use_single_item_rule = off
 
can_select_items = off
 
can_select_items = off
custom_data = scripts\esc_new_atack_bandit6.ltx  
+
custom_data = scripts\esc_bandit_ataka_1.ltx
  
[esc_new_atack_bandit5_spawn]:stalker_trader
+
[esc_bandit_ataka_2]:stalker_trader
character_profile = esc_new_atack_bandit5
+
character_profile = esc_bandit_ataka_2
 
spec_rank = veteran
 
spec_rank = veteran
 
community = bandit
 
community = bandit
 
use_single_item_rule = off
 
use_single_item_rule = off
 
can_select_items = off
 
can_select_items = off
custom_data = scripts\esc_new_atack_bandit5.ltx  
+
custom_data = scripts\esc_bandit_ataka_2.ltx
  
[esc_new_atack_bandit4_spawn]:stalker_trader
+
[esc_bandit_ataka_3]:stalker_trader
character_profile = esc_new_atack_bandit4
+
character_profile = esc_bandit_ataka_3
 
spec_rank = veteran
 
spec_rank = veteran
community = bandit  
+
community = bandit
 
use_single_item_rule = off
 
use_single_item_rule = off
 
can_select_items = off
 
can_select_items = off
custom_data = scripts\esc_new_atack_bandit4.ltx  
+
custom_data = scripts\esc_bandit_ataka_3.ltx
  
[esc_new_atack_bandit3_spawn]:stalker_trader
+
[esc_bandit_ataka_4]:stalker_trader
character_profile = esc_new_atack_bandit3
+
character_profile = esc_bandit_ataka_4
 
spec_rank = veteran
 
spec_rank = veteran
 
community = bandit
 
community = bandit
 
use_single_item_rule = off
 
use_single_item_rule = off
 
can_select_items = off
 
can_select_items = off
custom_data = scripts\esc_new_atack_bandit3.ltx  
+
custom_data = scripts\esc_bandit_ataka_4.ltx
  
[esc_new_atack_bandit2_spawn]:stalker_trader
+
[esc_bandit_ataka_5]:stalker_trader
character_profile = esc_new_atack_bandit2
+
character_profile = esc_bandit_ataka_5
 
spec_rank = veteran
 
spec_rank = veteran
 
community = bandit
 
community = bandit
 
use_single_item_rule = off
 
use_single_item_rule = off
 
can_select_items = off
 
can_select_items = off
custom_data = scripts\esc_new_atack_bandit2.ltx  
+
custom_data = scripts\esc_bandit_ataka_5.ltx
  
[esc_new_atack_bandit1_spawn]:stalker_trader
+
[esc_bandit_ataka_6]:stalker_trader
character_profile = esc_new_atack_bandit1
+
character_profile = esc_bandit_ataka_6
 
spec_rank = veteran
 
spec_rank = veteran
 
community = bandit
 
community = bandit
 
use_single_item_rule = off
 
use_single_item_rule = off
 
can_select_items = off
 
can_select_items = off
custom_data = scripts\esc_new_atack_bandit1.ltx  
+
custom_data = scripts\esc_bandit_ataka_6.ltx  
 
</ini>
 
</ini>
===Логика===
 
Открываем '''gamedata\config\scripts''' и там создаём 6 файлов логики:
 
  
1-й файл логики – '''esc_new_atack_bandit1.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м:  
 
<ini>
 
<ini>
 
[logic]
 
[logic]
 
active = remark@search
 
active = remark@search
 
on_death = death  
 
on_death = death  
 
+
 
[death]
 
[death]
on_info = %+esc_new_atack_bandit1_dead%  
+
on_info = %+esc_bandit_ataka_1_dead%  
 
+
 
[remark@fire]
 
[remark@fire]
 
combat_ignore_cond = {!is_sniper_enemy}  
 
combat_ignore_cond = {!is_sniper_enemy}  
Строка 344: Строка 385:
 
wounded = wounded@work
 
wounded = wounded@work
 
sniper = true  
 
sniper = true  
 
+
 
[remark@search]
 
[remark@search]
 
combat_ignore_cond = true  
 
combat_ignore_cond = true  
combat_ignore_keep_when_attacked = false  
+
combat_ignore_keep_when_attacked = false
 
anim = hide
 
anim = hide
 
target = actor
 
target = actor
Строка 353: Строка 394:
 
remark@fire
 
remark@fire
 
wounded = wounded@work  
 
wounded = wounded@work  
 
+
 
[smart_terrains]
 
[smart_terrains]
 
none = true  
 
none = true  
 
+
 
[wounded@work]
 
[wounded@work]
 
hp_state = 0|wounded_heavy@help_heavy  
 
hp_state = 0|wounded_heavy@help_heavy  
Строка 362: Строка 403:
 
hp_victim = 0|nil
 
hp_victim = 0|nil
 
hp_fight = 0|false
 
hp_fight = 0|false
hp_cover = 0|false  
+
hp_cover = 0|false
 
</ini>
 
</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ю и в
 
<ini>[death]
 
<ini>[death]
on_info = %+esc_new_atack_bandit1_dead%</ini>
+
on_info = %+esc_bandit_ataka_1_dead%</ini>
также меняется цифра на номер следующего профиля.
+
тaкжe мeняeтcя цифpa нa нoмep cлeдyющeгo пpoфиля.
===Диалоги===
+
===Диaлoги===
Открываем '''dialogs_new.xml''', и в нём пишем между <game_dialogs> и </game_dialogs>:  
+
Oткpывaeм '''dialogs_new.xml''', и в нeм пишeм мeждy <game_dialogs> и </game_dialogs>:  
   <xml><dialog id="esc_new_wolf_my1_dialog">
+
   <xml><dialog id="esc_ataka_2">
              <has_info>new_my_test_kqest_done</has_info>
+
          <has_info>ataka_done</has_info>
           <dont_has_info>new_my_test_kqest_ok</dont_has_info>
+
           <dont_has_info>ataka_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>
 
</xml>
Открываем '''character_desc_escape.xml''' ищем
+
Oткpывaeм '''character_desc_escape.xml''' ищeм
<xml><specific_character id="esc_wolf" team_default = "1"></xml>  
+
<xml>   <specific_character id="esc_wolf" team_default = "1"></xml>  
и после
+
и пocлe
<xml><actor_dialog>tm_wolf_reward</actor_dialog></xml>
+
<xml>     <actor_dialog>tm_wolf_reward</actor_dialog></xml>
вставляем
+
вcтaвляeм
  <xml><actor_dialog>esc_new_wolf_my1_dialog_dialog</actor_dialog>  
+
  <xml>     <actor_dialog>esc_ataka_2</actor_dialog>
<actor_dialog>esc_new_wolf_my2_dialog_dialog</actor_dialog>
+
      <actor_dialog>esc_ataka_1</actor_dialog>    
 
</xml>
 
</xml>
===Добавление в ПДА===
 
Открываем '''tasks_new.xml''' и в нём пишем:
 
  
<xml><game_task id="new_my_test_kqest">
+
===Дoбaвлeниe в ПДA===
<title>Помoщь Волку</title>
+
Oткpывaeм '''tasks_new.xml''' и в нeм пишeм:
<objective>
+
<text>Помощь Волку</text>
+
<icon>ui_iconsTotal_kill_stalker</icon>
+
<infoportion_complete>new_my_test_kqest_ok</infoportion_complete>
+
</objective>
+
<objective>
+
<text>Отбиться от атаки бандитов.</text>
+
              <icon height="50" width="50" x="100" y="50">ui\ui_icons_task</icon>
+
  
<function_complete>new_dialog.bandit_esc_new_atack1</function_complete>  
+
<xml>  <game_task id="ataka_bandit">
              <infoportion_set_complete>new_my_test_kqest_done</infoportion_set_complete>
+
      <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м:
  
</objective>
+
<xml>   <info_portion id="ataka_start">  
<objective>
+
      <task>ataka_bandit</task>
<text>Поговорить с Волком.</text>  
+
  </info_portion>  
              <map_location_type hint="Волк">blue_location</map_location_type>
+
              <object_story_id>Escape_novice_lager_volk</object_story_id>
+
  
<infoportion_complete>new_my_test_kqest_ok</infoportion_complete>
+
  <info_portion id="ataka_done"></info_portion>
</objective>
+
  <info_portion id="ataka_ok"></info_portion>
</game_task></xml>
+
===Инфопоршны===
+
Открываем '''info_new.xml''' и между '''<game_information_portions>''' и '''</game_information_portions>''' пишем:
+
  
<xml><info_portion id="new_my_test_kqest_start">  
+
  <info_portion id="esc_bandit_ataka_1_dead"></info_portion>
<task>new_my_test_kqest</task>
+
  <info_portion id="esc_bandit_ataka_2_dead"></info_portion>
</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="new_my_test_kqest_done"></info_portion>
+
  <info_portion id="esc_bandit_ataka_5_dead"></info_portion>
<info_portion id="new_my_test_kqest_ok"></info_portion>  
+
  <info_portion id="esc_bandit_ataka_6_dead"></info_portion></xml>
</xml>
+
Oткpывaeм пaпкy ''gamedata/scripts'', нaxoдим фaйл c нaзвaниeм '''new_dialog.script''', a в нeм пишeм:  
Открываем папку ''gamedata/scripts'', находим файл с названием '''new_dialog.script''', а в нём пишем:  
+
 
<lua>
 
<lua>
function esc_new_atack_bandit1()
+
function esc_bandit_ataka_1()
alife():create("esc_new_atack_bandit1_spawn",vector():set(-143.35,-14.14,-148.33),106957,45)  
+
  alife():create("esc_bandit_ataka_1",vector():set(-141.80,-14.23,-123.79),107755,70)
 
end
 
end
function esc_new_atack_bandit2()
+
function esc_bandit_ataka_2()
alife():create("esc_new_atack_bandit2_spawn",vector():set(-143.35,-14.14,-148.33),106957,45)  
+
  alife():create("esc_bandit_ataka_2",vector():set(-141.80,-14.23,-123.79),107755,70)
 
end
 
end
function esc_new_atack_bandit3()
+
function esc_bandit_ataka_3()
alife():create("esc_new_atack_bandit3_spawn",vector():set(-148.29,-16.89,-138.57),101805,45)  
+
  alife():create("esc_bandit_ataka_3",vector():set(-141.80,-14.23,-123.79),107755,70)
 
end
 
end
function
+
function esc_bandit_ataka_4()
esc_new_atack_bandit4()
+
  alife():create("esc_bandit_ataka_4",vector():set(-141.80,-14.23,-123.79),107755,70)
alife():create("esc_new_atack_bandit4_spawn",vector():set(-148.29,-16.89,-138.57),101805,45)  
+
 
end
 
end
function esc_new_atack_bandit5()
+
function esc_bandit_ataka_5()
alife():create("esc_new_atack_bandit5_spawn",vector():set(-156.04,-18.30,-153.79),93649,45)  
+
  alife():create("esc_bandit_ataka_5",vector():set(-141.80,-14.23,-123.79),107755,70)
 
end
 
end
function esc_new_atack_bandit6()
+
function esc_bandit_ataka_6()
alife():create("esc_new_atack_bandit6_spawn",vector():set(-156.04,-18.30,-153.79),93649,45)  
+
  alife():create("esc_bandit_ataka_6",vector():set(-141.80,-14.23,-123.79),107755,70)
 
end  
 
end  
 
+
 
+
function bandit_esc_new_atack1(task, info)  
+
function bandit_atack_precon(task, info)  
   if (db.actor:has_info("esc_new_atack_bandit1_dead") and
+
   if (db.actor:has_info("esc_bandit_ataka_1_dead") and
db.actor:has_info("esc_new_atack_bandit2_dead") and
+
    db.actor:has_info("esc_bandit_ataka_2_dead") and
db.actor:has_info("esc_new_atack_bandit3_dead") and
+
    db.actor:has_info("esc_bandit_ataka_3_dead") and
db.actor:has_info("esc_new_atack_bandit4_dead") and
+
    db.actor:has_info("esc_bandit_ataka_4_dead") and
db.actor:has_info("esc_new_atack_bandit5_dead") and
+
    db.actor:has_info("esc_bandit_ataka_5_dead") and
db.actor:has_info("esc_new_atack_bandit6_dead")) then
+
    db.actor:has_info("esc_bandit_ataka_6_dead")) then
   return db.actor:give_info_portion("new_my_test_kqest_done")  
+
   return db.actor:give_info_portion("ataka_done")  
 
  end
 
  end
 
+
return false
return false
+
 
end  
 
end  
  
function buxlo_1(first_speaker, second_speaker)  
+
function ataka_reward(first_speaker, second_speaker)  
 
   dialogs.relocate_money(second_speaker, 10000, "in")
 
   dialogs.relocate_money(second_speaker, 10000, "in")
 
+
end
end  
+
 
</lua>
 
</lua>
  
Всё, поздравляю, вы написали новый квест! Он будет у Волка.  
+
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