Статистика форума
Самые активные пользователи
Уважаемые пользователи
Недавно обновленные темы
Новые участники
  • Страница 1 из 1
  • 1
Форум » Уроки по созданию модов » Конфиги, скрипты и прочие мелочи » Создание нового шлема ((Автор: DOC_VENOM))
Создание нового шлема
Основатель сайта
Пользователь №: 1
Регистрация: 11.10.2012
Звание: Легенда
Сообщений: 677
Статус: Оффлайн
Сообщение # 1
Дата: 03.03.2014 в 21:46
Открываем файл outfit.ltx находится он в папке gamedata/configs/misc 
Итак для начала разберемся что и как, возьмём к примеру стандартный шлем [helm_respirator] его код выглядит так: 

[helm_respirator]:helmet - название секции шлема,именно к нему игра будет обращаться.helmet базовая (наследуемая) секция (изменять строго не рекомендуется). 
$spawn = "outfit\helm_respirator" - тут у нас спавн менять его не будем,оставим стандартный 
visual = dynamics\outfit\helm_respirator - тут у нас модель шлема 
control_inertion_factor = 1.0 - управление инертион фактором 
inv_name = st_helm_respirator - название шлема в инвентаре. 
inv_name_short = st_helm_respirator - название шлема в инвентаре. 
description = st_helm_respirator_descr - ссылка на описание шлема 

inv_weight = 4.0 - Вес шлема 

inv_grid_width = 2 - Ширина иконки в ui_icon_equipment.dds 
inv_grid_height = 2 - Высота иконки в ui_icon_equipment.dds
inv_grid_x = 4 - Положение по Х в ui_icon_equipment.dds 
inv_grid_y = 18 - Положение по У в ui_icon_equipment.dds 

upgr_icon_x = 20 - Тут всё тоже самое но только для иконки Апгрейда - ui_actor_armor.dds 
upgr_icon_y = 619 - Тут всё тоже самое но только для иконки Апгрейда - ui_actor_armor.dds 
upgr_icon_width = 106 - Тут всё тоже самое но только для иконки Апгрейда - ui_actor_armor.dds 
upgr_icon_height = 149 - Тут всё тоже самое но только для иконки Апгрейда - ui_actor_armor.dds 

cost = 1000 - Цена 

immunities_sect = sect_helm_respirator_immunities - секции имунитета 
bones_koeff_protection = actor_helm_respirator - это помоему защита головы ГГ 

telepatic_protection = 0.0200 - защита от телепатии 
radiation_protection = 0.0015 - защита от радиации 
chemical_burn_protection = 0.0500 - защита от химических ожогов 

upgrades = up_gr_firstab_helm_respirator - это код на Апгрейд 
installed_upgrades = 
upgrade_scheme = upgrade_scheme_helm_respirator - это код на схему Апгрейд 

[sect_helm_respirator_immunities] - коэффициенты иммунитета самого костюма, то 
есть - то, насколько сильно он сам подвержен повреждениям от различных типов 
воздействий. по значениям каждого типа 

burn_immunity = 0.04 - защита от воздействия огня (костры,аномалия "Жарка" и т.д.) 
strike_immunity = 0.0 - защита от ударов (наносятся мутантами, например, псевдогигантом) 
shock_immunity = 0.04 - ащита от поражения электричеством. 
wound_immunity = 0.0 - защита от ранений (наносятся мутантами, например, собаками, кровососами и т.д.) 
wound_2_immunity = 0.0 - защита от ранений (наносятся мутантами, например, собаками, кровососами и т.д.) 
radiation_immunity = 0.0 - защита от радиации. 
telepatic_immunity = 0.0 - защита от пси-воздействия (например, присутствие контроллера серьезно влияет на psy_health) 
chemical_burn_immunity = 0.04 - защита от химического воздействия. 
explosion_immunity = 0.04 - защита от взрывов/осколков. 
fire_wound_immunity = 0.04 - защита от огнестрельного оружия.


Важно! При создании нового ***.ltx файла (не важно от шлема или оружия) не забывайте добавлять инклуд! Добавлять 1 верх файла outfit.ltx. В слчае с оружием - weapons.ltx 
#include "outfit_upgrades\helm_respirator_up.ltx"


Далее создадим свой шлем в файле outfit.ltx в самом низу пишем... 

