Это популярное сообщение. Samber13 227 Опубликовано 8 Июня 2015 Это популярное сообщение. Поделиться Опубликовано 8 Июня 2015 (изменено) Theme for the articles and modding lessons in English. It's not for chatting.Share lessons or usefull articles. If you use someone's lesson, then specify author. Also english translations of the original lessons and articles from another languages are welcome. Lessons should be hidden in spoiler. Example: Files that we need:From unpacked 'all.spawn':alife_LOCATION-NAME.ltxAlso scripts from 'gamedata\scripts':pda.scriptxr_effects.scriptsLet's start:1) Open file 'alife_LOCATION-NAME.ltx' in editor (notepad) and add this section there: [1867] ; SECTION NUMBER ; cse_abstract properties section_name = space_restrictor name = YOUR_PLACE_NAME position = -180.277893066406,9.41139984130859,77.5603179931641 ;POSITON OF THE ZONE (In this case - small house in Izumrudnoye) direction = 0,0,0 ; cse_alife_object properties level_vertex_id=1233171 ; LEVEL VERTEX game_vertex_id=13 ; GAME VERTEX distance = 9.09999942779541 object_flags = 0xffffff2e custom_data = <[story_object] story_id = YOUR_PLACE_NAME_id [logic] cfg = scripts\sr_sleep.ltx END ; cse_shape properties shapes = shape0,shape1 shape0:type = box shape0:axis_x = 3.85299897193909,0,0 shape0:axis_y = 0,2.51200008392334,0 shape0:axis_z = 0,0,6.23259878158569 shape0:offset = 0,0,0 shape1:type = box shape1:axis_x = 3.16719889640808,0,0 shape1:axis_y = 0,2.51200008392334,0 shape1:axis_z = 0,0,4.87539911270142 shape1:offset = -3.29999589920044,0,-0.199996992945671 ; cse_alife_space_restrictor properties restrictor_type = 3 Close the file. 2) Open 'pda.script' and search: { {target = "zat_a2_sr_sleep_id", hint = "st_ui_pda_sleep_place"}, {target = "jup_a6_sr_sleep_id", hint = "st_ui_pda_sleep_place"}, {target = "pri_a16_sr_sleep_id", hint = "st_ui_pda_sleep_place"}, } Replace it by: { {target = "zat_a2_sr_sleep_id", hint = "st_ui_pda_sleep_place"}, {target = "jup_a6_sr_sleep_id", hint = "st_ui_pda_sleep_place"}, {target = "pri_a16_sr_sleep_id", hint = "st_ui_pda_sleep_place"}, {target = "YOUR_PLACE_NAME_id", hint = "st_ui_pda_sleep_place"}, } Close the file. 3) Open 'xr_effects.script' and search: function sleep(actor, npc) local sleep_zones = { "zat_a2_sr_sleep", "jup_a6_sr_sleep", "pri_a16_sr_sleep", "actor_surge_hide_2" } Replace it by: function sleep(actor, npc) local sleep_zones = { "YOUR_PLACE_NAME", "zat_a2_sr_sleep", "jup_a6_sr_sleep", "pri_a16_sr_sleep", "actor_surge_hide_2" } Close the file. Done. Now we can start the game and check it out! Author: @Viktor_KrisSource: ClickTranslation: @Samber13 Изменено 10 Июня 2015 пользователем Murarius 4 3 1 3 Калькулятор номера билда. Ссылка на комментарий
Это популярное сообщение. svarog2741 83 Опубликовано 10 Июня 2015 Это популярное сообщение. Поделиться Опубликовано 10 Июня 2015 (изменено) Changing the version of the engine. [spoiler='Lesson'] What we need: HexEditor Neo and xrGameSpy.dll And so, open Hex, loadable our DLL and click Ctrl+F(search) and write "1.0006". Then change it to any value Author: svarog2741 Compilation of locations under build Metro 2033 In xrLC append the-o switch and see that it was not a tick in the "convert to progressive". Compile draft in X-ray sdk, then convert level.cform Converter from Modera. Unknown visual type: 1. May occur due to the lack of descriptions of new Shader in the script. Treatment: open system.lua and enter in a specific section of shaders, which are shown in the log. 2. Location is not compiled with a suitable compiler. 3. There is a tick on "convert to progressive" Author: svarog2741 Also thanks to: Modera Изменено 10 Июня 2015 пользователем svarog2741 2 3 НС - шлак, солянки - шлак. Ссылка на комментарий
RafMadMan 85 Опубликовано 11 Июня 2015 Поделиться Опубликовано 11 Июня 2015 Critical hit (SoC). First you must create a file effect_blood.script and then write like this: lite_treshold = 0.05 --'how much health must decrease from the last update, to make screen become red crit_treshold = 0.30 --'how much health must decrease from the last update, to make actor shake drop_item_on_crit_prob = 0.20 --'a chance that actor will drop his weapon effector_power_coeff = 0.7 prev_health = -1 function wounded_pp_update() if prev_health > (db.actor.health + lite_treshold) then level.add_pp_effector("fire_hit.ppe", 2011, false) local effector_power = (prev_health - db.actor.health)*100*effector_power_coeff level.set_pp_effector_factor(2011, effector_power) if prev_health > db.actor.health + crit_treshold then level.add_cam_effector("camera_effects\\fusker.anm", 999, false, "") local snd_obj = xr_sound.get_safe_sound_object([[actor\pain_3]]) snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0) if math.random() < drop_item_on_crit_prob then local active_item = db.actor:active_item() if active_item and active_item:section() ~= "bolt" and active_item:section()~= "wpn_knife" then db.actor:drop_item(active_item) end end end prev_health = db.actor.health end end Then we open bind_stalker.script and into the function function actor_binder:update(delta) object_binder.update(self, delta) local time = time_global() game_stats.update (delta, self.object)we add this effect_blood.wounded_pp_update() That's all folks! Translaton: @RafMadMan P.S. Taken from Stalkerinside. And sorry for my not perfect English. Getting money from corpses (SoC). First we need a file treasure_manager.script . Let's find this: --' Using of initiator (a chance to give out a hiding-place) function CTreasure:use(npc) printf("TREASURE USE") After line printf("TREASURE USE") we write this if (npc and db.actor) then lootmoney.lootmoney(npc) end We should get --' Using of initiator (a chance to give out a hiding-place) function CTreasure:use(npc) printf("TREASURE USE") if (npc and db.actor) then lootmoney.lootmoney(npc) end After it we save changes and create file lootmoney.script and we write in it this function lootmoney(npc) if npc ~= nil and not string.find(npc:section(),"arena") and npc:character_community()~="arena_enemy" then local money = npc:money() if money ~= nil and money ~=0 then local deadmoney = money local npc_rank npc_rank = ranks.get_obj_rank_name(npc) if npc_rank ~= nil then if npc_rank == "novice" and deadmoney >=400 then deadmoney=math.random(25,400) elseif npc_rank == "experienced" and deadmoney >=500 then deadmoney=math.random(50,500) elseif npc_rank == "veteran" and deadmoney >=600 then deadmoney=math.random(100,600) elseif npc_rank == "master" and deadmoney >=700 then deadmoney=math.random(200,700) end end local news_texti = "\\n%c[255,255,0,0]Dead stalker: %c[default]"..npc:character_name().."\\n%c[255,255,0,0]Money found: %c[default]"..game.translate_string(tostring(deadmoney).."RU") db.actor:give_game_news(news_texti, "ui\\ui_iconsTotal", Frect():set(0,0,83,47), 1, 4000) db.actor:give_money(deadmoney) game_stats.money_quest_update(deadmoney) npc:give_money(-money) game_stats.money_quest_update(-money) end end end And after it save changes in the file. That's all! Translation and editing : @RafMadMan P.S. Taken from Stalkerinside. And sorry for my not perfect English. 1 1 Ссылка на комментарий
RafMadMan 85 Опубликовано 15 Июня 2015 Поделиться Опубликовано 15 Июня 2015 Cigarette addiction (SoC). First we need these files (AMK Mod): config/misc/items.ltx config/text/rus/string_table_enc_equipment.xml scripts/amk.script script/amk_mod.script 1) We create file your_script_name.script in folder gamedata/scripts and write in it this: snd = sound_object([[ambient\underground\rnd_giant]]) -- Check if we need to smoke. It calls out every 6 game minutes function test_for_need_kur() amk.save_variable("kur",amk.load_variable("kur",0)+1) amk.g_start_timer("kur",0,0,6) kur_reduce_health() end -- Health decrease, if actor hasn`t smoke for a long time function kur_reduce_health() local tmp = amk.load_variable("kur",0) if tmp > 150 then if db.actor.health > 0.15 then db.actor.health = - 0.15 end if not snd:playing() then snd:play_at_pos(db.actor, vector():set(0,0,0), 0, sound_object.s2d) end end end -- Smoking function kur_item(oid, time) if alife():object(oid)==nil then local tmp = amk.load_variable("kur",0) - time*10 if tmp < 0 then tmp = 0 end amk.save_variable("kur", tmp) kur_reduce_health() end end 2) We open file amk.script and after: function __do_timer_action(select_string,params_string) we write: if select_string=="kur" then your_script_name.test_for_need_kur() end 3) We open file amk_mod.script and in the function first_run we write amk.g_start_timer("kur",0,0,6) then in function check_sleep_item(obj) after elseif section=="treasure_item" then stype="tr_item" but before end we write this: elseif section == "sigaret" then stype = "sgr" 4) We open file items.ltx and in the end of the file we write this: [sigaret]:identity_immunities GroupControlSection = spawn_group discovery_dependency = $spawn = "food and drugs\antirad" $prefetch = 32 class = II_ANTIR cform = skeleton visual = weapons\sigaret\sigaret.ogf inv_name = sigareta inv_name_short = sigareta description = enc_food_sigareta inv_weight = 0.02 inv_grid_width = 1 inv_grid_height = 2 inv_grid_x = 10 inv_grid_y = 24 cost = 50 ; 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 5) We open file string_table_enc_equipment.xml in the end we write this: <string id="sigareta"> <text>Box of cigarettes</text> </string> <string id="enc_food_sigareta"> <text>Here you can write your own description of the cigarettes.</text> </string> Then we save changes and Cigarette addiction is ready for using in the game! That's all!Translation and editing : RafMadManP.S. Taken from Stalkerinside. And sorry for my not perfect English. 2 Ссылка на комментарий
RafMadMan 85 Опубликовано 20 Июня 2015 Поделиться Опубликовано 20 Июня 2015 (изменено) Universal repair kit. First we open file gamefata/config/misc/items.ltx and in its end we write this: ;-------------------------------------------------------------------------------Repair kit [repair_kit]:identity_immunities GroupControlSection = spawn_group discovery_dependency = $spawn = "devices\quest_items\repair_kit" $prefetch = 32 class = II_ANTIR cform = skeleton visual = physics\box\box_1c.ogf radius = 1 description = repair_kit_desc inv_name = repair_kit_name inv_name_short = repair_kit_name inv_weight = 3.0 inv_grid_width = 2 inv_grid_height = 2 inv_grid_x = 4 inv_grid_y = 18 cost = 500 eat_health = 0 eat_satiety = 0 eat_power = 0 eat_radiation = 0 eat_alcohol = 0 wounds_heal_perc = 0 eat_portions_num = 3 animation_slot = 4 Then we save changes and open file gamedata/config/text/rus/string_table_enc_equipment.xml and in the end of it, but before </string_table> we write this: <string id="repair_kit_name"> <text>Universal repair kit</text> </string> <string id="repair_kit_desc"> <text>Your description of the repair kit</text> </string> Then we save changes and open file gamedata/scripts/bind_stalker.script and after these lines: function actor_binder:on_item_drop (obj) level_tasks.proceed(self.object) --game_stats.update_drop_item (obj, self.object) we write this: exp_mod.itemuse(obj) -- Repair Kit Then we save changes and in this folder we create file exp|_mod.script and in it we write this: --Script from NZK mod --by zek ------------------------------------------------------------------------ --- Script of using things straight from invertory (In this case - using of the repair kit) --- Work with bind_stalker.script/actor_binder:on_item_drop/ ------------------------------------------------------------------------ function itemuse(what) local obj_name = what:name() if (string.find(obj_name, "repair_kit")) then use_repair_kit(what) -- If you want to add new trigger item, add script this line. end end ------------------------------------------------------------------------ --- The process of using of the repair kit ------------------------------------------------------------------------ function use_repair_kit(what) local repair_slot_num = 0 local item_in_slot_1 = db.actor:item_in_slot(1) local item_in_slot_2 = db.actor:item_in_slot(2) local item_in_slot_6 = db.actor:item_in_slot(6) if (item_in_slot_1 ~= nil) then repair_slot_num = 1 end if (item_in_slot_2 ~= nil) then if (repair_slot_num == 0) then repair_slot_num = 2 elseif (repair_slot_num == 1) then if (item_in_slot_1:condition() > item_in_slot_2:condition()) then repair_slot_num = 2 end end end if (item_in_slot_6 ~= nil) then if (repair_slot_num == 0) then repair_slot_num = 6 elseif (repair_slot_num == 1) then if (item_in_slot_1:condition() > item_in_slot_6:condition()) then repair_slot_num = 6 end elseif (repair_slot_num == 2) then if (item_in_slot_2:condition() > item_in_slot_6:condition()) then repair_slot_num = 6 end end end if (repair_slot_num == 1) then local rep_point = item_in_slot_1:condition() + 10 if (rep_point > 1) then rep_point = 1 end item_in_slot_1:set_condition(rep_point) elseif (repair_slot_num == 2) then local rep_point = item_in_slot_2:condition() + 10 if (rep_point > 1) then rep_point = 1 end item_in_slot_2:set_condition(rep_point) elseif (repair_slot_num == 6) then local rep_point = item_in_slot_6:condition() + 10 if (rep_point > 1) then rep_point = 1 end item_in_slot_6:set_condition(rep_point) end end That is all! Now we can add it to some trader. (It will be in another lesson.) That's all!Translation and editing : RafMadManP.S. Taken from Stalkerinside. Изменено 20 Июня 2015 пользователем RafMadMan 1 1 Ссылка на комментарий
qvvxvvq 111 Опубликовано 4 Июля 2015 Поделиться Опубликовано 4 Июля 2015 (изменено) Hyphenation of weapons from Call of Pripyat or Clear Sky in Shadow of Chernobyl from @StarterComplexity: highTools: 3ds max (from 9), SDK 0.4, and scripts 1. We throw in the scripts folder (... Autodesk / scripts). 2. Run 3DS Max and go to the tab Hud_С http://images.gameru.net/image/direct/e0665fb80f.png 3.Before that you need to take weapons from Call of Pripyat and hands. They are stored in a folder weapons (meshes\dynamics\weapons\hand) and there will also be animations for these weapons, and translate it into a format .skls. And translate it into a format .object with this program. 4. http://images.gameru.net/image/direct/b3e4d54eab.png 1. Model hands 2. Animations hand 3. List of animation 4. Download Model 5. Export model 6. Model weapons 7. Animations weapons 8. List of animations in weapon 9. Download animation 10. Playing once or infinity 11. Adjusting the position of the hands and arms 12. Export created animation 5. We choose a weapon. press Load Meshes. Further Export skin object. Further select the desired animated example Draw (from the left column) and Idle on the right and press Load Anims. Further Export Motion. And so with all. 6. Further go to the folder where you saved it all and upload it SDK 0.4. 7. Run SDK 0.4. http://images.gameru.net/image/direct/db7aa0a975.png 1) List textures. 2) Animations. Once you download them there will be a list of. 3) Download Animation \ Animations 8. Press Append. Load animation. 9. Press Bone Parts>Reset to Default>OK. http://images.gameru.net/image/direct/60c88485f7.png 10. Save. File>Export>Export OGF. http://images.gameru.net/image/direct/dd6da11362.png https://www.youtube.com/watch?v=J5kiQGRyxEo Test your skills Download http://rghost.ru/8TM75pdG7 Translation - PlayMod. Write to me if that.Thanks - @Starter,@ОТИС Изменено 4 Июля 2015 пользователем PlayMod 3 Ссылка на комментарий
RafMadMan 85 Опубликовано 14 Октября 2015 Поделиться Опубликовано 14 Октября 2015 (изменено) How to create your first quest? Creation of simple dialog.Let‘s start the process of creation of our quest from creating a small dialog. We open file gamedata\config\gameplay\character_desc_escape.xml and do this:- find string <actor_dialog>escape_trader_done_blockpost_box</actor_dialog> - and add after it a new one - <actor_dialog>escape_trader_oops</actor_dialog> - then we save changes.We have just added a new dialog branch to trader "Sidorovich", but not even a branch - just a link on it. The structure of the dialog is situated in file gamedata\config\gameplay\dialogs_escape.xml whicj we open and do this:- we find some free space between </dialog> and <dialog id="..."> - and add there a such construction: <dialog id="escape_trader_oops"> <precondition>escape_dialog.trader_alredy_give_job</precondition> <has_info>tutorial_end</has_info> <phrase_list> <phrase id="0"> <text>escape_trader_oops_0</text> <next>1</next> </phrase> <phrase id="1"> <text>escape_trader_oops_1</text> <next>2</next> </phrase> <phrase id="2"> <text>escape_trader_oops_2</text> <next>3</next> </phrase> <phrase id="3"> <text>escape_trader_oops_3</text> </phrase> </phrase_list> </dialog> - and save changes. Now we have a structure of a new dialog branch. But we have to do one more thing - to write strings, which actor will see in game instead of escape_trader_oops_....For it let‘s open a file gamedata\config\text\rus\stable_dialogs_escape.xml and do this:- find some free space between </string> и <string id="..."> - and write there such strings: <string id="escape_trader_oops_0"> <text>Hey, sidor, we can talk about... vodka?</text> </string> <string id="escape_trader_oops_1"> <text>Vodka? Are you kidding me? I have no vodka! But I remember that Wolf had hidden some on attic... Can you get it for me?</text> </string> <string id="escape_trader_oops_2"> <text>All right, then... I‘ll find some.</text> </string> <string id="escape_trader_oops_3"> <text>Go, go...</text> </string> - save changes.So now we have a dialog. We can strat the game and test it. But now we have to "pin" a quest to this dialog. Creation of quest.To "pin" activation of quest to a dialog is very easy. Just open file gamedata\config\gameplay\dialogs_escape.xml and do this:- let‘s change the content of <phrase id="2"> in this way: <phrase id="2"> <text>escape_trader_oops_2</text> <give_info>quest_vodka_started</give_info> <next>3</next> </phrase> - and save changes.Now, after Gunslinger says: "All right, then... I‘ll find some." trader Sidorovich gives us a quest "Bring vodka". But don‘t hurry to test changes. We have only added a reference about our quest, though we didin‘t create it. Let‘s fix this mistake. Open file gamedata\config\gameplay\tasks_escape.xml and in the begining of the file add this: <game_task id="esc_test_vodka_task"> <title>Bring vodka</title> <!-- name of the quest --> <objective> <text>Bring vodka to trader</text> <icon>ui_iconsTotal_find_item</icon> <infoportion_complete>test_quest_vodka_given</infoportion_complete> </objective> <objective> <text>Return with vodka to trader</text> <map_location_type hint="esc_dinamit_to_volk">green_location</map_location_type> <object_story_id>Escape_novice_lager_volk</object_story_id> <infoportion_complete>test_quest_vodka_given</infoportion_complete> </objective> <objective> <text>Find vodka on the attic</text> <map_location_type hint="escape_trader">blue_location</map_location_type> <object_story_id>Escape_Trader</object_story_id> <infoportion_complete>test_quest_vodka_given</infoportion_complete> </objective> </game_task> We have just wriiten the data of quest: icons, names of it parts, loction of markers and so on. We will return to this file in future, because a lot of things in it were made quickly and we didn‘t pay enough attention to it. I dont‘ know how to make the quest "Return with vodka to trader" appear in PDA, but i think it is not so bad - it works and we have no problems with the game. Let‘s continue. Let‘s open file gamedata\config\gameplay\info_l01escape.xml and registrate in it some new infoportions(we will use them to start and to complete the quest). - after string <game_information_portions> write this: <info_portion id="test_quest_vodka_given"></info_portion> <info_portion id="quest_vodka_started"> <task>esc_test_vodka_task</task> </info_portion> <info_portion id="dont_want_to_bring_vodka"></info_portion> That is all with infoportions.Now let‘s make some "small" but very important things - tips on the screen, which we can see when we start/end the quest. For it let‘s open a file gamedata\config\text\rus\string_table_tasks_escape.xml and write this: <string id="esc_test_bring_vodku"> <text>Bring vodka</text> </string> <string id="esc_test_bring_vodku_1"> <text>Find vodka on the attic</text> </string> <string id="esc_test_bring_vodku_2"> <text>Bring vodka to trader</text> </string> Now we can test it. Now we can begin the third part. We forgot to give player ability to complete the quest. Realization of ability to complete the quest.It is no so hard as it seems. All conditions are already created, now we only have to use them in the dialog. Let‘s change it: make it structure more branched and functional: 0. Hey, sidor, we can talk about... vodka? (switch-over to 1)1. Vodka? Are you kidding me? I have no vodka! But I remember that Wolf had hidden some on attic... Can you get it for me? (choice - switch-over to 2,4,5; initially we can use only 2)2. All right, then... I‘ll find some. (we start the quest , switch-over to 3, after this frase it disappears)3. Go, go... (the end of the dialog)4. Here is it!(appears only if actor has vodka in invertory, when you choose this answer vodka "carries" to trader, quest completes, switch-over to 7)5. Sorry, but i have no vodka... Can you wait some more?(appears only if we start the quest, switch-over to 6)6. Get out of here! Don‘t come back without vodka!!!(switch-over to 8)7. Oh, God... Yes, yes, now give it to me! Thank you, here is your reward.(gives player a reward, switch-over to 8)8. Fuck you!(the end of the dialog) That‘s how it looks in file gamedata\config\gameplay\dialogs_escape.xml: <dialog id="escape_trader_oops"> <precondition>escape_dialog.trader_alredy_give_job</precondition> <has_info>tutorial_end</has_info> <phrase_list> <phrase id="0"> <text>escape_trader_oops_0</text> <next>1</next> </phrase> <phrase id="1"> <text>escape_trader_oops_1</text> <next>2</next> <next>4</next> <next>5</next> </phrase> <phrase id="2"> <dont_has_info>quest_vodka_started</dont_has_info> <text>escape_trader_oops_2</text> <give_info>quest_vodka_started</give_info> <next>3</next> </phrase> <phrase id="3"> <text>escape_trader_oops_3</text> <action>dialogs.break_dialog</action> </phrase> <phrase id="4"> <text>escape_trader_oops_4</text> <precondition>escape_dialog.have_a_vodka</precondition> <action>escape_dialog.give_vodku</action> <next>7</next> </phrase> <phrase id="5"> <has_info>kvest_vodka_started</has_info> <text>escape_trader_oops_5</text> <next>6</next> </phrase> <phrase id="6"> <text>escape_trader_oops_6</text> <next>8</next> </phrase> <phrase id="7"> <text>escape_trader_oops_7</text> <give_info>test_quest_vodka_given</give_info> <action>escape_dialog.transfer_deneg</action> <next>8</next> </phrase> <phrase id="8"> <text>escape_trader_oops_8</text> </phrase> </phrase_list> </dialog> Now let‘s add to games such scripts as "giving money" and "giving vodka". Open file gamedata\scripts\escape_dialog.script and before separator(delimiter) Trader add such strings: function transfer_deneg(first_speaker, second_speaker) dialogs.relocate_money(second_speaker, 4000, "in") end function give_vodku (npc, actor) dialogs.relocate_item_section(npc, "vodka", "out") end function have_a_vodka (stalker, player) return stalker:object ("vodka") ~= nil end That‘s all! Now we can test our quest in game! Addition.If we change th e begining of our dialog in dialogs_escape.xml to this(code below), our branch wiil disappear after we complete the quest: <dialog id="escape_trader_oops"> <precondition>escape_dialog.trader_alredy_give_job</precondition> <has_info>tutorial_end</has_info> <dont_has_info>test_quest_vodka_given</dont_has_info> <phrase_list> But I didn‘t test it, so beware :^) That's all!Translation and editing : RafMadManP.S. Taken from Stalkerinside. And sorry for my not perfect English. If you have some problems with it - write me, may be I had made some mistakes in code/words. Изменено 14 Октября 2015 пользователем RafMadMan 3 Ссылка на комментарий
Vatt‘ghern 1 Опубликовано 13 Февраля 2016 Поделиться Опубликовано 13 Февраля 2016 (изменено) Creation of mark in PDA.Platform: CoP.Category: Scripts/Spawn. So, let‘s start, ok? We have connected(linked up) the location to game, situated map of location in the PDA, etc. And now we have a question: how to create a mark on the map in PDA? So, i‘ll tell you how to. For example: I have created an anomaly zone "Garbage" at linked up Pripyat(on the stadium). In alife_l11_pripyat.ltx: [137] ; cse_abstract properties section_name = space_restrictor name = zero_b1_spot ;any unique name position = 5.76249980926514,2.64950323104858,341.929992675781 ;centre of the circle, where we have to put the cursor to see the name/title of mark direction = 0,0,0 ; cse_alife_object properties game_vertex_id = 934 ;game vertex distance = 0 level_vertex_id = 214948 ;level vertex object_flags = 0xffffff3e custom_data = <<END [story_object] story_id = zero_b1_spot ;story_id (SID) of the mark END ; cse_shape properties shapes = shape0 shape0:type = sphere shape0:offset = 0,0,0 shape0:radius = 1 ; cse_alife_space_restrictor properties restrictor_type = 3 Then we built the spawn (Also - delete old all.spawn from the folder). Then we run the compilator. After compilation we get a file new.spawn, rename it into all.spawn and then find the folder gamedata/scripts. Open file pda.script. In this script there are registered different things in PDA, including marks on the map. We need only this table: local primary_objects_tbl = { {target="zat_b55_spot", hint="st_zat_b55_name"}, {target="zat_b100_spot", hint="st_zat_b100_name"}, {target="zat_b104_spot", hint="st_zat_b104_name"}, {target="zat_b38_spot", hint="st_zat_b38_name"}, {target="zat_b40_spot", hint="st_zat_b40_name"}, {target="zat_b56_spot", hint="st_zat_b56_name"}, {target="zat_b5_spot", hint="st_zat_b5_name"}, {target="zat_a2_spot", hint="st_zat_a2_name"}, {target="zat_b20_spot", hint="st_zat_b20_name"}, {target="zat_b53_spot", hint="st_zat_b53_name"}, {target="zat_b101_spot", hint="st_zat_b101_name"}, {target="zat_b106_spot", hint="st_zat_b106_name"}, {target="zat_b7_spot", hint="st_zat_b7_name"}, {target="zat_b14_spot", hint="st_zat_b14_name"}, {target="zat_b52_spot", hint="st_zat_b52_name"}, {target="zat_b39_spot", hint="st_zat_b39_name"}, {target="zat_b33_spot", hint="st_zat_b33_name"}, {target="zat_b18_spot", hint="st_zat_b18_name"}, {target="zat_b54_spot", hint="st_zat_b54_name"}, {target="zat_b12_spot", hint="st_zat_b12_name"}, {target="zat_b28_spot", hint="st_zat_b28_name"}, {target="zat_b103_spot", hint="st_zat_b103_name"}, {target="jup_b1_spot", hint="st_jup_b1_name"}, {target="jup_b46_spot", hint="st_jup_b46_name"}, {target="jup_b202_spot", hint="st_jup_b202_name"}, {target="jup_b211_spot", hint="st_jup_b211_name"}, {target="jup_b200_spot", hint="st_jup_b200_name"}, {target="jup_b19_spot", hint="st_jup_b19_name"}, {target="jup_a6_spot", hint="st_jup_a6_name"}, {target="jup_b25_spot", hint="st_jup_b25_name"}, {target="jup_b6_spot", hint="st_jup_b6_name"}, {target="jup_b205_spot", hint="st_jup_b205_name"}, {target="jup_b206_spot", hint="st_jup_b206_name"}, {target="jup_b32_spot", hint="st_jup_b32_name"}, {target="jup_a10_spot", hint="st_jup_a10_name"}, {target="jup_b209_spot", hint="st_jup_b209_name"}, {target="jup_b208_spot", hint="st_jup_b208_name"}, {target="jup_a12_spot", hint="st_jup_a12_name"}, {target="jup_b212_spot", hint="st_jup_b212_name"}, {target="jup_b9_spot", hint="st_jup_b9_name"}, {target="jup_b201_spot", hint="st_jup_b201_name"}, {target="jup_a9_spot", hint="st_jup_a9_name"}, {target="pri_a28_spot", hint="st_pri_a28_name"}, {target="pri_b36_spot", hint="st_pri_b36_name"}, {target="pri_b303_spot", hint="st_pri_b303_name"}, {target="pri_b301_spot", hint="st_pri_b301_name"}, {target="pri_a17_spot", hint="st_pri_a17_name"}, {target="pri_b306_spot", hint="st_pri_b306_name"}, {target="pri_a16_spot", hint="st_pri_a16_name"}, {target="pri_a25_spot", hint="st_pri_a25_name"}, {target="pri_b35_spot", hint="st_pri_b35_name"}, {target="pri_a21_spot", hint="st_pri_a21_name"}, {target="pri_b304_spot", hint="st_pri_b304_name"}, {target="pri_a18_spot", hint="st_pri_a18_name"}, {target="pri_b307_spot", hint="st_pri_b307_name"} } Here we have to register our mark. It doesn‘t matter where to register; just keep to/follow the syntax. For example, find this string: {target="jup_a9_spot", hint="st_jup_a9_name"}, And after it add: {target="zero_b1_spot", hint="st_zero_b1_name"}, If you want to register it at the end if the table, then to this string: {target="pri_b307_spot", hint="st_pri_b307_name"} add in the end add comma; under it add our mark, but now - without a comma in the end. Eh, like this, i think: {target="pri_b307_spot", hint="st_pri_b307_name"}, {target="zero_b1_spot", hint="st_zero_b1_name"} zero_b1_spot - SID of our mark, st_zero_b1_name - id of our mark. Then close this file and save changes. Oh, and now go to the folder configs/text/somefile(At this moment I could make a mistake, ‘cos I don‘t know how does this folder differ from english one, but I exactly know that it differs. So, just find folder with the "string_.." files(like "string_table_enc_equipment.xml" and so on)), open any file you want and add somewhere this: <string id="st_zero_b1_name"> <text>Here you write the text, that appears when cursor is on mark.</text> </string> I hope you undestand why xml-section is called "st_zero_b1_name". Also, I want to add, that all names of marks in vanilla CoP are situated in the file configs/text/st_land_names.xml (IT‘S IMPORTANT: I don‘t know where the string-files in english version of CoP are situated, so be carefull.) Author: Zero cool (cavenagi) (uin-1514138).Translation: I asked man called RafMadMan(Yup, I know he‘s from Russia(I can speak Russian, not fluently but can.)) to translate it for me, and he asked me to post it here. So, it isn‘t my work, I take no credits for posting it here. Изменено 13 Февраля 2016 пользователем Vatt‘ghern Добавлено Black Hawk, 20 Февраля 2016 Автор поста клон забаненного RafMadMan. Ссылка на комментарий
Vatt‘ghern 1 Опубликовано 13 Февраля 2016 Поделиться Опубликовано 13 Февраля 2016 add in the end add comma Here‘s a small mistake, it must be like this "add in the end a comma". Ссылка на комментарий
Vatt‘ghern 1 Опубликовано 20 Февраля 2016 Поделиться Опубликовано 20 Февраля 2016 (изменено) Cretaion of moving anomaly. Platform: CoP. Category: Configs/Spawn. Today I want to tell you how to create moving anomalies in your mod in CoP. You can find configs of these anomalies here gamedata\configs\zones\: ● fireball_zone - fire anomaly (Zaton. In cave under burned village and in the anomaly "Circus") ● fireball_electric_zone - electro-anomaly (Like one in vagon near bunker of scientists.) ● fireball_acidic_zone - chemical anomaly (Pripyat. Anomaly between blocks of flats.) First you must create anm-file, and put it here gamedata\anims\camera_effects\scenario_cam\name_of_location\. Then decompile all.spawn and create in alife-file of location you need a section of anomaly: [9000] ; a number of new section, that differs from all the others in this file ; cse_abstract properties section_name = fireball_zone ; name of the section, or "the name of anomaly" name = fireball_zone_test ; name of the obkect position = x, y, z ; coordinates of the start point(point where anomaly starts moving) direction = 0,0,0 ; cse_alife_object properties game_vertex_id = <numeral value> ; game_vertex of the start point distance = 0 level_vertex_id = <numeral value> ; level_vertex of the start point object_flags = 0xffffff3e ; cse_shape properties shapes = shape0 shape0:type = sphere shape0:offset = 0,0,0 shape0:radius = 1 ; cse_alife_space_restrictor properties restrictor_type = 3 ; cse_alife_custom_zone properties max_power = 0 ; cse_motion properties motion_name = camera_effects\scenario_cam\myanim.anm ; anm-file of the way, which anomaly follows while moving ; se_zone_torrid properties Then save changes, compile all.spawn and put it into your mod folder .../gamedata/spawns/. Addiction: - way in anm-file must start from the point which is reported in spawn - way of the anomaly should be in form of the circle Author: tracker. Translation: RafMadMan. Posting: Me. Изменено 20 Февраля 2016 пользователем Vatt‘ghern Добавлено Black Hawk, 20 Февраля 2016 Пункт 1.2. - клонирование с целью обхода блокировки. Клон заблокированного пользователя RafMadMan. Блокировка навсегда. 1 Ссылка на комментарий
Рекомендуемые сообщения
Создайте аккаунт или авторизуйтесь, чтобы оставить комментарий
Комментарии могут оставлять только зарегистрированные пользователи
Создать аккаунт
Зарегистрировать новый аккаунт в нашем сообществе. Это несложно!
Зарегистрировать новый аккаунтВойти
Есть аккаунт? Войти.
Войти