[Prośba] Modyfikacja w plikach uzbrojenia i pancerzy

Regulamin forum
Dział "Tworzenie Modyfikacji" służy do zadawania pytań odnośnie tworzenia modyfikacji, edytowania plików gry, oraz pisania tzw. tutoriali, czyli poradników odnośnie modyfikowania gry.
Nie zadajemy tutaj pytań odnośnie modyfikacji gotowych (nie dyskutujemy o nich!), prócz prób ich połączenia etc.


Przy cytowaniu plików *.LTX stosować tag [SYNTAX="ini"], przy cytowaniu plików *.script [SYNTAX="lua"] a przy cytowaniu plików *.xml - [SYNTAX="xml"].

[Prośba] Modyfikacja w plikach uzbrojenia i pancerzy

Postprzez Arikar w 04 Maj 2011, 09:22

Jako że jestem w tym temacie totalnym Nobem zwracam się z prośbą o pomoc do was bracia Stalkerzy.



Sprawa jest prosta nie znam angielskiego zbyt dobrze (Tak są takie osoby :E ). A w niektórych modach co jest mocno wkurzające bron i pancerze masakrycznie szybko się psuje, zaś ceny jej naprawy są horrendalne. Prosił bym was o podanie sposobu na takie zmodyfikowanie plików w Katalogu Gamedata/Config/Weapons aby bronię podczas używania się nie psuły co znacznie ułatwiło by rozgrywkę. Spotkałem się gdzieś w opisie jednego z modów z tym ale skleroza nie boli i zapomniałem sobie zapisać a szukanie w 9 stronach z modami tego jest delikatnie mówiąc Syzyfową pracą w dodatku nie pamiętam w jakim modzie się z tym spotkałem.


PS. W której części pliku Gamedata znajdują się pliki odpowiadające pancerzom???
Arikar
Kot

Posty: 14
Dołączenie: 20 Mar 2011, 21:03
Ostatnio był: 08 Wrz 2024, 10:41
Frakcja: Wojsko
Ulubiona broń: Storming Obokan
Kozaki: 0

Reklamy Google

Re: [Prośba] Modyfikacja w plikach uzbrojenia i pancerzy

Postprzez The Witcher w 04 Maj 2011, 09:31

Pancerze masz tu: config/misc/outfit.ltx Psucie się broni to linijka:

Kod: Zaznacz wszystko
condition_shot_dec          = 0.0001
- im mniej, tym wolniej się psuje. Jak ustawisz 0 to masz niezniszczalną broń. :P

Pancerze:

Kod: Zaznacz wszystko
[sect_novice_outfit_immunities]
burn_immunity            = 0.04         ;ęîýôôčöčĺíňű čěěóíčňĺňŕ ńŕěîăî ęîńňţěŕ
strike_immunity            = 0.01
shock_immunity            = 0.04
wound_immunity            = 0.025
radiation_immunity         = 0.00
telepatic_immunity         = 0.00
chemical_burn_immunity      = 0.04
explosion_immunity         = 0.04
fire_wound_immunity         = 0.015


Np. burn_immunity - po każdym wejściu w ogień psuje się o taką wartość, im mniej tym wolniej. Tak jak w przypadku broni.

Za ten post The Witcher otrzymał następujące punkty reputacji:
Positive Arikar, vandr, GajgerW.
The Witcher
Legenda

Posty: 1176
Dołączenie: 31 Lip 2008, 09:03
Ostatnio był: 25 Wrz 2024, 10:39
Ulubiona broń: --
Kozaki: 329

Re: [Prośba] Modyfikacja w plikach uzbrojenia i pancerzy

Postprzez Arikar w 05 Maj 2011, 07:38

Dodatkowo chciał bym się dowiedzieć czy istnieje taka możliwość zmiany pliku z exo_szkieletami tak by można było w nich swobodnie biegać?? Tak jak w stalker_light_exo???


Kod: Zaznacz wszystko
[stalker_light_exo]:outfit_base
GroupControlSection         = spawn_group
discovery_dependency          =
$spawn                = "outfit\stalker_light_exo"
;$prefetch             = 32
class               = E_STLK
cform                    = skeleton
visual                   = equipments\stalker_light_exo_gr.ogf
actor_visual            = actors\hero\stalker_claw_exo.ogf

ef_equipment_type         = 3

inv_name            = stalker_light_exo_name
inv_name_short            = stalker_light_exo_name
description            = stalker_light_exo_description
inv_weight            = 15.0
inv_grid_width            = 2
inv_grid_height            = 3
inv_grid_x            = 31
inv_grid_y            = 37
full_icon_name            = npc_icon_stalker_light_exo_outfit
nightvision_sect         = effector_nightvision_green_better

cost               = 20000
slot               = 6
full_scale_icon            = 16,1   ;èêîíêà ñòàëêåðà â êîñòþìå â ïîëíûé ðîñò
additional_inventory_weight      = 70
additional_inventory_weight2      = 70

power_restore_speed         = 0.02
;power_loss                  = 0.04

immunities_sect            = stalker_light_exo_immunities

; MEDIUM RESISTANCE
burn_protection          = 0.5
strike_protection          = 0.5
shock_protection          = 0.5
wound_protection         = 0.6
radiation_protection          = 0.5
telepatic_protection          = 0.2
chemical_burn_protection       = 0.5
explosion_protection          = 0.45
fire_wound_protection           = 0.45

bones_koeff_protection          = kombez_antigas_damage


[stalker_light_exo_immunities]
burn_immunity            = 0.00   ;êîýôôèöèåíòû èììóíèòåòà ñàìîãî êîñòþìà
strike_immunity            = 0.00
shock_immunity            = 0.00
wound_immunity            = 0.00
radiation_immunity         = 0.00
telepatic_immunity         = 0.00
chemical_burn_immunity         = 0.00
explosion_immunity         = 0.00
fire_wound_immunity         = 0.00
Arikar
Kot

Posty: 14
Dołączenie: 20 Mar 2011, 21:03
Ostatnio był: 08 Wrz 2024, 10:41
Frakcja: Wojsko
Ulubiona broń: Storming Obokan
Kozaki: 0

Re: [Prośba] Modyfikacja w plikach uzbrojenia i pancerzy

Postprzez The Witcher w 05 Maj 2011, 14:54

Zmień:
Kod: Zaznacz wszystko
sprint_allowed               = false


na:
Kod: Zaznacz wszystko
sprint_allowed               = true
The Witcher
Legenda

Posty: 1176
Dołączenie: 31 Lip 2008, 09:03
Ostatnio był: 25 Wrz 2024, 10:39
Ulubiona broń: --
Kozaki: 329

Re: [Prośba] Modyfikacja w plikach uzbrojenia i pancerzy

Postprzez scigacz1975 w 05 Maj 2011, 14:55

Ta stronka [klik] powstała po to żebyś nie musiał pytać. Wystarczy zajrzeć :wink:

Za ten post scigacz1975 otrzymał następujące punkty reputacji:
Positive The Witcher.
Awatar użytkownika
scigacz1975
Monolit

Posty: 3243
Dołączenie: 29 Sty 2010, 00:26
Ostatnio był: 12 Wrz 2024, 15:31
Miejscowość: Stalowa Wola
Frakcja: Samotnicy
Ulubiona broń: --
Kozaki: 926

Re: [Prośba] Modyfikacja w plikach uzbrojenia i pancerzy

Postprzez czeresniaczek1 w 26 Gru 2011, 15:27

Mam problem zmodyfikowałem jeden skrypt tak że broń trzymana przez NPC powinna być w 100% sprawna niestety nie wszystka jest zdarzają się egzemplarze sprawne w 0% jeżeli strzelimy z tego zniszczonego wybucha nam w rękach, może mi któryś z modderów pomóc .
Awatar użytkownika
czeresniaczek1
Tropiciel