[helm_battle_dolg]:helmet 
$spawn = "outfit\helm_battle" 
visual = dynamics\helm\helm_battle_dolg 
control_inertion_factor = 1.0 
inv_name = st_helm_battle_dolg 
inv_name_short = st_helm_battle_dolg 
description = st_helm_battle_dolg_descr 
inv_weight = 3.0 
inv_grid_width = 2 
inv_grid_height = 2 
inv_grid_x = 26 
inv_grid_y = 0 
upgr_icon_x = 900 
upgr_icon_y = 450 
upgr_icon_width = 100 
upgr_icon_height = 100 
cost = 8000 
nightvision_sect = effector_nightvision_1 
immunities_sect = sect_helm_battle_immunities 
bones_koeff_protection = actor_helm_battle 
telepatic_protection = 0.0600 
radiation_protection = 0.0050 
chemical_burn_protection = 0.0300 
strike_protection = 0.0 
explosion_protection = 0.0 
wound_protection = 0.0 
[sect_helm_battle_dolg_immunities] 
burn_immunity = 0.02 
strike_immunity = 0.0 
shock_immunity = 0.02 
wound_immunity = 0.0 
wound_2_immunity = 0.0 
radiation_immunity = 0.0 
telepatic_immunity = 0.0 
chemical_burn_immunity = 0.02 
explosion_immunity = 0.01 
fire_wound_immunity = 0.01


Далее добавим к мену Апгрейд,в файле outfit.ltx в верху пишем:

#include "outfit_upgrades\helm_battle_dolg_up.ltx"

Так теперь создадим ветку Апгрейда. Для этого создадим текстовый документ helm_battle_dolg_up.ltx в папке outfit_upgrades находится она gamedata/configs/misc/outfit_upgrades 
Далее в наш файл helm_battle_dolg_up.ltx пишем:

[up_sect_firsta_helm_battle_dolg] 
cost   = 500 
value  = +10 

chemical_burn_protection        = 0.005 
radiation_protection            = 0.0004 

[up_sect_firstc_helm_battle_dolg] 
cost   = 1000 
value   = +20 

telepatic_protection     = 0.010 

[up_sect_firstd_helm_battle_dolg] 
cost   = 1000 
value  = +20 

chemical_burn_protection         = 0.010 

[up_sect_firste_helm_battle_dolg] 
cost   = 1500 
value  = +20 

chemical_burn_protection        = 0.015 
radiation_protection            = 0.0006 

[up_sect_secona_helm_battle_dolg] 
cost   = 500 
value  = +1 

power_restore_speed    = 0.001 

[up_sect_seconc_helm_battle_dolg] 
cost   = 1000 
value   = +20 

telepatic_protection     = 0.010 

[up_sect_second_helm_battle_dolg] 
cost   = 2500 
value  = +2 

nightvision_sect     = effector_nightvision_2 

[up_sect_secone_helm_battle_dolg] 
cost   = 3500 
value  = +3 

nightvision_sect     = effector_nightvision_3 

[up_firsta_helm_battle_dolg] 
scheme_index            = 0, 0 
known                   = 1 
effects                 = up_gr_firstcd_helm_battle_dolg 
section                 = up_sect_firsta_helm_battle_dolg 
property                = prop_radio, prop_chem 

precondition_functor    = inventory_upgrades.precondition_functor_a 
precondition_parameter  = a & b 

effect_functor          = inventory_upgrades.effect_functor_a 
effect_parameter        = something_here 

prereq_functor          = inventory_upgrades.prereq_functor_a 
prereq_tooltip_functor  = inventory_upgrades.prereq_tooltip_functor_a 
prereq_params           = 
name                    = st_up_res_a1_name 
description             = st_up_res_a1_descr 
icon                    = ui_inGame2_upgrade_helm_battle_dolg_1 

[up_firstc_helm_battle_dolg] 
scheme_index            = 1, 0 
known                   = 1 
effects                 = up_gr_firstef_helm_battle_dolg 
section                 = up_sect_firstc_helm_battle_dolg 
property                = prop_psy 

precondition_functor    = inventory_upgrades.precondition_functor_a 
precondition_parameter  = a & b 

effect_functor          = inventory_upgrades.effect_functor_a 
effect_parameter        = something_here 

prereq_functor          = inventory_upgrades.prereq_functor_a 
prereq_tooltip_functor  = inventory_upgrades.prereq_tooltip_functor_a 
prereq_params           = 
name                    = st_up_res_b1_name 
description             = st_up_res_b1_descr 
icon                    = ui_inGame2_upgrade_helm_battle_dolg_2 

[up_firstd_helm_battle_dolg] 
scheme_index            = 1, 1 
known                   = 1 
effects                 = up_gr_firstef_helm_battle_dolg 
section                 = up_sect_firstd_helm_battle_dolg 
property                = prop_chem 

precondition_functor    = inventory_upgrades.precondition_functor_a 
precondition_parameter  = a & b 

effect_functor          = inventory_upgrades.effect_functor_a 
effect_parameter        = something_here 

prereq_functor          = inventory_upgrades.prereq_functor_a 
prereq_tooltip_functor  = inventory_upgrades.prereq_tooltip_functor_a 
prereq_params           = 
name                    = st_up_res_b5_name 
description             = st_up_res_b5_descr 
icon                    = ui_inGame2_upgrade_helm_battle_dolg_4 

