WaltTheVolt 2 Опубликовано 10 Декабря 2018 Писал об этом на ап-про. Пока там не ответили напишу еще и сюда. В OGSE 0.6.9.3. есть интересная фича с монтируемым экзоскелетом: Скрытый текст https://radikal.ru/video/XOjvlX3Bc1r Насколько я знаю, это еще планировали ввести на стадии разработки билдов ТЧ. Из файлов смог найти вот эти предметы в config/misc: Скрытый текст [antir_f]:identity_immunities ;то, что ГГ может использовать GroupControlSection = spawn_group discovery_dependency = cform = skeleton class = II_ANTIR ; eatable item eat_health = 0 eat_satiety = 0 eat_power = 0 eat_radiation = 0 eat_alcohol = 0 wounds_heal_perc = 0 eat_portions_num = 1 ; food item animation_slot = 4 ;hud item hud = wpn_vodka_hud ;----------Это шаблон для экзоскелета------------ ;--------------------------------------------------------------------------------------------- ;Секции МОНТИРУЕМОГО ЭКЗОКАРКАСА ;--------------------------------------------------------------------------------------------- ; ЛЁГКАЯ ЭКЗА ;--------------------------------------------------------------------------------------------- [exo1]:antir_f $spawn = "devices\exo1" visual = equipments\exoskelet radius = 1 inv_name = exo1_outfit_name inv_name_short = exo1_outfit_name description = exo1_outfit_description inv_weight = 20 inv_grid_width = 2 inv_grid_height = 3 inv_grid_x = 20 inv_grid_y = 17 cost = 75000 exoskeleton_type = exo1 jump_speed_dif = -3.0 sprint_koef_dif = -0.6 run_coef_dif = -0.2 run_back_coef_dif = -0.2 ;--------------------------------------------------------------------------------------------- ; ЭКЗА МАСТЕРА ;--------------------------------------------------------------------------------------------- [exo2]:exo1 $spawn = "devices\exo2" inv_name = exo2_outfit_name inv_name_short = exo2_outfit_name description = exo2_outfit_description inv_weight = 32 inv_grid_width = 2 inv_grid_height = 3 inv_grid_x = 22 inv_grid_y = 17 cost = 120000 exoskeleton_type = exo2 jump_speed_dif = -1.5 sprint_koef_dif = -0.3 run_coef_dif = -0.1 run_back_coef_dif = -0.1 ;--------------------------------------------------------------------------------------------- ; ????? НЕ ИСПОЛЬЗУЕТСЯ ;--------------------------------------------------------------------------------------------- [exo3]:exo1 $spawn = "devices\exo3" inv_name = inv_name_short = description = inv_weight = 0 inv_grid_width = 3 inv_grid_height = 4 inv_grid_x = 23 inv_grid_y = 17 cost = 0 exoskeleton_type = jump_speed_dif = -1.5 sprint_koef_dif = -0.25 run_coef_dif = -0.07 run_back_coef_dif = -0.07 Скрытый текст --------------------------------------------------------------------------------------------- ; КОСТЮМ НЕЙТРАЛЬНОГО СТАЛКЕРА ;--------------------------------------------------------------------------------------------- [stalker_outfit]:outfit_base $spawn = "outfit\stalker_outfit" visual = equipments\stalker_suit actor_visual = actors\hero\stalker_hood.ogf ef_equipment_type = 3 inv_name = stalker_outfit_name inv_name_short = stalker_outfit_name description = stalker_outfit_description inv_weight = 5.0 inv_grid_width = 2 inv_grid_height = 3 inv_grid_x = 41 inv_grid_y = 21 full_icon_name = npc_icon_stalker_outfit cost = 28400 immunities_sect = sect_stalker_outfit_immunities ; RESISTANCE bones_koeff_protection = armor_2_0_1 burn_protection = 0.40 shock_protection = 0.15 chemical_burn_protection = 0.25 radiation_protection = 0.20 telepatic_protection = 0.00 strike_protection = 0.25 wound_protection = 0.35 explosion_protection = 0.25 power_loss = 1.15 ; Параметры для ремонта tech_complication = 500 repair_compatibility = heavy_outfit ; Параметры для экзоскелетов exo1 = stalker_outfit_exo1 exo2 = stalker_outfit_exo2 [sect_stalker_outfit_immunities] burn_immunity = 0.09 ;коэффициенты иммунитета самого костюма strike_immunity = 0.01 shock_immunity = 0.03 wound_immunity = 0.03 radiation_immunity = 0.00 telepatic_immunity = 0.00 chemical_burn_immunity = 0.20 explosion_immunity = 0.03 fire_wound_immunity = 0.015 [stalker_outfit_repair] tech_complication = 500 repair_compatibility = heavy_outfit[stalker_outfit_exo1]:stalker_outfit,light_exo_visual_base $spawn = "outfit\stalker_outfit_exo1" visual = equipments\exoskelet ef_equipment_type = 5 inv_weight = 25.0 inv_grid_x = 43 inv_grid_y = 21 inv_name = stalker_outfit_exo1_name inv_name_short = stalker_outfit_exo1_name description = stalker_outfit_exo1_description full_icon_name = npc_icon_stalker_outfit_exo1 cost = 40400 ; RESISTANCE strike_protection = 0.27 wound_protection = 0.37 explosion_protection = 0.27 ; Параметры для ремонта tech_complication = 500 repair_compatibility = heavy_outfit power_loss = 0.17 additional_inventory_weight = 50 additional_inventory_weight2 = 60 without_exoskeleton = stalker_outfit ;формат записи параметра: without_exoskeleton = секция костюма, получаемого при демонтаже экзокаркаса exo_section = exo1 ;формат записи параметра: exo_section = секция демонтируемого экзокаркаса [stalker_outfit_exo1_repair]:stalker_outfit_repair [stalker_outfit_exo2]:stalker_outfit_exo1,heavy_exo_visual_base $spawn = "outfit\stalker_outfit_exo2" inv_weight = 37.0 inv_grid_x = 45 inv_grid_y = 21 inv_name = stalker_outfit_exo2_name inv_name_short = stalker_outfit_exo2_name description = stalker_outfit_exo2_description full_icon_name = npc_icon_stalker_outfit_exo2 cost = 51400 bones_koeff_protection = armor_5_4_1 ; RESISTANCE burn_protection = 0.43 shock_protection = -0.13 chemical_burn_protection = 0.30 radiation_protection = 0.40 telepatic_protection = 0.30 strike_protection = 0.57 wound_protection = 0.73 explosion_protection = 0.50 ; Параметры для ремонта tech_complication = 500 repair_compatibility = heavy_outfit additional_inventory_weight = 70 additional_inventory_weight2 = 80 without_exoskeleton = stalker_outfit ;формат записи параметра: without_exoskeleton = секция костюма, получаемого при демонтаже экзокаркаса exo_section = exo2 ;формат записи параметра: exo_section = секция демонтируемого экзокаркаса [stalker_outfit_exo2_repair]:stalker_outfit_repair А также сам скрипт: Скрытый текст --/ ui_ogse_exo_control.script /-- --/ Exoskeleton control module /-- --/ OGS Evolution Team 2010 /-- --/ version 1.9 (27/03/2011) /-- --/ Модуль монтируемых экзоскелетов /-- local sys_ini = system_ini() local sim = alife() local exo_condition = 1.0 local outfit_condition = 1.0 -- Функции function use_exo(use_object) if use_object == nil or alife():object(use_object:id()) == nil then return end local use_obj_section = use_object:section() if sys_ini:line_exist(use_obj_section, "exoskeleton_type") then local exoskeleton_type = sys_ini:r_string(use_obj_section, "exoskeleton_type") if exoskeleton_type then local outfit_item = db.actor:item_in_slot(6) if outfit_item and sim:object(outfit_item:id()) and not sys_ini:line_exist(outfit_item:section(), "without_exoskeleton") and sys_ini:line_exist(outfit_item:section(), exoskeleton_type) then local outfit_with_exo_section = sys_ini:r_string(outfit_item:section(), exoskeleton_type) if outfit_with_exo_section then -- уф, прошли все проверки - конвертим convert_outfit(outfit_item, outfit_with_exo_section) exo_condition = use_object:condition() outfit_condition = outfit_item:condition() return end end end -- а если не получается сконвертировать, то вертаем броньку взад ogse.spawn_item_in_inv(use_obj_section, db.actor) end end exo_to_rust = nil exo_to_rust_condition = nil function detach_exo() local outfit_item = db.actor:item_in_slot(6) if outfit_item and sim:object(outfit_item:id()) then local outfit_sec = outfit_item:section() if sys_ini:line_exist(outfit_sec, "without_exoskeleton") and sys_ini:line_exist(outfit_sec, "exo_section") then local outfit_without_exo_section = sys_ini:r_string(outfit_sec, "without_exoskeleton") local exo_section = sys_ini:r_string(outfit_sec, "exo_section") if outfit_without_exo_section and exo_section and can_detach_exo(outfit_sec) then local s_exo = ogse.spawn_item_in_inv(exo_section, db.actor) local c_exo = level.object_by_id(s_exo.id) local exo_rusting = outfit_item:condition() / outfit_condition if c_exo then -- c_exo:set_condition(exo_condition * exo_rusting) -- учтем, что состояние броньки уже было не идеальное, да еще мы попортили exo_to_rust = s_exo.id exo_to_rust_condition = exo_condition * exo_rusting ogse.start_timer("ex1",1) end convert_outfit(outfit_item, outfit_without_exo_section) end end end end function convert_outfit(outfit, new_outfit_section) local sobj = sim:object(outfit:id()) if sobj then local outfit_condition = outfit:condition() ogse_night_vision.set_exo_convert_flag(true) db.actor:move_to_ruck(outfit) sim:release(sobj, true) local s_new_outfit = ogse.spawn_item_in_inv(new_outfit_section, db.actor) outfit_spawn_watcher(s_new_outfit.id, outfit_condition):start() end end class "outfit_spawn_watcher" (ogse_qt.quick_timer) function outfit_spawn_watcher:__init(id, condition_to_set) super() self.id = id self.cond = condition_to_set end function outfit_spawn_watcher:condition() self.obj = level.object_by_id(self.id) return (self.obj ~= nil) end function outfit_spawn_watcher:action() self.obj:set_condition(self.cond) ogse_night_vision.set_exo_convert_flag(false) end -- Открытие/закрытие инвентаря. function on_inventory_info(info_id) if info_id == "ui_inventory" then on_show() end if info_id == "no_net_signal" or info_id == "net_signal" then set_actor_parameters() end end function save() ogse.save_variable("exo_condition", exo_condition) ogse.save_variable("outfit_condition", outfit_condition) end function load() exo_condition = tonumber(ogse.load_variable("exo_condition", 1.0)) outfit_condition = tonumber(ogse.load_variable("outfit_condition", 1.0)) end class "exo_control" (CUIScriptWnd) function exo_control:__init() super() local xml = CScriptXmlInit() xml:ParseFile("ui_ogse_exo_control.xml") self:Init(880, 264,32,32) -- само скриптовое окно размещаем там, где должна быть кнопка self.btn = xml:Init3tButton("ui_ogse_exo_control", self) -- кнопка, ради которой всё и делается self:Register(self.btn,"btn_exo_control") self:AddCallback("btn_exo_control", ui_events.BUTTON_CLICKED, self.btn_action, self) self:Show(true) -- без этого не увидим end function exo_control:AttachToInventory(inventory_window) self.inv = inventory_window inventory_window:AttachChild(self) end function exo_control:__finalize() self.inv:DetachChild(self) end function exo_control:btn_action() detach_exo() end local rec_wnd = exo_control() -- создаём один раз function on_show() if not rec_wnd.inv then rec_wnd:AttachToInventory(level.main_input_receiver()) end chek_button_accessibility() end function can_detach_exo(outfit_sec) local can_be_detached = true if sys_ini:line_exist(outfit_sec, "can_detach_exo") then can_be_detached = sys_ini:r_bool(outfit_sec, "can_detach_exo") end return can_be_detached end function chek_button_accessibility() local outfit_item = db.actor:item_in_slot(6) local enabled = outfit_item and sim:object(outfit_item:id()) and sys_ini:line_exist(outfit_item:section(), "without_exoskeleton") and sys_ini:line_exist(outfit_item:section(), "exo_section") and can_detach_exo(outfit_item:section()) rec_wnd.btn:Enable(enabled) end function set_actor_parameters() if db.actor and db.actor:alive() then local jump_speed = sys_ini:r_float("actor", "jump_speed") local sprint_koef = sys_ini:r_float("actor", "sprint_koef") local run_coef = sys_ini:r_float("actor", "run_coef") local run_back_coef = sys_ini:r_float("actor", "run_back_coef") local outfit_item = db.actor:item_in_slot(6) local max_weight = sys_ini:r_float("inventory", "max_weight") local max_walk_weight = sys_ini:r_float("actor_condition", "max_walk_weight") local exo_used = outfit_item and sim:object(outfit_item:id()) and sys_ini:line_exist(outfit_item:section(), "exo_section") -- local condition_for_weight_calc if outfit_item then -- проверка нужна на время переодевания костюма if exo_used then local exo_section = sys_ini:r_string(outfit_item:section(), "exo_section") if sys_ini:line_exist(exo_section, "jump_speed_dif") then local jump_speed_dif = sys_ini:r_float(exo_section, "jump_speed_dif") jump_speed = jump_speed+jump_speed_dif if db.actor:has_info("no_net_signal") then jump_speed = jump_speed*0.1 end end if sys_ini:line_exist(exo_section, "sprint_koef_dif") then local sprint_koef_dif = sys_ini:r_float(exo_section, "sprint_koef_dif") sprint_koef = sprint_koef+sprint_koef_dif if db.actor:has_info("no_net_signal") then sprint_koef = sprint_koef*0.9 end end if sys_ini:line_exist(exo_section, "run_coef_dif") then local run_coef_dif = sys_ini:r_float(exo_section, "run_coef_dif") run_coef = run_coef+run_coef_dif if db.actor:has_info("no_net_signal") then run_coef = run_coef*0.9 end end if sys_ini:line_exist(exo_section, "run_back_coef_dif") then local run_back_coef_dif = sys_ini:r_float(exo_section, "run_back_coef_dif") run_back_coef = run_back_coef+run_back_coef_dif if db.actor:has_info("no_net_signal") then run_back_coef = run_back_coef*0.9 end end --[[ condition_for_weight_calc = exo_condition else condition_for_weight_calc = outfit_item:condition()]] end -- KD: отключено, т.к. неудобно в геймплейном плане. --[[ local sect = outfit_item:section() -- это хе*ня, что добавляемый вес не зависит от состояния экзы. исправим. if sys_ini:line_exist(sect, "additional_inventory_weight") then local walk_weight = sys_ini:r_float(sect, "additional_inventory_weight") max_walk_weight = max_walk_weight+walk_weight*(condition_for_weight_calc - 1) -- движок тоже прибавляет вес, так что учтем это end if sys_ini:line_exist(sect, "additional_inventory_weight2") then local weight = sys_ini:r_float(sect, "additional_inventory_weight2") max_weight = max_weight+weight*(condition_for_weight_calc - 1) -- движок тоже прибавляет вес, так что учтем это end ]] end set_jump_speed(jump_speed) set_sprint_factor(sprint_koef) set_run_factor(run_coef) set_run_back_factor(run_back_coef) db.actor:set_actor_max_weight(max_weight) db.actor:set_actor_max_walk_weight(max_walk_weight) end end Ну и связанные с ним xml файлы: Скрытый текст <?xml version="1.0" encoding="windows-1251" ?> <wnd> <ui_ogse_exo_control x="0" y="0" width="32" height="32" hint="exo_control_btn_hint"> <texture_d>ui_ogse_exo_detach_btn_d</texture_d> <texture_e>ui_ogse_exo_detach_btn_e</texture_e> <texture_t>ui_ogse_exo_detach_btn_t</texture_t> <texture_h>ui_ogse_exo_detach_btn_h</texture_h> <text align="c" font="letterica16" r="227" g="199" b="178"></text> </ui_ogse_exo_control> </wnd> Скрытый текст <ui_texture> <file_name>ui\ui_ogse_exo_control</file_name> <texture id="ui_ogse_exo_detach_btn_e" x="0" y="1" width="32" height="28" /> <texture id="ui_ogse_exo_detach_btn_h" x="32" y="1" width="32" height="28" /> <texture id="ui_ogse_exo_detach_btn_t" x="64" y="1" width="32" height="28" /> <texture id="ui_ogse_exo_detach_btn_d" x="96" y="1" width="32" height="28" /> </ui_texture> Текстуры я таки не смог найти. Как я понимаю, здесь все работает так: при нажатии функции "использовать" экзоскелета, он вместе с надетым костюмом заменяется на другой предмет - якобы мы "прикрепляем" этот каркас к костюму и отдельной иконочкой мы его демонтируем. Очень хочется перенести эту фичу в CoC, ну или хотя бы для начала в оригинальный ТЧ, вот только нужно знать, что кроме скрипта еще нужно для работы этой фичи (движковые ли правки?). Не могли бы вы мне помочь в этом деле? Поделиться этим сообщением Ссылка на сообщение