Samber13 227 Опубликовано 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: How to create 'sleep zone' in COP (Показать) 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[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"}, } { {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"}, }{ {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" } 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" } 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 Калькулятор номера билда. Поделиться этим сообщением Ссылка на сообщение