[up_firste_helm_battle_dolg] 
scheme_index            = 2, 0 
known                   = 1 
effects                 = 
section                 = up_sect_firste_helm_battle_dolg 
property                = prop_radio, prop_chem 

precondition_functor    = inventory_upgrades.precondition_functor_a 
precondition_parameter  = a & b 

effect_functor          = inventory_upgrades.effect_functor_a 
effect_parameter        = something_here 

prereq_functor          = inventory_upgrades.prereq_functor_a 
prereq_tooltip_functor  = inventory_upgrades.prereq_tooltip_functor_a 
prereq_params           = 
name                    = st_up_res_c7_name 
description             = st_up_res_c7_descr 
icon                    = ui_inGame2_upgrade_helm_battle_dolg_3 

[up_secona_helm_battle_dolg] 
scheme_index            = 0, 1 
known                   = 1 
effects                 = up_gr_seconcd_helm_battle_dolg 
section                 = up_sect_secona_helm_battle_dolg 
property                = prop_power 

precondition_functor    = inventory_upgrades.precondition_functor_a 
precondition_parameter  = a & b 

effect_functor          = inventory_upgrades.effect_functor_a 
effect_parameter        = something_here 

prereq_functor          = inventory_upgrades.prereq_functor_a 
prereq_tooltip_functor  = inventory_upgrades.prereq_tooltip_functor_a 
prereq_params           = 
name                    = st_up_resp_a3_name 
description             = st_up_res_a3_descr 
icon                    = ui_inGame2_upgrade_helm_battle_dolg_5 

[up_seconc_helm_battle_dolg] 
scheme_index            = 1, 2 
known                   = 1 
effects                 = up_gr_seconef_helm_battle_dolg 
section                 = up_sect_seconc_helm_battle_dolg 
property                = prop_psy 

precondition_functor    = inventory_upgrades.precondition_functor_a 
precondition_parameter  = a & b 

effect_functor          = inventory_upgrades.effect_functor_a 
effect_parameter        = something_here 

prereq_functor          = inventory_upgrades.prereq_functor_a 
prereq_tooltip_functor  = inventory_upgrades.prereq_tooltip_functor_a 
prereq_params           = 
name                    = st_up_resp_c4_name 
description             = st_up_resp_c4_descr 
icon                    = ui_inGame2_upgrade_helm_battle_dolg_6 

[up_second_helm_battle_dolg] 
scheme_index            = 1, 3 
known                   = 1 
effects                 = up_gr_seconef_helm_battle_dolg 
section                 = up_sect_second_helm_battle_dolg 
property                = prop_night_vision 

precondition_functor    = inventory_upgrades.precondition_functor_a 
precondition_parameter  = a & b 

effect_functor          = inventory_upgrades.effect_functor_a 
effect_parameter        = something_here 

prereq_functor          = inventory_upgrades.prereq_functor_a 
prereq_tooltip_functor  = inventory_upgrades.prereq_tooltip_functor_a 
prereq_params           = 
name                    = st_up_resp_b1_name 
description             = st_up_resp_b1_descr 
icon                    = ui_inGame2_upgrade_helm_battle_dolg_8 

[up_secone_helm_battle_dolg] 
scheme_index            = 2, 1 
known                   = 1 
effects                 = 
section                 = up_sect_secone_helm_battle_dolg 
property                = prop_night_vision 

precondition_functor    = inventory_upgrades.precondition_functor_a 
precondition_parameter  = a & b 

effect_functor          = inventory_upgrades.effect_functor_a 
effect_parameter        = something_here 

prereq_functor          = inventory_upgrades.prereq_functor_a 
prereq_tooltip_functor  = inventory_upgrades.prereq_tooltip_functor_a 
prereq_params           = 
name                    = st_up_resp_c1_name 
description             = st_up_resp_c1_descr 
icon                    = ui_inGame2_upgrade_helm_battle_dolg_9 

[up_gr_firstab_helm_battle_dolg] 
elements                = up_firsta_helm_battle_dolg 

[up_gr_firstcd_helm_battle_dolg] 
elements                = up_firstc_helm_battle_dolg, up_firstd_helm_battle_dolg 

[up_gr_firstef_helm_battle_dolg] 
elements                = up_firste_helm_battle_dolg 

[up_gr_seconab_helm_battle_dolg] 
elements                = up_secona_helm_battle_dolg 

[up_gr_seconcd_helm_battle_dolg] 
elements                = up_seconc_helm_battle_dolg, up_second_helm_battle_dolg 

[up_gr_seconef_helm_battle_dolg] 
elements                = up_secone_helm_battle_dolg