Posty: 303
Dołączenie: 08 Lut 2009, 01:15
Ostatnio był: 19 Sie 2020, 15:30
Frakcja: Samotnicy
Ulubiona broń: TRs 301
Kozaki: 6

Re: [Prośba] Modyfikacja w plikach uzbrojenia i pancerzy

Postprzez utak3r w 27 Gru 2011, 09:49

A jak mamy Ci pomóc, skoro wiemy tylko tyle, że "zmodyfikowałeś jeden skrypt"? Pokaż, co zrobiłeś, to popatrzymy.
Image
Awatar użytkownika
utak3r
Modder

Posty: 2200
Dołączenie: 11 Lis 2009, 18:15
Ostatnio był: 31 Lip 2023, 16:01
Miejscowość: Szczecin
Frakcja: Powinność
Ulubiona broń: GP 37
Kozaki: 376

Re: [Prośba] Modyfikacja w plikach uzbrojenia i pancerzy

Postprzez czeresniaczek1 w 27 Gru 2011, 13:00

Wkleić ten skrypt mogę ale jaką mam gwarancję że nikt tego nie wykorzysta potem w jakimś tortualu\poradniku skrypt jest z moda soljanka + DXM mod.
:

-- DMX 1.3.4 PL trurl3 & Yurek
local math_random = math.random
local math_ceil = math.ceil
local string_find = string.find

--' Ęëţ÷ĺě ˙âë˙ĺňń˙ ăđóďďčđîâęŕ ďĺđńîíŕćŕ. Çíŕ÷ĺíčĺě ˙âë˙ĺňń˙ ňŕáëčöŕ, ńîäĺđćŕřŕ˙ čěĺíŕ ńĺęöčé ďđĺäěĺňîâ.
local item_by_community = {}

--' Çŕâčńčěîńňč â ńďŕóíĺ ďđĺäěĺňîâ. Ďđĺäěĺň ńďŕóíčňüń˙ ňîëüęî ĺńëč ĺńňü őîň˙ áű îäčí čç çŕâčńčěűő.
local item_dependence = {}

--' Ěíîćčňĺëč č ěčíčěŕęńű äë˙ âűďŕäĺíč˙ âĺůĺé â çŕâčńčěîńňč îň óđîâí˙
local mul_by_level = {}
local count_by_level = {}

--' Ďđĺäěĺňű, ęîňîđűĺ íĺëüç˙ óäŕë˙ňü (ęâĺńňîâűĺ íŕďđčěĺđ)
local always_keep_item = {}

local always_offs_items = {
["device_torch"]=true,
["device_pda"]=true,
["hand_radio"]=true,
["guitar_a"]=true,
["harmonica_a"]=true,
["binocular_a"]=true,
["wpn_knife"]=true,
["wpn_binoc"]=true,
["bolt"]=true,
["grenade_f1"]=true,
["grenade_rgd5"]=true,
["ammo_9x19_pbp"]=true,
["ammo_9x39_pab9"]=true,
["ammo_9x39_ap"]=true,
["ammo_9x18_fmj"]=true,
["ammo_9x18_pmm"]=true,
["ammo_11.43x23_fmj"]=true,
["ammo_5.45x39_fmj"]=true,
["ammo_5.45x39_ap"]=true,
["ammo_9x19_fmj"]=true,
["ammo_5.56x45_ss190"]=true,
["ammo_5.56x45_ap"]=true,
["ammo_12x70_buck"]=true,
["ammo_12x76_zhekan"]=true,
["ammo_12x76_dart"]=true,
["ammo_7.62x39_fmj"]=true,
["ammo_7.62x39_ap"]=true,
["ammo_og-7b"]=true,
["ammo_m209"]=true,
["ammo_vog-25p"]=true,
["bandage"]=true,
["medkit"]=true,
["medkit_army"]=true,
["medkit_scientic"]=true,
["antirad"]=true,
["bread"]=true,
["kolbasa"]=true,
["conserva"]=true,
["vodka"]=true,
["sigaret"]=true,
["player"]=true,
["energy_drink"]=true
}

-- Ňŕáëčöŕ âűäŕ÷č číôîďîđöčé ďî ÷ŕńňč čěĺíč ďîăčářĺăî íĺďčń˙.
local names_info = {
["snip_esc1"] = "snip_esc1_dead",
["snip_esc2"] = "snip_esc2_dead",
["snip_esc3"] = "snip_esc3_dead",
["snip_esc4"] = "snip_esc4_dead",
["snip_esc5"] = "snip_esc5_dead",
["snip_esc6"] = "snip_esc6_dead",
["snip_esc7"] = "snip_esc7_dead",
["snip_esc8"] = "snip_esc8_dead",
["snip_esc9"] = "snip_esc9_dead",
["snip_esc10"] = "snip_esc10_dead",
["snip_esc11"] = "snip_esc11_dead",
["snip_esc12"] = "snip_esc12_dead",
["naem_zahar1"] = "naem_zahar1_dead",
["naem_zahar2"] = "naem_zahar2_dead",
["naem_zahar3"] = "naem_zahar3_dead",
["naem_zahar4"] = "naem_zahar4_dead",
["naem_zahar5"] = "naem_zahar5_dead",
["naem_zahar6"] = "naem_zahar6_dead",
["ecolog_wound_bunker"] = "ucen_talk_est",
["mitya"] = "mitya_dead",
["grab_stal1"] = "grab_stal1_dead",
["grab_stal2"] = "grab_stal2_dead",
["grab_stal3"] = "grab_stal3_dead",
["grab_stal4"] = "grab_stal4_dead",
["grab_stal5"] = "grab_stal5_dead"
}

