Сложный квест на оборону лагеря — различия между версиями
Материал из S.T.A.L.K.E.R. Inside Wiki
TuMaN (обсуждение | вклад) (привел в порядок) |
|||
Строка 3: | Строка 3: | ||
Что нам потребуется? | Что нам потребуется? | ||
− | + | * '''system.ltx''' | |
− | + | * '''character_desc_escape.xml''' | |
− | + | * '''spawn_sections.ltx''' | |
− | |||
− | + | ==Создание и подготовка файлов== | |
+ | ===Инфопоршны=== | ||
− | + | Зарегистрируем пустой файл для '''info_portions'''. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | Открываем файл '''system.ltx''', находим вот это – '''[info_portions]'''. | |
− | + | Нужно дописать в конец этого раздела, через запятую '''info_new''' | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | Создадим этот файл ('''info_new.xml'''). | |
− | + | В ''config/gameplay'' создаём файл с названием '''info_new.xml''', в нём пишем это: | |
+ | <xml><?xml version="1.0" encoding="windows-1251" ?> | ||
− | < | + | <game_information_portions> |
− | |||
− | < | + | </game_information_portions></xml> |
− | </ | + | |
− | + | ||
− | + | ===Диалоги=== | |
+ | Зарегистрируем пустой файл для диалогов | ||
− | + | В '''system.ltx''' находим раздел '''[dialogs]''' и проделываем то, что делали с '''info_portions''' - дописываем в конце '''dialogs_new''' | |
− | + | Создадим этот файл в ''config\gameplay'' | |
− | + | Название: '''dialogs_new.xml''', а в нём такая схема: | |
− | < | + | <xml><?xml version="1.0" encoding="windows-1251" standalone="yes" ?> <game_dialogs> |
− | + | </game_dialogs></xml> | |
− | + | ===Инфо для квеста=== | |
− | + | Зарегистрируем XML файл для квеста: | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | Находим в ''config\gameplay'' файл с названием '''game_tasks.xml''', а в нём после | |
− | + | '''include "gameplay\game_tasks_by_vendor.xml"''' вставляем | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | include "gameplay\game_tasks_by_vendor.xml" | + | |
− | + | <xml>include "gameplay\tasks_new.xml"</xml> | |
− | + | Мы в него добавили одну строку - <xml>#include "gameplay\tasks_new.xml"</xml> | |
− | + | Создаём файл в папке gameplay с названием '''tasks_new.xml'''. | |
+ | ===Профили=== | ||
+ | Зарегистрируем файл с профилями. | ||
− | + | Допишите в раздел '''specific_characters_files''' (там где '''[profiles]''') '''new_profils_chareng''' | |
− | + | а так же в раздел '''npc_profiles''' - '''npc_profile_new.xml''' | |
− | + | ||
− | + | Создадим в папке ''gameplay'' 2 файла, с названиями '''new_profils_chareng.xml''' и '''npc_profile_new.xml''' | |
− | + | ||
− | + | В '''npc_profile_new.xml''' пишем: | |
− | + | ||
− | + | ||
− | < | + | <xml><?xml version='1.0' encoding="UTF-8"?> |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<xml> | <xml> | ||
− | </xml></ | + | </xml> </xml> |
− | + | В '''new_profils_chareng.xml''' пишем: | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | < | + | <xml><?xml version='1.0' encoding="windows-1251"?> |
− | + | </xml> | |
− | + | </xml></xml> | |
+ | ===Файл для скрипта=== | ||
+ | Создаём в папке ''gamedata/scripts'' файл с названием '''new_dialog.script'''. | ||
− | + | ==Заполнение файлов== | |
+ | ===Профили=== | ||
+ | Создадим профили нападающих на лагерь NPC. | ||
− | Открываем файл: | + | Открываем файл: '''new_profils_chareng.xml''' и в нём пишем между <nowiki><xml> и </xml></nowiki>: |
− | < | + | <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> | + | <class>esc_new_atack_bandit1</class> <community>bandit</community> |
+ | <money min="10000" max="100000" infinitive="0"></money> | ||
− | <rank>1300</rank> <reputation>50</reputation> | + | <rank>1300</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> | + | <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> | + | <supplies> |
+ | [spawn] \n | ||
+ | wpn_ak74 = 1, scope \n | ||
+ | ammo_5.45x39_fmj = 1 \n | ||
+ | </supplies> | ||
<start_dialog>hello_dialog</start_dialog> | <start_dialog>hello_dialog</start_dialog> | ||
<actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | ||
Строка 146: | Строка 108: | ||
</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> | + | <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> | + | <class>esc_new_atack_bandit2</class> <community>bandit</community> |
+ | <money min="10000" max="100000" infinitive="0"></money> | ||
− | <rank>1200</rank> <reputation>50</reputation> | + | <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> | + | <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> | + | <supplies> |
+ | [spawn] \n | ||
+ | wpn_ak74 = 1, scope \n | ||
+ | ammo_5.45x39_fmj = 1 \n | ||
+ | </supplies> | ||
<start_dialog>hello_dialog</start_dialog> | <start_dialog>hello_dialog</start_dialog> | ||
<actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | ||
Строка 160: | Строка 131: | ||
</specific_character> | </specific_character> | ||
− | <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> | + | <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> | ||
− | <class>esc_new_atack_bandit3</class> <community>bandit</community> <money min="10000" max="100000" infinitive="0"></money> | + | <class>esc_new_atack_bandit3</class> <community>bandit</community> |
+ | <money min="10000" max="100000" infinitive="0"></money> | ||
− | <rank>1200</rank> <reputation>50</reputation> | + | <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> | + | <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> | + | <supplies> |
+ | [spawn] \n | ||
+ | wpn_ak74 = 1, scope \n | ||
+ | ammo_5.45x39_fmj = 1 \n | ||
+ | </supplies> | ||
<start_dialog>hello_dialog</start_dialog> | <start_dialog>hello_dialog</start_dialog> | ||
<actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | ||
Строка 174: | Строка 154: | ||
</specific_character> | </specific_character> | ||
− | <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> | + | <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> | ||
− | <class>esc_new_atack_bandit4</class> <community>bandit</community> <money min="10000" max="100000" infinitive="0"></money> | + | <class>esc_new_atack_bandit4</class> <community>bandit</community> |
+ | <money min="10000" max="100000" infinitive="0"></money> | ||
− | <rank>1200</rank> <reputation>50</reputation> | + | <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> | + | <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> | + | <supplies> |
+ | [spawn] \n | ||
+ | wpn_ak74 = 1, scope \n | ||
+ | ammo_5.45x39_fmj = 1 \n | ||
+ | </supplies> | ||
<start_dialog>hello_dialog</start_dialog> | <start_dialog>hello_dialog</start_dialog> | ||
<actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | ||
Строка 188: | Строка 177: | ||
</specific_character> | </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> | + | <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> | + | <class>esc_new_atack_bandit5</class> <community>bandit</community> |
+ | <money min="10000" max="100000" infinitive="0"></money> | ||
− | <rank>1200</rank> <reputation>50</reputation> | + | <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> | + | <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> | + | <supplies> |
+ | [spawn] \n | ||
+ | wpn_ak74 = 1, scope \n | ||
+ | ammo_5.45x39_fmj = 1 \n | ||
+ | </supplies> | ||
<start_dialog>hello_dialog</start_dialog> | <start_dialog>hello_dialog</start_dialog> | ||
<actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | ||
Строка 202: | Строка 200: | ||
</specific_character> | </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> | + | <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> | + | <class>esc_new_atack_bandit6</class> <community>bandit</community> |
+ | <money min="10000" max="100000" infinitive="0"></money> | ||
− | <rank>1200</rank> <reputation>50</reputation> | + | <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> | + | <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> | + | <supplies> |
+ | [spawn] \n | ||
+ | wpn_ak74 = 1, scope \n | ||
+ | ammo_5.45x39_fmj = 1 \n | ||
+ | </supplies> | ||
<start_dialog>hello_dialog</start_dialog> | <start_dialog>hello_dialog</start_dialog> | ||
<actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> | ||
− | </specific_character></ | + | </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''', и в самом конце пишем: | |
− | [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 | + | <ini>[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 | ||
− | [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 | + | [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 | ||
− | [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_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_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_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 | + | [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 | ||
+ | </ini> | ||
+ | ===Логика=== | ||
+ | Открываем '''gamedata\config\scripts''' и там создаём 6 файлов логики: | ||
− | 1 файл логики – | + | 1-й файл логики – '''esc_new_atack_bandit1.ltx''', в нём пишем: |
− | < | + | <ini> |
− | [logic] active = remark@search on_death = death | + | [logic] |
+ | active = remark@search | ||
+ | on_death = death | ||
− | [death] on_info = %+esc_new_atack_bandit1_dead% | + | [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@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 | + | [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 | + | [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 | + | [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 | |
− | + | </ini> | |
− | + | Остальные файлы создаются с аналогичным содержанием, но в названии меняется цифра на следующую и в | |
− | + | <ini>[death] | |
− | + | on_info = %+esc_new_atack_bandit1_dead%</ini> | |
− | + | также меняется цифра на номер следующего профиля. | |
− | + | ===Диалоги=== | |
− | + | Открываем '''dialogs_new.xml''', и в нём пишем между <game_dialogs> и </game_dialogs>: | |
− | + | <xml><dialog id="esc_new_wolf_my1_dialog"> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | </ | + | |
− | + | ||
− | + | ||
− | < | + | |
− | + | ||
− | + | ||
− | [death] | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | </ | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | <dialog id="esc_new_wolf_my1_dialog"> | + | |
<has_info>new_my_test_kqest_done</has_info> | <has_info>new_my_test_kqest_done</has_info> | ||
<dont_has_info>new_my_test_kqest_ok</dont_has_info> | <dont_has_info>new_my_test_kqest_ok</dont_has_info> | ||
Строка 389: | Строка 399: | ||
</phrase_list> | </phrase_list> | ||
</dialog> | </dialog> | ||
− | </ | + | </xml> |
− | + | Открываем '''character_desc_escape.xml''' ищем | |
+ | <xml><specific_character id="esc_wolf" team_default = "1"></xml> | ||
+ | и после | ||
+ | <xml><actor_dialog>tm_wolf_reward</actor_dialog></xml> | ||
+ | вставляем | ||
+ | <xml><actor_dialog>esc_new_wolf_my1_dialog _dialog</actor_dialog> | ||
+ | <actor_dialog>esc_new_wolf_my2_dialog _dialog</actor_dialog> | ||
+ | </xml> | ||
+ | ===Добавление в ПДА=== | ||
+ | Открываем '''tasks_new.xml''' и в нём пишем: | ||
− | < | + | <xml><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> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<icon height="50" width="50" x="100" y="50">ui\ui_icons_task</icon> | <icon height="50" width="50" x="100" y="50">ui\ui_icons_task</icon> | ||
Строка 436: | Строка 424: | ||
<infoportion_set_complete>new_my_test_kqest_done</infoportion_set_complete> | <infoportion_set_complete>new_my_test_kqest_done</infoportion_set_complete> | ||
− | </objective> <objective> <text>Поговорить с Волком.</text> | + | </objective> |
+ | <objective> | ||
+ | <text>Поговорить с Волком.</text> | ||
<map_location_type hint="Волк">blue_location</map_location_type> | <map_location_type hint="Волк">blue_location</map_location_type> | ||
<object_story_id>Escape_novice_lager_volk</object_story_id> | <object_story_id>Escape_novice_lager_volk</object_story_id> | ||
− | <infoportion_complete>new_my_test_kqest_ok</infoportion_complete> </objective> </game_task></ | + | <infoportion_complete>new_my_test_kqest_ok</infoportion_complete> |
+ | </objective> | ||
+ | </game_task></xml> | ||
+ | ===Инфопоршны=== | ||
+ | Открываем '''info_new.xml''' и между '''<game_information_portions>''' и '''</game_information_portions>''' пишем: | ||
− | + | <xml><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> | |
− | + | </xml> | |
− | </ | + | Открываем папку ''gamedata/scripts'', находим файл с названием '''new_dialog.script''', а в нём пишем: |
− | + | <lua> | |
− | < | + | function esc_new_atack_bandit1() |
− | 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 | + | 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) | 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 | + | 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") | return db.actor:give_info_portion("new_my_test_kqest_done") | ||
end | end | ||
− | return false end | + | return false |
+ | end | ||
function buxlo_1(first_speaker, second_speaker) | function buxlo_1(first_speaker, second_speaker) | ||
Строка 464: | Строка 476: | ||
end | end | ||
− | </ | + | </lua> |
− | Всё, поздравляю, вы написали новый квест! Он будет у | + | Всё, поздравляю, вы написали новый квест! Он будет у Волка. |
+ | Желательно его выполнять после квеста с флешкой Шустрого! | ||
[[Категория:Конфигурационные файлы]] | [[Категория:Конфигурационные файлы]] |
Версия 03:29, 14 июля 2011
Сейчас мы создадим сложный квест на оборону лагеря!
Что нам потребуется?
- system.ltx
- character_desc_escape.xml
- spawn_sections.ltx
Содержание
Создание и подготовка файлов
Инфопоршны
Зарегистрируем пустой файл для info_portions.
Открываем файл system.ltx, находим вот это – [info_portions]. Нужно дописать в конец этого раздела, через запятую info_new
Создадим этот файл (info_new.xml).
В config/gameplay создаём файл с названием info_new.xml, в нём пишем это:
<?xml version="1.0" encoding="windows-1251" ?> <game_information_portions> </game_information_portions>
Диалоги
Зарегистрируем пустой файл для диалогов
В system.ltx находим раздел [dialogs] и проделываем то, что делали с info_portions - дописываем в конце dialogs_new
Создадим этот файл в config\gameplay
Название: dialogs_new.xml, а в нём такая схема:
<?xml version="1.0" encoding="windows-1251" standalone="yes" ?> <game_dialogs> </game_dialogs>
Инфо для квеста
Зарегистрируем XML файл для квеста:
Находим в config\gameplay файл с названием game_tasks.xml, а в нём после include "gameplay\game_tasks_by_vendor.xml" вставляем
include "gameplay\tasks_new.xml"Мы в него добавили одну строку -
#include "gameplay\tasks_new.xml"
Создаём файл в папке gameplay с названием tasks_new.xml.
Профили
Зарегистрируем файл с профилями.
Допишите в раздел specific_characters_files (там где [profiles]) new_profils_chareng
а так же в раздел npc_profiles - npc_profile_new.xml
Создадим в папке gameplay 2 файла, с названиями new_profils_chareng.xml и npc_profile_new.xml
В npc_profile_new.xml пишем:
<?xml version='1.0' encoding="UTF-8"?> <xml></xml>
В new_profils_chareng.xml пишем:
<?xml version='1.0' encoding="windows-1251"?>
</xml></xml>
Файл для скрипта
Создаём в папке gamedata/scripts файл с названием new_dialog.script.
Заполнение файлов
Профили
Создадим профили нападающих на лагерь NPC.
Открываем файл: 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> <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_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> <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_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> <class>esc_new_atack_bandit3</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_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> <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>
Открываем файл: npc_profile_new.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>
Открываем spawn_sections.ltx, и в самом конце пишем:
[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 [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 [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
Логика
Открываем gamedata\config\scripts и там создаём 6 файлов логики:
1-й файл логики – esc_new_atack_bandit1.ltx, в нём пишем:
[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
Остальные файлы создаются с аналогичным содержанием, но в названии меняется цифра на следующую и в
[death] on_info = %+esc_new_atack_bandit1_dead%
также меняется цифра на номер следующего профиля.
Диалоги
Открываем 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 id="0"> <text>Волк, ну ты как, жив?</text> <next>1</next> </phrase> <phrase id="1"> <text>Да, Ха-ха, как мы их?</text> <next>2</next> </phrase> <phrase id="2"> <text>Плохо, друг мой, плохо...</text> <next>3</next> </phrase> <phrase id="3"> <text>Вот спасибо тебе... Вот, держи, чем богат...</text> <action>new_dialog.buxlo_1</action> <next>4</next> </phrase> <phrase id="4"> <text>Спасибо!</text> <give_info>new_my_test_kqest_ok</give_info> <action>dialogs.break_dialog</action> </phrase> </phrase_list> </dialog> <dialog id="esc_new_wolf_my2_dialog"> <dont_has_info>new_my_test_kqest_start</dont_has_info> <phrase_list> <phrase id="0"> <text>Волк, а что ты весь дрожишь?</text> <next>1</next> </phrase> <phrase id="1"> <text>Да с минуты на минуту бандиты нападут...</text> <next>2</next> </phrase> <phrase id="2"> <text>Я тебе помогу отбиться, хорошо?</text> <next>3</next> </phrase> <phrase id="3"> <text>Вот спасибо тебе Меченый, век буду благодарен!</text> <next>4</next> </phrase> <phrase id="4"> <text>Хватит сопли распускать, с минуты на минуту бандиты подойдут!</text> <give_info>new_my_test_kqest_start</give_info> <action>new_dialog.esc_new_atack_bandit1</action> <action>new_dialog.esc_new_atack_bandit2</action> <action>new_dialog.esc_new_atack_bandit3</action> <action>new_dialog.esc_new_atack_bandit4</action> <action>new_dialog.esc_new_atack_bandit5</action> <action>new_dialog.esc_new_atack_bandit6</action> <action>dialogs.break_dialog</action> </phrase> </phrase_list> </dialog>
Открываем character_desc_escape.xml ищем
<specific_character id="esc_wolf" team_default = "1">
и после
<actor_dialog>tm_wolf_reward</actor_dialog>
вставляем
<actor_dialog>esc_new_wolf_my1_dialog _dialog</actor_dialog> <actor_dialog>esc_new_wolf_my2_dialog _dialog</actor_dialog>
Добавление в ПДА
Открываем tasks_new.xml и в нём пишем:
<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> <icon height="50" width="50" x="100" y="50">ui\ui_icons_task</icon> <function_complete>new_dialog.bandit_esc_new_atack1</function_complete> <infoportion_set_complete>new_my_test_kqest_done</infoportion_set_complete> </objective> <objective> <text>Поговорить с Волком.</text> <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> </objective> </game_task>
Инфопоршны
Открываем 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>
Открываем папку 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 return false end function buxlo_1(first_speaker, second_speaker) dialogs.relocate_money(second_speaker, 10000, "in") end
Всё, поздравляю, вы написали новый квест! Он будет у Волка. Желательно его выполнять после квеста с флешкой Шустрого!