Теперь добавим наш Апргейд Кардану. В файле stalkers_upgrade_info.ltx пропишем название нашего шлема:

helm_respirator 
helm_tactic 
helm_battle_dolg //наш шлем


Затем всё в этом же файле stalkers_upgrade_info.ltx после строк 

up_sect_secona_helm_battle = {!upgrade_hint_kardan(1)} false, true 
up_sect_seconc_helm_battle = {!upgrade_hint_kardan(2)} false, true 
up_sect_second_helm_battle = {!upgrade_hint_kardan(2)} false, true 
up_sect_secone_helm_battle = {!upgrade_hint_kardan(3)} false, true 
up_sect_seconf_helm_battle = {!upgrade_hint_kardan(3)} false, true


Пишем: 

up_sect_firsta_helm_battle_dolg= {!upgrade_hint_kardan(1)} false, true 
up_sect_firstc_helm_battle_dolg = {!upgrade_hint_kardan(2)} false, true 
up_sect_firstd_helm_battle_dolg = {!upgrade_hint_kardan(2)} false, true 
up_sect_firste_helm_battle_dolg = false ;{!upgrade_hint_kardan(3)} false, true 

up_sect_secona_helm_battle_dolg = {!upgrade_hint_kardan(1)} false, true 
up_sect_seconc_helm_battle_dolg = {!upgrade_hint_kardan(2)} false, true 
up_sect_second_helm_battle_dolg = {!upgrade_hint_kardan(2)} false, true 
up_sect_secone_helm_battle_dolg = {!upgrade_hint_kardan(3)} false, true 
up_sect_seconf_helm_battle_dolg = {!upgrade_hint_kardan(3)} false, true


Выглядеть будет так: 

up_sect_secona_helm_battle = {!upgrade_hint_kardan(1)} false, true 
up_sect_seconc_helm_battle = {!upgrade_hint_kardan(2)} false, true 
up_sect_second_helm_battle = {!upgrade_hint_kardan(2)} false, true 
up_sect_secone_helm_battle = {!upgrade_hint_kardan(3)} false, true 
up_sect_seconf_helm_battle = {!upgrade_hint_kardan(3)} false, true 

up_sect_firsta_helm_battle_dolg= {!upgrade_hint_kardan(1)} false, true 
up_sect_firstc_helm_battle_dolg = {!upgrade_hint_kardan(2)} false, true 
up_sect_firstd_helm_battle_dolg = {!upgrade_hint_kardan(2)} false, true 
up_sect_firste_helm_battle_dolg = false ;{!upgrade_hint_kardan(3)} false, true 

up_sect_secona_helm_battle_dolg = {!upgrade_hint_kardan(1)} false, true 
up_sect_seconc_helm_battle_dolg = {!upgrade_hint_kardan(2)} false, true 
up_sect_second_helm_battle_dolg = {!upgrade_hint_kardan(2)} false, true 
up_sect_secone_helm_battle_dolg = {!upgrade_hint_kardan(3)} false, true 
up_sect_seconf_helm_battle_dolg = {!upgrade_hint_kardan(3)} false, true


Так же нужно добавить описание нашему шлему. Для этого откроем файл st_items_outfit.xml (находится он в gamedata/configs/text/rus) и в самом низу пишем:

<string id="st_helm_battle_dolg"> 
<text>Стальной шлем Сталкера</text> 
</string> 
<string id="st_helm_battle_dolg_descr"> 
<text>......ТУТ ПИШЕМ ОПИСАНИЕ ВАШЕГО ШЛЕМА .....Я БЫ НАПИСАЛ ТОЛЬКО ГОЛОВА УЖЕ НЕ ДУМАЕТ</text> 
</string>


Всё сохраняем , далее добавляем наш шлем либо в торговлю либо сразу спавним в стартовом капитале ГГ. Я предпочитаю спавнить, для этого в файле character_desc_general.xml (находится он gamedata/configs/gameplay) 
Пишем после строки

conserva = 2 \n

вот это:

helm_battle_dolg = \n

Всё можно начинать игру!




Форум » Уроки по созданию модов » Конфиги, скрипты и прочие мелочи » Создание нового шлема ((Автор: DOC_VENOM))
  • Страница 1 из 1
  • 1
Поиск:
Пользователи, посетившие форум за текущий день
23:23
Обновить



Тени Чернобыля Чистое Небо Зов Припяти S.T.A.L.K.E.R. 2

Сайт управляется системой uCoz | Design by EXELENT
Авторское право на игру и использованные в ней материалы принадлежат GSC Game World
Администрация сайта не несёт ответственности за содержащиеся файлы на данном портале.
В случае полного, или частичного копирования ссылка на источник обязательна!
© 2012 Zona-chernobyl

  
Наверх