-- Ňŕáëčöŕ äë˙ ďđîâĺđęč â ëîá. Ďîđ˙äîę íĺ čěĺĺň çíŕ÷ĺíč˙.
local visuals = {
["stalker_bandit"] = "bandit_outfit",
["stalker_bandit_4"] = "bandit_outfit_red",
["stalker_bandit_2"] = "bandit_outfit_red",
["stalker_bandit_5"] = "bandit_outfit_blue",
["stalker_bandit_9"] = "bandit_outfit_blue",
["stalker_bandit_1"] = "bandit_outfit_red1",
["stalker_bandit_drunk"] = "outfit_bandit_m1",
["stalker_bandit_8"] = "bandit_gaz_outfit_m1",
["stalker_bandit_veteran"] = "bandit_veteran_outfit",
["stalker_bandit_borov"] = "bandit_master_outfit",
["stalker_bandit_master"] = "bandit_master_outfit",
["stalker_bandit_exoskeleton"] = "exo_bandit_outfit",
["stalker_do_antigas"] = "dolg_gaz_outfit_m1",
["stalker_do_komandir"] = "outfit_dolg_m1",
["stalker_do_nauchniy"] = "dolg_scientific_outfit",
["stalker_do_exoskeleton"] = "dolg_black_exoskeleton",
["stalker_nebo_balon_1"] = "nebo_heavy_outfit",
["stalker_nebo_rukzak"] = "nebo_light_outfit",
["stalker_nebo_nauchniy"] = "nebo_scientific_outfit",
["stalker_nebo_exoskeleton"] = "nebo_exo_outfit",
["stalker_ecolog"] = "ecolog_outfit",
["nauchniy_1"] = "ecolog_outfit",
["protect_suit2"] = "ecolog_outfit",
["stalker_ecolog_military"] = "protection_outfit",
["stalker_chemical"] = "protection_outfit",
["nauchniy_0"] = "protection_outfit",
["protect_suit1"] = "protection_outfit",
["izgoy"] = "bandit_veteran_outfit",
["stalker_ki_head_1"] = "outfit_killer_m1",
["stalker_ki_antigas"] = "killer_gaz_outfit_m1",
["stalker_ki_nauchniy"] = "merc_scientific_outfit",
["stalker_ki_exoskeleton"] = "killer_blue_exoskeleton",
["stalker_militari_1"] = "military_outfit",
["stalker_militari_antigas_1"] = "military_outfit",
["stalker_military"] = "military_outfit",
["stalker_military_green"] = "military_outfit",
["stalker_militari_2"] = "militaryspec_outfit",
["stalker_militari_antigas_2"] = "militaryspec_outfit",
["stalker_commander"] = "militaryspec_outfit",
["stalker_military_black"] = "militaryspec_outfit",
["stalker_monolit"] = "monolit_outfit",
["stalker_mo_hood_9"] = "monolit_gaz_outfit_m1",
["stalker_mo_nauchniy"] = "monolit_scientific_outfit",
["stalker_mo_exo"] = "monolit_exoskeleton",
["stalker_mo_elite"] = "monolit_black_outfit",
["stalker_hood"] = "stalker_outfit",
["stalker_bar_security"] = "stalker_guard_outfit",
["stalker_neytral_hood_9"] = "neytral_gaz_outfit_m1",
["stalker_2_gas"] = "neytral_gaz_outfit_v1",
["stalker_3_gas"] = "neytral_gaz_outfit_v2",
["stalker_4_gas"] = "neytral_gaz_outfit_v3",
["stalker_2_mask"] = "stalker_outfit_v1",
["lisiy"] = "stalker_outfit_v1",
["stalker_2_mask"] = "stalker_outfit_v1",
["stalker_2_ochki"] = "stalker_outfit_v1",
["stalker_2_rozh1"] = "stalker_outfit_v1",
["stalker_2_usi"] = "stalker_outfit_v1",
["stalker_3_mask"] = "stalker_outfit_v2",
["hellcar" ] = "stalker_outfit_v2",
["stalker_3_mask"] = "stalker_outfit_v2",
["stalker_3_rozh2"] = "stalker_outfit_v2",
["stalker_3_usi"] = "stalker_outfit_v2",
["stalker_4_rozh3"] = "stalker_outfit_v3",
["serega"] = "stalker_outfit_v3",
["stalker_4_ochki"] = "stalker_outfit_v3",
["stalker_prizrak"] = "outfit_stalker_m1",
["stalker_neytral_nauchniy"] = "scientific_outfit",
["stalker_scien"] = "scientific_outfit",
["stalker_neytral_exoskeleton"] = "exo_outfit",
["stalker_exoskeleton"] = "exo_outfit",
["green_stalker_1"] = "neytral_novice_outfit_m1",
["green_stalker_2"] = "novice_outfit",
["stalker_novice"] = "outfit_novice_m1",
["green_stalker_3"] = "novice_outfit_rain_1",
["green_stalker_4"] = "neytral_novice_outfit_cam",
["green_stalker_5"] = "novice_outfit_new_2",
["green_stalker_6"] = "novice_outfit_rain_2",
["green_stalker_7"] = "neytral_novice_outfit_cam_2",
["green_stalker_8"] = "neytral_novice_outfit_cam_3",
["green_stalker_9"] = "novice_outfit_new_1",
["green_stalker_10"] = "neytral_novice_outfit_cam_1",
["green_stalker_11"] = "neytral_novice_outfit_new",
["green_stalker_antigas"] = "neytral_novice_gaz_outfit_m1",
["soldier_mask"] = "outfit_soldier_m1",
["soldier_obichniy"] = "outfit_soldier_m1",
["stalker_soldier"] = "outfit_soldier_m1",
["soldier_spetsnaz"] = "specops_outfit",
["stalker_specops"] = "specops_outfit",
["soldier_antigas"] = "outfit_specnaz_m1",
["stalker_zombie1"] = "bandit_outfit",
["stalker_zombie2"] = "dolg_outfit",
["zombie_fresh_1"] = "dolg_outfit",
["stalker_zombie3"] = "stalker_outfit",
["stalker_zombie6"] = "stalker_outfit",
["zombie_fresh_2"] = "stalker_outfit",
["stalker_zombie4"] = "killer_outfit",
["stalker_zombie5"] = "stalker_guard_outfit",
["stalker_zombie7"] = "novice_outfit",
["stalker_zombie8"] = "neytral_novice_outfit_m1",
["stalker_zombie_specnaz"] = "specops_outfit",
["zombie_fresh_0"] = "svoboda_heavy_outfit",
["zombie_exoskeleton"] = "broken_exoskeleton",
["stalker_sv_rukzak_1_1"] = "svoboda_light_outfit",
["stalker_sv_rukzak_3"] = "svoboda_light_outfit",
["stalker_svoboda_light"] = "svoboda_light_outfit",
["stalker_sv_rukzak_1"] = "svoboda_heavy_outfit",
["stalker_sv_rukzak_2"] = "svoboda_heavy_outfit",
["stalker_sv_rukzak_3_1"] = "svoboda_heavy_outfit",
["stalker_sv_cook"] = "svoboda_heavy_outfit",
["stalker_sv_max"] = "svoboda_heavy_outfit",
["stalker_svoboda_heavy"] = "svoboda_heavy_outfit",
["stalker_sv_hood_91"] = "svoboda_gaz_outfit_m1",
["stalker_sv_hood_9"] = "svoboda_heavy_gaz_outfit_m1",
["stalker_sv_nauchniy"] = "freedom_scientific_outfit",
["stalker_sv_exoskeleton"] = "svoboda_exoskeleton",
["stalker_sv_leader"] = "outfit_svoboda_m1"
}

-- Ĺńëč íč÷ĺăî íĺ íŕřëî ďî ďđ˙ěîěó ńîîňâĺňńňâčţ, ňî áóäĺň ďîčńę ďî ÷ŕńňč íŕçâŕíč˙
-- Ďîđ˙äîę ńëĺäîâŕíč˙ â ňŕáëčöĺ čěĺĺň çíŕ÷ĺíčĺ!! Ńîđňčđîâŕňü ĺ¸ íĺëüç˙!
-- Áĺńńěűńëĺííî ńíŕ÷ŕëŕ čńęŕňü ďî "neytral", ŕ ďîňîě - ďî "stalker_neytral"!
-- Ěîćíî ňîëüęî íŕîáîđîň.
-- Ďîäňŕáëčöŕ npc_names äŕ¸ň âîçěîćíîńňü óęŕçűâŕňü ďđ˙ěî čě˙ íĺďčń˙ č ĺăî číäčâčäóŕëüíűé áđîíčę
local sect_by_visual_part = {
["stalker_bandit"] = {
sect = "bandit_outfit"
},
["stalker_do"] = {
sect = "dolg_outfit"
},
["stalker_ki"] = {
sect = "killer_outfit"
},
["stalker_mo"] = {
sect = "monolit_outfit"
},
["neytral"] = {
npc_names = {
["esc_wolf"] = "neytral_gaz_outfit_m2",
["esc_stalker_fanat"] = "neytral_gaz_outfit_m2",
["esc_fox"] = "neytral_gaz_outfit_m2",
["esc_provodnik"] = "neytral_gaz_outfit_m2",
["gar_hellcar"] = "neytral_gaz_outfit_m2",
["gar_seryi"] = "neytral_gaz_outfit_m2",
["agr_krot"] = "neytral_gaz_outfit_m2"
},
},
["stalker_neytral_rukzak"] = {
sect = "outfit_stalker_m2"
},
["stalker_neytral"] = {
sect = "stalker_outfit"
},
["soldier_bandana"] = {
sect = "outfit_soldier_m1"
},
["soldier_beret"] = {
sect = "outfit_soldier_m1"
},
["stalker_sv_balon_1"] = {
sect = "svoboda_heavy_outfit"
}
}

-- âĺđî˙ňíîńňü âűďŕäĺíč˙ áđîíĺćčëĺňîâ č äčŕďŕçîí ńîńňî˙íčé âűďŕâřčő áđîíĺćčëĺňîâ č îđóćč˙
-- condition - äčŕďŕçîí ńîńňî˙íčé âűďŕâřčő áđîíĺćčëĺňîâ č îđóćč˙
-- probability_outfit - âĺđî˙ňíîńňü âűďŕäĺíč˙ áđîíĺćčëĺňîâ
local data_by_community = {
default = { -- çíŕ÷ĺíč˙ ďî-óěîë÷ŕíčţ äë˙ íĺčçâĺńňíîé ăđóďďčđîâęč
condition = {min = 100, max = 100},
probability_outfit = 100
},
communities = {
["military"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["killer"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["monolith"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["zombied"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["bandit"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["stalker"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["dolg"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["freedom"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["ecolog"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["sniper"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["green"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["nebo"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
},
["lastday"] = {
condition = {min = 100, max = 100},
probability_outfit = 100
}
}
}

--' Ďđĺäěĺňű, îňíîń˙ůčĺń˙ ę ďŕňđîíŕě. Čő íŕäî ńďŕóíčňü äđóăčě ěĺňîäîě.
local ammo_sections = {}

local iniFileName = "misc\\death_generic.ltx"
local death_ini = ini_file(iniFileName)


function init_drop_settings()
--local community_list = { "stalker", "dolg", "freedom", "bandit", "military", "zombied", "ecolog", "killer", "monolith", "arena_enemy", "actor_dolg", "sniper", "green", "nebo" }

local n
local id, value
for k,v in pairs(data_by_community.communities) do
--' Íĺîáőîäčěî çŕďîëíčňü ňŕáëčöó
item_by_community[k] = {}
if iniLineSectionExist(k, iniFileName) then
n = iniLinesCount(k, iniFileName)
id, value = "", ""
for i=0,n-1 do
result, id, value = getIniLine(k,i,"","", iniFileName)
--item_by_community[v][id] = 1000 * tonumber(value)
if tonumber(value) >= 0.4 then value = 0.2 end
item_by_community[k][id] = 1000 * tonumber(value)
end
end
end

--' Çŕďîëí˙ĺě ňŕáëčöó çŕâčńčěîńňĺé
local n = iniLinesCount("item_dependence", iniFileName)
local id, value = "", ""
local vvv
for i=0,n-1 do
result, id, value = getIniLine("item_dependence",i,"","", iniFileName)
item_dependence[id] = {}
vvv = parse_names(value)
for k,v in pairs(vvv) do
item_dependence[id][v] = true
end
end

--' Ěíîćčňĺëč č ěčíčěŕęńű äë˙ âűďŕäĺíč˙ âĺůĺé â çŕâčńčěîńňč îň óđîâí˙
local level_name = level.name()

if not iniLineSectionExist(level_name, iniFileName) then
level_name = "default"
end

n = iniLinesCount(level_name, iniFileName)
id, value = "", ""
for i=0,n-1 do
result, id, value = getIniLine(level_name,i,"","", iniFileName)
mul_by_level[id] = tonumber(value)
end

local item_count_section = "item_count_" .. level.get_game_difficulty()
local n = iniLinesCount(item_count_section, iniFileName)
local t
local count_min, count_max
for i=0,n-1 do
result, id, value = getIniLine(item_count_section,i,"","", iniFileName)
--' Íóćíî đŕńďŕđńčňü value â äâŕ çíŕ÷ĺíč˙
t = parse_nums(value)
if t[1] == nil then
abort("Error on [death_ini] declaration. Section [%s], line [%s]", item_count_section, tostring(id))
end
count_min = t[1]
count_max = t[2]
if count_max == nil then
count_max = count_min
end

if mul_by_level[id] == nil then
mul_by_level[id] = 0
end

count_min = tonumber(count_min) * mul_by_level[id]
count_max = tonumber(count_max) * mul_by_level[id]

count_by_level[id] = {min = count_min, max = count_max}
end

--' Ďđĺäěĺňű, ęîňîđűĺ íĺëüç˙ óäŕë˙ňü (ęâĺńňîâűĺ íŕďđčěĺđ)
local n = iniLinesCount("keep_items", iniFileName)
for i=0,n-1 do
result, id, value = getIniLine("keep_items",i,"","", iniFileName)
if value == "true" then
always_keep_item[id] = true
end
end

--' Ďđĺäěĺňű, îňíîń˙ůčĺń˙ ę ďŕňđîíŕě. Čő íŕäî ńďŕóíčňü äđóăčě ěĺňîäîě.
ammo_sections = {}
local n = iniLinesCount("ammo_sections", iniFileName)
id, value = "", ""
for i=0,n-1 do
result, id, value = getIniLine("ammo_sections",i,"","", iniFileName)
ammo_sections[id] = true
end
end


class "drop_manager"
function drop_manager:__init(npc)
self.npc = npc
end

function drop_manager:create_release_item()
if self.npc == nil then return end
--' Ńďđŕřčâŕĺě ó ńĺđâĺđíîăî îáúĺęňŕ ăĺíĺđčëčńü ëč ďđĺäěĺňű
local se_obj = alife():object(self.npc:id())
if (se_obj == nil) then return end
if se_obj.death_droped == true then
return
end
se_obj.death_droped = true

--' Çŕďóńęŕĺě čňĺđŕňîđ íŕ óäŕëĺíčĺ ďđĺäěĺňîâ
self.npc:iterate_inventory(keep_item, self.npc)

local data = data_by_community.communities[self.npc:character_community()]
if not data then
data = data_by_community.default
end
local cond = data.condition

local item_in_slot = self.npc:item_in_slot(1)
if item_in_slot then
item_in_slot:unload_magazine()
item_in_slot:set_condition(math_random(cond.min, cond.max)/100)
end
item_in_slot = self.npc:item_in_slot(2)
if item_in_slot then
item_in_slot:unload_magazine()
item_in_slot:set_condition(math_random(cond.min, cond.max)/100)
end
--' Ďđîâĺđęŕ íŕ îňńóňńňâčĺ ńďŕóíŕ ëóňŕ
local ini = self.npc:spawn_ini()
if ini and ini:section_exist("dont_spawn_loot") then
return
end

--' Äîńďŕâíčâŕĺě íĺîáőîäčěîĺ ęîëč÷ĺńňâî čňĺěîâ:
--' Íĺîáőîäčěî ńîńňŕâčňü ńďčńîę îáúĺęňîâ ęîňîđűĺ ěîăóň áűňü çŕńďŕâíĺíű äë˙ ďĺđńîíŕćŕ
local spawn_items = item_by_community[self.npc:character_community()]
if spawn_items then
local number
for k,v in pairs(spawn_items) do
--' Ďî ęŕćäîěó îáúĺęňó íĺîáőîäčěî ďîëó÷čňü çŕâčńčěîńňč
if check_item_dependence(self.npc, k) == true then
--' Ďî ęŕćäîěó îáúĺęňó íĺîáőîäčěî ďîëó÷čňü ęîëč÷ĺńňâî
number = math_ceil(math_random(count_by_level[k].min, count_by_level[k].max))
--' Íĺîáőîäčěî çŕńďŕâíčňü íóćíîĺ ęîëč÷ĺńňâî.
create_items(self.npc, k, number, v)
end
end
end

local vis
local otf
local sect
--local npc_name = self.npc:name()
local npc_name = protected_items.get_obj_name(self.npc)
if not string_find(self.npc:section(), "arena") and
self.npc:character_community() ~= "arena_enemy" and
npc_name ~= "yan_specnaz_dead" and
npc_name ~= "x16_stalker_ghost" then
local t = amk.read_stalker_params(se_obj)
if t then
vis = t.visual
vis = amk.str_explode("\\",vis)
vis = vis[3]
end
end

--local finish = false
if vis then
sect = visuals[vis]
if not sect then
for k,v in pairs(sect_by_visual_part) do
if string_find(vis, k) then
if v.sect then
sect = v.sect
break
elseif v.npc_names then -- v.npc_names
sect = v.npc_names[npc_name]
--[[for name,outf in pairs(v.npc_names) do
if name == npc_name then
sect = outf
finish = true
break
end
end]]
--if finish then
if sect then
break
end
end
end
end
end

if sect then
otf = create_items(self.npc, sect, 1, data.probability_outfit * 10)
if otf then
amk.start_timer("outfit_cond",1,{otf.id, math_random(cond.min, cond.max)})
end
end
end

--[[for k, v in pairs(names_info) do
if string_find(npc_name, k) then
db.actor:give_info_portion(v)
break
end
end]]
if names_info[npc_name] then
if db.actor:dont_has_info(names_info[npc_name]) then
db.actor:give_info_portion(names_info[npc_name])
end
end
end

--' Ôóíęöč˙ âűçűâŕĺňń˙ äë˙ ęŕćäîăî ďđĺäěĺňŕ, ĺńëč âĺđíĺň false ňî ďđĺäěĺň óäŕëčňń˙.
-- Đŕçâĺ ? Óäŕëĺíčĺ ďđîčńőîäčň ďđ˙ěî âíóňđč ôóíęöčč, ŕ âíĺříĺěó čňĺđŕňîđó íŕďëĺâŕňü íŕ đĺçóëüňŕň (sapsan)
function keep_item(npc, item)
if not npc or not item or not alife():object(item:id()) then return end
local section = item:section()
if always_offs_items[section] then
alife():release(alife():object(item:id()), true)
return false
end
if protected_items.obj_is_protected(item, "items_protected", "exactly") or always_keep_item[section] then
return true
end

end

--' Ôóíęöč˙ ńďŕâíčň íĺîáőîäčěîĺ ÷čńëî ďđĺäěĺňîâ
function create_items(npc, section, number, rnd)
if npc == nil then return end
--'printf("create %s of %s", tostring(number), tostring(section))
if ammo_sections[section] == true then
if number > 0 then
se_respawn.create_ammo(section,
npc:position(),
npc:level_vertex_id(),
npc:game_vertex_id(),
npc:id(),
number)
end
else
for i=1,number do
--' Ďđîâĺđ˙ĺě âĺđî˙ňíîńňü ďî˙âčňü ęŕćäűé îáúĺęň â îňäĺëüíîńňč
if math_random(1000) <= rnd then
return alife():create(section,
npc:position(),
npc:level_vertex_id(),
npc:game_vertex_id(),
npc:id())
end
end
end
end


--' Ôóíęöč˙ ďđîâĺđ˙ĺň ĺńňü ëč őîňü îäčí čç çŕâčńčěűő îáúĺęňîâ ó ďĺđńîíŕćŕ
function check_item_dependence(npc, section)
if npc == nil then return end
if item_dependence[section] == nil then
return true
end

local d_flag = true
for k,v in pairs(item_dependence[section]) do
local obj = npc:object(k)
if obj and npc:marked_dropped(obj) ~= true then
return true
end
d_flag = false
end

return d_flag
end

Nie wiem za co odpowiada ten parametr.

if tonumber(value) >= 0.4 then value = 0.2 end
item_by_community[k][id] = 1000 * tonumber(value)



Teraz mam pytanie do modderów czy zechcieli by mi pomóc ?
Mam problem z plikami w Tajnych ścieżkach 2 próbowałem zrobić tak jak w poprzednim poście niestety wychodzą dziwne rzeczy po poprawieniu kondycji na 100% chodzi mi o script\death_manager wklejam ten skrypt.
:

--' Ęëţ÷ĺě ˙âë˙ĺňń˙ ăđóďďčđîâęŕ ďĺđńîíŕćŕ. Çíŕ÷ĺíčĺě ˙âë˙ĺňń˙ ňŕáëčöŕ, ńîäĺđćŕřŕ˙ čěĺíŕ ńĺęöčé ďđĺäěĺňîâ.
local item_by_community = {}

--' Çŕâčńčěîńňč â ńďŕóíĺ ďđĺäěĺňîâ. Ďđĺäěĺň ńďŕóíčňüń˙ ňîëüęî ĺńëč ĺńňü őîň˙ áű îäčí čç çŕâčńčěűő.
local item_dependence = {}

--' Ěíîćčňĺëč č ěčíčěŕęńű äë˙ âűďŕäĺíč˙ âĺůĺé â çŕâčńčěîńňč îň óđîâí˙
local mul_by_level = {}
local count_by_level = {}

--' Ďđĺäěĺňű, ęîňîđűĺ íĺëüç˙ óäŕë˙ňü (ęâĺńňîâűĺ íŕďđčěĺđ)
local always_keep_item = {}
local always_offs_items = {
"device_torch",
"device_pda",
"hand_radio",
"guitar_a",
"harmonica_a",
"binocular_a",
"wpn_knife",
"wpn_binoc",
"bolt",
"grenade_f1",
"grenade_rgd5",
"ammo_9x19_pbp",
"ammo_9x39_pab9",
"ammo_9x39_ap",
"ammo_9x18_fmj",
"ammo_9x18_pmm",
"ammo_11.43x23_fmj",
"ammo_5.45x39_fmj",
"ammo_5.45x39_ap",
"ammo_9x19_fmj",
"ammo_5.56x45_ss190",
"ammo_5.56x45_ap",
"ammo_12x70_buck",
"ammo_12x76_zhekan",
"ammo_12x76_dart",
"ammo_og-7b",
"ammo_m209",
"ammo_vog-25p",
"bandage",
"medkit",
"medkit_army",
"medkit_scientic",
"antirad",
"bread",
"kolbasa",
"conserva",
"vodka",
"energy_drink"}

--' Ďđĺäěĺňű, îňíîń˙ůčĺń˙ ę ďŕňđîíŕě. Čő íŕäî ńďŕóíčňü äđóăčě ěĺňîäîě.
local ammo_sections = {}

local death_ini = ini_file("misc\\death_generic.ltx")


function init_drop_settings()
local community_list = { "stalker", "dolg", "freedom", "bandit", "military", "zombied", "ecolog", "killer", "monolith", "arena_enemy", "actor_dolg","bratok","nebo","wanderer","ucheniy","usa","newstalk","hunter" }

for k,v in pairs(community_list) do
--' Íĺîáőîäčěî çŕďîëíčňü ňŕáëčöó
item_by_community[v] = {}
if death_ini:section_exist(v) then
local n = death_ini:line_count(v)
local id, value = "", ""
for i=0,n-1 do
result, id, value = death_ini:r_line(v,i,"","")
--item_by_community[v][id] = 1000 * tonumber(value)
if tonumber(value) >= 0.4 then value = 0.2 end
item_by_community[v][id] = 1000 * tonumber(value)
end
end
end

--' Çŕďîëí˙ĺě ňŕáëčöó çŕâčńčěîńňĺé
local n = death_ini:line_count("item_dependence")
local id, value = "", ""
for i=0,n-1 do
result, id, value = death_ini:r_line("item_dependence",i,"","")
item_dependence[id] = {}
local vvv = parse_names(value)
for k,v in pairs(vvv) do
item_dependence[id][v] = true
end
end

--' Ěíîćčňĺëč č ěčíčěŕęńű äë˙ âűďŕäĺíč˙ âĺůĺé â çŕâčńčěîńňč îň óđîâí˙
local level_name = level.name()

if not death_ini:section_exist(level_name) then
level_name = "default"
end

local n = death_ini:line_count(level_name)
local id, value = "", ""
for i=0,n-1 do
result, id, value = death_ini:r_line(level_name,i,"","")
mul_by_level[id] = tonumber(value)
end

local item_count_section = "item_count_" .. level.get_game_difficulty()
local n = death_ini:line_count(item_count_section)
for i=0,n-1 do
result, id, value = death_ini:r_line(item_count_section,i,"","")
--' Íóćíî đŕńďŕđńčňü value â äâŕ çíŕ÷ĺíč˙
local t = parse_nums(value)
if t[1] == nil then
abort("Error on [death_ini] declaration. Section [%s], line [%s]", item_count_section, tostring(id))
end
local min = t[1]
local max = t[2]
if max == nil then
max = min
end

if mul_by_level[id] == nil then
mul_by_level[id] = 0
end

min = tonumber(min) * mul_by_level[id]
max = tonumber(max) * mul_by_level[id]

count_by_level[id] = {min = min, max = max}
end

--' Ďđĺäěĺňű, ęîňîđűĺ íĺëüç˙ óäŕë˙ňü (ęâĺńňîâűĺ íŕďđčěĺđ)
local n = death_ini:line_count("keep_items")
for i=0,n-1 do
result, id, value = death_ini:r_line("keep_items",i,"","")
if value == "true" then
always_keep_item[id] = true
end
end

--' Ďđĺäěĺňű, îňíîń˙ůčĺń˙ ę ďŕňđîíŕě. Čő íŕäî ńďŕóíčňü äđóăčě ěĺňîäîě.
ammo_sections = {}
local n = death_ini:line_count("ammo_sections")
local id, value = "", ""
for i=0,n-1 do
result, id, value = death_ini:r_line("ammo_sections",i,"","")
ammo_sections[id] = true
end
end



class "drop_manager"
function drop_manager:__init(npc)
self.npc = npc
end
function drop_manager:create_release_item()
if self.npc == nil then return end
--' Ńďđŕřčâŕĺě ó ńĺđâĺđíîăî îáúĺęňŕ ăĺíĺđčëčńü ëč ďđĺäěĺňű
local se_obj = alife():object(self.npc:id())
if (se_obj == nil) then return end
if se_obj.death_droped == true then
return
end
se_obj.death_droped = true

--' Çŕďóńęŕĺě čňĺđŕňîđ íŕ óäŕëĺíčĺ ďđĺäěĺňîâ
self.npc:iterate_inventory(keep_item, self.npc)

--' Ďđîâĺđęŕ íŕ îňńóňńňâčĺ ńďŕóíŕ ëóňŕ
local ini = self.npc:spawn_ini()

if ini and ini:section_exist("dont_spawn_loot") then
return
end

--' Äîńďŕâíčâŕĺě íĺîáőîäčěîĺ ęîëč÷ĺńňâî čňĺěîâ:
--' Íĺîáőîäčěî ńîńňŕâčňü ńďčńîę îáúĺęňîâ ęîňîđűĺ ěîăóň áűňü çŕńďŕâíĺíű äë˙ ďĺđńîíŕćŕ
local spawn_items = item_by_community[self.npc:character_community()]
if spawn_items then
for k,v in pairs(spawn_items) do
--' Ďî ęŕćäîěó îáúĺęňó íĺîáőîäčěî ďîëó÷čňü çŕâčńčěîńňč
if check_item_dependence(self.npc, k) == true then
--' Ďî ęŕćäîěó îáúĺęňó íĺîáőîäčěî ďîëó÷čňü ęîëč÷ĺńňâî
local number = math.ceil(math.random(count_by_level[k].min, count_by_level[k].max))
--' Íĺîáőîäčěî çŕńďŕâíčňü íóćíîĺ ęîëč÷ĺńňâî.
create_items(self.npc, k, number, v)
end
end
end

if not string.find(self.npc:section(),"arena") and
self.npc:character_community()~="arena_enemy" and
self.npc:name()~="yan_specnaz_dead" and
self.npc:name()~="x16_stalker_ghost" then

local otf_1
local otf_2
local otf_3
local otf_4
local otf_5
local sect
local t = amk.read_stalker_params(se_obj)
if t ~= nil then
local vis = t.visual
vis = amk.str_explode("\\",vis)
vis = vis[3]
--skunk.dbglog("vis = '%s'", vis)
if vis then
-- bandit
if string.find(vis,"stalker_bandit") then sect = "bandit_outfit" end
if vis == "stalker_bandit_4" or vis == "stalker_bandit_2" then sect = "bandit_outfit_red" end
if vis == "stalker_bandit_5" or vis == "stalker_bandit_9" then sect = "bandit_outfit_blue" end
if vis == "stalker_bandit_1" then sect = "bandit_outfit_red1" end
if vis == "stalker_bandit_drunk" then sect = "outfit_bandit_m1" end
if vis == "stalker_bandit_8" then sect = "bandit_gaz_outfit_m1" end
if vis == "stalker_bandit_veteran" then sect = "bandit_veteran_outfit" end
if vis == "stalker_bandit_borov" or vis == "stalker_bandit_master" then sect = "bandit_master_outfit" end
if vis == "stalker_bandit_exoskeleton" then sect = "exo_bandit_outfit" end
-- dolg
if string.find(vis,"stalker_do") then sect = "dolg_outfit" end
if vis == "stalker_do_antigas" then sect = "dolg_gaz_outfit_m1" end
if vis == "stalker_do_komandir" then sect = "outfit_dolg_m1" end
if vis == "stalker_do_nauchniy" then sect = "dolg_scientific_outfit" end
if vis == "stalker_do_exoskeleton" then sect = "dolg_black_exoskeleton" end
-- nebo
if vis == "stalker_nebo_balon_1" then sect = "nebo_heavy_outfit" end
if vis == "stalker_nebo_rukzak" then sect = "nebo_light_outfit" end
if vis == "stalker_nebo_nauchniy" then sect = "nebo_scientific_outfit" end
if vis == "stalker_nebo_exoskeleton" then sect = "nebo_exo_outfit" end
-- ecolog
if vis == "stalker_ecolog" or vis == "nauchniy_1" or vis == "protect_suit2" then sect = "ecolog_outfit" end
if vis == "stalker_ecolog_military" or vis == "stalker_chemical" or vis == "nauchniy_0" or vis == "protect_suit1" then sect = "protection_outfit" end
-- izgoy
if vis == "izgoy" then sect = "bandit_veteran_outfit" end
-- killer
if string.find(vis,"stalker_ki") then sect = "killer_outfit" end
if vis == "stalker_ki_head_1" then sect = "outfit_killer_m1" end
if vis == "stalker_ki_antigas" then sect = "killer_gaz_outfit_m1" end
if vis == "stalker_ki_nauchniy" then sect = "merc_scientific_outfit" end
if vis == "stalker_ki_exoskeleton" then sect = "killer_blue_exoskeleton" end
-- militari
if vis == "stalker_militari_1" or vis == "stalker_militari_antigas_1" or vis == "stalker_military" or vis == "stalker_military_green" then sect = "military_outfit" end
if vis == "stalker_militari_2" or vis == "stalker_militari_antigas_2" or vis == "stalker_commander" or vis == "stalker_military_black" then sect = "militaryspec_outfit" end
-- monolit
if string.find(vis,"stalker_mo") or vis == "stalker_monolit" then sect = "monolit_outfit" end
if vis == "stalker_mo_hood_9" then sect = "monolit_gaz_outfit_m1" end
if vis == "stalker_mo_nauchniy" then sect = "monolit_scientific_outfit" end
if vis == "stalker_mo_exo" then sect = "monolit_exoskeleton" end
if vis == "stalker_mo_elite" then sect = "monolit_black_outfit" end
-- nauchniy (see ecolog)
-- neytral
if string.find(vis,"stalker_neytral") or vis == "stalker_hood" or vis == "stalker_neytral_rukzak" then sect = "stalker_outfit" end
if vis == "stalker_bar_security" then sect = "stalker_guard_outfit" end
if vis == "stalker_neytral_hood_92" then sect = "neytral_gaz_outfit_m1" end
if vis == "stalker_neytral_hood_9" then sect = "neytral_gaz_outfit_m2" end
if string.find(vis,"neytral") and (self.npc:name()=="esc_wolf" or self.npc:name()=="esc_stalker_fanat" or self.npc:name()=="esc_fox" or self.npc:name()=="esc_provodnik" or self.npc:name()=="agr_krot") then sect = "outfit_stalker_m2" end
if vis == "stalker_2_gas" then sect = "neytral_gaz_outfit_v1" end
if vis == "stalker_3_gas" then sect = "neytral_gaz_outfit_v2" end
if vis == "stalker_4_gas" then sect = "neytral_gaz_outfit_v3" end
if vis == "stalker_2_mask" or vis == "lisiy" or vis == "stalker_2_mask" or vis == "stalker_2_ochki" or vis == "stalker_2_rozh1" or vis == "stalker_2_usi" then sect = "stalker_outfit_v1" end
if vis == "stalker_3_mask" or vis == "hellcar" or vis == "stalker_3_mask" or vis == "stalker_3_rozh2" or vis == "stalker_3_usi" then sect = "stalker_outfit_v2" end
if vis == "stalker_4_rozh3" or vis == "serega" or vis == "stalker_4_ochki" then sect = "stalker_outfit_v3" end
if vis == "stalker_prizrak" then sect = "outfit_stalker_m1" end
if vis == "stalker_neytral_nauchniy" or vis == "stalker_scien" then sect = "scientific_outfit" end
if vis == "stalker_neytral_exoskeleton" or vis == "stalker_exoskeleton" then sect = "exo_outfit" end
-- novice
if vis == "green_stalker_1" then sect = "neytral_novice_outfit_m1" end
if vis == "green_stalker_2" then sect = "novice_outfit" end
if vis == "stalker_novice" then sect = "outfit_novice_m1" end
if vis == "green_stalker_3" then sect = "novice_outfit_rain_1" end
if vis == "green_stalker_4" then sect = "neytral_novice_outfit_cam" end
if vis == "green_stalker_5" then sect = "novice_outfit_new_2" end
if vis == "green_stalker_6" then sect = "novice_outfit_rain_2" end
if vis == "green_stalker_7" then sect = "neytral_novice_outfit_cam_2" end
if vis == "green_stalker_8" then sect = "neytral_novice_outfit_cam_3" end
if vis == "green_stalker_9" then sect = "novice_outfit_new_1" end
if vis == "green_stalker_10" then sect = "neytral_novice_outfit_cam_1" end
if vis == "green_stalker_11" then sect = "neytral_novice_outfit_new" end
if vis == "green_stalker_antigas" then sect = "neytral_novice_gaz_outfit_m1" end
-- protect (see ecolog)
-- soldier
if string.find(vis,"soldier_bandana") or string.find(vis,"soldier_beret") or vis == "soldier_mask" or vis == "soldier_obichniy" or vis == "stalker_soldier" then sect = "outfit_soldier_m1" end
if vis == "soldier_spetsnaz" or vis == "stalker_specops" then sect = "specops_outfit" end
if vis == "soldier_antigas" then sect = "outfit_specnaz_m1" end
-- stalker_zombi
if vis == "stalker_zombie1" then sect = "bandit_outfit" end
if vis == "stalker_zombie2" or vis == "zombie_fresh_1" then sect = "dolg_outfit" end
if vis == "stalker_zombie3" or vis == "stalker_zombie6" or vis == "zombie_fresh_2" then sect = "stalker_outfit" end
if vis == "stalker_zombie4" then sect = "killer_outfit" end
if vis == "stalker_zombie5" then sect = "stalker_guard_outfit" end
if vis == "stalker_zombie7" then sect = "novice_outfit" end
if vis == "stalker_zombie8" then sect = "neytral_novice_outfit_m1" end
if vis == "stalker_zombie_specnaz" then sect = "specops_outfit" end
if vis == "zombie_fresh_0" then sect = "svoboda_heavy_outfit" end
if vis == "zombie_exoskeleton" then sect = "broken_exoskeleton" end
-- svoboda
if vis == "stalker_sv_rukzak_1_1" or vis == "stalker_sv_rukzak_3" or vis == "stalker_svoboda_light" then sect = "svoboda_light_outfit" end
if string.find(vis,"stalker_sv_balon_1") or vis == "stalker_sv_rukzak_1" or vis == "stalker_sv_rukzak_2" or vis == "stalker_sv_rukzak_3_1" or vis == "stalker_sv_cook" or vis == "stalker_sv_max" or vis == "stalker_svoboda_heavy" then sect = "svoboda_heavy_outfit" end
if vis == "stalker_sv_hood_91" then sect = "svoboda_gaz_outfit_m1" end
if vis == "stalker_sv_hood_9" then sect = "svoboda_heavy_gaz_outfit_m1" end
if vis == "stalker_sv_nauchniy" then sect = "freedom_scientific_outfit" end
if vis == "stalker_sv_exoskeleton" then sect = "svoboda_exoskeleton" end
if vis == "stalker_sv_leader" then sect = "outfit_svoboda_m1" end
-- nano
if vis == "stalker_nano_suit" then sect = "nano_outfit" end
end
if sect~=nil then
if sect == "bandit_outfit" or sect == "outfit_bandit_m1" or sect == "bandit_outfit_blue" or sect == "bandit_outfit_red1" or sect == "bandit_outfit_red" or sect == "bandit_gaz_outfit_m1" or sect == "bandit_veteran_outfit" or sect == "bandit_master_outfit" or sect == "novice_outfit" or sect == "novice_outfit_rain_1" or sect == "novice_outfit_rain_2" or sect == "neytral_novice_outfit_m1" or sect == "neytral_novice_gaz_outfit_m1" or sect == "outfit_novice_m1" or sect == "neytral_novice_outfit_cam" or sect == "novice_outfit_new_1" or sect == "novice_outfit_new_2" or sect == "neytral_novice_outfit_cam_1" or sect == "neytral_novice_outfit_cam_2" or sect == "neytral_novice_outfit_cam_3" or sect == "neytral_novice_outfit_new" then
otf_1 = create_items(self.npc, sect, 1, 650)
if otf_1~= nil then
amk.start_timer("outfit_cond_1",1,otf_1.id) end

elseif sect == "stalker_outfit" or string.find(sect,"_outfit_v") or sect == "nebo_light_outfit" or sect == "killer_outfit" or sect == "outfit_soldier_m1" or sect == "svoboda_light_outfit" or sect == "svoboda_gaz_outfit_m1" then
otf_2 = create_items(self.npc, sect, 1, 550)
if otf_2~= nil then
amk.start_timer("outfit_cond_2",1,otf_2.id) end

elseif sect == "dolg_outfit" or sect == "dolg_gaz_outfit_m1" or sect == "ecolog_outfit" or sect == "outfit_dolg_m1" or sect == "outfit_killer_m1" or sect == "killer_gaz_outfit_m1" or sect == "specops_outfit" or sect == "outfit_specnaz_m1" or sect == "monolit_outfit" or sect == "monolit_gaz_outfit_m1" or sect == "stalker_guard_outfit" or sect == "outfit_stalker_m1" or sect == "nebo_heavy_outfit" or sect == "outfit_stalker_m2" or sect == "neytral_gaz_outfit_m1" or sect == "neytral_gaz_outfit_m2" or sect == "svoboda_heavy_outfit" or sect == "svoboda_heavy_gaz_outfit_m1" or sect == "outfit_svoboda_m1" then
otf_3 = create_items(self.npc, sect, 1, 450)
if otf_3~= nil then
amk.start_timer("outfit_cond_3",1,otf_3.id) end

elseif sect == "dolg_scientific_outfit" or sect == "ecolog_outfit" or sect == "protection_outfit" or sect == "merc_scientific_outfit" or sect == "military_outfit" or sect == "militaryspec_outfit" or sect == "monolit_scientific_outfit" or sect == "scientific_outfit" or sect == "monolit_black_outfit" or sect == "nebo_scientific_outfit" or sect == "freedom_scientific_outfit" then
otf_4 = create_items(self.npc, sect, 1, 350)
if otf_4~= nil then
amk.start_timer("outfit_cond_4",1,otf_4.id) end

else
otf_5 = create_items(self.npc, sect, 1, 250)
if otf_5~= nil then
amk.start_timer("outfit_cond_5",1,otf_5.id) end
end
end
end
end
if self.npc:name() =="solomon" then
db.actor:give_info_portion("haron_need_stalker_fail")
end
if string.find(self.npc:name(),"mathon") then
db.actor:give_info_portion("haron_naem_fail")
end
if string.find(self.npc:name(),"new_prizrak") then
db.actor:give_info_portion("prizrak_help_fail")
end
if string.find(self.npc:name(),"mil_lucash") then
db.actor:give_info_portion("mil_lucash_dead")
end
if string.find(self.npc:name(),"mil_blockpost_leader") then
db.actor:give_info_portion("mil_blockpost_leader_dead")
end
if string.find(self.npc:name(),"mil_soldat_one") then
db.actor:give_info_portion("mil_voen_one")
end
if string.find(self.npc:name(),"mil_soldat_two") then
db.actor:give_info_portion("mil_voen_two")
end
if string.find(self.npc:name(),"mil_soldat_tri") then
db.actor:give_info_portion("mil_voen_tri")
end
if string.find(self.npc:name(),"mil_soldat_four") then
db.actor:give_info_portion("mil_voen_four")
end
if string.find(self.npc:name(),"mil_soldat_five") then
db.actor:give_info_portion("mil_voen_five")
end
if string.find(self.npc:name(),"dark_komandir_belchuk") then
db.actor:give_info_portion("mil_voen_six")
end
if string.find(self.npc:name(),"mil_barier_one") then
db.actor:give_info_portion("mil_barier_one")
end
if string.find(self.npc:name(),"mil_barier_two") then
db.actor:give_info_portion("mil_barier_two")
end
if string.find(self.npc:name(),"mil_barier_tri") then
db.actor:give_info_portion("mil_barier_tri")
end
if string.find(self.npc:name(),"mil_barier_four") then
db.actor:give_info_portion("mil_barier_four")
end
if string.find(self.npc:name(),"mil_komandir_sidorchuk") then
db.actor:give_info_portion("mil_barier_five")
end
if string.find(self.npc:name(),"mil_stukach") then
db.actor:give_info_portion("mil_stukach_dead")
end
if string.find(self.npc:name(),"mil_engineer") then
db.actor:give_info_portion("mil_engineer_dead")
end
if string.find(self.npc:name(),"mil_cook") then
db.actor:give_info_portion("mil_cook_new_dead")
end
if self.npc:name() == "bes" then
db.actor:give_info_portion("bes_dead")
end
if string.find(self.npc:name(),"garbage_stalker_wound") then
db.actor:give_info_portion("garbage_stalker_wound_dead")
end
if string.find(self.npc:name(),"mil_osvedomitel") then
db.actor:give_info_portion("mil_osvedomitel_dead")
end
if string.find(self.npc:name(),"esc_krest_bratok") then
db.actor:give_info_portion("krest_dead")
end
if string.find(self.npc:name(),"atp_barman") then
db.actor:give_info_portion("band_kill_have")
end
end
--' Ôóíęöč˙ âűçűâŕĺňń˙ äë˙ ęŕćäîăî ďđĺäěĺňŕ, ĺńëč âĺđíĺň false ňî ďđĺäěĺň óäŕëčňń˙.
function keep_item(npc, item)
local npc_community = npc:character_community()
if item==nil or alife():object(item:id())==nil then return end

if npc == nil then return end
local section = item:section()

if section == "bolt" then
return false
end

if always_keep_item[section] == true then
return true
end

local item_id = item:id()
local kond=75
if npc_community == "military" then kond=75
elseif npc_community == "killer" then kond=75
elseif npc_community == "monolith" then kond=20
elseif npc_community == "zombied" then kond=5
elseif npc_community == "bandit" then kond=40
else kond=60
end
local item_in_slot = npc:item_in_slot(1)
if item_in_slot ~= nil and item_in_slot:id() == item_id then
item:unload_magazine()
--' Ňóň íŕäî óěĺíüřčňü ęîíäčří îđóćč˙
item:set_condition((math.random(90-kond)+kond)/100)
return true
end
item_in_slot = npc:item_in_slot(2)
if item_in_slot ~= nil and item_in_slot:id() == item_id then
item:unload_magazine()
--' Ňóň íŕäî óěĺíüřčňü ęîíäčří îđóćč˙
item:set_condition((math.random(95-kond)+kond)/100)
return true
end

-- óäŕë˙ňü ĎÄŔ, ăčňŕđó\ăŕđěîřęó, ôîíŕđčęč č ďđčáîđű íî÷íîăî âčäĺíč˙, đŕöčţ, áčíîęëü.
for a=1,table.getn(always_offs_items),1 do
if always_offs_items[a]==section then
--if (npc.mark_item_dropped) then
-- npc:mark_item_dropped(item)
--end
alife():release(alife():object(item:id()), true)
end
end
end

--' Ôóíęöč˙ ńďŕâíčň íĺîáőîäčěîĺ ÷čńëî ďđĺäěĺňîâ
function create_items(npc, section, number, rnd)
if npc == nil then return end
--'printf("create %s of %s", tostring(number), tostring(section))
if ammo_sections[section] == true then
if number > 0 then
se_respawn.create_ammo(section,
npc:position(),
npc:level_vertex_id(),
npc:game_vertex_id(),
npc:id(),
number)
end
else
for i=1,number do
--' Ďđîâĺđ˙ĺě âĺđî˙ňíîńňü ďî˙âčňü ęŕćäűé îáúĺęň â îňäĺëüíîńňč
if math.random(1000) <= rnd then
return alife():create(section,
npc:position(),
npc:level_vertex_id(),
npc:game_vertex_id(),
npc:id())
end
end
end
end


--' Ôóíęöč˙ ďđîâĺđ˙ĺň ĺńňü ëč őîňü îäčí čç çŕâčńčěűő îáúĺęňîâ ó ďĺđńîíŕćŕ
function check_item_dependence(npc, section)
if npc == nil then return end
if item_dependence[section] == nil then
return true
end

local d_flag = true
for k,v in pairs(item_dependence[section]) do
local obj = npc:object(k)
if obj ~= nil and npc:marked_dropped(obj) ~= true then
return true
end
d_flag = false
end

return d_flag
end

Za ten post czeresniaczek1 otrzymał następujące punkty reputacji:
Positive zdzicho.
Awatar użytkownika
czeresniaczek1
Tropiciel

Posty: 303
Dołączenie: 08 Lut 2009, 01:15
Ostatnio był: 19 Sie 2020, 15:30
Frakcja: Samotnicy
Ulubiona broń: TRs 301
Kozaki: 6


Powróć do Cień Czarnobyla

Kto jest na forum

Użytkownicy przeglądający to forum: Brak zarejestrowanych użytkowników oraz 8 gości